About Double variables

We're currently working with the MEGA2560 and have encountered precision limitations when using the double data type.

Are there other hardware versions that support proper use of the double data type?

The AVR Arduino core doesn't support a double data type. The "double" in AVR code is just a "float" synonym

All of the 32bit processors (ARM, ESP) support actual 64bit doubles, but the alternatives with as many pins as a MEGA2560 are rare.
There is the Adafruit Grand Central M4 Express featuring the SAMD51 : ID 4064 : Adafruit Industries, Unique & fun DIY electronics and kits
(Note: 3.3V IO.)

I believe that all ARM boards either support double precision in software or in the case of the Cortex M7 boards using STM32H747XI (e.g. Giga) have a double precision hardware FPU.

Have you tried the fp64lib library? It appears to support the atmega2560.

You might be able to rewrite your equations to get around this trouble...
Or use 32 bit integers in part of your calculations...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.