Infinities.jl icon indicating copy to clipboard operation
Infinities.jl copied to clipboard

`NotANumber` vs `ArgumentError`

Open putianyi889 opened this issue 2 years ago • 3 comments

Is this behaviour intended? Why is it?

https://github.com/JuliaMath/Infinities.jl/blob/0972ead14abe0eee1218c6f5b2e244775bd9e4c8/test/runtests.jl#L41

https://github.com/JuliaMath/Infinities.jl/blob/0972ead14abe0eee1218c6f5b2e244775bd9e4c8/test/runtests.jl#L163

putianyi889 avatar Jun 07 '23 14:06 putianyi889

The second one is because you can't return the result in a type-stable way.

I'm not sure if NotANumber is actually needed anywhere.... if downstream packages pass with an ArgumentError that could be preferable

dlfivefifty avatar Jun 08 '23 14:06 dlfivefifty

The second one is because you can't return the result in a type-stable way.

That's also a point of #37

I'm not sure if NotANumber is actually needed anywhere

It's discussed in #7

putianyi889 avatar Jun 08 '23 14:06 putianyi889

I'm not sure my argument in #7 holds water as the same would be true for ∞ + (-∞)

dlfivefifty avatar Jun 08 '23 14:06 dlfivefifty