On 2014-05-22 11:30, Torbjörn Granlund wrote: > ALso, I expect this to be tricky to implement in a portable and correct > way. Are you willing to make the assumption that doubles have 53 bits of precision? If you do, it's easy enough to implement.