Large negative arguments to exp() can give a floating point exception.
See comments in the example code.
PROGRAM EXPTEST
C
C Testing exponential with large negative arguments.
C Compile with "pgfortran -g -fast -Ktrap=fp -o exptest exptest.F.
C The parameter SCALING is to be set to a large positive number.
C If it is set large enough (1.E8, for example), then the program
C gets a floating point exception with pgfortran 15.10-0 64-bit target
C on x86-64 Linux -tp sandybridge.
C The exception comes from __fvd_exp_vex, called by __fvd_exp_vex_256.
C Omitting "Ktrap=fp" is a workaround.
C Adding "-Mnovect" to the compiler flags is another workaround.
C
IMPLICIT NONE
INTEGER, PARAMETER :: JD=24
REAL(KIND=8), PARAMETER :: SCALING=1.E8
REAL(KIND=8), DIMENSION(JD) :: EARG,Y
INTEGER :: J
C
C
DO J = 1,JD
EARG(J) = -SCALING * REAL(J)/24.D0
ENDDO
DO J = 1,JD
Y(J) = EXP(EARG(J))
ENDDO
WRITE(*,"('Min and max of exponential=',2ES20.8)")
& MINVAL(Y(1:JD)),MAXVAL(Y(1:JD))
END