Skip to content

Commit 5784cd3

Browse files
authored
enable new Float16 methods for sinh and cbrt (#40534)
From #39432 and #39441, these were still using their old definition due to method overwriting.
1 parent 2435f96 commit 5784cd3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

base/math.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,21 +1195,20 @@ include("special/log.jl")
11951195

11961196
# Float16 definitions
11971197

1198-
for func in (:sin,:cos,:tan,:asin,:acos,:atan,:sinh,:cosh,:tanh,:asinh,:acosh,
1198+
for func in (:sin,:cos,:tan,:asin,:acos,:atan,:cosh,:tanh,:asinh,:acosh,
11991199
:atanh,:log,:log2,:log10,:sqrt,:lgamma,:log1p)
12001200
@eval begin
12011201
$func(a::Float16) = Float16($func(Float32(a)))
12021202
$func(a::ComplexF16) = ComplexF16($func(ComplexF32(a)))
12031203
end
12041204
end
12051205

1206-
for func in (:exp,:exp2,:exp10)
1206+
for func in (:exp,:exp2,:exp10,:sinh)
12071207
@eval $func(a::ComplexF16) = ComplexF16($func(ComplexF32(a)))
12081208
end
12091209

12101210

12111211
atan(a::Float16,b::Float16) = Float16(atan(Float32(a),Float32(b)))
1212-
cbrt(a::Float16) = Float16(cbrt(Float32(a)))
12131212
sincos(a::Float16) = Float16.(sincos(Float32(a)))
12141213

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

0 commit comments

Comments
 (0)