Message-ID: From: Shawn Hargreaves To: djgpp AT delorie DOT com Subject: Re: Problems with paranoia.c and pow(0,0) Date: Wed, 29 Apr 1998 13:48:47 +0100 MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk Alex writes: > but later I discovered the pow(0,0) is not number that is > uncountable. Try it on a calculator You will see! > > So, don't want to try to compute it. This a math rule as I > discovered. Absolutely. I don't know exactly what the ANSI standard states should be the result from this calculation, but when you think about it in mathematical terms, it is obvious that there can be no single 'correct' result. Given the two numerical truisms: n^0 = 1 0^n = 0 you can see that there is a conflict for the special case 0^0. Since there is no clear definition of what this calculation should produce, it seems reasonable for a library implementation to return NaN. Shawn Hargreaves.