quarkiverse / quarkus-bon-jova-rockstar

An implementation of Rockstar as a JVM language
https://codewithrockstar.com/
3 stars 2 forks source link

Mandelbrot implementation #115

Closed holly-cummins closed 7 months ago

holly-cummins commented 7 months ago

Tada!

image

I've made a few small functional fixes, and adjusted the mandelbrot program slightly from the reference implementation, to work around these issues:

Because of floating point fun and games, I matched the Satriani output exactly if I used 0.06666666666666666666666666 for the method argument, but not if I used the fraction our souls over the moon. I’ve adjusted a few pixels in the expectations to match the current implementation.

Changing line 65 of Constant.java

From

            trueBranch.assign(answer, method.loadNull());
```

  to 


            trueBranch.assign(answer, method.load(0d));

broke one test. Splitting that test out from neighbouring tests made the test pass again, which is slightly troubling but probably has to do with stored variable state.