summary refs log tree commit diff stats
path: root/tests/showoff
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2020-02-07 17:10:25 +0100
committerGitHub <noreply@github.com>2020-02-07 17:10:25 +0100
commitb2c6db97f9f477f6999fa9c7aae5e32f10b6b3fe (patch)
treedb2b5c35608cfab2dd81514c8bf0a7c643af3056 /tests/showoff
parentcdedb863488da74622aa1cbdf6e9e989dabd4145 (diff)
downloadNim-b2c6db97f9f477f6999fa9c7aae5e32f10b6b3fe.tar.gz
printing float values will have one more digit. (#13276) [backport]
* printing float values will have one more digit. Fixes #13196
Diffstat (limited to 'tests/showoff')
-rw-r--r--tests/showoff/tdrdobbs_examples.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/showoff/tdrdobbs_examples.nim b/tests/showoff/tdrdobbs_examples.nim
index 0e10c6dd8..dd9d4ed72 100644
--- a/tests/showoff/tdrdobbs_examples.nim
+++ b/tests/showoff/tdrdobbs_examples.nim
@@ -1,7 +1,7 @@
 discard """
   output: '''108
 11 -1 1936
-0.4
+0.5
 true
 truefalse'''
 """
@@ -75,7 +75,7 @@ proc evaluate(n: Formula, varToVal: proc (name: string): float): float =
   of fkMul: evaluate(n.left, varToVal) * evaluate(n.right, varToVal)
   of fkExp: pow(evaluate(n.left, varToVal), evaluate(n.right, varToVal))
 
-echo evaluate(Formula(kind: fkLit, value: 0.4), nil)
+echo evaluate(Formula(kind: fkLit, value: 0.5), nil)
 
 proc isPolyTerm(n: Formula): bool =
   n.kind == fkMul and n.left.kind == fkLit and (let e = n.right;