Skip to content

Commit

Permalink
enable new Float16 methods for sinh and cbrt
Browse files Browse the repository at this point in the history
From #39432 and #39441, these were still using their old definition due
to method overwriting.
  • Loading branch information
vtjnash committed Apr 19, 2021
1 parent 2435f96 commit c2cca0a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions base/math.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ include("special/log.jl")

# Float16 definitions

for func in (:sin,:cos,:tan,:asin,:acos,:atan,:sinh,:cosh,:tanh,:asinh,:acosh,
for func in (:sin,:cos,:tan,:asin,:acos,:atan,:cosh,:tanh,:asinh,:acosh,
:atanh,:log,:log2,:log10,:sqrt,:lgamma,:log1p)
@eval begin
$func(a::Float16) = Float16($func(Float32(a)))
Expand All @@ -1209,7 +1209,6 @@ end


atan(a::Float16,b::Float16) = Float16(atan(Float32(a),Float32(b)))
cbrt(a::Float16) = Float16(cbrt(Float32(a)))
sincos(a::Float16) = Float16.(sincos(Float32(a)))

for f in (:sin, :cos, :tan, :asin, :atan, :acos,
Expand Down

0 comments on commit c2cca0a

Please sign in to comment.