anonymousking123 Posted January 29, 2015 Share Posted January 29, 2015 (edited) problem solved Edited January 29, 2015 by anonymousking123 Link to comment Share on other sites More sharing options...
fiveworlds Posted January 29, 2015 Share Posted January 29, 2015 How often do you have to perform this operation to get a specific x? once Link to comment Share on other sites More sharing options...
anonymousking123 Posted January 29, 2015 Author Share Posted January 29, 2015 once the first person to post such formula in private. The formula must work in all cases, and be comutationally feasible Link to comment Share on other sites More sharing options...
fiveworlds Posted January 29, 2015 Share Posted January 29, 2015 (edited) <script> var equation= "(x²-1)² / (4*x*(x²+a*x+1))"; var a=0; var b=10; while(a<b) { var equation = equation.replace("x", "(x²-1)² / (4*x*(x²+a*x+1))"); a=a+1; } document.write(equation); </script> Where b is the specific new_x you are looking for so for new_x=10 (((((((((((x²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1))²-1)² / (4*x*(x²+a*x+1)) where x=9 if I was being less lazy I could calculate it as well Edited January 29, 2015 by fiveworlds Link to comment Share on other sites More sharing options...
anonymousking123 Posted January 29, 2015 Author Share Posted January 29, 2015 so that would be the correct response then? Link to comment Share on other sites More sharing options...
fiveworlds Posted January 29, 2015 Share Posted January 29, 2015 You can run it yourself in a .html file just copy and paste it into notepad. Of course over 100000 is kinda slow on my computer so there are some limitations to it. If I was to have it calculated I would run the above script as php and then use that to generate the javascript code to give me an answer. Link to comment Share on other sites More sharing options...
Strange Posted January 29, 2015 Share Posted January 29, 2015 The original problem has been deleted so I can't comment on that. But ... I would run the above script as php and then use that to generate the javascript code to give me an answer. Why use PHP to generate Javascript? The PHP can generate whatever output the Javascript was going to. Unless the deleted problem asked for a Javascript solution? Link to comment Share on other sites More sharing options...
Phi for All Posted January 29, 2015 Share Posted January 29, 2015 problem solved ! Moderator Note Please, don't EVER delete the opening post! You aren't the only person here to learn. Link to comment Share on other sites More sharing options...
Recommended Posts