nuttx
nuttx copied to clipboard
round() problems with NaN
round() and roundf() (and presumably roundl()) don't return the correct value for NaN. Instead it is returning 0. Do these functions require a check such as:
if (isinf(x) || isnan(x))
return (x);
Prior to performing the rounding operation? (The check for infinity just saves having to go through the rest of the process.)