diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-02-08 00:30:24 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-08 09:30:24 +0100 |
commit | e4415422fe2b615a6dfe01bb7136ec41ef429108 (patch) | |
tree | 8e9f45c193aad54fa60c79cdc8e5f1981cea04cf /tests/showoff | |
parent | f3117d350ea245769d60a80b2d12b062cff4b8ff (diff) | |
download | Nim-e4415422fe2b615a6dfe01bb7136ec41ef429108.tar.gz |
Revert "printing float values will have one more digit. (#13276) [backport]" (#13363)
This reverts commit b2c6db97f9f477f6999fa9c7aae5e32f10b6b3fe.
Diffstat (limited to 'tests/showoff')
-rw-r--r-- | tests/showoff/tdrdobbs_examples.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/showoff/tdrdobbs_examples.nim b/tests/showoff/tdrdobbs_examples.nim index dd9d4ed72..0e10c6dd8 100644 --- a/tests/showoff/tdrdobbs_examples.nim +++ b/tests/showoff/tdrdobbs_examples.nim @@ -1,7 +1,7 @@ discard """ output: '''108 11 -1 1936 -0.5 +0.4 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.5), nil) +echo evaluate(Formula(kind: fkLit, value: 0.4), nil) proc isPolyTerm(n: Formula): bool = n.kind == fkMul and n.left.kind == fkLit and (let e = n.right; |