I have a hard time imagining where it’d make sense to use AbstractFloat
unless you’re actually compensating for floating point rounding with eps()
or nextfloat()
or similar. There are very few methods that work on all floating point numbers but wouldn’t also work on, for example Rational
or all Real
s. In many cases you can even widen definitions the whole way to Number
.
Restricting methods to ::AbstractFloat
arguments will likely artificially limit your code’s usefulness. And using ::AbstractFloat
as the type of a field in a custom type or as a type parameter like Vector{AbstractFloat}
is a major performance trap. So, yes, the name may be a little annoying, but it also isn’t all that useful.