Re: gives 919.8359999999999?`
- To: mathgroup at smc.vnet.net
- Subject: [mg132113] Re: gives 919.8359999999999?`
- From: Bob Hanlon <hanlonr357 at gmail.com>
- Date: Tue, 10 Dec 2013 04:00:42 -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: <20131205080510.023806A20@smc.vnet.net>
916.536 + 3.3 // FullForm TagBox[ StyleBox["919.8359999999999`", ShowSpecialCharacters->False, ShowStringCharacters->True, NumberMarks->True], FullForm] Precision[916.536 + 3.3] MachinePrecision % // N 15.9546 NumberForm[916.536 + 3.3, 15] TagBox[ InterpretationBox["\<\"919.836\"\>", 919.8359999999999, AutoDelete->True], NumberForm[#, 15]& ] "NumberForm[expr, n] prints with approximate real numbers in expr given to n - digit precision." SetPrecision[916.536 + 3.3, 15] 919.836000000000 Precision[%] 15. Bob Hanlon On Sun, Dec 8, 2013 at 4:33 AM, Murray Eisenberg <murray at math.umass.edu>wrote: > Then perhaps the original question should have been to reconcile: > > FullForm[916.536 + 3.3] > 919.8359999999999` > > NumberForm[916.536 + 3.3, 15] > 919.836 > > > On Dec 6, 2013, at 2:16 AM, Sseziwa Mukasa <mukasa at gmail.com> wrote: > > > Because by default non-integer values are stored as machine precision > values and the values displayed are typically displayed up to 5 decimal > places but FullForm displays a more accurate representation of the actual > machine precision value. > > > > On Dec 5, 2013, at 3:05 AM, Guillermo Sanchez < > guillermo.sanchez at hotmail.com> wrote: > > > >> FullForm[916.536 + 3.3] gives 919.8359999999999 instead of 919.836? > >> > >> Guillermo > >> > > > > > > --- > Murray Eisenberg > murray at math.umass.edu > Mathematics & Statistics Dept. > Lederle Graduate Research Tower > University of Massachusetts > 710 North Pleasant Street > Amherst, MA 01003-9305 > >
- References:
- Why FullForm[916.536 + 3.3] gives 919.8359999999999?`
- From: Guillermo Sanchez <guillermo.sanchez@hotmail.com>
- Why FullForm[916.536 + 3.3] gives 919.8359999999999?`