Re: Floating point bugs on RP2040 and RP235X ?
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.
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 * |
`----------^--------------' `--------------^--------------' `--------------^--------------'
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Media centres
- Gaming
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion