Hey all, I'm designing an application using PIC microcontrollers (PIC18 8 bit series or PIC24 16 bit series, still undecided) which requires the use of high precision math.
I need the precision of a 64 bit floating point type (in C) but none of the compilers support it except for Microchip C30 for the 16 bit PICs.
The only problem with that one is that the math functions (trig, log, etc...) only have a precision of a 32 bit float. Other options include using a math coprocessor but all the ones I've seen are only 32 bit floating point capable.
Another option is to use software math libraries such as MAPM. I got MAPM to compile and run to a certain extent, but since this is a library designed for real computers and not hardware-limited microcontrollers, I was only able to get it to work only to a certain number of decimal places before I ran out of memory.
The very very last option is to use the PIC32 microcontroller who's compiler supports 64 bit floating point data types will optimized, high precision math functions. However - I really don't want to have to use this chip. I'd much rather use the PIC18 series or the 16 bit series.
What should I do? Does anyone know of a 64 bit math coprocessor? Or another way to get this level of precision that I need? It seems to me that the most reasonable option right now (if there is no 64 bit math coprocessor available) is to use the 16 bit PIC with the C30 compiler and use the 64 bit floats and reimplement the math functions myself.
What do you guys think?
I need the precision of a 64 bit floating point type (in C) but none of the compilers support it except for Microchip C30 for the 16 bit PICs.
The only problem with that one is that the math functions (trig, log, etc...) only have a precision of a 32 bit float. Other options include using a math coprocessor but all the ones I've seen are only 32 bit floating point capable.
Another option is to use software math libraries such as MAPM. I got MAPM to compile and run to a certain extent, but since this is a library designed for real computers and not hardware-limited microcontrollers, I was only able to get it to work only to a certain number of decimal places before I ran out of memory.
The very very last option is to use the PIC32 microcontroller who's compiler supports 64 bit floating point data types will optimized, high precision math functions. However - I really don't want to have to use this chip. I'd much rather use the PIC18 series or the 16 bit series.
What should I do? Does anyone know of a 64 bit math coprocessor? Or another way to get this level of precision that I need? It seems to me that the most reasonable option right now (if there is no 64 bit math coprocessor available) is to use the 16 bit PIC with the C30 compiler and use the 64 bit floats and reimplement the math functions myself.
What do you guys think?
Last edited: