]> git.proxmox.com Git - mirror_edk2.git/blobdiff - AppPkg/Applications/Python/Python-2.7.2/Lib/test/ieee754.txt
edk2: Remove AppPkg, StdLib, StdLibPrivateInternalFiles
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.2 / Lib / test / ieee754.txt
diff --git a/AppPkg/Applications/Python/Python-2.7.2/Lib/test/ieee754.txt b/AppPkg/Applications/Python/Python-2.7.2/Lib/test/ieee754.txt
deleted file mode 100644 (file)
index 1822dcf..0000000
+++ /dev/null
@@ -1,185 +0,0 @@
-======================================\r
-Python IEEE 754 floating point support\r
-======================================\r
-\r
->>> from sys import float_info as FI\r
->>> from math import *\r
->>> PI = pi\r
->>> E = e\r
-\r
-You must never compare two floats with == because you are not going to get\r
-what you expect. We treat two floats as equal if the difference between them\r
-is small than epsilon.\r
->>> EPS = 1E-15\r
->>> def equal(x, y):\r
-...     """Almost equal helper for floats"""\r
-...     return abs(x - y) < EPS\r
-\r
-\r
-NaNs and INFs\r
-=============\r
-\r
-In Python 2.6 and newer NaNs (not a number) and infinity can be constructed\r
-from the strings 'inf' and 'nan'.\r
-\r
->>> INF = float('inf')\r
->>> NINF = float('-inf')\r
->>> NAN = float('nan')\r
-\r
->>> INF\r
-inf\r
->>> NINF\r
--inf\r
->>> NAN\r
-nan\r
-\r
-The math module's ``isnan`` and ``isinf`` functions can be used to detect INF\r
-and NAN:\r
->>> isinf(INF), isinf(NINF), isnan(NAN)\r
-(True, True, True)\r
->>> INF == -NINF\r
-True\r
-\r
-Infinity\r
---------\r
-\r
-Ambiguous operations like ``0 * inf`` or ``inf - inf`` result in NaN.\r
->>> INF * 0\r
-nan\r
->>> INF - INF\r
-nan\r
->>> INF / INF\r
-nan\r
-\r
-However unambigous operations with inf return inf:\r
->>> INF * INF\r
-inf\r
->>> 1.5 * INF\r
-inf\r
->>> 0.5 * INF\r
-inf\r
->>> INF / 1000\r
-inf\r
-\r
-Not a Number\r
-------------\r
-\r
-NaNs are never equal to another number, even itself\r
->>> NAN == NAN\r
-False\r
->>> NAN < 0\r
-False\r
->>> NAN >= 0\r
-False\r
-\r
-All operations involving a NaN return a NaN except for nan**0 and 1**nan.\r
->>> 1 + NAN\r
-nan\r
->>> 1 * NAN\r
-nan\r
->>> 0 * NAN\r
-nan\r
->>> 1 ** NAN\r
-1.0\r
->>> NAN ** 0\r
-1.0\r
->>> 0 ** NAN\r
-nan\r
->>> (1.0 + FI.epsilon) * NAN\r
-nan\r
-\r
-Misc Functions\r
-==============\r
-\r
-The power of 1 raised to x is always 1.0, even for special values like 0,\r
-infinity and NaN.\r
-\r
->>> pow(1, 0)\r
-1.0\r
->>> pow(1, INF)\r
-1.0\r
->>> pow(1, -INF)\r
-1.0\r
->>> pow(1, NAN)\r
-1.0\r
-\r
-The power of 0 raised to x is defined as 0, if x is positive. Negative\r
-values are a domain error or zero division error and NaN result in a\r
-silent NaN.\r
-\r
->>> pow(0, 0)\r
-1.0\r
->>> pow(0, INF)\r
-0.0\r
->>> pow(0, -INF)\r
-Traceback (most recent call last):\r
-...\r
-ValueError: math domain error\r
->>> 0 ** -1\r
-Traceback (most recent call last):\r
-...\r
-ZeroDivisionError: 0.0 cannot be raised to a negative power\r
->>> pow(0, NAN)\r
-nan\r
-\r
-\r
-Trigonometric Functions\r
-=======================\r
-\r
->>> sin(INF)\r
-Traceback (most recent call last):\r
-...\r
-ValueError: math domain error\r
->>> sin(NINF)\r
-Traceback (most recent call last):\r
-...\r
-ValueError: math domain error\r
->>> sin(NAN)\r
-nan\r
->>> cos(INF)\r
-Traceback (most recent call last):\r
-...\r
-ValueError: math domain error\r
->>> cos(NINF)\r
-Traceback (most recent call last):\r
-...\r
-ValueError: math domain error\r
->>> cos(NAN)\r
-nan\r
->>> tan(INF)\r
-Traceback (most recent call last):\r
-...\r
-ValueError: math domain error\r
->>> tan(NINF)\r
-Traceback (most recent call last):\r
-...\r
-ValueError: math domain error\r
->>> tan(NAN)\r
-nan\r
-\r
-Neither pi nor tan are exact, but you can assume that tan(pi/2) is a large value\r
-and tan(pi) is a very small value:\r
->>> tan(PI/2) > 1E10\r
-True\r
->>> -tan(-PI/2) > 1E10\r
-True\r
->>> tan(PI) < 1E-15\r
-True\r
-\r
->>> asin(NAN), acos(NAN), atan(NAN)\r
-(nan, nan, nan)\r
->>> asin(INF), asin(NINF)\r
-Traceback (most recent call last):\r
-...\r
-ValueError: math domain error\r
->>> acos(INF), acos(NINF)\r
-Traceback (most recent call last):\r
-...\r
-ValueError: math domain error\r
->>> equal(atan(INF), PI/2), equal(atan(NINF), -PI/2)\r
-(True, True)\r
-\r
-\r
-Hyberbolic Functions\r
-====================\r
-\r