Subject: bug#27765: 26.0.50; Calc b% and relch are inconsistent in algebraic and rpn modes

From: Mattias Engdegård <[email-masked]>
Date: Fri, 3 Sep 2021 11:22:15 +0200

3 sep. 2021 kl. 10.12 skrev Lars Ingebrigtsen <[email-masked]>:

> But perhaps others have other opinions; I've added Mattias to the CCs --
> perhaps he has some comments.

I'm afraid I have nothing clever to say about it. It seems understandable that `relch`, or `calcFunc-relch` in Lisp, follows the convention of just returning the value and not concern itself with its presentation. `b%` is an interactive command and therefore may take an interest in how the result is presented to the user. A weak argument, but perhaps it makes some sort of sense.

I have no idea what would break if we changed `calcFunc-relch` to return something like `(calcFunc-percent 25)` instead of 0.25. Maybe it just works.

Regarding the uniform display of percentages in org-mode: spreadsheet applications tend to use formatting of cells or columns when a certain presentation (like percentage or a certain number of decimals) is desirable. On the other hand, some functions in popular spreadsheets do return values adorned with a presentation hint; this is the case for financial functions that compute interest, for example.

Maybe Calc assumes that someone who uses b% is a HP-12C type of person and wants a percentage, while those using algebraic mode get plain values.