Re: single precision
- From: "Steven G. Johnson" <stevenj@xxxxxxxxxxxx>
- Date: Wed, 20 Feb 2008 08:29:14 -0800 (PST)
On Feb 19, 2:58 pm, James Tursa <aclassyguywithakno...@xxxxxxxxxxx>
wrote:
I am not convinced you are getting my point. Yes, MATLAB is very
likely calling single-precision versions of the underlying libraries,
but *those libraries* may in fact be doing intermediate calculations
in higher precision, even if *none* of the local variables in those
libraries are explicitly declared as higer precision variables in the
original source code.
James, my comments included that possibility; in fact I had actually
started to write about it in a parenthetical comment, and then deleted
it as too complicated and unnecessary before I posted. Yes, the
compiler may automatically do some intermediate calculations in double
precision (or even extended precision) depending upon the language,
compiler, and the FPU mode. However, it will generally only do that
for variables when they are stored in registers, not when they are
spilled to the stack, and will certainly not do that when they are
explicitly written to an array at intermediate stages of the
algorithm.
So, this is not really that different in effect from asking whether
the underlying code uses a (bounded number) of local double-precision
variables; the overall precision of a multi-stage algorithm (where all
calculations don't fit into local variables or registers) like an FFT
or an LU decomposition is then limited by single-precision roundoff
characteristics.
Steven
.
- References:
- single precision
- From: Dan
- Re: single precision
- From: Steven G. Johnson
- Re: single precision
- From: James Tursa
- Re: single precision
- From: Steven G. Johnson
- Re: single precision
- From: James Tursa
- single precision
- Prev by Date: Re: nidaqmx, analogout, putdata?
- Next by Date: I am sure matlab has a function for this...
- Previous by thread: Re: single precision
- Next by thread: Re: single precision
- Index(es):
Relevant Pages
|