# Does FMP 18 Evaluate() Handle More Complex Expressions?

**URL:** <https://the.fmsoup.org/t/does-fmp-18-evaluate-handle-more-complex-expressions/104>\
**Category:** Questions\
**Created:** [June 10, 2019, 4:19pm UTC](https://the.fmsoup.org/t/does-fmp-18-evaluate-handle-more-complex-expressions/104 "2019-06-10T16:19:05Z")\
**Posts on this page:** 2\
**Page:** 4

<div class="post-metadata">

**Author:** ![anon45965781](https://avatars.discourse-cdn.com/v4/letter/a/13edae/32.png) [@anon45965781](https://the.fmsoup.org/u/anon45965781)\
**Post date:** [August 2, 2019, 8:28pm UTC](https://the.fmsoup.org/t/does-fmp-18-evaluate-handle-more-complex-expressions/104/62 "2019-08-02T20:28:13Z")

</div>

Yep, this thread has legs!

The FMP community is awesome.

–

If anyone wants to have some fun, now that FMP 18 has a “while” statement (“for statement” coming in FMP 101…LOL), implement the _Sieve of Eratosthenes_ in FMP and see what kind of performance you get for getting the prime numbers from the first 100,000,000 (100M) integers.

This is super fun and simple-to-implement algorithm taught in intro programming classes (probably even in high schools these days…)

_[Sieve of Eratosthenes - Wikipedia](https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes)_

–  
(for comparison, in Java it takes 1.9 seconds to get all primes from the first 100,000,000 integers.)

---

<div class="post-metadata">

**Author:** ![AndyHibbs](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/andyhibbs/32/3089_2.png) [@AndyHibbs](https://the.fmsoup.org/u/AndyHibbs)\
**Post date:** [August 3, 2019, 7:13am UTC](https://the.fmsoup.org/t/does-fmp-18-evaluate-handle-more-complex-expressions/104/63 "2019-08-03T07:13:10Z")

</div>

The evaluate function is brilliant for generating self incrementing variables such as $var1, $var2, etc. Just one of the multitude of things we’ve used it for.

[Previous page](https://the.fmsoup.org/t/does-fmp-18-evaluate-handle-more-complex-expressions/104.md?page=3)
