From: Jelle Licht <jlicht@fsfe.org>
To: "Mattias Engdegård" <mattiase@acm.org>,
"Stefan Kangas" <stefan@marxist.se>
Cc: David Gillespie <daveg@synaptics.com>, 47302@debbugs.gnu.org
Subject: bug#47302: 27.1; calc math-format-number formatting for floats without decimals is unusual
Date: Thu, 22 Apr 2021 17:03:42 +0200 [thread overview]
Message-ID: <86v98ejr8x.fsf@fsfe.org> (raw)
In-Reply-To: <FFC09163-F940-4DE5-B90E-F53752D37229@acm.org>
Mattias Engdegård <mattiase@acm.org> writes:
> 21 apr. 2021 kl. 17.16 skrev Stefan Kangas <stefan@marxist.se>:
>>
>> Jelle Licht <jlicht@fsfe.org> writes:
>
>>> (calc-eval "123.0") ; => "123."
>>> (calc-eval "0.0") ; => "0."
>>>
>>> I would expect this output to be either "123.0" or "123" and "0.0" or
>>> "0" respectively.
>
> Jelle, thanks for the report!
>
> Calc distinguishes integers from floating-point numbers by the presence of a decimal point, so removing it is probably not a good idea. The lack of a trailing 0 after the decimal point is clearly intended but mainly a cosmetic issue; it's uncommon in hand-writing but not in computerese.
>
> We could put a 0 after the decimal point but not doing so saves some space in the often narrow Calc windows. I'd suggest leaving it as it is. The notation is distinctive enough that there is no serious risk of misunderstanding.
>
> If you disagree, do say.
Hi Mattias,
It would be nice to have a (formatting) option to print 'full'
floating-point numbers. There are a lot of other knobs to tweak
w.r.t. printing numbers, so in that sense it does not seem totally
inconceivable for such a thing to exist.
The context in which I would use this is one where the output of calc is
being used by other programs and data formats (e.g. JSON). For now, I'll
just have to have emacs read and then subsequently print the result of
my calc-adventures, which works fine.
Thanks for the consideration,
- Jelle
next prev parent reply other threads:[~2021-04-22 15:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-21 21:54 bug#47302: 27.1; calc math-format-number formatting for floats without decimals is unusual Jelle Licht
2021-04-21 15:16 ` Stefan Kangas
2021-04-22 13:44 ` Mattias Engdegård
2021-04-22 15:03 ` Jelle Licht [this message]
2021-04-22 16:35 ` Dave Gillespie
2021-04-25 15:53 ` Mattias Engdegård
2021-04-26 14:58 ` Dave Gillespie
2021-04-27 16:15 ` Mattias Engdegård
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=86v98ejr8x.fsf@fsfe.org \
--to=jlicht@fsfe.org \
--cc=47302@debbugs.gnu.org \
--cc=daveg@synaptics.com \
--cc=mattiase@acm.org \
--cc=stefan@marxist.se \
/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).