View Full Version : confuse with floating point type in OpenVG specification.

06-25-2007, 12:49 AM
dear all:
in OpenVG spec. page 8(page 18 in PDF reader)
" ...at least 16 bits mantissa, and 6 bits for exponent....."

but in OpenVG page 9 (page 19 in PDF reader)
".. all implement must define VG_MAX_FLOAT to be at least 10^10..."

the precision s6.16 can not represent 10^10 correctly.....
so strange.

06-25-2007, 02:54 AM
Hm, it's close: 10^10 is 2^33.2, while a s16e6 number with exponent biased by 31 can represent 1.999 * 2^32.
So you either need to increase the bias by one or use a wider exponent. But I guess the intention was to allow s16e7, i.e. 24 bit floating point. 23 bit numbers seem quite odd.