14 Nov
2005
14 Nov
'05
1:41 p.m.
Gary>I find Maple better when writing nested loops, the syntax is easier.
In maple you would write "for i from 1 to 10 do print(i) end do;"
In Macsyma, just "for i thru 10 do print(i)" If you don't need the index, "thru 10 do ..."
It's easy to put a while statement inside that.
"for i while i^3<1111 do print(i)" or "for i:2 unless integerp(sqrt(fib(i))) and not primep(i) do print(i-1)" or "for i:x^4+14 step -1 unless operatorp(factor(i),"*") do print(15+x^4-i)" or "for i:1 next 4*i while i<10^6 do print(logb(4,4*i))" . Macsyma's help is better, too. --rwg