Skip to content

Commit 46623c4

Browse files
Uses ssml from https://doi.org/10.1145/3061665, and fix typos
1 parent 5f9e442 commit 46623c4

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

SRC/la_constants.f90

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,11 @@ module LA_CONSTANTS
7777
(minexponent(0._sp) - 1) * 0.5_sp)
7878
real(sp), parameter :: stbig = real(radix(0._sp), sp)**floor( &
7979
(maxexponent(0._sp) - digits(0._sp) + 1) * 0.5_sp)
80-
! ssml = 1/s, where s was defined in https://doi.org/10.1145/355769.355771
80+
! ssml >= 1/s, where s was defined in https://doi.org/10.1145/355769.355771
81+
! The correction was added in https://doi.org/10.1145/3061665 to scale denormalized numbers correctly
8182
real(sp), parameter :: sssml = real(radix(0._sp), sp)**( - floor( &
82-
(minexponent(0._sp) - 1) * 0.5_sp))
83-
! ssml = 1/S, where S was defined in https://doi.org/10.1145/355769.355771
83+
(minexponent(0._sp) - digits(0._sp)) * 0.5_sp))
84+
! sbig = 1/S, where S was defined in https://doi.org/10.1145/355769.355771
8485
real(sp), parameter :: ssbig = real(radix(0._sp), sp)**( - ceiling( &
8586
(maxexponent(0._sp) - digits(0._sp) + 1) * 0.5_sp))
8687

@@ -119,10 +120,11 @@ module LA_CONSTANTS
119120
(minexponent(0._dp) - 1) * 0.5_dp)
120121
real(dp), parameter :: dtbig = real(radix(0._dp), dp)**floor( &
121122
(maxexponent(0._dp) - digits(0._dp) + 1) * 0.5_dp)
122-
! ssml = 1/s, where s was defined in https://doi.org/10.1145/355769.355771
123+
! ssml >= 1/s, where s was defined in https://doi.org/10.1145/355769.355771
124+
! The correction was added in https://doi.org/10.1145/3061665 to scale denormalized numbers correctly
123125
real(dp), parameter :: dssml = real(radix(0._dp), dp)**( - floor( &
124-
(minexponent(0._dp) - 1) * 0.5_dp))
125-
! ssml = 1/S, where S was defined in https://doi.org/10.1145/355769.355771
126+
(minexponent(0._dp) - digits(0._dp)) * 0.5_dp))
127+
! sbig = 1/S, where S was defined in https://doi.org/10.1145/355769.355771
126128
real(dp), parameter :: dsbig = real(radix(0._dp), dp)**( - ceiling( &
127129
(maxexponent(0._dp) - digits(0._dp) + 1) * 0.5_dp))
128130

0 commit comments

Comments
 (0)