x = trunc(fp) yields fp rounded towards zero to the closest integer valued 
float.
What name would you give to the complementary function, rounding away from 
zero to the closest integer valued float?

stretch(fp)  = signbit(fp) ? floor(fp) : ceil(fp)   # abs(trunc(fp) - 
stretch(fp)) is 0.0 when fp is integer valued and is 1.0 otherwise



Reply via email to