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)
commit3ea3c1f2f99b0ca58203368be9c7baeff3f6c5e4 (patch)
tree5ccaf989644eb1335f2de7a6ce5b0c14f471ec70 /tests
parentfde157fe110c3d91ac52522c38683329a33f70b9 (diff)
downloadtcl-3ea3c1f2f99b0ca58203368be9c7baeff3f6c5e4.zip
tcl-3ea3c1f2f99b0ca58203368be9c7baeff3f6c5e4.tar.gz
tcl-3ea3c1f2f99b0ca58203368be9c7baeff3f6c5e4.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