GNU bug report logs - #74760
29.4; Calc : calcFunc-rate does not produce negative results

Previous Next

Package: emacs;

Reported by: Ting Boon Ghee <tingbg <at> gmail.com>

Date: Tue, 10 Dec 2024 05:11:02 UTC

Severity: normal

Found in version 29.4

Full log


Message #17 received at 74760 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 74760 <at> debbugs.gnu.org, Ting Boon Ghee <tingbg <at> gmail.com>
Subject: Re: bug#74760: 29.4; Calc : calcFunc-rate does not produce negative
 results
Date: Tue, 10 Dec 2024 17:00:08 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> Isn't it true that in the financial world there are no negative rates,
> only positive rates written in red color?  Maybe this explains what
> you see?

It's probably not related but: this part of `calc-fin-rate' is clearly
suspicious:

      (calc-to-percentage
       (calc-normalize
	(cons (if (calc-is-hyperbolic) 'calcFunc-ratel
		(if (calc-is-hyperbolic) 'calcFunc-rateb ;; !@?!
		  'calcFunc-rate))
	      (calc-top-list-n n))))

Looks like one of those two identical `calc-is-hyperbolic' tests
must be replaced with `calc-is-inverse' (the second one?).


Michael.




This bug report was last modified 189 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.