I have just updated Supply Chain News to pretty print Envision scripts as well. Here is the first script:
montecarlo 1000 with // approximate π value x = random.uniform(-1, 1) y = random.uniform(-1, 1) inCircle = x^2 + y^2 < 1 sample approxPi = avg(if inCircle then 4 else 0) show scalar "π approximation" with approxPi // 3.22
By the way, mathematical formulas are pretty-printed as well:
I have just updated Supply Chain News to pretty print Envision scripts as well. Here is the first script:
By the way, mathematical formulas are pretty-printed as well:
$$ \phi = \frac{1 + \sqrt{5}}{2} $$