Thread Subject: strange sum result

Subject: strange sum result

From: Marco Pappalepore

Date: 27 Nov, 2007 10:41:46

Message: 1 of 1

if one writes in Matlab

>> 0.999999992 + 0.000000002

he gets

ans =

    9.999999940000001e-001

the strange result is that decimal 1 on the right.

Is that normal ? Is that IEEE-754 conformant ?

Where can I find the exact sum algorithm of matlab in order
to learn when to expect such a behaviour ?

many thanks

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com