I have an .xlsx spreadsheet with a single number in the top-left cell of sheet 1.
The Excel UI displays:
-130.98999999999
This is v
Unfortunately, this is not the same number the user can see in Excel. Can anyone point me to an algorithm to obtain the same number the user sees in Excel?
I don't think that it is using an algorithm here. Excel uses IEEE754 double internally and I'd guess that it is just using a printf
style format when displaying the number:
$ python -c 'print "%.14g" % -130.98999999999069'
-130.98999999999
$ python -c 'print "%.14g" % -130.9899999999907'
-130.98999999999