Skip to Main Content Skip to Search
Login
File Exchange
MATLAB Newsgroup
Link Exchange
  Blogs  
 Contest 
MathWorks.com

Thread Subject: comparision between Version 6.5.1 and Version 7.5

Subject: comparision between Version 6.5.1 and Version 7.5

From: Govind Raj

Date: 1 Jul, 2008 08:47:03

Message: 1 of 5

Hi.
I am working on convertion some programe which is in
FORTRAN95 to MATLAB 6.5.1. after formating, i got the same
results as in FORTRAN (and also in MATLAB-6.5.1). When i
checked in MATLAB version 7.5, I got ~3% error. like
instead of 550 (MATLAB 6.5.1 and FORTRAN95) i got around
545 (in MATLAB 7.5).

Could any one explain why is this difference coming in
higher version of MATLAB though it is small magnitude
difference?

thanks and regards
Govind.

Subject: comparision between Version 6.5.1 and Version 7.5

From: vedenev

Date: 1 Jul, 2008 09:00:30

Message: 2 of 5

Try to set "backward capability":
file menu => preferences => Mat-files => Ensure bacvard capability (-
v6)

------------------------------------
Maxim Vedenev, Matlab freelancer
http://simulations.narod.ru/


Subject: comparision between Version 6.5.1 and Version 7.5

From: Robert Bemis

Date: 1 Jul, 2008 17:55:02

Message: 3 of 5

Govind, can you post the MATLAB expression that gives
different answers in different versions?

Thanks
Bob


"Govind Raj" <nggovind@yahoo.com> wrote in message
<g4cqu7$dqo$1@fred.mathworks.com>...
> Hi.
> I am working on convertion some programe which is in
> FORTRAN95 to MATLAB 6.5.1. after formating, i got the same
> results as in FORTRAN (and also in MATLAB-6.5.1). When i
> checked in MATLAB version 7.5, I got ~3% error. like
> instead of 550 (MATLAB 6.5.1 and FORTRAN95) i got around
> 545 (in MATLAB 7.5).
>
> Could any one explain why is this difference coming in
> higher version of MATLAB though it is small magnitude
> difference?
>
> thanks and regards
> Govind.

Subject: comparision between Version 6.5.1 and Version 7.5

From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)

Date: 1 Jul, 2008 18:33:33

Message: 4 of 5

In article <g4dr1m$gls$1@fred.mathworks.com>,
Robert Bemis <rbemis@mathworks.com> 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

Subject: comparision between Version 6.5.1 and Version 7.5

From: Robert Bemis

Date: 2 Jul, 2008 13:39:01

Message: 5 of 5

Walter, thanks for your detailed reply. As you indicated,
there are many factors that can contribute to different
answers. I'm not sure how well the far-from-zero case
(1e240) relates to Govind's (5.5e2).

Govind, have you contacted MathWorks Technical Support about
this issue? Some investigation may be warranted.
http://www.mathworks.com/support/contact_us/index.html

Cheers
Bob

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
version diference Govind Raj 1 Jul, 2008 04:50:19
rssFeed for this Thread

envelope graphic E-mail this page to a colleague

Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.
Related Topics