On 2007-07-30, Timothy Normand Miller wrote: > On 7/30/07, Petter Urkedal <[EMAIL PROTECTED]> wrote: > > On 2007-07-30, Andre Pouliot wrote: > > > In that case I'm going to modify the program to make the result go to > > > infinity when we receive an infinite/NAN or force the output at zero when > > > we > > > receive an denormalized/zero value. So no more denormalized value. All > > > case > > > that make the pipeline behave strangely will be covered. The case infinite > > > multiplied by zero will result in zero unless someone have an objection. > > > > I think I'd let Inf*0 = NaN, the argument being as follows: Ignoring the > > sign, if the result of an operation on finite values is Inf, the true > > value can be anything above the greatest representable, and if the > > result is 0, the value can be anything below the smallest representable. > > The product of the two can be *any* value including 0 and infinite. > > For us, infinity is just as undefined as NaN. Sure, we can clamp > infinity to the max value when converting to fixed point, and we > probably will, but we'll do it with the least logic, meaning that NaN > will end up being clamped the same.
I see I'm thinking to generally here. Dropping corner cases seems good, but choosing between Inf and NaN, isn't NaN the more general? > Anyhow, there's a reason I prefer that 0*inf yield zero. That's > because zero is defined. Zero may be used as a way to take some > operand out of consideration. To generalize, we might have a constant > of zero as one operand and GARBAGE as the other because of some other > optimization. If we are talking about coordinates, isn't it an advantage that any undefined operation results in NaN and causing the corresponding triangles not be rendered, rather than potentially ending up in the corner of the screen? Well, that was may practical consideration, but if you say 0*Inf=0 (0*NaN=0) is good for the pipeline, I'll take your word for it. _______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
