Fortran-FOSS-Programmers / Fortran-202X-Proposals

A place to collaborate on proposals for the next Fortran standard
21 stars 0 forks source link

Support REAL$n for all binary$n types in IEEE754 #11

Open jeffhammond opened 7 years ago

jeffhammond commented 7 years ago

Change

13.8.2.21 REAL32, REAL64, and REAL128 The values of these default integer scalar named constants shall be those of the kind type parameters that specify a REAL type whose storage size expressed in bits is 32, 64, and 128 respectively. If, for any of these constants, the processor supports more than one kind of that size, it is processor dependent which kind value is provided. If the processor supports no kind of a particular size, that constant shall be equal to -2 if the processor supports kinds of a larger size and -1 otherwise.

to

... REAL16, REAL32, REAL64, REAL128, and REAL256 The values of these default integer scalar named constants shall be those of the kind type parameters that specify a REAL type whose storage size expressed in bits is 16, 32, 64, 128, and 256 respectively. If, for any of these constants, the processor supports more than one kind of that size, it is processor dependent which kind value is provided. If the processor supports no kind of a particular size, that constant shall be equal to -2 if the processor supports kinds of a larger size and -1 otherwise.

These five floating-point types correspond to the five binary types in IEEE754.

My desire for binary16 is much stronger than that of binary256.