Is the Python built-in math library embedded in the C math library, or does Python have a C-independent math library? Also, an independent Python platform library?
below is the page on which it is written :
Note. The module mathconsists mainly of thin wrappers around the functions of the C library math. The behavior in exceptional cases is poorly defined by the C standards, and Python inherits most of its math-function error-reporting behavior from the C platform implementation. As a result, specific exceptions that occur in cases of errors (and even if some arguments are considered exceptional at all) are not defined in what a useful cross platform or cross version. For example, whether it returns a math.log(0)value -Infor raises a value ValueErroror OverflowErrorisnt, and in cases where it math.log(0)raises OverflowError, it math.log(0L)can raise ValueError.NaN, NaN. NaN . - libm. ValueError EDOM OverflowError errno ERANGE.2.6: Python NaN libm.
Note. The module mathconsists mainly of thin wrappers around the functions of the C library math. The behavior in exceptional cases is poorly defined by the C standards, and Python inherits most of its math-function error-reporting behavior from the C platform implementation. As a result, specific exceptions that occur in cases of errors (and even if some arguments are considered exceptional at all) are not defined in what a useful cross platform or cross version. For example, whether it returns a math.log(0)value -Infor raises a value ValueErroror OverflowErrorisnt, and in cases where it math.log(0)raises OverflowError, it math.log(0L)can raise ValueError.
math
math.log(0)
-Inf
ValueError
OverflowError
math.log(0L)
NaN, NaN. NaN . - libm. ValueError EDOM OverflowError errno ERANGE.
NaN
EDOM
errno ERANGE
2.6: Python NaN libm.
libm
Python C, . Windows " C".. , MicrosoftCRunTimeLibrary (MSCRT).
Source: https://habr.com/ru/post/1713165/More articles:How to change font color using html? - htmlOpening a MS Access database from VB that is being used by another user - databaseCriticism of my MySQL database for unlimited areas of DYNAMIC - mysqlJDBC connection string for SQL Server cluster - sql-serverHow do I do cross-project refactoring with ropemac? - pythonCheck implementation of recursive interface, C # - reflectionCreating all possible trees of depth N? - code-generationHow can I select the entire row when using max - sqlasp.net MVC: pass query string as string or separate parameters? - query-stringSQL: CASE constraint (number of conditions WHEN, THEN) - sqlAll Articles