We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unsafe_trunc
llvm_arithmetic == true
1 parent ec873b3 commit aa90ef6Copy full SHA for aa90ef6
src/bfloat16.jl
@@ -290,6 +290,8 @@ if llvm_arithmetic
290
Base.unsafe_trunc(::Type{$Ti}, x::BFloat16) = Base.fptoui($Ti, x)
291
end
292
293
+ Base.unsafe_trunc(::Type{UInt128}, x::BFloat16) = unsafe_trunc(UInt128, Float32(x))
294
+ Base.unsafe_trunc(::Type{Int128}, x::BFloat16) = unsafe_trunc(Int128, Float32(x))
295
else
296
Base.unsafe_trunc(T::Type{<:Integer}, x::BFloat16) = unsafe_trunc(T, Float32(x))
297
0 commit comments