Improve precision of float numbers
|
04-11-2019, 10:10 AM
Post: #1
|
|||
|
|||
Improve precision of float numbers
Hi all!
I like to build small RPN calculators (ScArY, SCOTT, ARC) with AVR microcontrollers (which are easy to program). Unfortunately these microcontrollers support float numbers with 4 byte single precision (due IEEE-754) only. That means they support a precision of 6 to 7 decimal digits. Now I would like to improve this precision to at least 9 decimal digits. The only idea I have is to define a new number format (struct) to separate mantissa and exponent: Code: struct real { But now I have to "reinvent" every mathematical operation like adding two numbers (the following code works, but is far from beeing efficient): Code: void realadd(real * res, real a, real b) { Looking forward to transzendent functions or complex numbers I feel overstrained. Do you have any other idea how to raise the precision with less effort? Thanks for any idea. deetee |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)