unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Subject: Re: GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-3-22 on raven, modified by Debian
Date: 17 Apr 2003 01:54:03 +0200	[thread overview]
Message-ID: <x5d6jmq9r8.fsf@lola.goethe.zz> (raw)
In-Reply-To: mailman.4765.1050536031.21513.bug-gnu-emacs@gnu.org

Mark Barnes <mbarnes@pacifier.com> writes:

> If I enter this expression in a buffer
> 
> (* 85 1.1)
> 
> and evaluate it it using Ctrl-x-e, I get the following answer
> displayed in the minibuffer:
> 
> 93.50000000000001
> 
> If I evaluate this expression
> 
> (- 93.5 (* 85 1.1))
> 
> I get this answer in the minibuffer:
> 
> -1.4210854715202004e-14
> 
> Is this documented in the reference manual?  I was unable to find
> anything about this kind of problem.

It is a facet of the well-known fact of life that 10*0.1 hardly ever
is 1.0.

In short: numerics.  0.1 has no exact representation in binary
floating point numbers.


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

       reply	other threads:[~2003-04-16 23:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.4765.1050536031.21513.bug-gnu-emacs@gnu.org>
2003-04-16 23:54 ` David Kastrup [this message]
2003-04-16 23:33 GNU Emacs 21.2.1 (i386-debian-linux-gnu, X toolkit, Xaw3d scroll bars) of 2002-3-22 on raven, modified by Debian Mark Barnes

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=x5d6jmq9r8.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    /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).