Re: Why FullForm[916.536 + 3.3] gives 919.8359999999999?`
- To: mathgroup at smc.vnet.net
- Subject: [mg132107] Re: Why FullForm[916.536 + 3.3] gives 919.8359999999999?`
- From: "Nasser M. Abbasi" <nma at 12000.org>
- Date: Fri, 6 Dec 2013 02:17:06 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: l-mathgroup@wolfram.com
- Delivered-to: mathgroup-outx@smc.vnet.net
- Delivered-to: mathgroup-newsendx@smc.vnet.net
- References: <l7pbp3$gbk$1@smc.vnet.net>
- Reply-to: nma at 12000.org
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
- Follow-Ups:
- Re: gives 919.8359999999999?`
- From: Murray Eisenberg <murray@math.umass.edu>
- Re: gives 919.8359999999999?`