We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normed
The current implementation of multiplication for Normed uses floating point arithmetic.
The following three points are important in adding checked_mul:
checked_mul
checked_add
checked_sub
FixedPoint
rawtype
N0f8
N0f16
Float
Therefore, the optimization for at least N0f8 and N0f16 is important.
The text was updated successfully, but these errors were encountered:
See also: #125 (comment)
However, reducing the bit width (i.e. use of UInt16) may be advantageous for SIMD loops.
UInt16
function Base.:*(x::N0f8, y::N0f8) m = UInt16(x.i) * UInt16(y.i) z = m + ((m + 0x80) >> 0x8) + 0x80 reinterpret(N0f8, unsafe_trunc(UInt8, z >> 0x8)) end
Sorry, something went wrong.
isapprox
typemin(::FixedPoint{<:Signed})
Successfully merging a pull request may close this issue.
The current implementation of multiplication for
Normed
uses floating point arithmetic.The following three points are important in adding
checked_mul
:checked_add
/checked_sub
,FixedPoint
multiplication andrawtype
multiplication are different.N0f8
,N0f16
and so on, do not cause overflow in multiplication.Float
-->Normed
conversion code may throw an exception.Therefore, the optimization for at least
N0f8
andN0f16
is important.The text was updated successfully, but these errors were encountered: