I recently stumbled upon an error writing x->zeros(typeof(x), (2, 2))
, when I applied this to π
. I quickly found that this was related to the Irrational
type, which seems to be kind of a headache: Zero(π) and one(π) are false and true? discusses this. This leads to weird behaviours: for instance, in my case it was Irrational(zero(π))
throwing an error (because zero(π)
is false
).
So is there a reason for the type to exist?