[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Correct way to build .deb with -mieee



Adam C Powell IV wrote:

> Note that it is possible to have one of
> these three divisions by zero and still produce a triangle or two; one
> can even have C1=C2<q and C0=C3>q and get two triangles, so we can't
> just test for any zeroes and skip the whole thing. ...

But you could test for any zeroes (maybe by precomputing the 4
denominators and checking whether their product is 0?) and then handle
that special case (presumably relatively rare and therefore causing
little performance penalty) with explicit checks for each denominator.
With floating-points the checks against 0 should probably involve a
finite tolerance, to avoid underflows and overflows.

> ...  It just seems easier
> to do it this way, and because it's just for graphics, I don't really
> care about the divide by zero.

I'm not sure what happens to the graphics (might it cause a visual
artefact at some point?) but someone might try to use the programme's
output for some further analysis (e.g., volume calculations) rather
than just visualization.

- Robert Funnell



Reply to: