On Friday 04 February 2005 17:10, Timothy Miller wrote: > I've been coding the adder I'm working on to have a true zero. Logic > detects that the exponent is zero (meaning something like 2^-127, I > think) and doing the appropriate thing to make it a true zero. > > But I'm wondering if I can't just do away with that. 2^-127 is so > small that any time it gets converted to integer or added to a larger > number, it really does become zero. In fact, I'm not sure I can come > up with a situation where not explicitly making that zero does any > harm. > > Comments?
At the moment no, other than pointing out that while OpenGL is very lax when it comes to specifying floating point precision, with one exception: It is always pointed out quite clearly that operations involving 0.0 and 1.0 should be precise. Now since the chip won't be fully programmable in the shader sense, this hack alone might not be too problematic as long as you're very careful. > One simplification I've already done is to not account for overflow or > underflow. If the exponent goes below 0 or greater than 255, it > wraps. Is it reasonable to just hope that no one uses numbers that > big or that small? Wrapping overflow is probably unproblematic, but I'm worried about underflow - even more so when you make 0 a really, really small number instead of true 0. What happens when, in the rasterizer, R, dRdY and dRdX are all 0? Will the adjust code in HorizontalRasterize work correctly? cu, Nicolai
pgpxdeDamJdL3.pgp
Description: PGP signature
_______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
