You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/08/03 06:28:44 UTC

[GitHub] [incubator-nuttx] nealef opened a new issue, #6767: round() problems with NaN

nealef opened a new issue, #6767:
URL: https://github.com/apache/incubator-nuttx/issues/6767

   `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.)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] fjpanag commented on issue #6767: round() problems with NaN

Posted by GitBox <gi...@apache.org>.
fjpanag commented on issue #6767:
URL: https://github.com/apache/incubator-nuttx/issues/6767#issuecomment-1235664116

   @nealef Thank you for pointing this out.
   
   This is a fairly trivial fix. Would you like to contribute to NuttX by submitting a PR?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx] xiaoxiang781216 closed issue #6767: round() problems with NaN

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 closed issue #6767: round() problems with NaN
URL: https://github.com/apache/incubator-nuttx/issues/6767


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org