Logo
Explore Help
Sign In
ada/cpython
0
0
Fork 0
You've already forked cpython
mirror of https://github.com/AdaCore/cpython.git synced 2026-02-12 12:57:15 -08:00
Code Issues Packages Projects Releases Wiki Activity
Files
4c3eda3a847c927bc1594de70b2bf9d27975c8ba
cpython/Python/hypot.c

23 lines
260 B
C
Raw Normal View History

*** empty log message ***
1996-08-29 18:10:41 +00:00
/* hypot() replacement */
Merged revisions 58939-58946 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r58940 | martin.v.loewis | 2007-11-12 05:53:02 +0100 (Mon, 12 Nov 2007) | 3 lines Only set rl_completion_display_matches_hook if there is a Python hook function. Fixes #1425. ........ r58941 | martin.v.loewis | 2007-11-12 06:14:05 +0100 (Mon, 12 Nov 2007) | 2 lines Patch #1418: Make the AC_REPLACE_FUNCS object files actually work. ........ r58942 | walter.doerwald | 2007-11-12 11:01:33 +0100 (Mon, 12 Nov 2007) | 2 lines Fix TextCalendar.prweek(). This closes issue #1427. ........
2007-11-12 15:01:33 +00:00
#include "Python.h"
*** empty log message ***
1996-08-29 18:10:41 +00:00
Mass ANSIfication of function definitions. Doesn't cover all 'extern' declarations yet, those come later.
2000-07-22 18:47:25 +00:00
double hypot(double x, double y)
*** empty log message ***
1996-08-29 18:10:41 +00:00
{
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);
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Page: 1483ms Template: 45ms
English
English
Licenses API