> On Sep 26, 2023, at 08:31, Tom Browder <tom.brow...@gmail.com> wrote:
> 
> On Mon, Sep 25, 2023 at 20:07 Bruce McCoy via gnucash-user <
> gnucash-user@gnucash.org> wrote:
> ...discussion of GnuCash's handling of numbers...
> 
> Does GnuCash use the Gnu Multiple Precision Arithmetic (GMP) library?

No. Like all infinite precision numerical methods it allocates from the heap 
and that makes it too slow. GnuCash uses a pair of stack-allocated 128-bit 
integers (see 
https://github.com/Gnucash/gnucash/blob/stable/libgnucash/engine/gnc-int128.hpp)
 to compose rational numbers 
(https://github.com/Gnucash/gnucash/blob/stable/libgnucash/engine/gnc-rational.hpp)
 for computation that's reduced to int64_t-based rationals 
(https://github.com/Gnucash/gnucash/blob/stable/libgnucash/engine/gnc-numeric.hpp)
 for presentation and storage. Intermediate results are reduced to help prevent 
overflows and a variety of rounding techniques are implemented in 
https://github.com/Gnucash/gnucash/blob/stable/libgnucash/engine/gnc-rational-rounding.hpp.

Regards,
John Ralls

_______________________________________________
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-----
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.

Reply via email to