l_fp, time, calendar

Gary E. Miller gem at rellim.com
Sun Mar 26 00:50:19 UTC 2017


Yo Hal!

On Sat, 25 Mar 2017 15:07:18 -0700
Hal Murray <hmurray at megapathdsl.net> wrote:

> Isn't that as simple as convert a 64 bit integer to float and divide
> by 1<<32 to get the right scale?

Nope.  Loss of precision.  A double only has 52 bits of significant
digits.  A float only 23.  To fully encode a 64 bit int you need
a long double with (usually) 80 significant bits.

Most Intel CPUs can do long double in hardware, so available for you
without much penalty.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
	gem at rellim.com  Tel:+1 541 382 8588

	    Veritas liberabit vos. -- Quid est veritas?
    "If you can’t measure it, you can’t improve it." - Lord Kelvin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ntpsec.org/pipermail/devel/attachments/20170325/4d7a6c83/attachment.bin>


More information about the devel mailing list