DEC 64: Decimal Floating Point by Douglas Crockford(dec64.org)
dec64.org
DEC 64: Decimal Floating Point by Douglas Crockford
http://dec64.org/
9 comments
>By giving programmers a choice of number types, programmers are required to waste their time making choices that don’t matter. Even worse, making a bad choice can lead to a loss of accuracy or destructive bugs.
So why not use BigDecimal? It's too slow? So performance is a reasonable selection criterion? But not performance of million ints vs a million DEC64s? o_0
So why not use BigDecimal? It's too slow? So performance is a reasonable selection criterion? But not performance of million ints vs a million DEC64s? o_0
[deleted]
IEEE 754-2008 already has standardised decimal formats: http://en.wikipedia.org/wiki/Decimal_floating_point#IEEE_754...
Crockford addresses that in passing at the end of the DEC64 page, claiming that IEEE 754's decimal floating point types were too inefficient to garner support.
Douglas Crockford talks about why he wants DEC 64 in this talk: http://vimeo.com/97419177 (jump to 41m:20s)
This has been brought up before and lots of issues were raised. Including multiple 0s and lack of normalization.
At least with IEEE 754 you can cast as an INT and collate. Putting the exponent in the lowest bits prevents that for DEC64. What were they thinking?