Post Reply 
Improve precision of float numbers
04-16-2019, 03:59 PM (This post was last modified: 04-17-2019 02:46 PM by Jonathan Busby.)
Post: #11
RE: Improve precision of float numbers
Have you thought of using a scheme like that used for DEC64? It has all the speed advantages of binary floating point along with all the accuracy benefits of BCD, plus, it supports a a larger range of values.

Each DEC64 value is represented as M*10^(e) where M is the 2's complement mantissa and e is the 2's complement exponent. In the DEC64 implementation, M is 56 bits and e is 8 bits. For an MCU, one could use exponents and mantissas that use fewer bits -- it doesn't affect the basic idea. The only semi computationally expensive process involved with DEC64 is the entry and display of the numbers, but, both of those processes can be executed very quickly.



Aeternitas modo est. Longa non est, paene nil.
Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Improve precision of float numbers - Jonathan Busby - 04-16-2019 03:59 PM

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