We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

hippy
Posts: 19831
Joined: Fri Sep 09, 2011 10:34 pm

Re: Floating point bugs on RP2040 and RP235X ?

Mon Oct 27, 2025 8:22 pm

Seems to me there are inconsistencies, divergences and discrepancies, with respect to IEEE 754 itself, within implementations, between 32-bit and 64-bit, even between compiler libraries, and with respect to RP2 documentation.

Which are issue and which are not would seem to depend on which definitive truth one wishes to use and what one's expectations would be.

Code: Select all

 .--------------. .--------------.--------------. .--------------.--------------.
 | Pi 4B | | RP2 32-bit | Compiler Lib | | RP2 64-bit | Compiler Lib |
 .----------|--------------| |--------------|--------------| |--------------|--------------|
 | 00000000 | 0.000000 | | 0.000000 | 0.000000 | | 0.000000 | 0.000000 |
 | 0000FFFF | 0.000000 | | 0.000000 | 0.000000 | | 0.000000 | 0.000000 |
 | 80000000 | -0.000000 * | | 0.000000 | 0.000000 | | 0.000000 | 0.000000 |
 | 8000FFFF | -0.000000 | | -0.000000 * | 0.000000 * | | 0.000000 * | -0.000000 * |
 | 7F800000 | inf | | inf | inf | | inf | inf |
 | 7F80FFFF | nan | | nan * | nan * | | inf * | nan * |
 | FF800000 | -inf | | -inf | -inf | | -inf | -inf |
 | FF80FFFF | -nan * | | nan * | nan * | | -inf * | nan * |
 `----------^--------------' `--------------^--------------' `--------------^--------------'

Return to "SDK"

AltStyle によって変換されたページ (->オリジナル) /