[Patch, Fortran] Another floating point speedup

Jerry DeLisle jvdelisle@verizon.net
Mon Jan 5 15:45:00 GMT 2009


Tobias Burnus wrote:
> Hi Dominique,
> 
> Daniel Kraft wrote:
>> Dominique Dhumieres wrote:
>>> I have two failures with the NIST
>>> tests: FM110 and 900. The failures for FM110 can be reduced to
>>> character(15) :: str="+ .339567+2"
>>> character(15) :: str1="+.339567+2"
>>> real :: x
>>> read(str1,*) x
>>> print *, x
>>> read(str,*) x
>>> print *, x
>>> end
>>>
>>> where STR gives:
>>>
>>> At line 6 of file read_tst.f90
>>> Fortran runtime error: Bad real number in item 1 of list input
>> I don't think this has something to do with it, though, as this error
>> message is not generated by my code; and gfortran 4.3 gives this
>> error, too, on my system (unless I messed something up).  This looks
>> like something to fix with the following up list_read patches, maybe.
> It fails here also with other compiles. NAG f95 prints:
>   Invalid input for real editing
>   Program terminated by I/O error on internal file
> and ifort prints:
>   forrtl: severe (59): list-directed I/O syntax error, unit -5, file
> Internal List-Directed Read
> whereas sunf95 shows
>   Error 1084:  unexpected character in real value
> while g95 accepts it but the result is not as expected: "0." for STR.
> 
> (Admittedly I have not checked the standard.)
> 
> Thus I think either the NIST test case is wrong or (more likely) while
> reducing the failure there was an algorithmic changed which made test
> invalid.
> 
> Tobias
> 
Its an NIST bug.  The version of NIST I have posted at the wiki has this fixed. 
I contacted NIST over a year two years ago requesting they fix this.  None there 
that seems to know what to do with it.

Jerry



More information about the Fortran mailing list