> On Dec 17, 2018, at 1:50 PM, Thomas Kurz <sqlite.2...@t-net.ruhr> wrote: > > Can someone explain to me why it has been defined this way? Having 1 bit > sign, 11 bit exponent, and 52 bit mantissa, I would have stored the (in the > meantime well known) number 211496.26 as 21149626E-2, i.e. I would have > stored a 52 bit integer number and appropriate exponent. This way there > should be no rounding errors and one would always have a guaranteed precision > of ~15 significant digits.
You’re asking why we don’t use base-10 exponents instead of base-2? It’s because calculations on such numbers are much slower and more complex than binary. (You might as well ask why integers are stored as binary instead of BCD!) —Jens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users