Skip to content

Commit 148041f

Browse files
committed
Don't import non-public Base.Math.fastabs
1 parent c5bc298 commit 148041f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/SpecialFunctions.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ import LogExpFunctions
1818
using OpenLibm_jll
1919
using OpenSpecFun_jll
2020

21-
using Base.Math: fastabs
22-
2321
export
2422
airyai,
2523
airyaiprime,
@@ -118,4 +116,9 @@ for f in (:beta, :lbeta)
118116
end
119117
polygamma(m::Integer, x::Missing) = missing
120118

119+
# `fastabs` is identical to `Base.Math.fastabs` which is not used here since it is not public
120+
# https://github.com/JuliaLang/julia/blob/93fb785831dcfcc442f82fab8746f0244c5274ae/base/special/trig.jl#L1057
121+
fastabs(x::Number) = abs(x)
122+
fastabs(x::Complex) = abs(real(x)) + abs(imag(x))
123+
121124
end # module

0 commit comments

Comments
 (0)