More digit in currency
Derek Atkins
warlord at MIT.EDU
Fri Jun 25 09:03:53 EDT 2004
linas at linas.org (Linas Vepstas) writes:
>> > Price column of the Edit Invoice form (in menu Business|Customer|New
>> > Invoice)
>
> Ah ha! I tried this in cvs head, and tried to create the most minimal
> customer and invoice possible, and got a hard crash ...
>
> /usr/bin/guile: relocation error:
> /opt/gnucash/lib/gnucash/libgnc-business-ledger.so.0: undefined symbol:
> gnc_option_db_lookup_taxtable_option
Hmm, this is unfortunate.. HEAD is working for me. :(
>> Interesting. It looks like yet another bug in the gnc_numeric math.
>
> I'm guessing its probably in the flags that are being specified
> (i.e. the rounding mode, etc.) The flags are poorly documented and
> have bizarre side effects sometimes ... Although ... price ... hmm.
> prices involve multiplication ... and overflow problems is why I wrote
> the 128-bit math lib ...
Unfortunately the math-lib works, but it's using 64-bit math. In this
particular case the number fits into 64-bits but NOT into 63 bits, so
the check for a "carry" is wrong.
>> No need. You've already provided enough information for me to
>> reproduce the problem here. Linas, can you reproduce it there? Or
>> have you never played with the business features at all.
>
> Did you reproduce in 1.8.9 or in cvs head? Does it repro in head,
> or did the 128-bit lib make use lucky?
I checked in both trees. The problem is clearly a 'carry' problem
with numbers >= 2^63 and < 2^64 because bignum.hi == 0 but the
number wont fit in a gint64.
-derek
--
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-user
mailing list