Staging
v0.8.1
https://github.com/python/cpython
Revision ef63e9f345755d216d9b2e5bc817e7a45598e746 authored by Tim Peters on 13 March 2006, 05:53:04 UTC, committed by Tim Peters on 13 March 2006, 05:53:04 UTC
When the new -w option (yay! great idea) reruns a
failed test, first display the name of the test (else
it's not always clear from the output which test is
getting run).
1 parent 1baff3c
Raw File
Tip revision: ef63e9f345755d216d9b2e5bc817e7a45598e746 authored by Tim Peters on 13 March 2006, 05:53:04 UTC
Merge rev 42963 from the trunk.
Tip revision: ef63e9f
hypot.c
/* hypot() replacement */

#include "pyconfig.h"
#include "pyport.h"

double hypot(double x, double y)
{
	double yx;

	x = fabs(x);
	y = fabs(y);
	if (x < y) {
		double temp = x;
		x = y;
		y = temp;
	}
	if (x == 0.)
		return 0.;
	else {
		yx = y/x;
		return x*sqrt(1.+yx*yx);
	}
}
back to top