UPDATE: negative rate

Derek Atkins warlord at MIT.EDU
Wed Mar 9 11:40:11 EST 2005

"Vijay Vishvas Dharap" <vijay_dharap at infosys.com> writes:

> And I just used the functions[_fi_calc_interest and functions required
> by it] listed there as I cannot use the whole application as its ported
> only to linux.

Not quite. Gnucash works fine on Linux, *BSD, Solaris, MacOS X, IRIX,
and a number of other OSes.

> Furthermore I converted the functions listed in that place into java
> class for my work.

I suspect a bug in your Java, then.

> I have attached the code that I used in java. Only minimal changes were
> done from actual C source code needed for compilation purposes.
> Now when I use this function of rate and provide the specified values,
> I get positive value of the rate.
> But same values when given to VB function rate, gives me negative rate.
> i.e. -1.98245150
> Whenever the VB rate is giving positive values, the values by my rate
> function matches with the VB rate function. But for negative values, I
> don't get correct values.
> Now probably I am clearer about discrepancy I am talking about.

Could be a bug in VB.  Could be a bug in your Java.  I suspect it's
possible that our code doesn't handle negative rates.

> Regards,
> Vijay


       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-devel mailing list