Created
January 27, 2020 14:53
-
-
Save Yardanico/19f841ce642148f6763b8769729ab366 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mathexpr | |
import std / [times, monotimes, stats] | |
var r: RunningStat | |
for iterations in 1..5: | |
let start = getMonoTime() | |
let e = newEvaluator() | |
for i in 0 ..< 1000000: | |
let r = e.eval("100^---+-++---++-+-+-.5+1 + --(1e2^(+(-(-(-.5e0))))+1e0)") | |
if r != 12.1: | |
quit(0) | |
r.push float((getMonoTime() - start).inMilliseconds) | |
echo r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment