Logo
Explore Help
Sign In
1berry/cpython
1
0
Fork 0
You've already forked cpython
Code Issues Packages Projects Releases Wiki Activity
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 Version: 1.23.8 Page: 716ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API