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
julia> Distances.evaluate(Euclidean(), Int16(-1360), Int16(-136)) ERROR: DomainError with -9152.0: sqrt was called with a negative real argument but will only return a complex result if called with a complex argument. Try sqrt(Complex(x)). Stacktrace: [1] throw_complex_domainerror(f::Symbol, x::Float64) @ Base.Math ./math.jl:33 [2] sqrt @ ./math.jl:608 [inlined] [3] sqrt @ ./math.jl:1531 [inlined] [4] eval_end @ ~/.julia/packages/Distances/mlz7p/src/metrics.jl:336 [inlined] [5] _evaluate @ ~/.julia/packages/Distances/mlz7p/src/metrics.jl:314 [inlined] [6] Euclidean @ ~/.julia/packages/Distances/mlz7p/src/metrics.jl:331 [inlined] [7] evaluate(dist::Euclidean, a::Int16, b::Int16) @ Distances ~/.julia/packages/Distances/mlz7p/src/generic.jl:47 [8] top-level scope @ REPL[32]:1 julia> Distances.eval_op(Euclidean(), Int16(-1360), Int16(-136)) -9152
Would be nice if instead of an error, the typemax is returned, ideally with a check whether the operations are incurring an overflow
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Would be nice if instead of an error, the typemax is returned, ideally with a check whether the operations are incurring an overflow
The text was updated successfully, but these errors were encountered: