diff mercurial/help/hg.1.txt @ 24016:fb93721cc229

util: add getbefloat64 As far as I can tell, this is wrong. double's format isn't strictly specified in the C standard, but the wikipedia article implies that platforms implementing optional Annex F "IEC 60559 floating-point arithmetic" will work correctly. My local C experts believe doing *((double *) &t) is a strict aliasing violation, and that using a union is also one. Doing memcpy appears to be the least-undefined behavior possible.
author Augie Fackler <augie@google.com>
date Tue, 03 Feb 2015 13:17:21 -0500
parents 9c963a43ecfb
children 8fe5fc8d7b8e
line wrap: on
line diff