We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
rem
1 parent 70ae1d6 commit ee5bd54Copy full SHA for ee5bd54
src/normed.jl
@@ -203,3 +203,9 @@ end
203
204
_unsafe_trunc(::Type{T}, x::Integer) where {T} = x % T
205
_unsafe_trunc(::Type{T}, x) where {T} = unsafe_trunc(T, x)
206
+if !signbit(signed(unsafe_trunc(UInt, -12.345)))
207
+ # a workaround for 32-bit ARMv7 (issue #134)
208
+ function _unsafe_trunc(::Type{T}, x::AbstractFloat) where {T}
209
+ unsafe_trunc(T, unsafe_trunc(typeof(signed(zero(T))), x))
210
+ end
211
+end
0 commit comments