Hi,

I have been looking at the fp-bit code and noticed:
/* numeric parameters */
/* F_D_BITOFF is the number of bits offset between the MSB of the mantissa
   of a float and of a double. Assumes there are only two float types.
   (double::FRAC_BITS+double::NGARDS-(float::FRAC_BITS-float::NGARDS))
 */
#define F_D_BITOFF (52+8-(23+7))


I would guess the comment has a typo and should be
(double::FRAC_BITS+double::NGARDS-(float::FRAC_BITS+float::NGARDS))
instead.

In my port I am having some trouble with the truncation from df to sf.
I wonder if there's any doc reference upon which the code was based to do the truncation. I can't really find anything and even though the code is not hard I am still missing something.

Cheers,

--
PMatos

Reply via email to