• S
    math: rewrite rounding functions (ceil, floor, trunc, round, rint) · d1a2ead8
    Szabolcs Nagy 提交于
    * faster, smaller, cleaner implementation than the bit hacks of fdlibm
    * use arithmetics like y=(double)(x+0x1p52)-0x1p52, which is an integer
    neighbor of x in all rounding modes (0<=x<0x1p52) and only use bithacks
    when that's faster and smaller (for float it usually is)
    * the code assumes standard excess precision handling for casts
    * long double code supports both ld80 and ld128
    * nearbyint is not changed (it is a wrapper around rint)
    d1a2ead8
roundl.c 709 字节