Posted: 3rd Jun 2021 11:26
This code:

+ Code Snippet
value as float
value = 1.0
do
    inc value, value
	print(value)
    Sync()
loop


will make my player crash with no error message (just closes). I know I have raised this issue before, but since it has not been fixed, I'm reporting it again.

Windows 10 64-bit
Intel i7 47200HQ
8GB ram
AGK2 built on 2021-02-09
Posted: 3rd Jun 2021 13:30
In the meantime, you can set a cap on the number.

"If your rent is a penny the first day and doubles every day..." tallied at computer speed gets really ridiculous inside of a second.

The image here is your number by about the 25th or so iteration.

Posted: 3rd Jun 2021 14:17
I'm fairly sure this is how my landlord has actually calculated my rent.
Posted: 5th Jun 2021 4:37
added to the git
Posted: 5th Jun 2021 5:37
I doubt that's PRINT related, the FPU side of the processor will put into an overflow state if you keep doubling floats. once this happens future float operations will no doubt hang it.
Posted: 11th Jun 2021 2:55
The image here is your number by about the 25th or so iteration


That is way more that 25.

You could do 30 on paper and see it is like 5+million dollars on the last day, and over 10 mil for the total.

This is an old joke my grandmother taught me, but it wasn't rent. (they hired you for the month, and that was your daily pay - everyone says okay after you explain the first week - lol - sweet contract)

I have made a program to check Mersenne prime numbers using Dark Basic Classic that could do results thousands of digits long (many screens) accurately by using multidimensional arrays for incrementing the numbers.

So, there are easy work-arounds for math processor limitations. (I used addition to do multiplication, so it was the long way around but it worked fine)

I have also used this doubling factor to illustrate the global human population problem if each couple has an average of 4 children... 30 generations adds up fast.

In the 1980's I was doing census research and saw that there were roughly 1.6 billion people on the planet in the year 1900, and they were predicting we would hit 7 billion by the year 2000.

I warned them then that if humans procreate the next 100 years at the same rate they have for the last 100 years, that there would be about 3.5 times the number of people that the planet can sustain based on the best agricultural estimates.

No one wanted to listen to a kid trying to warn them, but now they realize the dilemma, hence the population reduction efforts through wars, chem trails, man made viruses, sugar and corn syrup food additives, etc etc... (unfortunately the pollution damage is already too far gone - ocean life depletion, carbon emissions, etc etc all due to overpopulation)

Fun math exercise though.