Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #16329

Re: Why FullForm[916.536 + 3.3] gives 919.8359999999999?`

From "Nasser M. Abbasi" <nma@12000.org>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Why FullForm[916.536 + 3.3] gives 919.8359999999999?`
Date 2013-12-06 07:12 +0000
Message-ID <l7rtcd$o5d$1@smc.vnet.net> (permalink)
References <l7pbp3$gbk$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


On 12/5/2013 1:59 AM, Guillermo Sanchez wrote:
> FullForm[916.536 + 3.3] gives 919.8359999999999 instead of 919.836?
>
> Guillermo
>

computers use computation using floating points. And the above is
the result of adding large floating point to small floating point.  

Same result in Mat*ab

---------------------
EDU>> format long
EDU>> 916.536 + 3.3

      9.198359999999999e+02
--------------------

What you see on the screen with:

---------------------
916.536 + 3.3
     919.836  <------------- OUT
---------------------

Then the 919.836 is not the actual value inside the computer. If
you point the mouse to the end of the outout cell above and hit
enter, you'll get the actual value

     919.8359999999999`

which is the FullForm

--Nasser


Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Why FullForm[916.536 + 3.3] gives 919.8359999999999?` Guillermo Sanchez <guillermo.sanchez@hotmail.com> - 2013-12-05 07:59 +0000
  Re: Why FullForm[916.536 + 3.3] gives 919.8359999999999?` "Nasser M. Abbasi" <nma@12000.org> - 2013-12-06 07:12 +0000
  Re: gives 919.8359999999999?` Murray Eisenberg <murray@math.umass.edu> - 2013-12-08 09:37 +0000

csiph-web