Does FMP 18 Evaluate() Handle More Complex Expressions?

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


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

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.