>>Third, sqrt((double)(n*n)) is exact >>because sqrt is accurate to 1 ulp on your machine. This is really the core of my original question. > How do they do that? > Someone else has already suggested that > there's something better than Newton's algorithm. > Perhaps it's related to the old long-division algorithm > that I vaguely remember from elementary school. > Do you know the details? I used to. I used Google http://www.google.com/ to search for +floating-point +square root +SRT algorithm I found lots of stuff > including lots of stuff written by my mentors -- > Milos Ercegovac and Thomas Lang. See: Arbitrary Precision Square Root Algorithm; Was:Unreasonable accuracy of sqrt() TomCee ==== I am currently studying numerical analysis and my professor was talking about something called minimax. However, I can not find info on it in the notes that he posts. I was wondering if somebody has any information on it? I do know that Mn, the nth minimax polynomial is the best approximation of a polynomial, but thats about it. Any help would be appreciated. ==== This is likely a very simple problem for anyone posting to this group, but I was wondering if someone might help me out. I should say help me to help my son. Here it is: A vacant lot is 100 feet long. The area of the lot in square feet is twice the perimeter in feet. What is the width of the lot? Writing it out as shown below with x being the width of the lot, the only number I can come up with that is close is 4.16, but that doesn't quite work. Can anyone help? How would you work this to solve for the width? (100x / 2) = (2x+200) dtechtive@verizon.net ==== A simple set-up for this would begin like: eqn1: A = 100 * X = 2 * P; ==> P = 50X eqn2: P = 2 * (100 + X) ; ==> X = 25/6 ~ 4.166.... So I'd conclude that your answer is 'almost' correct. Correctly rounding you would have reported 4.17 not 4.16, either way though when you round your numbers will not come out quite right. > This is likely a very simple problem for anyone posting to this group, > but I was wondering if someone might help me out. I should say help > me to help my son. Here it is: A vacant lot is 100 feet long. The area of the lot in square feet is > twice the perimeter in feet. What is the width of the lot? Writing it out as shown below with x being the width of the lot, the > only number I can come up with that is close is 4.16, but that doesn't > quite work. Can anyone help? How would you work this to solve for the width? (100x / 2) = (2x+200) > dtechtive@verizon.net ==== Please clarify doesn't quite work; your equation appears to match your problem statement. Jerry > This is likely a very simple problem for anyone posting to this group, > but I was wondering if someone might help me out. I should say help > me to help my son. Here it is: A vacant lot is 100 feet long. The area of the lot in square feet is > twice the perimeter in feet. What is the width of the lot? Writing it out as shown below with x being the width of the lot, the > only number I can come up with that is close is 4.16, but that doesn't > quite work. Can anyone help? How would you work this to solve for the width? (100x / 2) = (2x+200) > dtechtive@verizon.net ==== This is likely a very simple problem for anyone posting to this group, > but I was wondering if someone might help me out. I should say help > me to help my son. Here it is: A vacant lot is 100 feet long. The area of the lot in square feet is > twice the perimeter in feet. What is the width of the lot? Writing it out as shown below with x being the width of the lot, the > only number I can come up with that is close is 4.16, but that doesn't > quite work. Can anyone help? How would you work this to solve for the width? (100x / 2) = (2x+200) > dtechtive@verizon.net > Please clarify doesn't quite work; your equation appears to > match your problem statement. Jerry Not quite a match. The equation should be 100x = 2(2x + 100). The answer is 100/99. Very skinny lot! ==== This is likely a very simple problem for anyone posting to this > group, but I was wondering if someone might help me out. I should > say help me to help my son. Here it is: A vacant lot is 100 feet long. The area of the lot in square feet is > twice the perimeter in feet. What is the width of the lot? Writing it out as shown below with x being the width of the lot, the > only number I can come up with that is close is 4.16, but that > doesn't quite work. Can anyone help? How would you work this to solve for the width? (100x / 2) = (2x+200) > dtechtive@verizon.net Please clarify doesn't quite work; your equation appears to > match your problem statement. Jerry Not quite a match. The equation should be 100x = 2(2x + 100). > The answer is 100/99. Very skinny lot! I suggest that you attempt to _check_ your answer. (Your equation is incorrect. Dan's equation was correct.) David ==== > Please clarify doesn't quite work; I suppose Dan means that 4.16 feet isn't the _precise_ answer. If so, he's right. > your equation appears to match your > problem statement. Jerry > This is likely a very simple problem for anyone posting to this group, > but I was wondering if someone might help me out. I should say help > me to help my son. Here it is: A vacant lot is 100 feet long. The area of the lot in square feet is > twice the perimeter in feet. What is the width of the lot? Writing it out as shown below with x being the width of the lot, the > only number I can come up with that is close is 4.16, but that doesn't > quite work. Can anyone help? How would you work this to solve for the width? (100x / 2) = (2x+200) 50x = 2x + 200 48x = 200 x = 200/48 = 25/6 so the width is precisely 25/6 feet, which could also be written as (4 + 1/6) feet or 4' 2 etc. For future reference, an appropriate newsgroup for such a question is alt.algebra.help . David ==== >|> This question seems to resurface every few years; >||> Here is that 'elementary school' algorithm which many of us were >|> taught. >||> It is of arbitrary precision; i.e. limited only by your patience >|> and/or your machine. >||> This method was formerly taught in primary school, but the algorithm >|> seems to be 'getting lost' today!!! >Yes, but the real question is why it ever WAS taught! >It always was a damn-fool method for hand calculation, though of >some theoretical interest. There are at least 3 better methods >suitable for hand use or mental arithmetic. I have no idea why >it was preferred, except that it is 'elementary' in the sense that >it doesn't use calculus. >But, considering that both binary chop and linear interpolation >are ancient, and suitable for using in your head, that is a feeble >excuse. The method you describe should be taught in undergraduate >courses and not before! Hmm. Perhaps I can supply some ancient perspective. I was taught the hand method in, IIRC, the 8th or 9th grade. It could be done reasonably rapidly and I don't recall ever having any trouble with it. Why were we not taught any other methods? Because back then in the dim recesses of time there were no other number systems. No binary, no mixed radix, nothing but the occasional Roman numeral. Nobody knew Newton's method and there was no way it could have been taught. Of course there were no computers, electronic calculators, and the mechanical ones capable of taking square roots were very very new and very very expensive. I did not see one of them until I was a graduate student. Slide rules were good only to three digits at best and the common log tables only good to four at best. The fun thing about the method was demonstrating algebraically how it worked. If we could do that, we were considered top students. Why did the method persist? Teachers are very very conservative as a group. Things are taught because they were always taught. It takes a while before things change. For instance, why is calculus taught before discrete math? One could argue that generating functions are far easier to understand than derivatives, yet one is commonly taught in high school and the other is almost unknown outside of the math community. And oh yes, why do we still use logs to the base 10 and why don't we teach logs to the base 2 along with natural logs? Same reason. ----- Paul J. Gans ==== |> |> Hmm. Perhaps I can supply some ancient perspective. I was |> taught the hand method in, IIRC, the 8th or 9th grade. It |> could be done reasonably rapidly and I don't recall ever having |> any trouble with it. I was taught it a bit earlier, and had trouble, probably because I couldn't work out why it worked, and am bad at learning by rote. So I invented binary chop. A common reaction. |> Why were we not taught any other methods? Because back then |> in the dim recesses of time there were no other number systems. |> No binary, no mixed radix, nothing but the occasional Roman |> numeral. Eh? None of those are relevant. Binary chop has nothing to do with binary notation, and neither interpolation nor Newton-Raphson are discrete methods in that sense. In any case, with UK-based teaching, we had been using mixed base arithmetic for years. What is the cost of 3 tons, 7 hundredweight, 25 pounds, 6 ounces of something at 2 pounds, 11 shillings and 3 pence 3 farthings a stone. All right, it was usually a BIT simpler :-) |> Nobody knew Newton's method and there was no way it could have |> been taught. Of course there were no computers, electronic |> calculators, and the mechanical ones capable of taking |> square roots were very very new and very very expensive. |> I did not see one of them until I was a graduate student. |> Slide rules were good only to three digits at best and the |> common log tables only good to four at best. Yer whaa? I thought that you said an ANCIENT perspective! What on earth do you need any of those for? I was using Newton's method for ages before they were allowed in mathematics teaching or examinations. |> The fun thing about the method was demonstrating algebraically |> how it worked. If we could do that, we were considered top |> students. For that, you need algebra. When people are talking about its teaching in elementary school, most of us are referring to LONG before we were taught algebra. If I recall, I was taught it before I was taught about even the use of variables, though after I had been started on non-trivial geometry. Nick Maclaren. ==== Infinite Dimensional Analysis, Quantum Probability and Related Topics View table-of-contents and abstracts at http://www.worldscinet.com/idaqp.html Integral On A Manifold Remi Leandre Optimal Consumption And Portfolio In A BlacköScholes Market Driven By Fractional Brownian Motion Yaozhong Hu, Bernt Oksendal And Agnes Sulem Central Limit Theorems For Coxeter Systems And Artin Systems Of Extra Large Type Gero Fendler Support Of A Joint Resolution Of Identity And The Projection Spectral Theorem Artem D. Pulemyotov Martingale Characterizations Of Increment Processes In A Locally Compact Group Herbert Heyer And Gyula Pap Short Notes A Degenerate Stochastic Partial Differential Equation For The Purely Atomic Superprocess With Dependent Spatial Motion Donald A. Dawson, Zenghu Li and Hao Wang Effective Determination Of Poisson Noise Si Si The Combinatorics Of The R-Free Convolution Survey Central Gaussian Convolution Semigroups On Compact Groups: A Survey A. Bendikov and L. Saloff-Coste For more information, go to http://www.worldscinet.com/idaqp.html X-Received: (from approve@localhost) by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id hBBG9MH07916; ==== Here is the algorithm you are seeking using a symbolic package called Macsyma v.2.2: [xx:taylor(sum(sum(z^bfloat(p^sqrt(q))/(z^bfloat(p^sqrt(q))-1),p,2,5),q,2,5) ,z,inf,5),bfloat(makelist(powers(denom(part(xx,j)),z),j,1,length(xx)))]; Sample of results: [16 + (1/(z^(29736144583/11157424511))) + (1/(z^(593022861439/178513961987))) + (1/(z^4)) + (1/(z^(36140041546/7671231941))) + (1/(z^(40691659899/8605063048))) + . . ., [[0.0b0], [2.6651441426902251887b0], [3.3219970854839128052b0], [4.0b0], [4.7111131333214371389b0], [4.7288043878374149479b0]]] Of course I can't compute to million of floating point place with this pacakge but if you have a supercomputer this is how this is done. You can get millions, or trillions of such transcendental numbers. Hope this is what you are looking for. If not pleas refer dr.Huen Y.K. X-Received: (from approve@localhost) by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id hBBEApl31297; ==== Dear All, I am trying to solve a system of nonlinear equations which is very complicated. The resulting function is a stochastic variable, which I have to approximate using the Monte Carlo methods. Therefore evaluation of the function is very time consuming (one evaluation is about one minute). My problem is to find an appropriate algorithm which solves the nonlinear system of equations without approximation of the Jacobian/Hessian matrix. Due to the complexity of the stochastic function it does not make sense to use methods like Newton, Newton-Raphson, etc. I was thinking about something like bisections or regula falsi, eventually secant method. They work fine in one dimensional space. But I do not know about higher dimensions. Pshem ==== > Dear All, I am trying to solve a system of nonlinear equations which is very > complicated. The resulting function is a stochastic variable, which I > have to approximate using the Monte Carlo methods. Therefore > evaluation of the function is very time consuming (one evaluation is > about one minute). My problem is to find an appropriate algorithm > which solves the nonlinear system of equations without approximation > of the Jacobian/Hessian matrix. Due to the complexity of the > stochastic function it does not make sense to use methods like Newton, > Newton-Raphson, etc. I was thinking about something like bisections or regula falsi, > eventually secant method. They work fine in one dimensional space. But > I do not know about higher dimensions. > Pshem Try doing a Google search on Broyden's method. -- There are two things you must never attempt to prove: the unprovable -- and the obvious. -- Democracy: The triumph of popularity over principle. -- http://www.crbond.com ==== > The resulting function is a stochastic variable, which I > have to approximate using the Monte Carlo methods. Therefore > evaluation of the function is very time consuming (one evaluation is > about one minute). My problem is to find an appropriate algorithm > which solves the nonlinear system of equations without approximation > of the Jacobian/Hessian matrix. Due to the complexity of the > stochastic function it does not make sense to use methods like Newton, > Newton-Raphson, etc. Try doing a Google search on Broyden's method. This is unlikely to work well for noisy equations. There is no really cheap way for problems which are both expensive and noisy. Try the software from http://www4.ncsu.edu/eos/users/c/ctkelley/www/tim.html But probably you'll need to write your own routine which fits successive linear models to the equations and then solves the resulting linear systems. Arnold Neumaier