Staging
v0.8.1
https://github.com/python/cpython
Revision 0c0d949feb422483c9e81800e0f7c0aada25b6ff authored by Thomas Wouters on 25 February 2007, 22:15:53 UTC, committed by Thomas Wouters on 25 February 2007, 22:15:53 UTC
Don't use a fixed temporary name (gdbm).
Don't use our own temp name creation (dbm).
1 parent 0454bc2
Raw File
Tip revision: 0c0d949feb422483c9e81800e0f7c0aada25b6ff authored by Thomas Wouters on 25 February 2007, 22:15:53 UTC
Backported r51621 from p3yk:
Tip revision: 0c0d949
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