Christopher Rowley

Results 471 comments of Christopher Rowley

I was thinking about it earlier, and I definitely think that `ComplexInfinity{T}` should represent the number `z * ∞` by the non-zero complex number `z :: Complex{T}` and not by...

Yes please. As a general rule I think `x*∞` should be represented exactly if possible, whatever the type of `x`. On the whole this might mean storing `x` exactly, but...

> Projective Infinity (the infinity of the Riemann sphere) There's already https://github.com/scheinerman/RiemannComplexNumbers.jl No reason we couldn't add projective infinities in general though, if there's demand.

Type instability and promotion craziness! This is what `InfExtendedReal{Int}` solves, by being a single concrete type.

> Small union types do not suffer from type instability: this is the whole point of `Union{T,Missing}`. That relies on the specifics of the Julia compiler, and the notion of...

``` julia> map(a->[a], Union{Int,Infinity}[1,Infinity()]) 2-element Array{Array{T,1} where T,1}: [1] [Infinity()] julia> @inferred ans[1] ERROR: return type Array{Int64,1} does not match inferred return type Array{T,1} where T Stacktrace: [1] error(::String) at...

The above is exactly the sort of thing that someone doing numerical computing shouldn't have to think about: the existing API for number types is that they promote to a...

Also `[1, Infinity()]` is a `Vector{Real}` and `1:Infinity()` doesn't work at all. I suppose one fix would be to have a promotion rule `T

> Hmm, with the right overrides we can get things to work: My point was not specific to `Vector`, but applies to any type that has a numeric type parameter....

> [Arithmetic of ComplexInfiniity](https://functions.wolfram.com/Constants/ComplexInfinity/introductions/Symbols/ShowAll.htmll) I get File Not Found. > But the name reminds me to say that `RiemannSphere{T} = Union{Complex{T}, Infinity}` doesn't make conceptual sense because `Infinity()` is the...