How should i solve for x in this equation:
p*e^-x + q*sin(x) + r*cos(x) + s*tan(x) + t*x^2 + u = 0
with the user to input the values of p,q,r,s,t and u.
i'm thinking of looping from 0.0001 until i-dont-know-what
and then testing each value of x that will satisfy the equation.
but i dont think that's very efficient... especially if the given p,q,r,s,t and u values would yield to no possible value of x...
Nor, we might point out, is it a site which is in the business of giving away contest answers. It's extremely poor form to cheat, which is what you're trying to do. It's extremely stupid to announce that you're entering a java contest and then ask for help giving the contest web site as the URL for the problem you're trying to solve. Kind of gives the game away.
Unless there's something in the rules specifically allowing outside help, this is very bad, and speaks very poorly for you. Please act in a responsible manner in the future - and I don't mean by covering your tracks better!
where did i ever mention that this was part of the contest i was joining? The contest was offline. The problems were on paper. All we had to do was to code in JCreator LE.
the site where i got this problem from was an online repository of different programming problems. i googled it myself so that I may have an idea of what sort of problems may come out.
how's that for cheating? and is this not acting in a responsible manner?
anyways i won 2nd with 6 probs over 8 in the 3 hour limit and thankfully this prob didnt come out. :P
hmm, if i remember the reason for posting this...
it was a problem i had with java decimals
i tried to loop from
0.0001 until 1 since this is the range for x
i then iterated x by 0.0001
but the problem i had was that the operation result turned out to be something like:
x = 0.0001 + 0.0001 = 0.00019
it wasnt accurate... x.x
its as far as i cud remember
hey there :)
i found the perfect answer for my query :)
are actually pretty accurate ESTIMATES. Thus, both are widely used in scientific calculations of very very large or very very small numbers...
in cases where data is sensitive and has to be accurate (like money, for example)
it is best to use