On August 14, 2017 8:00:19 PM EDT, Jed Brown <j...@jedbrown.org> wrote:
>Tobin Isaac <tis...@cc.gatech.edu> writes:
>> _Complex_I has problems if one of Re(z) and Imag(z) is intended to be
>Inf or -Inf.  For my purposes, I wanted to be able to define boxes in
>the complex plane that generalize to infinite strips.
>
>Sounds like maybe complex numbers aren't a good way to represent this
>construct (with multiple distinct infinities).

I'm only interested in tensor-product intervals not generalized circles in 
$\mathbb{C} \cup {\infty}$.  Using complex numbers is simple (I can use 
`PetscScalar lo, hi;` for all builds) and it takes advantage of ieee 754 
affinely extended real number line semantics instead of coming up with my own.  
I can't see something better.

>
>I don't have a great solution other than to just cast to a struct that
>you can tamper with directly.

Type-punning to a union is my fallback, which by my reading of the standards is 
valid in all _Complex implementations this far.

Reply via email to