MonumoLtd / SimpleGA.jl

Geometric algebra in Julia.
MIT License
23 stars 2 forks source link

Define `Base.isnan` and friends for all multivectors #30

Open tpgillam opened 9 months ago

tpgillam commented 9 months ago

We should also decide whether to implement Base.isinf.

Base.isfinite has a default implementation of isfinite(x::Number) = iszero(x - x), which we currently delegate to -- this seems to be sensible. But we should add tests for this regardless.

tpgillam commented 9 months ago

Note that the built-in Complex type is a good model for e.g. what should happen if one component of a multivector is Inf and the other is NaN -- we should simply return true from both isnan and isinf.