Re: Merseene Twister -- A New Fortran 95 Implementation
From: Steven G. Kargl (kargl_at_x1-6-00-00-c5-b3-45-24.client.attbi.com)
Date: 01/06/04
- Next message: Jugoslav Dujic: "Re: ALLOCATABLE arrays"
- Previous message: John Lansberry: "Re: integer(8) problem with CVF 6.6B"
- In reply to: Richard Maine: "Re: Merseene Twister -- A New Fortran 95 Implementation"
- Next in thread: James Giles: "Re: Merseene Twister -- A New Fortran 95 Implementation"
- Reply: James Giles: "Re: Merseene Twister -- A New Fortran 95 Implementation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 06 Jan 2004 16:57:49 GMT
In article <m3fzeue5fu.fsf@altair.dfrc.nasa.gov>,
Richard Maine <nospam@see.signature> writes:
> Scott Robert Ladd <scott@coyotegulch.com> writes:
>
>> Then I involved myself in the GNU gfortran project; gfortran rejected
>> -2147483648 as invalid. Indeed, the "free-as-in-liberty" compiler was
>> correct, using a strict interpretation of the Fortran 95 Standard (section
>> 13.7, to be precise).
>
> Nope. I maintain that this is a *MIS*interpretation of the section.
> And this is the one compiler in development that I was talking
> about.
I've read chapters 4 and 13 of the draft standard and I cannot locate
where the standard states that a machine number, which is not a
member of model numbers, must be permitted by a conforming Fortran
processor. Based on your following paragraph, I don't see how you
can claim it is a *MIS*interpretation of the standard. gfortran
is limiting the default integer kind (on a 32-bit processor) to
[-2**31-1:2**31-1]. Your following paragraph suggests that gfortran
is a conforming processor.
> True, the standard doesn't require that the number in question be
> a valid integer value. But the standard also doesn't require that
> +12345 be a valid integer value. The compiler is quite free to
> limit integers to a range of -11111 to +12344, and to take 32-bits
> to store such integers. Seems a bit strange, but it is allowed.
> The compiler is also free to disallow -2147483648 as an integer
> value, but the standard no more demands this than it demands that
> integers be limited to the range of -11111 to +12344.
>
> I think that it is just broken for the compiler to disallow this.
> And if it doesn't get fixed someday, I expect lots of complaints.
> I don't think it does anyone a service to interpret the standard
> like this.
I'm curious Richard, what does your suite of F90/95 compilers
do with the following program.
program a
integer :: i = -2147483647 ! non-portable code
i = i - 1
print *, abs(i) ! -2147483648 is not a model number.
end program a
By limiting INTEGER to the model numbers, gfortran can have
an optimized ABS() function; otherwise the compiler/run-time
library should/would need to check for a range error in ABS().
-- Steve
- Next message: Jugoslav Dujic: "Re: ALLOCATABLE arrays"
- Previous message: John Lansberry: "Re: integer(8) problem with CVF 6.6B"
- In reply to: Richard Maine: "Re: Merseene Twister -- A New Fortran 95 Implementation"
- Next in thread: James Giles: "Re: Merseene Twister -- A New Fortran 95 Implementation"
- Reply: James Giles: "Re: Merseene Twister -- A New Fortran 95 Implementation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|