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$>
References: <go3gjt$lmh$> <PCdpl.23889$_U5.15720@newsfe20.iad>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1235577121 7764 (25 Feb 2009 15:52:01 GMT)
NNTP-Posting-Date: Wed, 25 Feb 2009 15:52:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 498815
Xref: comp.soft-sys.matlab:520742

Walter Roberson <> 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')?