Skip to content

Commit

Permalink
Update bfloat16.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ViralBShah authored Sep 17, 2024
1 parent e5b0bc4 commit 663b207
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bfloat16.jl
Original file line number Diff line number Diff line change
Expand Up @@ -433,9 +433,9 @@ for F in (:abs, :abs2, :sqrt, :cbrt,
end
end

Base.atan(y::BFloat16, x::BFloat16) = BFloat16(atan(Float32(y), Float32(x)))
Base.atan(y::BFloat16, x::BFloat16) = BFloat16(atan(Float32(y), Float32(x)))
Base.hypot(x::BFloat16, y::BFloat16) = BFloat16(hypot(Float32(x), Float32(y)))
Base.hypot(x::BFloat16, y::BFloat16, z::BFloat16) = BFloat16(hypot(Float32(x), Float32(y), Float32(z)))
Base.clamp(x::BFloat16, lo::BFloat16, hi::BFloat16) = BFloat16(clamp(Float32(x), Float32(lo), Float32(hi)))

Base.bitstring(x::BFloat16) = bitstring(reinterpret(UInt16, x))
Base.bitstring(x::BFloat16) = bitstring(reinterpret(UInt16, x))

0 comments on commit 663b207

Please sign in to comment.