9999999999999999.0 – 9999999999999998.0
geocar.sdf1.org
9999999999999999.0 – 9999999999999998.0
1–10 of 83 posts
Re: 9999999999999999.0 – 9999999999999998.0
#2Re: 9999999999999999.0 – 9999999999999998.0
#3I wonder if there is a way to fool Wolfram in giving the wrong answer. Or ChatGPT?
Re: 9999999999999999.0 – 9999999999999998.0
#4 >>> 9007199254740993.0
9007199254740992.0
What's really surprising is that this number is only ~16 million in single precision floats.Re: 9999999999999999.0 – 9999999999999998.0
#5Floating point 101. And it almost never matters.
I take issue with this. Drift from floating point inaccuracies can compound quickly and dramatically affect results. Sure if you're just looping over a 1000 item list, it's not going to matter that JavaScript is representing that as a float/double, but in a wide variety of contexts, such as anything to do with money, it absolutely does matter.
Re: 9999999999999999.0 – 9999999999999998.0
#6Floating point 101. And it almost never matters.
Re: 9999999999999999.0 – 9999999999999998.0
#7Floating point 101. And it almost never matters.
BTW this is one of the reasons why you should never represent money as a float, except when making a rough estimate. Another, bigger reason is that 0.1 is an infinite repeating fraction in binary, so it can't be represented exactly.
Re: 9999999999999999.0 – 9999999999999998.0
#8Re: 9999999999999999.0 – 9999999999999998.0
#9Re: 9999999999999999.0 – 9999999999999998.0
#10 $ bc -l
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software
Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
9999999999999999.0 - 9999999999999998.0
1.0