C-extension in Python -- returning results
Fredrik Lundh
fredrik at pythonware.com
Wed Nov 7 16:36:31 EST 2001
Keith Farmer wrote:
> I don't understand what the '-1.#IND' returns indicate.
IEEE indeterminates.
the following site mentions things like (infinity - infinity) and
(0 x infinity):
http://www.research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html
and -1.#IND is exactly what the following small program prints
(if compiled under MSVC, at least):
main()
{
double a = 1.0;
double b = 0.0;
double c = a / b;
double d = c - c;
printf("%g", d);
}
maybe you're dividing by zero somewhere in there? adding a few
strategic printf statements to your code might help you figure out
where things go wrong.
(and I'm sure tim will correct me if I'm wrong)
</F>
More information about the Python-list
mailing list