Prev: Context Problem
Next: Matrix questions
From: Jim Lambaugh on 27 Apr 2010 04:04 Hi guys When I write numbers in my code, I do it as (e.g.) 1.0 1000.0 Pi //N etc... Is it correct to say that my calculations are done with machine- precision, i.e. with rougly 16 digit precision? Regards, Jim.
From: Christoph Lhotka on 27 Apr 2010 07:51 Hello, you will find the awnser by looking on $MachinePrecision..chr On 27/04/2010 10:04, Jim Lambaugh wrote: > Hi guys > > When I write numbers in my code, I do it as (e.g.) > > 1.0 > 1000.0 > Pi //N > etc... > > Is it correct to say that my calculations are done with machine- > precision, i.e. with rougly 16 digit precision? > > Regards, > Jim. > > >
From: Bob Hanlon on 27 Apr 2010 08:48 They start off that way data = {1.0, 1000.0, Pi // N}; Precision /@ data {MachinePrecision,MachinePrecision,MachinePrecision} Precision /@ Gamma[data] {MachinePrecision,12.1834,MachinePrecision} Bob Hanlon ---- Jim Lambaugh <lambaugh(a)gmail.com> wrote: ============= Hi guys When I write numbers in my code, I do it as (e.g.) 1.0 1000.0 Pi //N etc... Is it correct to say that my calculations are done with machine- precision, i.e. with rougly 16 digit precision? Regards, Jim.
From: Bill Rowe on 28 Apr 2010 01:58 On 4/27/10 at 4:04 AM, lambaugh(a)gmail.com (Jim Lambaugh) wrote: >When I write numbers in my code, I do it as (e.g.) >1.0 1000.0 Pi //N etc... >Is it correct to say that my calculations are done with machine- >precision, i.e. with rougly 16 digit precision? Yes. But note, you do not explicitly need to convert exact numbers to machine numbers using N in most cases. For example 1000. Pi computes a machine precision number without explicitly using N. The default for Mathematica is to use machine precision if any portion of an expression is in machine precision and the precision of other portions is not explicitly given.
From: DrMajorBob on 28 Apr 2010 01:59 If Abs[f'[x]] > 1, then f[x] has LESS precision than x. If x is machine precision, there's no tracking of that loss of precision, so you could end up with no meaningful digits without knowing it. If x is "arbitrary precision", there IS tracking... but it tends to be pessimistic. You might lose precision (according to Mathematica) even though -1 < f'[x] < 1. In that case, you lose precision but shouldn't. Bobby On Tue, 27 Apr 2010 03:04:32 -0500, Jim Lambaugh <lambaugh(a)gmail.com> wrote: > Hi guys > > When I write numbers in my code, I do it as (e.g.) > > 1.0 > 1000.0 > Pi //N > etc... > > Is it correct to say that my calculations are done with machine- > precision, i.e. with rougly 16 digit precision? > > Regards, > Jim. > -- DrMajorBob(a)yahoo.com
|
Pages: 1 Prev: Context Problem Next: Matrix questions |