I wonder is there a workaround, or an external, which will allow me to work with a really big number.
Project Euler (a wonderful little source for programming exercises) asks in problem 25 "What is the first term in the Fibonacci sequence to contain 1000 digits?"
I can get as far as term 1470 which is
72836013092016285809643117......307018801152
and which contains 307 digits before I get the dreaded "inf".
I'd really like to be able to use LiveCode to solve this.
My script is
Code: Select all
On MouseUp
put "n" into Thou
put 1 into start
put 1 into Feed
put 0 into Nex
put 2 into term
repeat until thou = "y"
Put start + feed into Nex
put feed into start
put nex into feed
add 1 to term
if term mod 10 = 0 then
wait 1 millisecond
put term && number of chars in feed && feed
end if
if number of chars in feed > 999 then
put term && feed into field "Display"
end if
end repeat
end mouseUp