@@ -155,10 +155,7 @@ logbU(::Type{Float64},::Val{10}) = 0.4342944819032518
155
155
logbL (:: Type{Float64} ,:: Val{10} ) = 1.098319650216765e-17
156
156
157
157
# Procedure 1
158
- # XXX we want to mark :consistent-cy here so that this function can be concrete-folded,
159
- # because the effect analysis currently can't prove it in the presence of `@inbounds` or
160
- # `:boundscheck`, but still the access to `t_log_Float64` is really safe here
161
- Base. @assume_effects :consistent @inline function log_proc1 (y:: Float64 ,mf:: Float64 ,F:: Float64 ,f:: Float64 ,base= Val (:ℯ ))
158
+ @inline function log_proc1 (y:: Float64 ,mf:: Float64 ,F:: Float64 ,f:: Float64 ,base= Val (:ℯ ))
162
159
jp = unsafe_trunc (Int,128.0 * F)- 127
163
160
164
161
# # Steps 1 and 2
216
213
end
217
214
218
215
# Procedure 1
219
- # XXX we want to mark :consistent-cy here so that this function can be concrete-folded,
220
- # because the effect analysis currently can't prove it in the presence of `@inbounds` or
221
- # `:boundscheck`, but still the access to `t_log_Float32` is really safe here
222
- Base. @assume_effects :consistent @inline function log_proc1 (y:: Float32 ,mf:: Float32 ,F:: Float32 ,f:: Float32 ,base= Val (:ℯ ))
216
+ @inline function log_proc1 (y:: Float32 ,mf:: Float32 ,F:: Float32 ,f:: Float32 ,base= Val (:ℯ ))
223
217
jp = unsafe_trunc (Int,128.0f0 * F)- 127
224
218
225
219
# # Steps 1 and 2
@@ -571,8 +565,7 @@ function _log_ext(xu)
571
565
z = reinterpret (Float64, xu - (tmp & 0xfff0000000000000 ))
572
566
k = Float64 (tmp >> 52 )
573
567
# log(x) = k*Ln2 + log(c) + log1p(z/c-1).
574
- # getfield instead of getindex to satisfy effect analysis not knowing whether this is inbounds
575
- t, logctail = getfield (t_log_table_compact, Int (i+ 1 ))
568
+ t, logctail = @inbounds t_log_table_compact[Int (i+ 1 )]
576
569
invc, logc = log_tab_unpack (t)
577
570
# Note: invc is j/N or j/N/2 where j is an integer in [N,2N) and
578
571
# |z/c - 1| < 1/N, so r = z/c - 1 is exactly representable.
0 commit comments