Tester for exploring the mapping of a float to a real
To visualise the mapping and how you get the trade off between precision and range.
Use low precision, custom, float representations.
Convert via memcpy(3) and copious bit shifting to a Real
Even though Real is actually also a float (default double) at the moment, it's good enough to treat as being an exact representation
when the custom float is 8 bits. Besides, gnuplot can only plot within double precision anyway.
I say "custom" because I have an explicit sign bit for the exponent, which itself is unsigned.
I *think* standard representations have the exponent be a signed int so the sign bit is implied.
Not sure why the mantissa is treated as being unsigned with an explicit sign bit but the exponent isn't?
HFPA says the exponent is between e_min and e_max which is a bit confusing. Is e_min != -e_max normally?
Will do some plots and experiment a bit after sleep.
UCC git Repository :: git.ucc.asn.au