Fractran: Difference between revisions
m
→{{header|Phix}}: improved comments
(→{{header|Phix}}: bugfix: prime_factors(1) now returns {1}, upped the ante) |
m (→{{header|Phix}}: improved comments) |
||
Line 2,762:
Notice that 2, being a power of 2, has zero in all slots other than 2.<br>
We can say that (eg) 15 is not exactly divisible by 2 because
We can also say that 15 is not a power of 2 because there are non-0 in other than n[find(2,known_factors)].<br>
Division (to whole integer) is performed simply by subtracting the corresponding powers, as above not possible if any would be negative.
<lang Phix>constant steps = 20,
|