Shape-Machine

fn main() {
    let prev = 0.0;
    ? "" (prev);
    let count = 0;
    loop {
        let next = (prev + 3) * 0.86;
        if prev == next { break; }
        prev = next;
        print "{prev:9.6f} ";
        if ++count % 10 == 0 { println ""; }
    }
    println "\nTook {count + 1} iterations.";
}

Output:

4
 6.020000  7.757200  9.251192 10.536025 11.640982 12.591244 13.408470 14.111284 14.715704 15.235506 
15.682535 16.066980 16.397603 16.681938 16.926467 17.136762 17.317615 17.473149 17.606908 17.721941 
17.820869 17.905948 17.979115 18.042039 18.096153 18.142692 18.182715 18.217135 18.246736 18.272193 
18.294086 18.312914 18.329106 18.343031 18.355007 18.365306 18.374163 18.381780 18.388331 18.393965 
18.398810 18.402976 18.406560 18.409641 18.412291 18.414571 18.416531 18.418216 18.419666 18.420913 
18.421985 18.422907 18.423700 18.424382 18.424969 18.425473 18.425907 18.426280 18.426601 18.426877 
18.427114 18.427318 18.427493 18.427644 18.427774 18.427886 18.427982 18.428064 18.428135 18.428196 
18.428249 18.428294 18.428333 18.428366 18.428395 18.428420 18.428441 18.428459 18.428475 18.428488 
18.428500 18.428510 18.428519 18.428526 18.428532 18.428538 18.428543 18.428547 18.428550 18.428553 
18.428556 18.428558 18.428560 18.428561 18.428563 18.428564 18.428565 18.428566 18.428567 18.428567 
18.428568 18.428568 18.428569 18.428569 18.428570 18.428570 18.428570 18.428570 18.428570 18.428571 
18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 
18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 
18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 
18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 
18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 
18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 
18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 
18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 
18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 
18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 
18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 
18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 18.428571 

Took 231 iterations.

Attribution: This is a community solution for the Rosetta Code task Shape-Machine in Zen C.

This article uses material from the Rosetta Code article Shape-Machine, which is released under the GNU Free Documentation License 1.3. A list of the original authors can be found in the page history.