Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Double Precision
Date: Wed, 25 Feb 2009 15:52:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 30
Message-ID: <go3pf1$7ik$1@fred.mathworks.com>
References: <go3gjt$lmh$1@fred.mathworks.com> <PCdpl.23889$_U5.15720@newsfe20.iad>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1235577121 7764 172.30.248.38 (25 Feb 2009 15:52:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Wed, 25 Feb 2009 15:52:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 498815
Xref: news.mathworks.com comp.soft-sys.matlab:520742

Walter Roberson <roberson@hushmail.com> wrote in message <PCdpl.23889$_U5.15720@newsfe20.iad>...
> Hosein wrote:
> > I used "Double Precision" on top of my main code. Does it mean that it works for all
> > operations even in subroutines and functions? 
> 
> Are you sure that is in a matlab program??
> 
> I figure that in matlab,
> 
> Double Precision
> 
> would be equivalent to
> 
> Double('Precision')
> 
> As Matlab still permits some fuzzy matching about upper vs lower case, I think this
> would be interpreted as
> 
> double('Precision')
> 
> which would take the character string array ['P' 'r' 'e'] and so on and convert
> the data type from char to double precision floating point. The code would be
> equivalent to
> 
> 'Precision' + 0.
> 
> and the output would be a series of 9 numbers.

I am working with very small numbers and it is important to include all digits in all operations. Since Matlab did not give me any error messages, I though it was OK to use "Double Precision".
According to my problem, Which one would be better: "Double Precision" or double('precision')?