Skip to content

Commit 3e4e631

Browse files
committed
Use Tang's algorithm for log and log1p. Adds basic tests.
1 parent 3e72801 commit 3e4e631

File tree

3 files changed

+427
-3
lines changed

3 files changed

+427
-3
lines changed

base/math.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ exp10(x::Integer) = exp10(float(x))
120120
@vectorize_1arg Number exp10
121121

122122
# functions that return NaN on non-NaN argument for domain error
123-
for f in (:sin, :cos, :tan, :asin, :acos, :acosh, :atanh, :log, :log2, :log10,
124-
:lgamma, :log1p)
123+
for f in (:sin, :cos, :tan, :asin, :acos, :acosh, :atanh, :log2, :log10,
124+
:lgamma)
125125
@eval begin
126126
($f)(x::Float64) = nan_dom_err(ccall(($(string(f)),libm), Float64, (Float64,), x), x)
127127
($f)(x::Float32) = nan_dom_err(ccall(($(string(f,"f")),libm), Float32, (Float32,), x), x)
@@ -369,7 +369,7 @@ function mod2pi(x::Int64)
369369
end
370370

371371
# More special functions
372-
372+
include("special/log.jl")
373373
include("special/trig.jl")
374374
include("special/bessel.jl")
375375
include("special/erf.jl")

0 commit comments

Comments
 (0)