Path: news.mathworks.com!not-for-mail
From: "sujata " <sujatagp@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: decimal precision
Date: Wed, 4 Nov 2009 12:56:02 +0000 (UTC)
Organization: AEGON Nederland N.V.
Lines: 12
Message-ID: <hcrtl2$9t3$1@fred.mathworks.com>
Reply-To: "sujata " <sujatagp@gmail.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257339362 10147 172.30.248.35 (4 Nov 2009 12:56:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 4 Nov 2009 12:56:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1683215
Xref: news.mathworks.com comp.soft-sys.matlab:582348


Hi 

I have a question. I have the following calculation

(1+number1)/(1+number2) - 1


The number 1 and number 2 are scalars with 16 decimals 

when I calculate the upper formula in both excel and matlab with the same number1 and number2,  I get a difference on the last three decimals. 

Why is this so? And what should I do that they are exact the same.