0

Suppose I have a number, x, which should be doubled every second.

If one had a function which is called exactly once every second, the solution would be simple: All you would have to do was multiplying x by 2.

What, however, can you do to achieve the same results when working not in one-second but very tiny steps?

The target function should, given a small delta time value, still multiply x by 2 every second.

An example:

  1. x == 3

  2. Apply the function every millisecond for one second, therefore passing 1/1000 as parameter to it

  3. Now x == 6

How can I solve this problem?

flag
Please read the faq; this question is not research-level and hence not suitable for this site. You might try math.stackexchange.com instead. – Todd Trimble Jul 25 2011 at 12:34
1 
If doubling 2 gives you 3, you have a serious problem. But, seriously, the problem is not suitable for this site which, as per the faq, is for questions of interest to research mathematicians. It would be welcome at math.stackexchange – Gerry Myerson Jul 25 2011 at 12:34

closed as too localized by Todd Trimble, Gerry Myerson, Tony Huynh, Neil Strickland, Emil Jeřábek Jul 25 2011 at 12:54

Browse other questions tagged or ask your own question.