summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-06-24 13:55:46 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-06-24 13:55:46 (GMT)
commit448da15b7fffbb7e10b589a22c7ee059a629bf60 (patch)
tree5ccaf989644eb1335f2de7a6ce5b0c14f471ec70 /tests
parent447722a6ad983008b5be213d3e39685262398019 (diff)
downloadtcl-448da15b7fffbb7e10b589a22c7ee059a629bf60.zip
tcl-448da15b7fffbb7e10b589a22c7ee059a629bf60.tar.gz
tcl-448da15b7fffbb7e10b589a22c7ee059a629bf60.tar.bz2
Make sure that an input lying precisely 1/2 ULP between two floating point values is rounded to even.
Diffstat (limited to 'tests')
-rw-r--r--tests/expr.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/expr.test b/tests/expr.test
index 42d0c79..bd5ed8f 100644
--- a/tests/expr.test
+++ b/tests/expr.test
@@ -7165,6 +7165,14 @@ test expr-48.1 {Bug 1770224} {
expr {-0x8000000000000001 >> 0x8000000000000000}
} -1
+test expr-50.1 {test sqrt() of bignums with non-Inf answer} {
+ expr {sqrt("1[string repeat 0 616]") == 1e308}
+} 1
+
+test expr-51.1 {test round-to-even on input} {
+ expr 6.9294956446009195e15
+} 6929495644600920.0
+
# cleanup
if {[info exists a]} {
unset a