Post Reply 
Improve precision of float numbers
04-14-2019, 05:56 AM
Post: #8
RE: Improve precision of float numbers
Hi agarza!

(04-13-2019 02:03 PM)agarza Wrote:  What I did was to to use uint64_t (which gcc does support) and map it to a new float-64 type.
(see post: https://www.hpmuseum.org/forum/thread-12761.html)

Wow - thanks for this hint. I tried that before, but did not recognize that only Serial.Print doesn't support int64_t.

So my first attempt
Code:
struct real {
  long m;
  int8_t e;
};
can be changed to
Code:
struct real {
  int64_t m;
  int8_t e;
};
... and I can calculate with an (at least) 18 digit precision.

Can you tell me more how to "map it to a new float-64 type" - I didn't find a hint to it in your post?
Do I still have to reinvent mathematical functions?
How did you do it with your DIY calculator?

Regards deetee

PS: I like your DIY calculator - the front view, the custom PCB and how you managed to run the LCD display (I know these displays are really tricky to drive),
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Improve precision of float numbers - deetee - 04-14-2019 05:56 AM



User(s) browsing this thread: 1 Guest(s)