lua-users home
lua-l archive

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


> Oh, and I wouldn't call the +-2^52 trick a hack. In fact all
> modern C compilers use a variation of it to implement floor(),
> ceil(), trunc() and round() if the FP is done in hardware, but
> doesn't have a special instruction for rounding (e.g. x87 does,
> SSE2 and most other FPUs don't).

Not being a hack for a compiler does not imply not being a hack for an
application. (Among other differences, compilers have fixed targets.)

-- Roberto