trunc_to_inf and add an alias trunc_to_zero for regular trunc ??

On Saturday, March 12, 2016 at 1:49:41 PM UTC+2, Jeffrey Sarnoff wrote:
>
> 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