lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On Wed, Sep 18, 2019 at 12:21 PM Coda Highland <chighland@gmail.com> wrote:
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