Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Retaining precision after subtraction
Date: Tue, 27 Apr 2010 20:52:04 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 5
Message-ID: <hr7ipk$kbg$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1272401524 20848 172.30.248.38 (27 Apr 2010 20:52:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 27 Apr 2010 20:52:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2331674
Xref: news.mathworks.com comp.soft-sys.matlab:630389

I've a simple question:

I have a script that calculates a p-value, which is often a tiny number (i.e. 1e-80).  I need the script to return the 1-p value but retain the precision.  When I try to do this, matlab always returns 1 for p-values below 1e-15.  Can anyone tell me how to retain the precision of the calculation ?

Thanks in advance