However, there are six different ways that a C implementation could choose to implement number formatting, five of which are documented in IEEE-754:
* Round towards 0 * Round towards +inf * Round towards -inf * Round towards nearest, ties to even * Round towards nearest, ties away from 0 * Truncate decimal representation
It occurs to me that truncating the decimal representation is actually equivalent to rounding towards 0, so that's only five after all and all of them are documented. Wasn't thinking about that.
/s/ Adam
Not for negative numbers. |