Skip to content

Commit

Permalink
Deprecate vectorized functions in base/fastmath.jl in favor of compac…
Browse files Browse the repository at this point in the history
…t broadcast syntax.
  • Loading branch information
Sacha0 committed Sep 4, 2016
1 parent 2a5b38d commit d5a9830
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 2 additions & 0 deletions base/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -890,6 +890,7 @@ for f in (
:airyprime, :airyai, :airyaiprime, :airybi, :airybiprime, :airy, :airyx, :besselj0, :besselj1, :bessely0, :bessely1, # base/special/bessel.jl
:cbrt, :sinh, :cosh, :tanh, :atan, :asinh, :exp, :erf, :erfc, :exp2, :expm1, :exp10, :sin, :cos, :tan, :asin, :acos, :acosh, :atanh, #=:log,=# :log2, :log10, :lgamma, #=:log1p,=# :sqrt, # base/math.jl
:abs, :abs2, :angle, :isnan, :isinf, :isfinite, # base/floatfuncs.jl
:acos_fast, :acosh_fast, :angle_fast, :asin_fast, :asinh_fast, :atan_fast, :atanh_fast, :cbrt_fast, :cis_fast, :cos_fast, :cosh_fast, :exp10_fast, :exp2_fast, :exp_fast, :expm1_fast, :lgamma_fast, :log10_fast, :log1p_fast, :log2_fast, :log_fast, :sin_fast, :sinh_fast, :sqrt_fast, :tan_fast, :tanh_fast, # base/fastmath.jl
)
@eval @dep_vectorize_1arg Number $f
end
Expand All @@ -908,6 +909,7 @@ for f in (
:polygamma, :zeta, :beta, :lbeta, # base/special/gamma.jl
:airy, :airyx, :besseli, :besselix, :besselj, :besseljx, :besselk, :besselkx, :bessely, :besselyx, :besselh, :besselhx, :hankelh1, :hankelh2, :hankelh1x, :hankelh2x, # base/special/bessel.jl
:log, :hypot, :atan2, # base/math.jl
:pow_fast, :atan2_fast, :hypot_fast, :max_fast, :min_fast, :minmax_fast, # base/fastmath.jl
)
@eval @dep_vectorize_2arg Number $f
end
Expand Down
2 changes: 0 additions & 2 deletions base/fastmath.jl
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ for f in (:acos, :acosh, :angle, :asin, :asinh, :atan, :atanh, :cbrt,
f_fast = fast_op[f]
@eval begin
$f_fast(x) = $f(x)
@vectorize_1arg Number $f_fast
end
end

Expand All @@ -356,7 +355,6 @@ for f in (:^, :atan2, :hypot, :max, :min, :minmax)
$f_fast(x::Number, y::Number) = $f_fast(promote(x, y)...)
# fall-back implementation that applies after promotion
$f_fast{T<:Number}(x::T, y::T) = $f(x, y)
@vectorize_2arg Number $f_fast
end
end

Expand Down

0 comments on commit d5a9830

Please sign in to comment.