ama_trig
Full Member level 2
- Joined
- Oct 9, 2009
- Messages
- 123
- Helped
- 20
- Reputation
- 40
- Reaction score
- 13
- Trophy points
- 1,298
- Location
- Where my hard drive lives!
- Activity points
- 2,100
Q: I've got 3 events happening in period of 28,29,30 days, each event starts different time in years day[0-365](or actually I know the last time each one did happen), for example 102,109,107 also I know that today is 115(of 365),
1)How to calculate how many days after today it is 3 events are going to happen again?
2)what about the same, for 4 events?
Add. info:
I'm looking Fastest way to do this, at first what I did was to define a loop that incremented today by factor of 1, then calculate the modulus for 3 of them(taking time shift into consideration),when the result for three of them were zero, Bingo!!!, but it was way too slow!
1)How to calculate how many days after today it is 3 events are going to happen again?
2)what about the same, for 4 events?
Add. info:
I'm looking Fastest way to do this, at first what I did was to define a loop that incremented today by factor of 1, then calculate the modulus for 3 of them(taking time shift into consideration),when the result for three of them were zero, Bingo!!!, but it was way too slow!