all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Stefan Kangas <stefan@marxist.se>
Cc: David Gillespie <daveg@synaptics.com>,
	Jelle Licht <jlicht@fsfe.org>,
	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 15:44:07 +0200	[thread overview]
Message-ID: <FFC09163-F940-4DE5-B90E-F53752D37229@acm.org> (raw)
In-Reply-To: <CADwFkmnsYE3sfS-2LWWTRFxWVrrSjiY5At+CBJVnr_c=EH1AJw@mail.gmail.com>

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.






  reply	other threads:[~2021-04-22 13:44 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 [this message]
2021-04-22 15:03     ` Jelle Licht
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=FFC09163-F940-4DE5-B90E-F53752D37229@acm.org \
    --to=mattiase@acm.org \
    --cc=47302@debbugs.gnu.org \
    --cc=daveg@synaptics.com \
    --cc=jlicht@fsfe.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.