From: Ting Boon Ghee <tingbg@gmail.com>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 74760@debbugs.gnu.org
Subject: bug#74760: 29.4; Calc : calcFunc-rate does not produce negative results
Date: Wed, 11 Dec 2024 02:40:34 +0800 [thread overview]
Message-ID: <CAE5kas+D-NafCA-zGcyj=GVQUuhWToQmQ2_mP-f8LA3-qsouCA@mail.gmail.com> (raw)
In-Reply-To: <87v7vrsb5u.fsf@web.de>
[-- Attachment #1: Type: text/plain, Size: 1560 bytes --]
Thanks everyone for response.
These financial functions (and more) are available in spreadsheets such as
Libreoffice Calc. There is no restriction for Rate to be negative in
Libreoffice Calc. One way to look at this is, from investment perspective,
it just means the series of payments is less than the initial outlay,
resulting in negative return.
The Info manual describes the Rate function as an inverse of ‘pv’:
‘rate(N, PAYMENT, AMOUNT)’ computes the value of RATE such that ‘pv(RATE,
N, PAYMENT) = AMOUNT’. So let's try PV.
If Rate = -0.1, N = 1, PAYMENT = 90, calculate PV. Thus,
M-x calc <RET> _0.1 <RET> 1 <RET> 90 <RET> b P
Answer : 100
This means PV function can accept Rate as a negative number.
I stumbled upon this issue because I was trying to recreate a table that I
had done previously in Libreoffice Calc into an Org Table. The table uses
Rate function to calculate a series of returns with a range of negative to
positive returns. The negative returns generated errors in the table fields.
I suppose Emacs Calc was developed long ago to mimic handheld calculators.
I'd wonder whether anyone is still using it as a "handheld" financial
calculator. Such functions are most useful in spreadsheets. Emacs now has
an implementation of a spreadsheet in the form of Org Table that uses Emacs
Calc. This does mean that it is restricted to what Emacs Calc can provide.
A missing function that I wish for is the XIRR function available in other
spreadsheet softwares.
--
Best regards,
Boon Ghee
[-- Attachment #2: Type: text/html, Size: 1914 bytes --]
prev parent reply other threads:[~2024-12-10 18:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 16:44 bug#74760: 29.4; Calc : calcFunc-rate does not produce negative results Ting Boon Ghee
2024-12-10 13:22 ` Eli Zaretskii
2024-12-10 13:44 ` Ship Mints
2024-12-10 16:00 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-10 15:52 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-10 16:14 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-10 17:25 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-10 18:40 ` Ting Boon Ghee [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAE5kas+D-NafCA-zGcyj=GVQUuhWToQmQ2_mP-f8LA3-qsouCA@mail.gmail.com' \
--to=tingbg@gmail.com \
--cc=74760@debbugs.gnu.org \
--cc=michael_heerdegen@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).