summaryrefslogtreecommitdiffstatshomepage
path: root/tests/float/builtin_float_abs.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/float/builtin_float_abs.py')
-rw-r--r--tests/float/builtin_float_abs.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/float/builtin_float_abs.py b/tests/float/builtin_float_abs.py
new file mode 100644
index 0000000000..c0935c6eec
--- /dev/null
+++ b/tests/float/builtin_float_abs.py
@@ -0,0 +1,13 @@
+# test builtin abs function with float args
+
+for val in (
+ '1.0',
+ '-1.0',
+ '0.0',
+ '-0.0',
+ 'nan',
+ '-nan',
+ 'inf',
+ '-inf',
+ ):
+ print(val, abs(float(val)))