Invalid operations

Formulas can easily perform invalid operations, such as dividing by zero. Rather than showing an error message when an invalid operation occurs, Ultra Fractal just ignores the error and calculates further. This means that the resulting image can be unpredictable if you do not pay proper attention to these special cases. See also the isInf and isNaN functions, and Compatibility.

Invalid operations include dividing by zero (also with the % operator), and using some built-in functions with invalid arguments. The range of valid arguments for a function is always discussed (if there are invalid values) in the description of the function. It does not hurt to use arguments outside the valid range, as long as you remember that the results may be unpredictable.

If you are using loops, you should avoid writing infinite loops at all times. An infinite loop is a loop which repeats forever, without stopping. Here is are two examples:

while true
  ...
endwhile
repeat
  ...
until false

You must make sure that the loop is exited at some time. This means that the condition in a while loop should eventually become false, and that the condition in a repeat loop should eventually become true.

If, for some reason, the formula still enters an infinite loop, the fractal window will remain black and no pixels will be calculated at all because the formula is still busy to calculate the first pixel, which will never be finished. Ultra Fractal is still able to terminate an infinite loop. Just close the fractal window, or select another formula.

Next: Publishing your formulas

See Also
Debugging