all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: John Yates <john@yates-sheets.org>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: What is 0.01 here not 0.01 here 0.009999999999999?
Date: Sat, 3 Apr 2021 00:19:10 +0300	[thread overview]
Message-ID: <YGeKTuYRzEbm0Hv9@protected.localdomain> (raw)
In-Reply-To: <CAJnXXoiyTt7ybuFoA-wGv0TyzGV+vjU5ZvxcoA8Ey1KZJmz1EA@mail.gmail.com>

* John Yates <john@yates-sheets.org> [2021-04-02 23:48]:
> On Fri, Apr 2, 2021 at 1:07 PM Jean Louis <bugs@gnu.support> wrote:
> > Thank you. I did browse it, did not yet understand it.
> 
> And so, having made no progress towards understanding
> computer-based floating point arithmetic, you press on
> arguing from a position of ignorance.

Oh John, not so harsh on me. I did understand the principle and thank
you for presenting it simpler. Before few years I got it
already. Understanding principle does not mean that I understand full
documents, they have many references and mathematical terms that I
cannot understand. There is no ignorance, and why assume so, when I
need the feature? Person who does not need feature is not
interested. But don't ask me to get as interested as mathematics
professor, as I am not. All what I need is to increase the versio
number in format NN.NN. There was solution with `calc-eval' that I did
not know about.

> Put most simply, on a machine in which floating point
> numbers encode the significand (sometimes erroneously
> termed the 'mantissa') using a binary representation,
> there is no way to encode, and hence express, a fraction
> whose divisor is not a power of 2.  So you can encode
> precisely 1/2, 1/4, 1/128, etc.  But you will never have a
> precise encoding of 1/3, 1/5, 1/10, etc.

Nicely explained, I do understand it, it is clear, I have been playing
with pocket calculators. Yet understanding the principle may not lead to
comprehension of the whole subject.

That word mantissa is in Wordnet as:

* Overview of noun mantissa

The noun mantissa has 1 sense (no senses from tagged texts)
1. mantissa, fixed-point part -- (the positive fractional part of the
representation of a logarithm; in the expression log 643 = 2.808 the
mantissa is .808)

I did not find the word "significand", but I think you mean that above
definition. 

> Much effort has gone into optimizing "round tripping",
> the conversion of decimal numbers into the nearest
> floating point number and getting it back out again.
> 
> But you are asking for more.  You want arithmetic on
> imprecise representations of your perfect decimal
> numbers to deliver precisely the same result as your
> mental model.  That is never going to happen.

Actually, I am asking for less... how you did not see it?

Yes, I need arithmetic on imprecise representations... to deliver what
I want, and it is doing what I want. `calc-eval' is doing it, and my
function is delivering me string that is increased for 0.01 -- well
that is what I wanted, and is happening... several times per hour
those numbers are increasing, function is working ;-p

> I am not going to try to explain normalization, rounding,
> rounding modes, etc.  Suffice it to say that this is the
> realm of numerical analysis, a rich field that traces its
> roots straight back to Alen Turing.

Excellent, but if function goes that deep, it would take a while to
give me 10.11 increase for 0.01.

> In closing, let me recommend David Goldberg's classic
> 'What every computer scientist should know about
> <http://pages.cs.wisc.edu/~david/courses/cs552/S12/handouts/goldberg-floating-point.pdf>
> floating-poing arithmetic
> <http://pages.cs.wisc.edu/~david/courses/cs552/S12/handouts/goldberg-floating-point.pdf>

Thank you. I will browse it, to get the concept, not read it to get
comprehension.

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://rms-support-letter.github.io/




  reply	other threads:[~2021-04-02 21:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02 13:42 What is 0.01 here not 0.01 here 0.009999999999999? Jean Louis
2021-04-02 13:56 ` Stefan Monnier
2021-04-02 17:03   ` Jean Louis
2021-04-02 17:41     ` Teemu Likonen
2021-04-02 18:44       ` Jean Louis
2021-04-02 20:46     ` John Yates
2021-04-02 21:19       ` Jean Louis [this message]
2021-04-02 22:04         ` John Yates
2021-04-02 23:29           ` Jean Louis
2021-04-03  4:39             ` Arthur Miller
2021-04-03  5:36               ` Jean Louis
2021-04-03  3:56     ` Arthur Miller
2021-04-03  5:19       ` Jean Louis
2021-04-03 13:54         ` Stefan Monnier
2021-04-03 16:26           ` Packages for ELPA, emacs-libpq Jean Louis
2021-04-02 14:02 ` What is 0.01 here not 0.01 here 0.009999999999999? Eli Zaretskii
2021-04-02 17:07   ` Jean Louis
2021-04-03  4:49     ` Arthur Miller
2021-04-16 20:41 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-04-17 10:53   ` Jean Louis
2021-04-19 10:51   ` Eric S Fraga

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=YGeKTuYRzEbm0Hv9@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=help-gnu-emacs@gnu.org \
    --cc=john@yates-sheets.org \
    --cc=monnier@iro.umontreal.ca \
    /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.