[SOLVED] Simple I/O Math
4 replies



06.09.11 08:34:02 pm
Here's a simple question that I just can't solve at the moment...
Can I get the formula?
Code:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
Input | Output
------------------
4 | 4
6 | 8
8 | 16
10 | 32
12 | 64
? | ?
------------------
------------------
4 | 4
6 | 8
8 | 16
10 | 32
12 | 64
? | ?
------------------
Can I get the formula?
Code:
1
Output=func(Input)
edited 1×, last 06.09.11 09:13:12 pm
I guess this is an exponential function and it looks like this:
Code:
1
2
3
2
3
function func(x)
return 2^(x/2)
end
return 2^(x/2)
end
if you want the question marks to be replaced, its
14 and 128.
14 and 128.
On the outside I may appear like an emotionless sarcastic piece of shit but just like an onion when you peel off more layers you find the exact same thing every single time and you start crying.
Flacko is right
func(4) = 2^(4/2) = 2^2 = 4
func(6) = 2^(6/2) = 2^3 = 8
func(8) = 2^(8/2) = 2^4 = 16
func(10) = 2^(10/2) = 2^5 = 32
func(12) = 2^(12/2) = 2^6 = 64
func(4) = 2^(4/2) = 2^2 = 4

func(6) = 2^(6/2) = 2^3 = 8

func(8) = 2^(8/2) = 2^4 = 16

func(10) = 2^(10/2) = 2^5 = 32

func(12) = 2^(12/2) = 2^6 = 64

Should I come back and make one last map for CS2D?



