For Programmers: Free Programming Magazines  


Home > Archive > Fortran > March 2008 > Re: double precision difference between matlab and fortran 90









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: double precision difference between matlab and fortran 90
louisrom1@gmail.com

2008-03-17, 8:18 am

On Mar 14, 5:08 pm, glen herrmannsfeldt <g...@ugcs.caltech.edu> wrote:
> James Van Buskirk wrote:
>
> There are a number of ways they can come out different.
> One is that constant expressions are often done at compile
> time, and sometimes with a different result than the same
> expression at run time. Another is the rounding mode of
> the floating point processor.
>
> Fortran doesn't say much about rounding of floating point,
> but the IEEE standard does. Also possible is the
> difference between 53 bit double and 64 bit temporary
> real for x87.
>
> It seems that you are getting the two possible rounded
> results from the subtraction, rounded up or down.
>
> -- glen


Is there a way to control the way Matlab and Compaq visual fortran
round their numbers?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com