LEFT | RIGHT |
(Both sides are equal) |
1 /* Math module -- standard C math library functions, pi and e */ | 1 /* Math module -- standard C math library functions, pi and e */ |
2 | 2 |
3 /* Here are some comments from Tim Peters, extracted from the | 3 /* Here are some comments from Tim Peters, extracted from the |
4 discussion attached to http://bugs.python.org/issue1640. They | 4 discussion attached to http://bugs.python.org/issue1640. They |
5 describe the general aims of the math module with respect to | 5 describe the general aims of the math module with respect to |
6 special values, IEEE-754 floating-point exceptions, and Python | 6 special values, IEEE-754 floating-point exceptions, and Python |
7 exceptions. | 7 exceptions. |
8 | 8 |
9 These are the "spirit of 754" rules: | 9 These are the "spirit of 754" rules: |
10 | 10 |
(...skipping 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2021 m = PyModule_Create(&mathmodule); | 2021 m = PyModule_Create(&mathmodule); |
2022 if (m == NULL) | 2022 if (m == NULL) |
2023 goto finally; | 2023 goto finally; |
2024 | 2024 |
2025 PyModule_AddObject(m, "pi", PyFloat_FromDouble(Py_MATH_PI)); | 2025 PyModule_AddObject(m, "pi", PyFloat_FromDouble(Py_MATH_PI)); |
2026 PyModule_AddObject(m, "e", PyFloat_FromDouble(Py_MATH_E)); | 2026 PyModule_AddObject(m, "e", PyFloat_FromDouble(Py_MATH_E)); |
2027 | 2027 |
2028 finally: | 2028 finally: |
2029 return m; | 2029 return m; |
2030 } | 2030 } |
LEFT | RIGHT |