Simple math equation??

Pages: 12
ill try some variations of that and see if i can get it
wow 20 replies in 1 hour :O
that is like a record (21 now)
Well, for this expression


1
2
dq = 15072.0 * 
 ( 1.0 - ( ( a + y ) / a ) / ( 1.0 + ( a + y * f ) / ( k * std::log( ( a + y ) /a ) / log( 2.0 ) ) ) ); 


I have 5024
yay i win!!
(but with the gay method lol)
suppose the base of the solution keys log = 1.616807
then this should be your code :
dq = 15072*(1-((k/a)/(1+((k*f)/(k*(log(k/a)/log(1.616807)))))));
and the answer is correct -.-
EDIT i replace y+a by k since theyre both 0.1
Last edited on
vlad same mistake again :s
( a + y * f ) should become ((a+y)*f)
thanks vlad and gelatine for all your help i appreciate it sorry for taking up so much time
no problemo :p i like doing this. and i already learned alot bout that log() i have never seen it at school before (im only 15)
@gelatine
vlad same mistake again :s
( a + y * f ) should become ((a+y)*f)


If so then I get

7536
yeah same as i had at last post from page 1
so in case you have swapped the 0 and the 5 in 15072 the code would become:
dq = 10572*(1-((k/a)/(1+((k*f)/(k*(log(k/a)/log(1.616807)))))));
which outputs 5286
i really believe that 7536 should be the correct answer. by the way where did you get that equation from? was it from school or is it a formula that exists?
it was a given and all the variables were given, we just had to convert it from written math to programing language. it was tricky because there were multiple operations and sets of parenthesis
pff i'm giving up... i have been trying all time and i have had 1136 or something like that but nothing correct ;s
i think i have it now

try this

the original equation was:
dq = (15072*(1-(((a + y)/a)/(1+(((a + y)*f)/(k*(log((a + y))/a)))))));

the new equation is:
dq = 15072*(1-(((a + y)/a)/(1+(((a + y)*f)/k)*(log((a + y)/a)))));

*note the parenthesis around the k value*

i now get the answer 5283.21

all that time and effort for just a '(' to be changed to a ')'
Last edited on
wow jesus...
Topic archived. No new replies allowed.
Pages: 12