Re:Google Trying to Solve a UUID
by cm2187 on Saturday August 06, 2022 @10:51AM
(#32368609)
Excel is also super dangerous. All numbers are stored as double, which means that if you open a csv file that contains large int64 ids, they will likely be rounded. And then there are dates, and people who still think it is a good idea to store dates in a US or European format in a csv file rather than something unambiguous and universal (yyyy-mm-dd).
[ Parent
| on HN ]
Re:Google Trying to Solve a UUID
by joshspankit on Saturday August 06, 2022 @12:51PM
(#32369653)
That’s garbage. If I input a number in to a spreadsheet I expect that number to stay exactly as-is.
That a Excel could introduce bugs due to doing floats behind the scenes.... Completely unacceptable.
Most programming languages don’t behave that way, either.
Why would we have to hold Excel to higher standards?
Now, that Excel stores binary floats, but tries to pretend to use decimal ones, that’s something I think we can blame it for.
From section 2 of https://people.eecs.berkeley.edu/~wkahan/Mindless.pdf:
Some parentheses in Microsoft’s Excel 2000 spreadsheet possess uncanny powers: Values Excel 2000 Displays for Several Expressions
Expression 1.23456789012345000E+00 <– Entered to help count digits
V = 4/3 displays… 1.33333333333333000E+00 Does Excel carry 15 sig. dec.?
W=V- 1 3.33333333333333000E-01 Whence comes the 15th 3 ?
X = W*3 1.00000000000000000E+00 Where went all 15 of the 9s ?
Y=X- 1 0.00000000000000000E+00 They all went away !
Z = Y*2^52 0.00000000000000000E+00 Really all gone.
(4/3 - 1)*3 - 1 0.00000000000000000E+00 Yes, gone.
((4/3 - 1)*3 - 1) -2.22044604925031000E-16 (But not ENTIRELY gone !)
((4/3 - 1)*3 - 1)*2^52 -1.00000000000000000E+00 Excel’s arithmetic is weird.
Re:Google Trying to Solve a UUID
by joshspankit on Saturday August 06, 2022 @07:36PM
(#32372567)
> Why would we have to hold Excel to higher standards?
Because one of it’s main uses is for doing calculations with money?
must be new here .. :)
Re:Google Trying to Solve a UUID
by joshspankit on Saturday August 06, 2022 @01:18PM
(#32369863)
Hahahaha
I appreciate that comeback. Well played.
I've seen a lot of compliance tests for credit card processing. These frequently will be Excel sheets with series of test descriptions. For example "Run a $12.45 sale on card number XXXXX with a tax amount of $1.73 and a shipping address of 1234 Main Street, 70242." Inevitably the card numbers are rounded. If you paste in a timestamp for the transaction result, that gets cast weirdly. I end up reworking the default formats for the sheet so that things will not be clobbered.
Re:Google Trying to Solve a UUID
by happyopossum on Saturday August 06, 2022 @11:32AM
(#32368976)
That doesn’t sound like a dengerous excel problem, it sounds like a sloppy ETL problem. Don’t import data blindly - check the date formats for example.
That's nice in theory, but in practice people do it. https://www.theverge.com/2020/8/6/21355674/human-genes-renam...