(j3.2006) FP16 16-bit-floating-point

Bader, Reinhold Reinhold.Bader
Fri Jun 16 08:31:03 EDT 2017


Hello Rolf, 

to the best of my knowledge, the answers are as follows:

Q1: Not in the sense of having an explicit name like the REAL32, REAL64, REAL128 names for specific integer kinds that were added to Fortran 2008. 
        However, it is left free to implementors to create a new kind number in the implementation that could be returned by SELECTED_REAL_KIND() and, 
         if IEEE conforming, by IEEE_SELECTED_REAL_KIND() and consequently all relevant IEEE support routines.

Q2: REAL*2 is (like REAL*8) a non-conforming notation (REAL*8 is supported as an extension by many implementations), so the answer is no. 
        A proper declaration might look like

        integer, parameter :: rk = selected_real_kind(2,6)    ! at least 2 decimal digits and 6 maximal decimal exponent - hope I have this right ...
        real(KIND=rk) :: x

       with the following caveats:
      * the KIND that fits the requirement most closely will be used, so it might be necessary to use the STORAGE_SIZE intrinsic to check what one gets.
      * KIND numbers are non-portable, so might vary for one and the same kind between implementations (at least one compiler I know deviates from all others I know).

I checked three of the compilers I know: they currently do not support FP16.

Regards
Reinhold


> -----Urspr?ngliche Nachricht-----
> Von: Rolf Rabenseifner [mailto:rabenseifner at hlrs.de]
> Gesendet: Freitag, 16. Juni 2017 13:53
> An: fortran standards email list for J3 <j3 at j3-fortran.org>; Bader, Reinhold
> <Reinhold.Bader at lrz.de>
> Cc: MPI-WG Fortran working group <mpiwg-fortran at lists.mpi-forum.org>;
> Atsushi Hori <ahori at riken.jp>; Martin Schulz <schulzm at llnl.gov>; MPI WG
> Point To Point Communications working group <mpiwg-p2p at lists.mpi-
> forum.org>
> Betreff: FP16 16-bit-floating-point
> 
> Hi all together,
> 
> I'm sitting in the MPI Forum Meeting and we discuss the new IEEE FP16
> datatype.
> 
> Questions to the Fortran atandardization body:
> 
> - Does the Fortran Standardization Body has already a proposal for
>   the new name in Fortran for this IEEE FP16?
> 
> - Will be REAL*2 identical to IEEE FP16?
> 
> Best regards
> Rolf
> 
> --
> Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner at hlrs.de .
> High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530 .
> University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832 .
> Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner .
> Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307) .



More information about the J3 mailing list