marcus Posted May 24, 2007 Share Posted May 24, 2007 I take a starting number, say, 35000. I want to have it so, the next day I get 40% of that number, and add it, but continue the process for 7300 days. So: Day 1: 35000 Day 2: 35000*.40+Day 1 Day 3: Day 2*.40+Day 2 Day 4: Day 3 * .40+ Day 3 for 7300 days. Quote Link to comment https://forums.phpfreaks.com/topic/52739-solved-help-how-can-this-be-done/ Share on other sites More sharing options...
hitman6003 Posted May 24, 2007 Share Posted May 24, 2007 echo 35000 * (pow(1.4, 7300)); Quote Link to comment https://forums.phpfreaks.com/topic/52739-solved-help-how-can-this-be-done/#findComment-260405 Share on other sites More sharing options...
marcus Posted May 24, 2007 Author Share Posted May 24, 2007 Turns out infinite. Anyway around this? I did a for statement before, same result. Quote Link to comment https://forums.phpfreaks.com/topic/52739-solved-help-how-can-this-be-done/#findComment-260406 Share on other sites More sharing options...
hitman6003 Posted May 24, 2007 Share Posted May 24, 2007 probably not infinite...just too big an int for php Quote Link to comment https://forums.phpfreaks.com/topic/52739-solved-help-how-can-this-be-done/#findComment-260408 Share on other sites More sharing options...
marcus Posted May 24, 2007 Author Share Posted May 24, 2007 I could imagine. It has to be possible. Say: 32000 pounds. Next day + 40% of that, for 20 years (no leap) Quote Link to comment https://forums.phpfreaks.com/topic/52739-solved-help-how-can-this-be-done/#findComment-260410 Share on other sites More sharing options...
AndyB Posted May 24, 2007 Share Posted May 24, 2007 Of course it's possible, but is it worth doing? Apparently not, as I make it slightly less than 2 followed by one thousand and sixty nine zeros ... give or take a few quintillion. Quote Link to comment https://forums.phpfreaks.com/topic/52739-solved-help-how-can-this-be-done/#findComment-260449 Share on other sites More sharing options...
hitman6003 Posted May 24, 2007 Share Posted May 24, 2007 is that all? Quote Link to comment https://forums.phpfreaks.com/topic/52739-solved-help-how-can-this-be-done/#findComment-260453 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.