newlib?: pow function can produce incorrect results.

Cary R.
Tue Apr 24 01:52:00 GMT 2007

> gcc -fno-builtin ./pow-error.c 

Yes -fno-builtin certainly makes the results
consistent, but I would consider this result slightly
less correct.

> Unless the function call is optimized away.

Hmm, I guess I didn't think something as complicated
as pow would get optimized away. Thanks for the
insight! I also need to remember to look at the
assembly code.

> Are you only seeking insight, or is there a
> particular problem you want to solve?

Mostly insight. These are certainly extreme limits and
if they are wrong it's not a problem for what I'm
working on. The reason I even found them is that I try
to test my code at all the weird limits to make sure
things break gracefully and as expected. In this case
I got inconstant results that didn't match my
expectations. It would be nice if this could be made
more compliant, but I also realize that it's not
anyones job to do that.

Thanks for the replies,


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list