Re: comparision between Version 6.5.1 and Version 7.5



In article <g4dr1m$gls$1@xxxxxxxxxxxxxxxxxx>,
Robert Bemis <rbemis@xxxxxxxxxxxxx> wrote:
Govind, can you post the MATLAB expression that gives
different answers in different versions?

sprintf('%.250g',1.0e+240)

In R20007a, this is

1000000000000000013946113804119924437974165856986638331112094170909680489426130543638408513078605724209795153399497011464465488473637220910340574757582946907032347746826714825234078949864321840610832155574248213693581484614981956096327942144

According to Roger Stafford, version 4a
"gives a different and somewhat more erroneous answer."

According to Urs, version R2008a gives
1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

However, when *I* test on R2008a for Linux-64, I get the same answer
as I list for R2007a.


Roughly six weeks ago, either Urs or dpb showed a calculation that
gave a different result when I tested. I -think- it was with the
same (R2007a) version that I was using, but I am not sure of it.
I do recall that they were running on different processor than I
was; my recollection is that they were using MS Windows. I recall
that I was thinking at the time that I should ask whether they
happened to have used the system-dependant call (supported on Windows)
to set their default precision, but I didn't get around to asking.
I would probably have a bit of difficulty locating the appropriate
thread... it might have been 500 or more of my postings ago.


In summary: very old versions of Matlab used a different default
precision. In fairly new versions of Matlab on MS Windows, the
precision behaviour can be deliberately controlled to use x86
extended precision numbers instead of IEEE 754 Double behaviour.

I do not have enough information to know whether different versions
of Matlab for different platforms default to potentially-different
precision or different rounding behaviours.

The problems that people have had with different BLAS libraries
for different processors implies... well, implies that the BLAS
libraries are -different- for different processors (not just for
different platforms.) BLAS is heavily optimized for performance;
I do not have enough information to know whether BLAS is designed
in terms of "the highest performance that produces the exact same
answer" or "the highest performance that produces an answer within
a given error tolerance". (For example, would BLAS use the
MIPS 4 architecture "recip" instruction together with "multiply"s
even though the result can be slightly different than if you
instead use division ?)
--
"Beauty, like all other qualities presented to human experience,
is relative; and the definition of it becomes unmeaning and
useless in proportion to its abstractness." -- Walter Pater
.



Relevant Pages

  • Re: data types
    ... single precision and will operate in single precision when doing operations between ... Matlab is able to recognize certain patterns of operations with multiple operators ... sufficiently large, it hands the operations over to libraries such as BLAS, which have ...
    (comp.soft-sys.matlab)
  • Re: Precision and Accuracy of Elementary Functions in MATLAB
    ... exploring MATLAB as the programming language seems more accessible. ... Not so with with elementary functions. ... These operate in double or single precision, ... If you pass a double array into the Symbolic Math Toolbox, ...
    (comp.soft-sys.matlab)
  • Re: Int 32 processing speed: Is it a bug
    ... It is confirmed that matlab is not doing any integer arithmetic in ... I am not planning to use any matrix calculation in my program. ... Elapsed time is 0.017342 seconds. ... %Double precision ...
    (comp.soft-sys.matlab)
  • Re: A concern about the Matlab implementation of the Mersenne Twister RNG.
    ... On Mar 8, 10:48 am, Peter Perkins ... MATLAB's "basic" data class is double precision, ... That isn't exactly what MATLAB ... which comes with source code. ...
    (comp.soft-sys.matlab)
  • Re: Who uses clapack?
    ... Use of traditional BLAS interposes a mandatory memory save ... > the sqrtin extended precision, but it is not forced to truncate ... > do a simple dot product to compute the vector norm, ...
    (sci.math.num-analysis)