[Top][All Lists]

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

Re: [Bug-glpk] 0 ** 0; result undefined

From: Andrew Makhorin
Subject: Re: [Bug-glpk] 0 ** 0; result undefined
Date: Sun, 9 Nov 2008 05:31:30 +0300

> According to ISO/IEC 9899:TC2 (ISO C99)
> A domain error may occur if x is zero and y is zero. (in function pow).

This standard also says (see subsection F.9.4.4, page 460):

   pow(x, 0) returns 1 for any x, even a NaN.

However, this does not mean that the GNU MathProg must follow the same
convention :)

> Obviously this is implementation dependent.

> Hence the code in fp_power has to check to be compatible with different
> C compilers.

It does check.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]