Why Nostr? What is Njump?
2024-04-17 04:00:29

Vile Lasagna on Nostr: Getting some frustrating but interesting results from all of this floating point ...

Getting some frustrating but interesting results from all of this floating point shenanigans though....

So, the same variable assigned to -3.8 reads, when assigned to a float

-3.7999999523162841796875

But, when assigned to a double,

-3.7999999999999998223643160599749535322189331054687

So comparing both the difference is also annoyingly big:

0.00000004768371564267681605997495353221893310546875

10^-8 is... uncomfortably big? It's making me wonder if my whole idea is flawed because of this
Author Public Key
npub1dn05pw4j3exndwsqsxv04nm50txppfnsfpqexlqsvfk55q8gwrrsh9pfj0