Barry Schwartz 🫖 on Nostr: It turns out there is a very simple way compute the square root while purposely never ...
It turns out there is a very simple way compute the square root while purposely never underestimating it: Heron’s method, initialized with the maximum of 1 and the number whose root you are taking.
Just be sure NOT to run the algorithm to the full precision of the floating point type!
Published at
2023-06-21 14:16:55Event JSON
{
"id": "545d02937cfec74219ccc9ba6d95720c8d849a4355777725df616ec7ae6d581b",
"pubkey": "3c8c92ad926987dff5631a61915bfcee930320713933de82b2c9ae0eb189e03c",
"created_at": 1687357015,
"kind": 1,
"tags": [
[
"mostr",
"https://masto.ai/users/chemoelectric/statuses/110582629379999726"
]
],
"content": "It turns out there is a very simple way compute the square root while purposely never underestimating it: Heron’s method, initialized with the maximum of 1 and the number whose root you are taking.\n\nJust be sure NOT to run the algorithm to the full precision of the floating point type!",
"sig": "e5520f1c009212977a0aea70156cda67bf9763c302884dee9b76bbbfd63c236cd3278e50d9b29c7863baa5b0ffa84f25b657ba146d5ef1aec0a575865557b769"
}