mm-539 === Subject: Re: Exact Rational Interpolation > Cherednichenko, V.G. > Rational interpolation: analytical solution. (Russian, English) > [J] Sib. Mat. Zh. 43, No.1, 188-193 (2002); > translation in Sib. Math. J. 43, No.1, 151-155 (2002). [ISSN 0037-4474] >Peter, we concluded that this approach is not numerically practical >for interpolation with arbitrary number of points. >After many failed attempts, I decided to give up on rational interpolation. what do you mean by arbitrary? No more than about 10 data points of course. high degree interpolation makes no sense. if low degree (say (7,5)) does not suf[CapitalThorn]ce, you must work piecewise. hth peter === Subject: Re: Householder QR decomposition >I have a matrix A >A = ( -1 -1 ) > ( 0 -a ) > ( 0 a ) >that I would like to decompose in A=QR according to Householder method. >I think that Q = I - 2 u transpose(u) >but I don't know how to [CapitalThorn]nd u. >According to what I've read, u is the vector v / norm(v) >with v = ( 0 ) ( 0 ) > ( -a ) - ( sqrt(2)*a ) > ( a ) ( 0 ) >but it does not work here. >Could someone explain why? > Franck should be v = [0; sign(-a)*(abs(a)+sqrt(2)*abs(a)) ; a ]; or use a Givenstranformation Q = [ 1 0 0 ; 0 -1/sqrt(2) 1/sqrt(2) ; 0 1/sqrt(2) 1/sqrt(2) ]; hth peter === Subject: Re: Householder QR decomposition > I have a matrix A > A = ( -1 -1 ) > ( 0 -a ) > ( 0 a ) > that I would like to decompose in A=QR according to Householder method. > I think that Q = I - 2 u transpose(u) > but I don't know how to [CapitalThorn]nd u. > According to what I've read, u is the vector v / norm(v) > with v = ( 0 ) ( 0 ) > ( -a ) - ( sqrt(2)*a ) > ( a ) ( 0 ) > but it does not work here. > Could someone explain why? Let's see if we can [CapitalThorn]gure out what u should be. Letting ^t denote transpose, and letting e_1 denote the vector (1 0 0)^t, we want A = QR, so R = Q^t A = QA, since Q = Q^t. QAe_1 is the [CapitalThorn]rst column of R, which will be a vector of the form (sigma 0 0)^t. Since Q is Euclidean-norm-preserving, sigma = ||Ae_1||_2 = ||(-1 0 0)^t||_2 = 1. QAe_1 = (I - 2uu^t)Ae_1 = Ae_1 - 2u(u^t Ae_1) = (1 0 0)^t. (u^t Ae_1) is a scalar, say alpha, so we can write Ae_1 - 2 alpha u = (1 0 0)^t. Thus, 2 alpha u = Ae_1 - (1 0 0)^t. But we can determine u without knowing alpha since ||u||_2 = 1. Therefore, normalizing Ae_1 - (1 0 0)^t gives u: u = (Ae_1 - (1 0 0)^t) / ||Ae_1 - (1 0 0)^t||_2. In your case, Ae_1 = (-1 0 0)^t, so Ae_1 - (1 0 0)^t = (-2 0 0)^t. Then u = (-1 0 0)^t. Let's check it out: QAe_1 = [I - 2(-1 0 0)^t (-1 0 0)](-1 0 0)^t = (-1 0 0)^t - 2(-1 0 0)^t = (1 0 0)^t. This is correct. Notice that column 2 of A, namely the constant a, does not enter into the development of u. Dave === Subject: Re: Ill posed matrix-inversion >I've a question. >Suppose I want to solve the Eq: >Tx = y >This will give: >T'Tx=T'y >Howeever when T'T is ill-posed you will solve: >(T'T + eI)x=T'y >In which e is the damping. >Now are my questions: >1 : Can you determine the optimal-value for e when the condition number of >T'T is known? optimal in which sense? cross-validation is a means , but optimal? if you know the level of noise in y you might try to minimize the error bound for x . >2: How to estimate the condition number of T'T >Maurice which information are you willing to provide? from the values of T'*T alone you have no chance. Cholesky-decomposition ? Transformation to tridiagoanl form? QR-decomposition of T? hth peter === Subject: Ill posed matrix-inversion > I've a question. > Suppose I want to solve the Eq: > Tx = y > This will give: > T'Tx=T'y > Howeever when T'T is ill-posed you will solve: > (T'T + eI)x=T'y > In which e is the damping. > Now are my questions: > 1 : Can you determine the optimal-value for e when the condition > number of > T'T is known? What works for lots of practical problems are the L-curve criterion, problems to [CapitalThorn]nd usable resources. === Subject: Re: Ill posed matrix-inversion Yhanks for your answer but I'm aware of the different techniques availabe like L-curve, TSVD, GCV etc. But I'm interested in the relation between the damping en the ill-conditioning of the matrix. Because f.e. in L-curve techniques you need to solve for each step the set of eq's for different e-values. Furthermore I'm solving a set of eq's in the Fourier domain so - They are complex - I'm doing this for different freq's If I can on forehand relate the value of e to the structure of T'T this would help me a big deal. So do you know (or someone else) a reference or direction for my problem that is also understandable for no-mathematicians (phyicist in my case)? Maurice >I've a question. >Suppose I want to solve the Eq: >Tx = y >This will give: >T'Tx=T'y >Howeever when T'T is ill-posed you will solve: >(T'T + eI)x=T'y >In which e is the damping. >Now are my questions: >1 : Can you determine the optimal-value for e when the condition >number of >T'T is known? > What works for lots of practical problems are the L-curve criterion, > problems to [CapitalThorn]nd usable resources. === Subject: Re: Ill posed matrix-inversion > I've a question. > Suppose I want to solve the Eq: > Tx = y > This will give: > T'Tx=T'y > Howeever when T'T is ill-posed you will solve: > (T'T + eI)x=T'y > In which e is the damping. > Now are my questions: > 1 : Can you determine the optimal-value for e when the condition > number of T'T is known? > What works for lots of practical problems are the L-curve criterion, > problems to [CapitalThorn]nd usable resources. As you say, these are practical rather than optimal - what I mean is, there is no (objective) best answer to this problem. Similar to SVD thresholding, where you need to de[CapitalThorn]ne a small singular value. === Subject: C++ vs. JAVA by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8DE64E12703; I am a student of Computer Science and keenly interested in learning different programming languages. I have learnt C and C++ and now trying to learn JAVA. What I found is that JAVA almost sounds like C++ in various ways. My question is which of these languages offer a better habit of programming in real-world problems and software development? === Subject: Re: C++ vs. JAVA === Subject: Re: C++ vs. JAVA On a broad outlook C++ & Java look similar with same basic oo principles. But, once you start programming, you will start seeing the differences and how your design very much depends on the language you pick. As suggested above, there is a lot to learn in mem allocation, garbage collection etc...Since you're just begining to learn let me explain the [CapitalThorn]rst simple difference (?) In java objects are passed by reference and in C++ you have references and pointers. This by itself will lead a lot of things to learn. When to use references and when to use pointers, which is fast, why is it fast, how is mem allocation done etc etc...other differences can be, Say, C++ allows multiple inheritance, while Java has interfaces and strictly doesnot allow multiple inheritance. Why? if you look from out side it seems almost the same, but one should be aware of every such subtle fundae and what it exactly mean, to become an excellent programmer or architect. I would highly recommend you to buy Programming with Objects A Comparative presentation of OOP with C++ and Java by Avinash Kak. I would rate 5+/5 :) If you can understand & master this book you should be in the top20% of the lot. --Ramoj Paruchuri === Subject: Re: C++ vs. JAVA > I am a student of Computer Science and keenly interested in learning > different programming languages. I have learnt C and C++ and now > trying to learn JAVA. What I found is that JAVA almost sounds like C++ > in various ways. My question is which of these languages offer a > better habit of programming in real-world problems and software > development? In view of the never-ending debates over languages, you should post your question to a language group. Prepare yourself by thoroughly understanding the difference between compiled and interpreted languages, and the subtleties of managing memory in platforms which support dynamic memory allocation, garbage collection, caches, etc. Then search for information on IEEE ßoating point math and error control. Having done that, be prepared for the fact that many individuals will place familiarity with a language at higher value than other, more objective, performance criteria. Good luck. -- 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 === Subject: OT ( or at least skew ;) On what group should I pose this question I'm minding a hyperactive [reportedly bright ] 3rd grade boy with behavior problems for ~1 hour once a week ( he's bored and disruptive in adult meeting and (will not)/(can not) participate in age appropriate alternative. ) When asked what is his favorite subject, his face lights up and replies math! Can some one point me to some suitable printed material that comes in small chunks which would get his attention. I believe he has two basic needs: 1. an adult taking his interests seriously 2. tackling something that gives him sense of accomplishment === Subject: Re: OT ( or at least skew ;) On what group should I pose this question In message <10kbransfecige3@corp.supernews.com>, Richard Owlett >I'm minding a hyperactive [reportedly bright ] 3rd grade boy with >behavior problems for ~1 hour once a week ( he's bored and disruptive >in adult meeting and (will not)/(can not) participate in age >appropriate alternative. ) How old is 3rd grade? >When asked what is his favorite subject, his face lights up and replies >math! He may well be clever then (but not necessarily at maths). Since you needed to ask this question it is clear that he wrong footed you. Try sci.math - similar questions have come up before. >Can some one point me to some suitable printed material that comes in >small chunks which would get his attention. I believe he has two basic >needs: > 1. an adult taking his interests seriously > 2. tackling something that gives him sense of accomplishment Lots of recreational mathematics puzzles have been published in the past from the works of Lewis Caroll through to Martin Gardeners books. Pick a few of the simpler practical ones and they have almost universal appeal. eg Hexaßexagons, Mobius strips. Mazes, puzzles like tower of Hanoi, and strategic board games checkers, go and chess are other things that often appeal to budding young mathematics. Simple easy to learn rules with complex outcomes. -- Martin Brown === Subject: Re: OT ( or at least skew ;) On what group should I pose this question > In message <10kbransfecige3@corp.supernews.com>, Richard Owlett > I'm minding a hyperactive [reportedly bright ] 3rd grade boy with > behavior problems for ~1 hour once a week ( he's bored and disruptive > in adult meeting and (will not)/(can not) participate in age > appropriate alternative. ) > How old is 3rd grade? 8 or 9 > When asked what is his favorite subject, his face lights up and > replies math! > He may well be clever then (but not necessarily at maths). Since you > needed to ask this question it is clear that he wrong footed you. Others had commented that they thought the boy was bright. His comment on liking math was the [CapitalThorn]rst time we met. I well know the difference between liking and ability [ I like singing. Musically inclined friends prefer sitting on the far side of the congregation ;] > Try sci.math - similar questions have come up before. > Can some one point me to some suitable printed material that comes in > small chunks which would get his attention. I believe he has two basic > needs: > 1. an adult taking his interests seriously > 2. tackling something that gives him sense of accomplishment > Lots of recreational mathematics puzzles have been published in the past > from the works of Lewis Caroll through to Martin Gardeners books. Pick a > few of the simpler practical ones and they have almost universal appeal. > eg Hexaßexagons, Mobius strips. > Mazes, puzzles like tower of Hanoi, and strategic board games checkers, > go and chess are other things that often appeal to budding young > mathematics. Simple easy to learn rules with complex outcomes. === Subject: Re: OT ( or at least skew ;) On what group should I pose this question > I'm minding a hyperactive [reportedly bright ] 3rd grade boy with > behavior problems for ~1 hour once a week ( he's bored and disruptive in > adult meeting and (will not)/(can not) participate in age appropriate > alternative. ) > When asked what is his favorite subject, his face lights up and replies > math! > Can some one point me to some suitable printed material that comes in > small chunks which would get his attention. I believe he has two basic > needs: > 1. an adult taking his interests seriously > 2. tackling something that gives him sense of accomplishment Hi See plus.math.org for a wealth of material As well as the many interesting, thought and experimentation provoking, cover exactly what you are looking for. Good Luck -Greg === Subject: Re: OT ( or at least skew ;) On what group should I pose this question > I'm minding a hyperactive [reportedly bright ] 3rd grade boy with > behavior problems for ~1 hour once a week ( he's bored and disruptive in > adult meeting and (will not)/(can not) participate in age appropriate > alternative. ) > When asked what is his favorite subject, his face lights up and replies > math! > Can some one point me to some suitable printed material that comes in > small chunks which would get his attention. I believe he has two basic > needs: > 1. an adult taking his interests seriously > 2. tackling something that gives him sense of accomplishment Sorry this answer is also slightly OT, but this is a really excellent book I wish I had encountered when I was younger (not 3rd grade mind... :) R.B.J.T. ALLENBY, RINGS, FIELDS AND GROUPS: INTRODUCTION TO ABSTRACT ALGEBRA === Subject: Re: OT ( or at least skew ;) On what group should I pose this question >I'm minding a hyperactive [reportedly bright ] 3rd grade boy with >behavior problems for ~1 hour once a week ( he's bored and disruptive in >adult meeting and (will not)/(can not) participate in age appropriate >alternative. ) >When asked what is his favorite subject, his face lights up and replies >math! >Can some one point me to some suitable printed material that comes in >small chunks which would get his attention. I believe he has two basic >needs: > 1. an adult taking his interests seriously > 2. tackling something that gives him sense of accomplishment > Sorry this answer is also slightly OT, but this is a really excellent > book I wish I had encountered when I was younger (not 3rd grade > mind... :) > R.B.J.T. ALLENBY, RINGS, FIELDS AND GROUPS: INTRODUCTION TO ABSTRACT > ALGEBRA Can you give a formal reference suitable for an inter-library loan request? I'm a techie living in RURAL SW MO [ they understand cows, chickens, hogs, manure, fertilizer ...] ? === Subject: Re: OT ( or at least skew ;) On what group should I pose this question > Can you give a formal reference suitable for an inter-library loan > request? I'm a techie living in RURAL SW MO [ they understand cows, > chickens, hogs, manure, fertilizer ...] ? Sounds like it time they learnt them some algebra ;) Main Author: Allenby, R. B. J. T. Title: Rings, [CapitalThorn]elds and groups : an introduction to abstract algebra Edition: 2nd ed. Publisher: London : Edward Arnold, 1991 (various printings). Physical Description: xxvi, 383 p ; 24 cm. ISBN: 0340544406 === Subject: Re: OT ( or at least skew ;) On what group should I pose this question >Can you give a formal reference suitable for an inter-library loan >request? I'm a techie living in RURAL SW MO [ they understand cows, >chickens, hogs, manure, fertilizer ...] ? > Sounds like it time they learnt them some algebra ;) Request entered. They should at least see algebra in passing. > Main Author: Allenby, R. B. J. T. > Title: Rings, [CapitalThorn]elds and groups : an introduction to abstract algebra > Edition: 2nd ed. > Publisher: London : Edward Arnold, 1991 (various printings). > Physical Description: xxvi, 383 p ; 24 cm. > ISBN: 0340544406 === Subject: Re: OT ( or at least skew ;) On what group should I pose this question > I'm minding a hyperactive [reportedly bright ] 3rd grade boy with > behavior problems for ~1 hour once a week ( he's bored and disruptive in > adult meeting and (will not)/(can not) participate in age appropriate > alternative. ) > When asked what is his favorite subject, his face lights up and replies > math! > Can some one point me to some suitable printed material that comes in > small chunks which would get his attention. I believe he has two basic > needs: > 1. an adult taking his interests seriously > 2. tackling something that gives him sense of accomplishment I would start by teaching him some algebra. Teach him about positive and negative numbers. Give him some problems to solve that can be solved by algebra. You might explain the basic rule that if two sides of an equation are equal and you do the same thing to both sides, they remain equal. (Of course you don't divide by zero. Explain in[CapitalThorn]nity---that will give him some- thing to chew on!) If he has a decent attention span you might try him on some simple combina- torial problems, such as how many ways to distribute n things in m boxes. (Use small de[CapitalThorn]nite values for m and n, such as m=2, n=5.) A problem that I always enjoyed, and that should keep him busy for a while is the twelve pearls: 1. You have twelve identical-looking pearls. 11 have the same weight but the 12th differs by being either heavier or lighter than the others. 2. Using a simple balance, and weighing groups of pearls against each other, can you pick out the odd pearl and determine whether it is heavier or lighter than the others, using only 3 weighings? Give him examples of Pythagorean triples such as 3,4,5 and 5,12,13. The Pythagorean Theorem is straightforward and can be explained visually using the construction shown in Brownowski's The Ascent of Man (also on the Web). I would eventually introduce him to functions and the ideas of analytic geometry by having him graph simple functions by hand on graph paper. I wouldn't teach him about computer graphing programs until he has the idea what they are for. You might also give problems involving the graphical solution of pairs of equations. Once he knows algebra, ask him to devise formulas for summing 1. the integers from 1 to N. 2. the squares of the integers from 1 to N. Explain Zeno's Paradox and pose it in such a way that he adds up the inverse powers of 2, say: 1 + 2^{-1} + 2^{-2} + ... ---then encourage him to guess the answer. In fact it is good pedagogy for potential mathematicians to encourage guessing followed by veri[CapitalThorn]cation. The only way to [CapitalThorn]nd out what your young ward can do is to try him out with some of these things. He may surprise you: if he has a serious bent for math, he should grasp the things I mentioned as if he were remembering them rather than learning them from scratch. I am not such a mathematician myself, but I have met a few. -- Julian V. Noble Professor Emeritus of Physics jvn@lessspamformother.virginia.edu ^^^^^^^^^^^^^^^^^^ http://galileo.phys.virginia.edu/~jvn/ For there was never yet philosopher that could endure the toothache patiently. -- Wm. Shakespeare, Much Ado about Nothing. Act v. Sc. 1. === Subject: Re: OT ( or at least skew ;) On what group should I pose this question Am 13.09.04 21:00 schrieb Richard Owlett: > I'm minding a hyperactive [reportedly bright ] 3rd grade boy with > behavior problems for ~1 hour once a week ( he's bored and disruptive in > adult meeting and (will not)/(can not) participate in age appropriate > alternative. ) > When asked what is his favorite subject, his face lights up and replies > math! > Can some one point me to some suitable printed material that comes in > small chunks which would get his attention. I believe he has two basic > needs: > 1. an adult taking his interests seriously > 2. tackling something that gives him sense of accomplishment Gottfried Helms === Subject: Re: OT ( or at least skew ;) On what group should I pose this question === > Subject: On what group should I pose this question Well, how about sci.math? They discuss this kind of question every once in a while. -- Quidquid latine dictum sit, altum viditur. === Subject: modelling thin wire in Remcom's FDTD X-RFC2646: Original Good evening everyone, I've noticed that whenever I use Remcom's FDTD package to compute the input impedance of a thin wire dipole, that it divides the courant stability timestep by 2. Could anyone tell me why it does this? Alan === Subject: Synergetics Section 260.42 application The last graphic in the section Finding Roots Of Equations Numerically With Bucky Numbers at: http://users.adelphia.net/~cnelson9/Links/index_lnk_11.html which is one of the sections of Synergetics Coordinates Applications at: http://users.adelphia.net/~cnelson9/ is followed by a question about the speed of the convergence of a general root [CapitalThorn]nding method. The guesses for the third iteration on, could be found with the vector equation method shown in the section Solving Matrix Problems Using Bucky Numbers at: http://users.adelphia.net/~cnelson9/Links/index_lnk_10.html I don't think Newton's method can be beat, I've tried and tried, but if anyone could beat Newton it would be Bucky Fuller. How does the speed of convergence compare for polynomials in general? What is the traditional name for this kind of root [CapitalThorn]nding method? Has it been done with the Cartesian coordinate system? What is the closest to Synergetics Section 260.42? at: http://mathworld.wolfram.com/topics/Root-Finding.html Cliff Nelson Dry your tears, there's more fun for your ears, Forward Into The Past 2 PM to 5 PM, Sundays, California time, at: http://www.kspc.org/ Don't be a square or a blockhead; see: http://users.adelphia.net/~cnelson9/ === Subject: c1 continuity with 2 bezier curves I am using 2 quadratic bezier curves (3 control points each) joint together such that the [CapitalThorn]rst control point of the second curve is the same as the last control point of [CapitalThorn]rst curve). It is clear that there is no c1 continuity at the point where the 2 curves join. Is there a way around this problem? Tejas === Subject: thermal analysis of high speed (60,000rpm)spindles for internal grinding by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8ECF6T03974; in my problem there is shaft which is rotating at 60,000rpm, and power rate of 4kW. the shaft is rotating between 4 ball bearings and on shaft motor windings are there ( rotor) ( motor and shafts are integral parts) as the heat is generated between the stator and rotor 1. how to cacalculate the heat generated from motor 2. heat generated due to friction in all 4 bearings 3. heat at motor windage shearing air - using equations ( theoretically) then whether i need to create 3D or 2D model ( axi symmetric )in ansys, eventhough i have taken ansys training i could not able get solution plz help me in getting the solution. === Subject: Re: polar grid to cartesian grid by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8ECF8J04050; Refer to Henry Stark's (1981) paper titled Ôdirect fourier reconstruction in computerized tomography' and also his paper titled Ôsampling theorem in polar coordinates' . - Vaidyanathan Ravi Shankar. === Subject: Re: ANSYS - 3D problems by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8EDi8Y13012; hai i am srikkanth in completed my master degree in cad now i am searching for job. i am intrested to take some problem in ansys and do the analysis. i am searching for projects, if u have any problem please send to me bye k.srikkanth >I'm Timm from RWTH-Aachen, germany. >My task is to simulate mechanical resonances of a 3-dimensional problem >with extended areas of sandwich-like structures. Imagine a (folded) >stack capacitor or somethink simular rectangular shaped. >In the moment I'm working on a silicon graphics workstation (R4600, >192MB) with ANSYS 5.1, in future maybe I'll use a Gray-J90. >Alas, my problem description exceeds any limits: like [CapitalThorn]lesize, >workspace, swapspace, calculation time and so on. >(Surely, I know, it's a 3D problem! :-) ) >Do you have some ideas to shrink the problem? Or do you know some >interesting links or hints? >Timm Leuerer >leuerer@iwe.rwth-aachen.de === Subject: LU Factorization of a singular matrix Hi I understand that only non-singular matrices have unique LU factorization and that singular matrices could have in[CapitalThorn]nitely many LU Factorization. How can I prove this? Also, could anyone give me an example (of 3x3 matrix, say) of how singular matrix can have in[CapitalThorn]nitely many factorizations PA = LU? Jake === Subject: Re: LU Factorization of a singular matrix To be more speci[CapitalThorn]c, how can I prove that singular matrices could have in[CapitalThorn]nitely many LU factorization? Also, an example of a singular matrix that has more than one LU factorization would be helpful. Jake > Hi > I understand that only non-singular matrices have unique LU > factorization and that singular matrices could have in[CapitalThorn]nitely many LU > Factorization. How can I prove this? Also, could anyone give me an > example (of 3x3 matrix, say) of how singular matrix can have > in[CapitalThorn]nitely many factorizations PA = LU? > Jake === Subject: Re: LU Factorization of a singular matrix > To be more speci[CapitalThorn]c, how can I prove that singular matrices could have > in[CapitalThorn]nitely many LU factorization? Pretty easy. Take any LU factorization of a nonsingular matrix, set L_{nn}=0, then U_{nn} can have any value you want. V. -- email: lastname at cs utk edu homepage: www cs utk edu tilde lastname === Subject: Re: LU Factorization of a singular matrix > Hi > I understand that only non-singular matrices have unique LU > factorization False on several counts: (1) If you allow permutations (PA=LU) then even a non-singular matrix can have more than one factorization (depending on the pivoting strategy). (2) I understand that there is a tacit assumption that one of the matrices L, U has unit diagonal (say L); if you relax this assumption, you can have in[CapitalThorn]nitely many factorizations. (3) If you insist that P=I, then some non-singular matrices will fail to have LU-factorization (consider A(1,1)=0). > and that singular matrices could have in[CapitalThorn]nitely many LU > Factorization. How can I prove this? Also, could anyone give me an > example (of 3x3 matrix, say) of how singular matrix can have > in[CapitalThorn]nitely many factorizations PA = LU? What is closer to uniqueness is this: suppose A is an m-by-n matrix of rank r>0, then P*A=L*U where L is m-by-r lower triangular with unit diagonal and R is r-by-n upper triangular with non-singular diagonal. For at least one permutation matrix P, the factorization will exist, and with the given P, the L and U will be unique. If your A is square (m=n) and you look for non-unique LU with L and U square, you pad it with something that will conform to lower (upper) triangular form and cancels out. Example: A = [2 3 2 ] [2 3 2 ] [2 3 2 ] P = I L = [1 0 0] [1 1 0] [1 c 1] U = [2 3 2] [0 0 0] [0 0 0] and c can be arbitrary. But it's a waste: this A is actually U*V where U = [1 ] [1 ] [1 ] V = [2 3 2] > Jake === Subject: Parallel sparse cholesky I'm testing some new load balancing policies designed to heterogeneous clusters. Now, I'm seeking the appropriate parallel applications to serve as benchmarks to evaluate the policy. One option would be the Sparse Cholesky Factorization. After reading some papers, I decided that this application would be a good benchmark, although few papers have been published on the use of workstation clusters for executing this type of application. I'd like to ask if someone could provide a message-passing sparse cholesky implementation. I'm using PVM on the tests, but the implementation does not need to be implemented using PVM. It can be in any language, or even pseudo-language, provided that use the message-passing paradigm. William === Subject: Re: Parallel sparse cholesky > I'd like to ask if someone could provide a message-passing sparse > cholesky implementation. Petsc does not have a parallel Cholesky. Pspases is a direct solver; if you are looking for an incomplete factorization look at BlockSolve95. V. -- email: lastname at cs utk edu homepage: www cs utk edu tilde lastname === Subject: Re: Parallel sparse cholesky >I'm testing some new load balancing policies designed to heterogeneous >clusters. Now, I'm seeking the appropriate parallel applications to >serve as benchmarks to evaluate the policy. >One option would be the Sparse Cholesky Factorization. After reading >some papers, I decided that this application would be a good >benchmark, although few papers have been published on the use of >workstation clusters for executing this type of application. >I'd like to ask if someone could provide a message-passing sparse >cholesky implementation. I'm using PVM on the tests, but the >implementation does not need to be implemented using PVM. It can be in >any language, or even pseudo-language, provided that use the >message-passing paradigm. >William some entry says: Re: sparse matrix computations ... PETSc is a rather comprehensive package for all things matrix: http://www.mcs.anl.gov/petsc You can use it from both C and Fortran. ... and from my annotations: begin{citation} PSPASES : A Scalable Parallel Direct Solver Library for Sparse Symmetric Positive De[CapitalThorn]nite Systems http://www.cs.umn.edu/~mjoshi/pspases by Mahesh Joshi, George Karypis, Vipin Kumar Department of Computer Science, University of Minnesota, Mineapolis. & Anshul Gupta IBM Thomas J. Watson Research Center, Yorktown Heights, New York. We are glad to announce a new version (1.0) of PSPASES. PSPASES is a stand-alone MPI-based parallel library for solving linear systems of equations involving sparse symmetric positive de[CapitalThorn]nite matrices. The library ef[CapitalThorn]ciently implements the scalable parallel algorithms developed by authors, for each of the four phases of direct solution method; viz. ordering, symbolic factorization, numerical Cholesky factorization, and solution of triangular systems. PSPASES is implemented using standard MPI and BLAS calls, which makes it portable to most of today's parallel computers and networks of workstations. We have tested PSPASES extensively on IBM SP, network of IBM RS6000 workstations, Cray T3E, SGI Origin 2000 and PowerChallenge architectures. PSPASES uses ParMETIS and METIS as default libraries for computing [CapitalThorn]ll- reducing ordering, but it also accepts user supplied ordering. Different functional interfaces are provided for each of the phases of the solver and a simple interface is also provided for easy use. The user can use these interfaces to solve multiple systems with same nonzero structures; to solve same system for multiple right hand sides; and to get different statistical information such as the memory requirements of the solver and the quality of the ordering. Visit the PSPASES web site at http://www..cs.umn.edu/~mjoshi/pspases to obtain the software, the manual, related technical papers, usage notes, and to see some performance benchmarking results. Please read the terms and conditions for use, given at the website, before downloading and using the PSPASES software. If your machine does not have access to the web, then you may obtain the software via an anonymous ftp to ftp.cs.umn.edu. Change the directory to users/kumar/mahesh and get the [CapitalThorn]les pspases-1.0.tar.gz, README.INSTALL, and README.USAGE (remember to use binary transfer mode). Any comments, questions or bugs regarding PSPASES can be directed to Mahesh Joshi (mjoshi@cs.umn.edu). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% hth peter === Subject: unique number group between 1-1000 Hi! I'm doing a sweepstake: http://www.standardsbigbid.com/londonapartment/php/Help.php# works and thought this would be the best news group to discuss the possibilities...I know for a fact (via other news groups/ forums) that the following amounts, so far, are not unique: 1.00, 1.01, 1.11,1.13, 1.18 1.45, 1.49, 1.75, 2.00, 2.33, 2.63, 3.00, 3.11, 3.26, 3.57, 4.00, 4.64, 5.00, 5.235.73, 6.00, 6.17,6.19, 7.00, 7.58, 7.83, 8,00, 8.58, 8.71, 9.57, 9.87, 10.00, 11.00, 11.14, 11.17, 11.63,11.71, 11.73, 12.00, 12.27, 13.00, 13.02, 13.13, 13.18, 14.00, 14.02, 14.89, 15,00, 15.56, 19.76, 20.00, 27.47, 29.09 31.91 theshak === Subject: Re: How to [CapitalThorn]nd the cube root of a number ( By Vedic maths) by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8FDPjf08900; how do you [CapitalThorn]nd the cubed root of a number, and the 4th root and the 5th root, etc... what does it mean do [CapitalThorn]nd the root of a number...what are you doing? === Subject: Re: How to [CapitalThorn]nd the cube root of a number ( By Vedic maths) >how do you [CapitalThorn]nd the cubed root of a number, and the 4th root and the >5th root, etc... what does it mean do [CapitalThorn]nd the root of a number...what >are you doing? given number a not = 0 , [CapitalThorn]nd number x such that x^n=a, n the given degree. (there are always n solutions, some complex also for positive a if n>=3) hth peter === Subject: Calling FFTW from C++? (x-posted) I am currently working on a program using FFTW-> http://www.fftw.org . My basic C program to compute the 2D Fourier transform of a bunch of data works [CapitalThorn]ne when I compile it with gcc. However, I would like to Unfortunately, I cannot get my program to compile with g++. I compile it as follows: g++ ft2d.c -o ft2d -I/usr/local/include -L /usr/local/lib -lfftw3 -lm The errors I get are: ft2d.c: In function `int main()': ft2d.c:13: invalid conversion from `void*' to `double (*)[2]' ft2d.c:14: invalid conversion from `void*' to `double (*)[2]' Here is my code: #include #include int main(void) { fftw_complex *in, *out; fftw_plan p; int nx = 5; int ny = 5; int i; /* Allocate the input and output arrays, and create the plan */ in = fftw_malloc(sizeof(fftw_complex) * nx * ny); out = fftw_malloc(sizeof(fftw_complex) * nx * ny); p = fftw_plan_dft_2d(nx, ny, in, out, FFTW_FORWARD, FFTW_ESTIMATE); /* Now [CapitalThorn]ll the input array with the input data */ /* We'll simply make a sine wave */ for (i = 0; i < (nx * ny); i++) { in[i][0] = sin(i / 10.0 * M_PI); /* Real part */ in[i][1] = 0.0; /* Imaginary part */ } /* Actually execute the plan on the input data */ fftw_execute(p); /* Print out the results */ for (i = 0; i < (nx * ny); i++) printf(Coef[CapitalThorn]cient %d: %f%+f*in, i, out[i][0], out[i][1]); /* Clean up after ourselves */ fftw_destroy_plan(p); fftw_free(in); fftw_free(out); return 0; } Eventually I will do something more complex than a sine wave, but you get the idea. If anyone knows what the problem is, I would greatly appreciate any help. This is all that fftw.org has about calling it from C++: http://fftw.org/faq/section2.html#cplusplus --Erica === Subject: Re: Calling FFTW from C++? (x-posted) > My basic C program to compute the 2D Fourier transform of a bunch of > data works [CapitalThorn]ne when I compile it with gcc. However, I would like to > Unfortunately, I cannot get my program to compile with g++. > I compile it as follows: > g++ ft2d.c -o ft2d -I/usr/local/include -L /usr/local/lib -lfftw3 -lm > The errors I get are: > ft2d.c: In function `int main()': > ft2d.c:13: invalid conversion from `void*' to `double (*)[2]' > ft2d.c:14: invalid conversion from `void*' to `double (*)[2]' IMHO if you want to mix C and C++ in a project, you should leave your C [CapitalThorn]les as .C [CapitalThorn]les, (and compile them with gcc not g++). If you include the corresponding .H [CapitalThorn]le from a C++ source [CapitalThorn]le do this: extern C { #include ft2d.h }; Alternatively you could write a wrapper [CapitalThorn]le that uses this, that would avoid having to do this in every other unit that has to include the C header. There's a chapter in the c.l.c++ FAQ about mixing C and C++ in projects, have a read of it and see if there is any more advice. === Subject: Re: Calling FFTW from C++? (x-posted) > I am currently working on a program using FFTW-> http://www.fftw.org . > My basic C program to compute the 2D Fourier transform of a bunch of > data works [CapitalThorn]ne when I compile it with gcc. However, I would like to > Unfortunately, I cannot get my program to compile with g++. > I compile it as follows: > g++ ft2d.c -o ft2d -I/usr/local/include -L /usr/local/lib -lfftw3 -lm > The errors I get are: > ft2d.c: In function `int main()': > ft2d.c:13: invalid conversion from `void*' to `double (*)[2]' > ft2d.c:14: invalid conversion from `void*' to `double (*)[2]' You don't note in your code what lines 13 and 14 are, but if I'm counting correctly, the errors are on the fftw_malloc lines, right? You probably need to cast the results of those function calls to (fftw_complex *). It appears that the fftw_malloc call returns a void*, and the compiler is complaining about that type not matching your in and out variables' declared type. -Howard > Here is my code: > #include > #include > int main(void) > fftw_complex *in, *out; > fftw_plan p; > int nx = 5; > int ny = 5; > int i; > /* Allocate the input and output arrays, and create the plan */ > in = fftw_malloc(sizeof(fftw_complex) * nx * ny); > out = fftw_malloc(sizeof(fftw_complex) * nx * ny); === Subject: Re: Calling FFTW from C++? (x-posted) > I am currently working on a program using FFTW-> http://www.fftw.org . > My basic C program to compute the 2D Fourier transform of a bunch of > data works [CapitalThorn]ne when I compile it with gcc. However, I would like to > Unfortunately, I cannot get my program to compile with g++. > I compile it as follows: > g++ ft2d.c -o ft2d -I/usr/local/include -L /usr/local/lib -lfftw3 -lm > The errors I get are: > ft2d.c: In function `int main()': > ft2d.c:13: invalid conversion from `void*' to `double (*)[2]' > ft2d.c:14: invalid conversion from `void*' to `double (*)[2]' > You don't note in your code what lines 13 and 14 are, but if I'm counting > correctly, the errors are on the fftw_malloc lines, right? You probably > need to cast the results of those function calls to (fftw_complex *). It > appears that the fftw_malloc call returns a void*, and the compiler is > complaining about that type not matching your in and out variables' declared > type. > -Howard > Here is my code: > #include > #include > int main(void) > { > fftw_complex *in, *out; > fftw_plan p; > int nx = 5; > int ny = 5; > int i; > /* Allocate the input and output arrays, and create the plan */ > in = fftw_malloc(sizeof(fftw_complex) * nx * ny); > out = fftw_malloc(sizeof(fftw_complex) * nx * ny); === Subject: Re: Calling FFTW from C++? (x-posted) X-RFC2646: Original > I am currently working on a program using FFTW-> http://www.fftw.org . > My basic C program to compute the 2D Fourier transform of a bunch of > data works [CapitalThorn]ne when I compile it with gcc. However, I would like to > Unfortunately, I cannot get my program to compile with g++. > I compile it as follows: > g++ ft2d.c -o ft2d -I/usr/local/include -L /usr/local/lib -lfftw3 -lm > The errors I get are: > ft2d.c: In function `int main()': > ft2d.c:13: invalid conversion from `void*' to `double (*)[2]' > ft2d.c:14: invalid conversion from `void*' to `double (*)[2]' This is one of the differences between C++ and C. In C void* automatically converts to any other pointer, in C++ you must cast. > Here is my code: > #include > #include > int main(void) > fftw_complex *in, *out; > fftw_plan p; > int nx = 5; > int ny = 5; > int i; > /* Allocate the input and output arrays, and create the plan */ > in = fftw_malloc(sizeof(fftw_complex) * nx * ny); in = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * nx * ny); > out = fftw_malloc(sizeof(fftw_complex) * nx * ny); out = (fftw_complex*)fftw_malloc(sizeof(fftw_complex) * nx * ny); That should do it. john === Subject: Simple oscillator numerical integration I need to integrate (numericaly) the well know simple oscillator equation x''+ 2 csi w x' + w^2 x = f(t) where: x is the displacement x'the velocity x'' the acceleration w is the frequency csi is the oscillator dumping f(t) is the external applied force The problem arise in the case whe add a dumping force in the form: fd(t)=C x'^a where: C is a constant a is a exponent usualy in the range 0.1 to 1 In my situation the dumpers work like a friction dumper force a=0.1 (similar to a diriclet force depending of the sign of x'). The full equation become: x''+ 2 csi w x' + w^2 x = f(t)+C x'^a I try some tecnique: * standards integrator (newmark o theta wilson) delaing the dumping force in the next step. * Runge Kutta decoupling the system in a system of two [CapitalThorn]rst order ODE.. but, in any case, the result is bad because: * the response of the dumper can be very strong respect to the applied force and the system become unstable. Also is outside my aspectative that the force in the dumper is great than the applied force. * at the end of f(t) application the system oscillate for a unde[CapitalThorn]ned time around a con[CapitalThorn]guration and dont show the classical oscillation decay of csi dumped system (probably for the dif[CapitalThorn]culty tho capture the correct sign of velocity...) Any one as a suggestion? Some relaxing technique? Pepito === Subject: Re: Simple oscillator numerical integration > I need to integrate (numericaly) the well know simple oscillator > equation > x''+ 2 csi w x' + w^2 x = f(t) < ... > > Any one as a suggestion? Some relaxing technique? > Pepito For highly-nonlinearly damped systems, it is a good idea to try an explicit integrator [CapitalThorn]rst, since you dont need to worry about iterating a corrector (which is largely meaningless in path dependent problems). But the best choice depends on the application. I had good results with CD for dry friction damping, in which there is a signi[CapitalThorn]cant hysteretic cycle. In any case, the key step is: REDUCE TO FIRST ORDER. Methods designed to work directly with SO systems often fail miserably for nonlinear damping. === Subject: Re: Simple oscillator numerical integration >I need to integrate (numericaly) the well know simple oscillator >equation >x''+ 2 csi w x' + w^2 x = f(t) >where: >x is the displacement >x'the velocity >x'' the acceleration >w is the frequency >csi is the oscillator dumping >f(t) is the external applied force >The problem arise in the case whe add a dumping force in the form: >fd(t)=C x'^a >where: >C is a constant >a is a exponent usualy in the range 0.1 to 1 >In my situation the dumpers work like a friction dumper force a=0.1 >(similar to a diriclet force depending of the sign of x'). >The full equation become: >x''+ 2 csi w x' + w^2 x = f(t)+C x'^a >I try some tecnique: >* standards integrator (newmark o theta wilson) delaing the dumping >force in the next step. >* Runge Kutta decoupling the system in a system of two [CapitalThorn]rst order >ODE.. >but, in any case, the result is bad because: >* the response of the dumper can be very strong respect to the applied >force and the system become unstable. Also is outside my aspectative >that the force in the dumper is great than the applied force. >* at the end of f(t) application the system oscillate for a unde[CapitalThorn]ned >time around a con[CapitalThorn]guration and dont show the classical oscillation >decay of csi dumped system (probably for the dif[CapitalThorn]culty tho capture >the correct sign of velocity...) >Any one as a suggestion? Some relaxing technique? >Pepito there are three points: a in [0.1,1] you are sure? if you write this in the standard form you get x'' +r(x,x',t)*x' + w^2 * x = f(t) r(x,x',t)=(2*csi*w -C*abs(x')^{a-1}) r is the damping factor this means if abs(x') becomes small, then there is no damping but a strong acceleration? I had thougth of something like C<0 and a>1 ? secondly, if strong damping takes place, then the stepsize must be reduced drastically in order to remain in the stable regime of the method. thirdly, the integrators you mention assume a high order differentiable x which is not the case if x' changes sign. hence if this occurs you must carefully detect time where this takes place and restart the integrator there, otherwise again there will be an additional oscillating effect in the numerical solution. hth peter === Subject: Re: maximum entropy method by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8GC6PO32543; I want souce code for maximum entropy method for signal restoration/estimation Is any body has material on that === Subject: best software environment for numerical analysis I am about to embark on a software project with intensive numerical analysis and i have been out of it(ie software) for a while. below is my project but i wanted to know what the best language to use is. My best guess is to use c++ and use kdevelop 3.1 on Suse Linux 9.1, and that i will be able to compile other people's C or C++ code from the internet. (other linux distro's 15 years ago i did a fortran simulation utilised in diffraction co-ef[CapitalThorn]cients for antenna desgn. now i assume all the fortran stuff is now essentially available in C or C++(or at least the stuff i need). I assume for numerical analysis, from what i have recently read on the internet, delphi and Python are NOT the way to go. Project Description: I am writing a blackjack simulation for card counting anaylis. will be calculations of 0% advantage, con[CapitalThorn]dence intervals variance etc for numerous rule variations of a game that is well suited to object orientated design. Comparisons of actual recorded results with expected results etc. So my questions are: any info appreciated. :) :) 1. Delphi/python and other high level langauges are NOT the way to go? 2. C++ is roughly on the right track? 3. kdevelop will give me reasonable CASE tools etc/ software engineering environment? (i want to spend the least amount of time doing the software) 4. If i wanted to get the best tools available does that mean spending lots of $$$$ on tools like Rational or other. is this right? just how bad is kdevelop compared to these other tools? === Subject: Re: best software environment for numerical analysis >I am about to embark on a software project with intensive numerical >analysis and i have been out of it(ie software) for a while. >I assume for numerical analysis, from what i have recently read on the >internet, delphi and Python are NOT the way to go. It appears that you intend to write software which is really for a one off calculation albeit for a number of scenarios. Modern personal computers are incredibly fast. Apparently the new Mac G5 is on par with a Cray supercomputer from 1985. Given how fast computers are and how slow programmers are for a one off calculation you should be looking for a language which will be easy to program in and which is not prone to the introduction of errors. If you are already familiar with Pascal then you should seriously consider using Delphi. I have been playing around with some computation in Delphi. I was concerned with performance so I replaced the innermost loop (doing DAXPY) with inline assembler and got only a small improvement even though that loop consumed a majority of the total time for the whole program. I do not think you will suffer much or any performance penalty using Delphi over C or C++. === Subject: Re: best software environment for numerical analysis >I am about to embark on a software project with intensive numerical >analysis and i have been out of it(ie software) for a while. >I assume for numerical analysis, from what i have recently read on the >internet, delphi and Python are NOT the way to go. >It appears that you intend to write software which is really for a one >off calculation albeit for a number of scenarios. >Modern personal computers are incredibly fast. Apparently the new Mac >G5 is on par with a Cray supercomputer from 1985. This might be, but they are far from ef[CapitalThorn]cient for quite a few types of problems which were much better handled before the desire for speed was used to throw out good mathematical instructions. >Given how fast computers are and how slow programmers are for a one >off calculation you should be looking for a language which will be >easy to program in and which is not prone to the introduction of >errors. This is assuming that the operations wanted are even present in the language. Low-accuracy computations of the type envisioned by the current generation of hardware and software designers (the present double precision) is really a misnomer), no matter how fast, do not do a reasonable job of handling different or more accurate computations. -- This address is for information only. I do not claim that these views are those of the Statistics Department or of Purdue University. Herman Rubin, Department of Statistics, Purdue University hrubin@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558 === Subject: Re: best software environment for numerical analysis > I assume for numerical analysis, from what i have recently read on > the internet, delphi and Python are NOT the way to go. before you discount Delphi, you might want to take a look at some of the things that folks have done with it in the [CapitalThorn]elds of science/engineering/mathematics... see http://www-rab.larc.nasa.gov/nmp/fNMPapps.htm -- Mark Vaughan ____________ Visit the Numerical Methods in Pascal web page at http://www-rab.larc.nasa.gov/nmp/fNMPhome.htm === Subject: Re: best software environment for numerical analysis >I am about to embark on a software project with intensive numerical >analysis and i have been out of it(ie software) for a while. >below is my project but i wanted to know what the best language to use >is. My best guess is to use c++ and use kdevelop 3.1 on Suse Linux >9.1, and that i will be able to compile other people's C or C++ code >from the internet. (other linux distro's >15 years ago i did a fortran simulation utilised in diffraction >co-ef[CapitalThorn]cients for antenna desgn. now i assume all the fortran stuff is >now essentially available in C or C++(or at least the stuff i need). Fortran is still OK. You can get it free from Salford Software http://www.salfordsoftware.co.uk/compilers/support/ downloads.html You can get both 95 and 77 free. A.L. === Subject: Re: best software environment for numerical analysis >I am about to embark on a software project with intensive numerical >analysis and i have been out of it(ie software) for a while. >below is my project but i wanted to know what the best language to use >is. My best guess is to use c++ and use kdevelop 3.1 on Suse Linux >9.1, and that i will be able to compile other people's C or C++ code >from the internet. (other linux distro's >15 years ago i did a fortran simulation utilised in diffraction >co-ef[CapitalThorn]cients for antenna desgn. now i assume all the fortran stuff is >now essentially available in C or C++(or at least the stuff i need). >Fortran is still OK. You can get it free from Salford Software >http://www.salfordsoftware.co.uk/compilers/support/ downloads.html >You can get both 95 and 77 free. The Salford Fortran compiler is free for personal use, but it is a Windows product, and the OP intends to use Linux. The free Fortran 95 compilers for Linux are Intel (for non-commercial use) http://www.intel.com/software/products/compilers/ßin/ G95 http://www.g95.org gfortran http://www.gfortran.org/ G95 and gfortran are not complete but are under active development. So far, G95 runs all my F95 standard-conforming codes. http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- === Subject: Re: best software environment for numerical analysis >I am about to embark on a software project with intensive numerical >analysis and i have been out of it(ie software) for a while. >below is my project but i wanted to know what the best language to use >is. My best guess is to use c++ and use kdevelop 3.1 on Suse Linux >9.1, and that i will be able to compile other people's C or C++ code >from the internet. (other linux distro's >15 years ago i did a fortran simulation utilised in diffraction >co-ef[CapitalThorn]cients for antenna desgn. now i assume all the fortran stuff is >now essentially available in C or C++(or at least the stuff i need). You were probably using Fortran 77. Fortran 90 and 95 have greatly improved the language. For code using arrays, especially multidimensional arrays, it easier to work in Fortran 95 than C++ IMO. Fortran 90 is a strict superset of F77 and Fortran 95 is a superset for practical purposes (F95 comopilers still support the few F77 features of[CapitalThorn]cially deleted), so your F77 knowledge is still good. There is a free Fortran 95 compiler for Linux, called G95, at http://www.g95.org . I have used it on SuSE Linux 9.0 . >I assume for numerical analysis, from what i have recently read on the >internet, delphi and Python are NOT the way to go. Unless speed is very important, I think Python is [CapitalThorn]ne, especially in conjunction with the Numeric or Numarray modules and SciPy. There are many math libraries callable from Python, and it is possible to call C and Fortran libraries. http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- === Subject: Re: best software environment for numerical analysis >You were probably using Fortran 77. yes it was.... >Fortran 90 and 95 have greatly improved >the language. For code using arrays, especially multidimensional arrays, >it easier to work in Fortran 95 than C++ IMO. Fortran 90 is a strict superset >of F77 and Fortran 95 is a superset for practical purposes (F95 comopilers >still support the few F77 features of[CapitalThorn]cially deleted), so your F77 knowledge >is still good. >There is a free Fortran 95 compiler for Linux, called G95, at http://www.g95.org > I have used it on SuSE Linux 9.0 . i have found using arrays within pascal to be messy at the time. I have become jack of all trades and master of none. all a long time ago. i have done a Ôbit' of: assembly language in DOS, fortran77 on solaris, some embedded ADA, DOS pascal, EXCEL Visual Basic. I want to try industry standard that will be here in a while. A fair amount of tricky code, and therefor at risk of error, is in the play of the hands. many different rules at different casinos, slightly different. hence object orientation techniques - data abstraction, infomation hiding etc are very important. eg shoe.shufße, or shoe.ßip_next_card, shoe.number_of_decks=6. I know ADA and pascal can pass functions as variables to procedures. this type of stuff was useful last time i tried. i assume you can do this in C++ as well. >Unless speed is very important, I think Python is [CapitalThorn]ne, especially in conjunction >with the Numeric or Numarray modules and SciPy. There are many math libraries >callable from Python, and it is possible to call C and Fortran libraries. speed is important do to the high variance of the game and hence number of simulations required to determine the long run. but there is more than one way to skin a cat. maybe i can scrouge CPU usage from somewhere else. The [CapitalThorn]rst part of my analysis will be to do probabilties as the count varies for different hands. the statistical aspects of variance etc will be later. I get the impression Python can be useful as a glue language to call routines written in other languages. this in itself seems useful even if most of the code is implented in other languages. can python call ADA stuff as well? I have been doing some searching on the internet to compare languages but i am using internet cafes at the moment so internet access is limited. my usenet server has a 24hour'ish delay on updating posted messages.(astraweb.com) . so there is a delay to read your guys tips. >http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups >---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- === Subject: Re: best software environment for numerical analysis > [...] > speed is important do to the high variance of the game and hence > number of simulations required to determine the long run. but there > is more than one way to skin a cat. maybe i can scrouge CPU usage from > somewhere else. > [...] > I get the impression Python can be useful as a glue language to call > routines written in other languages. this in itself seems useful even > if most of the code is implented in other languages. I once used Python + C to do some analysis on large images. It was disappointing: I ended up re-writing essentially all of the code in C. At [CapitalThorn]rst, I prototyped in Python, but by the time it took the prototype to [CapitalThorn]nish its test run on real data I usually had the C implementation ready (which ran 100-1000x faster). I also didn't like that I had to do the memory management manually when interfacing C to Python. I also tried the pynumerics libraries. But as my code didn't vectorize well results were not satisfying. Also, I found the pointer semantics of pynumeric's vectors and matrices annoying: Octave/ Matlab's value semantics seems more natural to me, and side-effects are easier to control. Today I use Python for scripting non-time-critical stuff only. === Subject: Re: best software environment for numerical analysis > I get the impression Python can be useful as a glue language to call > routines written in other languages. this in itself seems useful even > if most of the code is implented in other languages. Yes, I am familar with doing this with C (a little). > can python call ADA stuff as well? Never tried it. -- Lou Pecora (my views are my own) === Subject: Re: best software environment for numerical analysis by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8HBajY21887; >There is a free Fortran 95 compiler for Linux, called G95, at http://www.g95.org GNU gcc-4.0 will include gfortran instead of g77. This is available, as a beta release, either from the gcc snapshots or as Linux/Cygwin binaries at http://f77.linksysnet.com. G95 and gfortran forked nearly two years ago - don't ask me why because I wasn't there! It does seem like a waste of scarce effort, though. >Unless speed is very important, I think Python is [CapitalThorn]ne, especially in conjunction >with the Numeric or Numarray modules and SciPy. There are many math libraries >callable from Python, and it is possible to call C and Fortran libraries. This choice is highly subjective and dependent on what you are trying to do. (i) For high performance computing and large codes, fortran or C are the way to go. Both have extensive libraries, automatic vectorizers etc., etc.. (ii) For day to day, medium scale calculations/simulations, the various interpreted languages, mentioned in this thread, are ideal. (iii) For syntactic simplicity in numerical calculations, with rasonable performance, matlab/octave/Scilab/FreeMat/... are ideal. (iv) Python with SciPy, R and all the rest were designed for other things and, in their present manifestations, can only be described (IMO) as being clumsy for numerical work - particularly if you are coming from a fortran world. (v) Frankly, matlab is the best; both in terms of performance and libraries. However, you have to have a VERY, VERY deep pocket. (vi) For compatibility and performance, octave is next best and is FREE. It does lack the fancy graphics and the GUI but, as has already been said on this thread, that can be dealt with by other means and will change in the future. Above all octave has good libraries and code written for Matlab runs on octave, pretty much as it comes. I use Matlab at work and octave at home. Code transfers between the two with no problem. (vii) Scilab is also good, particularly in version 3, but has diverged substantially from matlab. As David Bateman said, the license has a commercial restriction: .... Any commercial use or circulation of the DERIVED( or COMPOSITE) SOFTWARE shall have been previously authorized by INRIA and ENPC..... . Paul T === Subject: Re: best software environment for numerical analysis >There is a free Fortran 95 compiler for Linux, called G95, at href=http://www.g95.org>http://www.g95.org >GNU gcc-4.0 will include gfortran instead of g77. This is available, >as a beta release, either from the gcc snapshots or as Linux/Cygwin >binaries at http://f77.linksysnet.com. >G95 and gfortran forked nearly two years ago - don't ask me why >because I wasn't there! It does seem like a waste of scarce effort, >though. >Unless speed is very important, I think Python is [CapitalThorn]ne, especially in >conjunction >with the Numeric or Numarray modules and SciPy. There are many math >libraries >callable from Python, and it is possible to call C and Fortran >libraries. >This choice is highly subjective and dependent on what you are trying >to do. >(i) For high performance computing and large codes, fortran or C are >the way to go. Both have extensive libraries, automatic vectorizers >etc., etc.. >(ii) For day to day, medium scale calculations/simulations, the >various interpreted languages, mentioned in this thread, are ideal. >(iii) For syntactic simplicity in numerical calculations, with >rasonable performance, matlab/octave/Scilab/FreeMat/... are ideal. Fortran 95 has array functionality comparable to Matlab, and I [CapitalThorn]nd its syntax to pretty simple. The question is whether you prefer a statically typed language like Fortran, with explicit declarations -- I do. >(iv) Python with SciPy, R and all the rest were designed for other >things and, in their present manifestations, can only be described >(IMO) as being clumsy for numerical work - particularly if you are >coming from a fortran world. I came to Python from Fortran (which I still use) and have not found it clumsy, just slower for number-crunching. The lower speed is usually not a problem. >(v) Frankly, matlab is the best; both in terms of performance and >libraries. However, you have to have a VERY, VERY deep pocket. Deep pockets to use it on one machine, and even deeper pockets to create a stand-alone executable with the Matlab compiler, which costs $20,000 for a U.S. commercial license -- a colleague just asked about this. http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- === Subject: Re: best software environment for numerical analysis >(v) Frankly, matlab is the best; both in terms of performance and >libraries. However, you have to have a VERY, VERY deep pocket. > Deep pockets to use it on one machine, and even deeper pockets to create > a stand-alone executable with the Matlab compiler, which costs $20,000 for > a U.S. commercial license And fork out another ten grand or so if you'd like to run it in real-time. Not bad pricing (gouging) strategy for a *[CapitalThorn]x* to make Matlab usable for real, non homework, calculations. === Subject: Re: best software environment for numerical analysis by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8GFdee20816; Phil: Forever philosophical be your name for it proves the existence of odds and probability! I am myself not only a blackjack player, but also a gamblers gambler. I have authored a huge web site dedicated to gambling science, including blackjack. The main blackjack page is: http://www.saliu.com/blackjack.html (Dont be disappointed by the cold mathematical truth on card counting!) I have done also a lot of programming in gambling, lottery, mathematics, statistics, etc. I use Visual Basic sometimes. But my tool of choice is the 32-bit Basic compiler from PowerBasic. It really is powerful. My FTP download site has dozens of free programs compiled with PowerBasic Console Compiler (PBCC). I also offer free source code in PBCC to generate unique random numbers (http://www.saliu.com/random-numbers.html). That might be of interest to you, since I assume you want to generate and analyze of combinatorics: PermuteCombine.EXE. It calculates and generates all possible sets of numbers and words: exponents, permutations, arrangements, and combinations. There is also software to calculate the probability and odds for many gambling situations. My freeware is available from this entry point: http://www.saliu.com/infodown.html The programs have meaningful descriptions, plus links to more detailed information. If you want perfect accuracy in odds calculation, only generation in lexicographical order will do. But todays computers are incapable of working with trillions of trillions of gazillions of googols. For now, we can only settle for random simulation in gambling, especially blackjack (4 or more decks). Hope to see your program soon. Hopefully, youll make it freeware! Laius Usail, Doctor in Occult Science of Gambling http://www.saliu.com/occult-science-gambling.html >I am about to embark on a software project with intensive numerical >analysis and i have been out of it(ie software) for a while. >below is my project but i wanted to know what the best language to use >is. My best guess is to use c++ and use kdevelop 3.1 on Suse Linux >9.1, and that i will be able to compile other people's C or C++ code >from the internet. (other linux distro's >15 years ago i did a fortran simulation utilised in diffraction >co-ef[CapitalThorn]cients for antenna desgn. now i assume all the fortran stuff is >now essentially available in C or C++(or at least the stuff i need). >I assume for numerical analysis, from what i have recently read on the >internet, delphi and Python are NOT the way to go. >Project Description: I am writing a blackjack simulation for card >counting anaylis. will be calculations of 0% advantage, con[CapitalThorn]dence >intervals variance etc for numerous rule variations of a game that is >well suited to object orientated design. Comparisons of actual >recorded results with expected results etc. >So my questions are: any info appreciated. :) :) >1. Delphi/python and other high level langauges are NOT the way to go? >2. C++ is roughly on the right track? >3. kdevelop will give me reasonable CASE tools etc/ software >engineering environment? (i want to spend the least amount of time >doing the software) >4. If i wanted to get the best tools available does that mean spending >lots of $$$$ on tools like Rational or other. is this right? just how >bad is kdevelop compared to these other tools? === Subject: Re: best software environment for numerical analysis >I have done also a lot of programming in gambling, lottery, >mathematics, statistics, etc. I use Visual Basic sometimes. But my >tool of choice is the 32-bit Basic compiler from PowerBasic. It really >is powerful. My FTP download site has dozens of free programs compiled >with PowerBasic Console Compiler (PBCC). I did once start writing a pascal implementation of blackjack. problem was the language compiler at the time, borland pascal DOS IDE, did not support objects. this made it tricky going(ie lot of extra work). Same problem here with BASIC, also type checking may not be up to scratch on BAsic. >I also offer free source code in PBCC to generate unique random >numbers (http://www.saliu.com/random-numbers.html). That might be of >interest to you, since I assume you want to generate and analyze >of combinatorics: PermuteCombine.EXE. It calculates and generates all >possible sets of numbers and words: exponents, permutations, >arrangements, and combinations. There is also software to calculate >the probability and odds for many gambling situations. My freeware is >available from this entry point: needs to be open source language compatable....I am trying to refresh >If you want perfect accuracy in odds calculation, only generation in >lexicographical order will do. But todays computers are incapable of >working with trillions of trillions of gazillions of googols. For now, >we can only settle for random simulation in gambling, especially >blackjack (4 or more decks). lexicographical order. i assume this considers all combinations and permutations of all cards remaining. interesting, had not thought of this. curiosity only...not planning an implentation. do you know how many calculations for one deck, assuming your at the 1st hand of shoe. 2 decks etc. === Subject: Re: best software environment for numerical analysis > 1. Delphi/python and other high level langauges are NOT the way to go? Well, actually Python CAN be the way to go. There are plenty of people who use Python to do numerical calculations, especially for rapid tests of algorithms and ideas. VERY good for that. One of the nicest languages you'll ever use. However, for blazing speed when writing your own (especially if it has loops) you can write C or C++ extensions that can be called from Python. There are lots of packages for exending Python out there already. Well known and used is the numeric (or numarray) linear algebra package (built on LAPAC IIRC). I would certainly check it out. A high price option that's Ôsimilar' in that it is easy to program (though not as clean as Python) and has very good plotting routines is MatLAB. If you can afford it, that might be a good RAD/Test tool. Oh, yeah. Python is free. > 2. C++ is roughly on the right track? I guess if you're develping a app for commercial release (this wasn't clear) this is eventually where you want to go. Eventually. That development part can still include the above. Don't know answers to 3. adn 4. Sorry. -- Lou Pecora (my views are my own) === Subject: Re: best software environment for numerical analysis > 1. Delphi/python and other high level langauges are NOT the way to go? >Well, actually Python CAN be the way to go. There are plenty of people >who use Python to do numerical calculations, especially for rapid tests >of algorithms and ideas. VERY good for that. One of the nicest >languages you'll ever use. this sounds good. rapid tests of ideas.I had another idea i wanted to do that required fast analysis. use python to test the hypothesis. What is of major importance is the quality. i read a lot of stuff about type checking done at compile time versus run time and the checking of the actual values during run time.(otherwise called static or dynamic type checking). Obviously the software will be unit tested as i can but any extra Ôway' of being more sure is useful. a LOT of my money will be bet using the analysis - so bug free code is critical. I do have other sources of analysis but not the aspects i want to investigate. For me it doesn't really matter if the languages does checks at compile time or run time as long as the checks are done. since it is a simulation, ie start it, then wait [CapitalThorn]ve hours, then look at text output. i understand python does do the checks. but python does not have the object orientated data hiding forced on the programmer. >However, for blazing speed when writing your >own (especially if it has loops) you can write C or C++ extensions that >can be called from Python. There are lots of packages for exending >Python out there already. Well known and used is the numeric (or >numarray) linear algebra package (built on LAPAC IIRC). I would >certainly check it out. could always do it [CapitalThorn]rst in python and then convert parts or all of it to C++ as required. >Oh, yeah. Python is free. An important aspect of the language is using what everyone else is using to gain access to libraries/code that is already there and hopefully tested. support too, also maybe everybody is using this for a reason, ie it is good. free is good too. >A high price option that's Ôsimilar' in that it >is easy to program (though not as clean as Python) and has very good >plotting routines is MatLAB. If you can afford it, that might be a good >RAD/Test tool. I know people use Matlab for numerical analysis but i don't know much about it as i have never used it. i imagine it is not so much object orientated but is for heavy duty numerical analysis. At [CapitalThorn]rst my program will be mostly the game simulation/optimised play which are well modelled with objects and probability analysis from results. The next part that will include variance analysis, possily error analysis that will be very numerical as well as possible shufße analysis. > 2. C++ is roughly on the right track? >I guess if you're develping a app for commercial release (this wasn't >clear) this is eventually where you want to go. Eventually. That >development part can still include the above. App is for my own use and possibly a handful of associates only. why do you say c++ is eventually where you want to go. because python would need to be on the target system as well or users may not like slow response or for robustness? === Subject: Re: best software environment for numerical analysis >I guess if you're develping a app for commercial release (this wasn't >clear) this is eventually where you want to go. Eventually. That >development part can still include the above. > App is for my own use and possibly a handful of associates only. > why do you say c++ is eventually where you want to go. because python > would need to be on the target system as well or users may not like > slow response or for robustness? I was thinking more in terms of an optimized, binary app. But I guess Python could still be comercial. I've never really done commercial so I was guessing here. I use Python and C++ for my own research which means rarely does anyone else use my apps. The combination of languages is very nice. I would check out S- or R-Plus. I know people who have used those packages and like them. I've never used them. Finally, for MatLAB I would guess you will put out several thousand $, but most engineering people swear by it. It's speed is roughly equivalent to Python. That means if you want to optimize/speed things up you are looking at some compiled language in addition, too. -- Lou Pecora (my views are my own) === Subject: Re: best software environment for numerical analysis [...snip] A high price option that's Ôsimilar' in that it > is easy to program (though not as clean as Python) and has very good > plotting routines is MatLAB. If you can afford it, that might be a good > RAD/Test tool. Oh, yeah. Python is free. Also Python has a very nice plotting library: http://matplotlib.sourceforge.net/ And for a Matlab replacement I recomend Scilab (www.scilab.org) also if it hasn't for example a PDEtool... :-( hi, nelson === Subject: Re: best software environment for numerical analysis >Also Python has a very nice plotting library: >http://matplotlib.sourceforge.net/ excellent, i had been thinking about xplot. >And for a Matlab replacement I recomend Scilab (www.scilab.org) also if it >hasn't for example a PDEtool... :-( >hi, > nelson === Subject: Re: best software environment for numerical analysis X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime > certainly check it out. A high price option that's Ôsimilar' in that it > is easy to program (though not as clean as Python) and has very good > plotting routines is MatLAB. If you can afford it, that might be a good > RAD/Test tool. Oh, yeah. Python is free. You could also try Scilab and Octave as free alternatives to Matlab. Russell. === Subject: Re: best software environment for numerical analysis > certainly check it out. A high price option that's Ôsimilar' in that > it is easy to program (though not as clean as Python) and has very > good plotting routines is MatLAB. If you can afford it, that might be > a good RAD/Test tool. Oh, yeah. Python is free. > You could also try Scilab and Octave as free alternatives to Matlab. > Russell. The license of Scilab restricts its use in commericial environments. Octave is GPLed, so you can use it in commerical environments, but if you distribute changes you made to Octave or its functions you must distribute the source code... Your own functions are yours of course :-) D. === Subject: Re: best software environment for numerical analysis I prefer R, which is the successor of S. It's free (beer and freedom), has much better graphics than Octave, has a good high-level control language, and has a huge array of software available. It was designed with statistics in mind, but is extremely useful for a wide range of numerical tasks. (IMO, the only time Octave is really a good choice is if you have to run existing Matlab, and even then, it rarely works, as Octave is missing many of Matlab's features.) rif === Subject: Re: best software environment for numerical analysis > I prefer R, which is the successor of S. It's free (beer and > freedom), has much better graphics than Octave, has a good high-level > control language, and has a huge array of software available. It was > designed with statistics in mind, but is extremely useful for a wide > range of numerical tasks. (IMO, the only time Octave is really a good > choice is if you have to run existing Matlab, and even then, it rarely > works, as Octave is missing many of Matlab's features.) First of all let me tell you that I am in no way an experienced R-user, so I cannot talk from that point of view, but I do use Matlab and Octave a lot for my research. I try to write compatible code, and from my experience and in my opinion, there is indeed still a difference and certainly not all of your Matlab code will run under Octave, but please note that there is already quite some compatibility (as David Bateman already mentioned in this thread) and the Octave-developers are really putting their efforts in keeping Octave compatible with Matlab. This used to be different in the past... Please understand that Ôkeeping up compatability' is not always easy, especially when all the work is done by volunteers working in their spare free time... It's also a good idea to always try to keep up with the latest releases of Octave to pro[CapitalThorn]te from all the best stuff that is out there. In my opinion, the only big thing Octave still is missing is a nice graphical user interface like Matlab has it. But let's all face it: if we can type our M-[CapitalThorn]les in an editor, run our scripts and functions at the Octave prompt, and look at our graphics within GNU-plot, then is it really necessary to have other bells and whistles around? Bart -- Share what you know. Learn what you don't. === Subject: Re: best software environment for numerical analysis X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime > In my opinion, the only big thing Octave still is missing is a nice > graphical user interface like Matlab has it. But let's all face it: if > we can type our M-[CapitalThorn]les in an editor, run our scripts and functions at > the Octave prompt, and look at our graphics within GNU-plot, then is it > really necessary to have other bells and whistles around? Unfortunately Gnuplot is the main reason I don't use Octave. I primarily use Matlab to analyse data and Gnuplot simply doesn't offer a good means of doing that (it might be okay once you have [CapitalThorn]gured out all its idiosyncracies). Russell. === Subject: Re: best software environment for numerical analysis > I prefer R, which is the successor of S. It's free (beer and > freedom), has much better graphics than Octave, has a good high-level > control language, and has a huge array of software available. It was > designed with statistics in mind, but is extremely useful for a wide > range of numerical tasks. (IMO, the only time Octave is really a good > choice is if you have to run existing Matlab, and even then, it rarely > works, as Octave is missing many of Matlab's features.) > rif Rif, As some one who uses heavily and contributes to Octave, I [CapitalThorn]nd your critism laughable. Though there is not much point responding as you don't say what it is that you [CapitalThorn]nd lacking in Octave. Recent versions of Octave have NDArrays, int/uint and math on these. Octave even has features ahead of matlab (eg. +=, and || though I think matlab just introduced these) and features from the very latest version of matlab such as anonymous function handles (eg @ () ). Want a toolbox that isn't in the base distribution, you need look no further than octave.sourceforge.net. As for graphics, yes there are some issues with octave, that are being worked on now and I'm certain that future versions of octave will have comparable graphics capabilities to matlab. Even without fancy graphics, the fact that Octave is now so higher compatiable with Matlab, make it a perfect candidate for simulation in a cluster where you'd need as many Matlab license as nodes in the cluster. If you care to identify what it is exactly you [CapitalThorn]nd lacking with Octave, I'm sure I could make a better response to your complaint. D. === Subject: Re: best software environment for numerical analysis I must have misspoke. The thrust of my message should have been I really like R, why not take a look at it? rather than Octave is not a good program, avoid it. I did not mean to badmouth Octave. I haven't used it in a year or so, since I started using R; it's possible it has improved greatly in that time frame, and I have no basis for making a judgement about its current capabilities. Also, please understand that my comment was made in the context of not liking Matlab much either --- I strongly prefer R to Matlab, and that's why I'd personally only use Octave when I wanted to run Matlab code. Similarly, I retract my statement that R is a successor to S. rif === Subject: Re: best software environment for numerical analysis > I must have misspoke. The thrust of my message should have been I > really like R, why not take a look at it? rather than Octave is not > a good program, avoid it. I did not mean to badmouth Octave. I > haven't used it in a year or so, since I started using R; it's > possible it has improved greatly in that time frame, and I have no > basis for making a judgement about its current capabilities. Also, > please understand that my comment was made in the context of not > liking Matlab much either --- I strongly prefer R to Matlab, and > that's why I'd personally only use Octave when I wanted to run Matlab > code. Just out of curiosity and because I don't know R myself and might want to learn it's capabilities(*): what kind of things make R so superior to Matlab/Octave? In what is R better than Octave/Matlab? Bart (*) the right tool for the right job, you know ;-) -- Share what you know. Learn what you don't. === Subject: Re: best software environment for numerical analysis > I must have misspoke. The thrust of my message should have been I > really like R, why not take a look at it? rather than Octave is not > a good program, avoid it. I did not mean to badmouth Octave. I > haven't used it in a year or so, since I started using R; it's > possible it has improved greatly in that time frame, and I have no > basis for making a judgement about its current capabilities. Also, > please understand that my comment was made in the context of not > liking Matlab much either --- I strongly prefer R to Matlab, and > that's why I'd personally only use Octave when I wanted to run Matlab > code. >Just out of curiosity and because I don't know R myself and might want >to learn it's capabilities(*): what kind of things make R so superior to >Matlab/Octave? In what is R better than Octave/Matlab? R and S-Plus are designed for and used by statisticians, so there is statistical software for those programs not available in Matlab -- you'd have to write your own code. See http://cran.r-project.org for a list of R packages. Usually, R can run S-Plus code. http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- === Subject: Re: best software environment for numerical analysis >R and S-Plus are designed for and used by statisticians, so there is statistical >software for those programs not available in Matlab -- you'd have to write >your own code. See http://cran.r-project.org for a list of R packages. Usually, >R can run S-Plus code. I have another problem that is purely statistical, not a simulation. A randomizing machine has a bias, and from a sample of spins i want to calculate the bias. Obviously as the sample size increases the con[CapitalThorn]dence of the bias calculation will narrow. There are four randomizing devices in the machine and for each device the next outcome of a spin is a function of the previous outcome, but you don't know which of the four previous outcomes was the starting point for each of the four devices. Now if there was only one device this would be straight forward(although some work for me since i am not mathematician) to reverse backwards and calculate actual probabilities with a certain con[CapitalThorn]dence level for a given sample size. So i need to do the analysis of a sample, or analyze the data as it is collected to determine a bias with a useful con[CapitalThorn]dence interval. Will this R and S help me best do this? === Subject: Re: best software environment for numerical analysis There's a powerpoint presentation at http://www.bioconductor.org/workshops/Heidelberg02/ r-intro.ppt that does a good job explaining R's features. Basically, I [CapitalThorn]nd the language itself more full-featured than Matlab, closer to functional programming, with lots of built-in data types that seem to mesh well for numerical work, and a nice infrastructure or automagically downloading software from the central R repository. rif === Subject: Re: best software environment for numerical analysis >I prefer R, which is the successor of S. It's free (beer and >freedom), has much better graphics than Octave, has a good high-level >control language, and has a huge array of software available. It was >designed with statistics in mind, but is extremely useful for a wide >range of numerical tasks. (IMO, the only time Octave is really a good >choice is if you have to run existing Matlab, and even then, it rarely >works, as Octave is missing many of Matlab's features.) R is worth considering, but calling it a successor (implying better or more modern) of S is a bit misleading IMO. S-Plus is a commercial product that is still under development, and R is a viable open-source ALTERNATIVE in many cases. http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- === Subject: Re: Science and Religion by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8GF9aV18070; Art: Forever axiomatic be your name for it proves the necessity of the quest for knowledge! Science and religion in agreement? They can only agree to disagree at best! At worst, which is also equivalent to most of the time, religion orders an armada of inquisitors to war. That is, war against the nerds who can only [CapitalThorn]ght with pencils and defend themselves with paper shields! Science uses reason as a tool in searching Truth, while religion attempts to establish Order in randomness. What religion and science have in common is they are fundamental components of consciousness. You may want to read these bibles: http://www.saliu.com/civilization.html (Civilization is the permutation of the fundamental elements of Consciousness: Art, Religion, Science, Philosophy) and http://www.saliu.com/almighty_number.html (Almighty Number, Randomness, Universe, God, Order, History, Repetition). Laius Usail, Doctor in Occult Science of Randomness >Science and Religion >If you're interested in science and in religion, and wish >the two were more in agreement, you're invited to a free >download of the book Science Without Bounds: >A Synthesis of Science, Religion, and Mysticism >Free electronic copies available for personal and educational use >at http://www.adamford.com/swb< /a> >Here's what some people have said about Science Without Bounds. >One of the best on the Internet . . . for quality, accuracy of >content, presentation and usability. - Britannica Presents Internet >Guide Awards >Style is tight, clean and refreshingly free from scienti[CapitalThorn]c, mystical, >philosophical and theological jargon. . . . It's the kind of book >where you'll need to stop and do 15 minutes of deep thinking and >pondering every few pages . . . Outstanding book, engrossing, a >classic - Wendy Christensen, Inscriptions, the weekly e-zine for >professional writers, (InscriptionsMagazine.com) >Selected by The McKinley Group's professional editorial team as a >3-Star site . . . a special mark of achievement in Magellan, >McKinley's comprehensive Internet directory of over 1.5 million sites >and 40,000 reviews. >Found it very intriguing. A lot of your ideas had me nodding my head >in agreement. - Karl B. >I was astonished to read your book non-stop over 7 hours last night. >It was the best synthesis of the collective understanding I have read >in my 48 years. - S. R. >I'm impressed by the breadth of your understanding and the amount of >work you've obviously put into it. - R.W.K. >Wow! This is about all I can say at the moment. - Ella B. >Science and Religion >If you're interested in science and in religion, and wish >the two were more in agreement, you're invited to a free >download of the book Science Without Bounds: >A Synthesis of Science, Religion, and Mysticism >Free electronic copies available for personal and educational use >at http://www.adamford.com/swb< /a> >Here's what some people have said about Science Without Bounds. >One of the best on the Internet . . . for quality, accuracy of >content, presentation and usability. - Britannica Presents Internet >Guide Awards >Style is tight, clean and refreshingly free from scienti[CapitalThorn]c, mystical, >philosophical and theological jargon. . . . It's the kind of book >where you'll need to stop and do 15 minutes of deep thinking and >pondering every few pages . . . Outstanding book, engrossing, a >classic - Wendy Christensen, Inscriptions, the weekly e-zine for >professional writers, (InscriptionsMagazine.com) >Selected by The McKinley Group's professional editorial team as a >3-Star site . . . a special mark of achievement in Magellan, >McKinley's comprehensive Internet directory of over 1.5 million sites >and 40,000 reviews. >Found it very intriguing. A lot of your ideas had me nodding my head >in agreement. - Karl B. >I was astonished to read your book non-stop over 7 hours last night. >It was the best synthesis of the collective understanding I have read >in my 48 years. - S. R. >I'm impressed by the breadth of your understanding and the amount of >work you've obviously put into it. - R.W.K. >Wow! This is about all I can say at the moment. - Ella B. === Subject: Re: Help to solve an integral by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8GF9af18066; >I am looking for help to solve an integral. >The integral is a de[CapitalThorn]nite integral for x varying from 0 until pi of >the following function: >Exp[-Sqrt[-1]*a(x+b*Sqrt[1+c^2-2*c*Cos[x]])] >b and c are real values, and a is a value taking Integer numbers. >Mathematica does not help. >Thibaut Bonjour, I don't know if its useful but you can integrate approximately if you replace the cos by a square signal : cos[x_]:=If[x Hi all! > How do I go about [CapitalThorn]tting a straight line (vector) through three > points in space? Each of the three points is given by three > coordinates (x,y,z) that are measured with some uncertainty. > The textbooks I have all discuss using the method of least squares for > [CapitalThorn]tting a straight line through a number of (x,y) points in a plane > but I need a method that works in three dimensions. > Although this is probably a trivial problem for you mathematicians I > would appreciate any help you can offer. > /Red B. With two coordinates it's just linear regression, with more coordinates is's multiple regression or pca (depending on the distance-measure). Gottfried Helms === Subject: Re: How do I [CapitalThorn]t a line through three points in space? > Hi all! > How do I go about [CapitalThorn]tting a straight line (vector) through three > points in space? Each of the three points is given by three > coordinates (x,y,z) that are measured with some uncertainty. > The textbooks I have all discuss using the method of least squares for > [CapitalThorn]tting a straight line through a number of (x,y) points in a plane > but I need a method that works in three dimensions. > Although this is probably a trivial problem for you mathematicians I > would appreciate any help you can offer. > /Red B. This is a way to [CapitalThorn]nd an acceptable solution : Let the line pass thru the center of gravity and then compare the 6 directions de[CapitalThorn]ned by the cg and one point or parallel with two points. A model in mathematica : lineFit[OM1_,OM2_,OM3_]:= Module[{}, norm[vec_]:=Sqrt[vec.vec]; OG=(OM1+OM2+OM3)/3; v[1]=OM1-OG; v[2]=OM2-OG; v[3]=OM3-OG; v[4]=OM2-OM1; v[5]=OM3-OM2; v[6]=OM1-OM3; d[i_]:=norm[Cross[v[i],(OM1-OG)]]/norm[v[i]] +norm[Cross[v[i],(OM2-OG)]]/norm[v[i]] +norm[Cross[v[i],(OM3-OG)]]/norm[v[i]] ; res={v[#],d[#]}&/@{1,2,3,4,5,6} ; Sort[res,Last[#1] Two follow-on questions: > 1. Will the best [CapitalThorn]t line run through the centroid of the triangle? > 2. Will the best [CapitalThorn]t line reside in the plane of this triangle? > Will this extend to points in R4? > Randall Yes to all questions. Gottfried Helms Example: [9] a = {{1,2,3}, _ {4,1,5}, _ {7,1,3}} // three arbitrary points a: x-coord y-coord z-coord |------------------------------| p1 | 1.00 2.00 3.00 | p2 | 4.00 1.00 5.00 | p3 | 7.00 1.00 3.00 | [10] center = meansp(a) // [CapitalThorn]nding center center : x-coord y-coord z-coord +------------------------------+ c | 4.00 1.33 3.67 | [11] a1 = a-center //translate centering to origin a1 : x-coord y-coord z-coord +------------------------------+ p1' | -3.00 0.67 -0.67 | p2' | . -0.33 1.33 | p3' | 3.00 -0.33 -0.67 | [12] t = gettrans(a1,pca) [13] pca = a1*t // [CapitalThorn]nding best line in [CapitalThorn]rst axis (column 1 of matrix) pca : x-coord y-coord z-coord +------------------------------+ p1 | -3.07 0.66 . | p2 | 0.06 -1.37 . | p3 | 3.01 0.71 . | The three points are in a plane. The best approximate line is the [CapitalThorn]rst axis (x-axis) [14] pca_plus = {pca,{1,0,0},{2,0,0}} // add two points marking the main axis pca_plus : x-coord y-coord z-coord +------------------------------+ p1 | -3.07 0.66 . | p2 | 0.06 -1.37 . | p3 | 3.01 0.71 . | +------------------------------+ r1 | 1.00 . . | r2 | 2.00 . . | Two points on the main axis are added to the system. Now rotate back into original position: [15] a1_plus = pca_plus*t' // rotate back a1_plus : x-coord y-coord z-coord +------------------------------+ p1' | -3.00 0.67 -0.67 | p2' | . -0.33 1.33 | p3' | 3.00 -0.33 -0.67 | +------------------------------+ r1' | 0.99 -0.17 0.01 | r2' | 1.97 -0.33 0.01 | ... and translate back to old center: [16] a_plus = a1_plus + center // translate back a_plus : x-coord y-coord z-coord +------------------------------+ p1 | 1.00 2.00 3.00 | p2 | 4.00 1.00 5.00 | p3 | 7.00 1.00 3.00 | +------------------------------+ r1 | 4.99 1.17 3.67 | r2 | 5.97 1.00 3.68 | Note: r2 could also be the center-point, since the translation was origin to center, and the origin lies on the [CapitalThorn]rst principal axis. Example four points: [17] a = {{1,2,3,4},{4,1,5,7},{7,1,3,2},{5,9,2,1}} // four arbitrary points a : x-coord y-coord z-coord w-coord +----------------------------------------+ | 1.00 2.00 3.00 4.00 | | 4.00 1.00 5.00 7.00 | | 7.00 1.00 3.00 2.00 | | 5.00 9.00 2.00 1.00 | [18] center = meansp(a) // [CapitalThorn]nding center center : x-coord y-coord z-coord w-coord +----------------------------------------+ | 4.25 3.25 3.25 3.50 | [19] a1 = a-center //translate centering to origin a1 : x-coord y-coord z-coord w-coord +----------------------------------------+ | -3.25 -1.25 -0.25 0.50 | | -0.25 -2.25 1.75 3.50 | | 2.75 -2.25 -0.25 -1.50 | | 0.75 5.75 -1.25 -2.50 | [20] t = gettrans(a1,pca) [21] pca = a1*t // [CapitalThorn]nding best line in [CapitalThorn]rst axis (column 1 of matrix) pca : x-coord y-coord z-coord w-coord +----------------------------------------+ | -1.74 2.47 -1.82 . | | -4.04 0.57 1.94 . | | -0.58 -3.74 -0.78 . | | 6.36 0.70 0.66 . | The four points are spanning a 3-d-space Best [CapitalThorn]tting line is the [CapitalThorn]rst axis. [22] pca_plus = {pca,{1,0,0,0},{2,0,0,0}} // add two points marking the main axis pca_plus : x-coord y-coord z-coord w-coord +----------------------------------------+ | -1.74 2.47 -1.82 . | | -4.04 0.57 1.94 . | | -0.58 -3.74 -0.78 . | | 6.36 0.70 0.66 . | +----------------------------------------+ | 1.00 . . . | | 2.00 . . . | [23] a1_plus = pca_plus*t' // rotate back a1_plus : x-coord y-coord z-coord w-coord +----------------------------------------+ | -3.25 -1.25 -0.25 0.50 | | -0.25 -2.25 1.75 3.50 | | 2.75 -2.25 -0.25 -1.50 | | 0.75 5.75 -1.25 -2.50 | +----------------------------------------+ | 0.16 0.82 -0.24 -0.50 | | 0.33 1.63 -0.48 -1.00 | [24] a_plus = a1_plus + center // translate back a_plus : x-coord y-coord z-coord w-coord +----------------------------------------+ | 1.00 2.00 3.00 4.00 | | 4.00 1.00 5.00 7.00 | | 7.00 1.00 3.00 2.00 | | 5.00 9.00 2.00 1.00 | +----------------------------------------+ | 4.41 4.07 3.01 3.00 | | 4.58 4.88 2.77 2.50 | === Subject: Re: How do I [CapitalThorn]t a line through three points in space? Randall === Subject: Re: How do I [CapitalThorn]t a line through three points in space? >Hi all! >How do I go about [CapitalThorn]tting a straight line (vector) through three >points in space? Each of the three points is given by three >coordinates (x,y,z) that are measured with some uncertainty. >The textbooks I have all discuss using the method of least squares for >[CapitalThorn]tting a straight line through a number of (x,y) points in a plane >but I need a method that works in three dimensions. >Although this is probably a trivial problem for you mathematicians I >would appreciate any help you can offer. >/Red B. you can do least squares of course also here, but it is somewhat tricky to do a line [CapitalThorn]t because: how do you want to represent the line? how will you measure the error? for example you can represent the line as the intersection of two planes. since this is possible in many ways and optimization codes dislike solution continua we must make it unique in some way: make the planes orthogonal to each other. represent the plane in Hesse form: a*x+b*y+c*z+d=0 (*) side condition a^2+b^2+c^2=1 a>=0 e*x+f*y+g*z+h=0 (*) side condition e^2+f^2+g^2=1 b>=0 side condition a*e+b*f+c*g=0 inserting x,y,z for the three points gives six residuals whose sum of squares you may want to minimize subject to the 5 constraints. a nonlinear optimization code will do that. this seems like overkill, since from the three points you could also conclude which of the coef[CapitalThorn]ciients a,b,c,d,e,f cannot be zero and [CapitalThorn]x that to one, remaining with six residuals, six unknowns and the orthogonality constraint. but this already weights the errrors differently and in an unpredictable way, hence I discourage this.. or you use the parametric form x(t)=x0+d*t x0 , d vectors, t the line parameter d=(d1,d2,d3) with d1*x0_1+d2*x0_2+d3*x0_3=0 (orthogonality) and d1^2+d2^2+d3^2=1, d1>=0 . (normalization) you could go a step further and represent d by a vector in spherical coordinates d=(cos(phi)*cos(psi),sin(phi)*cos(psi),sin(psi)), now with phi and psi as unknowns, but the orthogonality constraint remains to make the solution unique (with phi in [-pi/2,pi/2]) then the orthogonal distance of the point P(i)=(x(i),y(i),z(i)) from the line is euclidean length of P(i)-x0-(d'*P(i))*d and squaring and adding this you get the error functional which is to be minimized subject to the constraints for codes which can do nonlinear least squares with constraints see http://plato.la.asu.edu/topics/problems/nlolsq.html I recommend ENLSIP (just at the bottom of this page) hth peter === Subject: Re: How do I [CapitalThorn]t a line through three points in space? >How do I go about [CapitalThorn]tting a straight line (vector) through three >points in space? Each of the three points is given by three >coordinates (x,y,z) that are measured with some uncertainty. >you can do least squares of course also here, but it is somewhat >tricky to do a line [CapitalThorn]t because: >how do you want to represent the line? >how will you measure the error? >for example you can represent the line as the intersection of two planes. Is there really a context (consistent with the OP's presentation of his/her problem) in which it would make sense to select a line which is not contained in the line speci[CapitalThorn]ed by the three points? This reduces the problem to [CapitalThorn]tting a line to three points in a single plane. (Of course one still has to decide the criterion by which that line will be considered optimal.) dave === Subject: How to solve this PDE? (Pleaaaaaaaaaaaaase!!) Hi every one. I would like to [CapitalThorn]nd function A(x,t) by solving this PDE: dA/dt=cosh(ax).dA/dx + b.cosh(ax).t a and b are constants. Does anyone has any idea of how I should deal with it? Nas === Subject: Re: How to solve this PDE? (Pleaaaaaaaaaaaaase!!) > Hi every one. > I would like to [CapitalThorn]nd function A(x,t) by solving this PDE: > dA/dt=cosh(ax).dA/dx + b.cosh(ax).t > a and b are constants. Does anyone has any idea of how I should > deal with it? > Nas Maple solves diff(A(x,t),t) = cosh(c*x)*(diff(A(x,t),x)+b*t) readily as : (A(x,t) = 2*b/c*int(arctan(exp(c*x)),x)-b*t*x-2*b/c*arctan(exp(c*x))*x+ arbitrary_funct ion((t*c+2*arctan(exp(c*x)))/c)); or equivalently : (A(x,t) = -I*b/c^2*dilog(1-I*exp(c*x))+I*b/c^2*dilog(1+I*exp(c*x))-b*t* x-2*b/c*arctan( exp(c*x))*x+arbitrary_function((t*c+2*arctan(exp(c*x)))/c)); Chris === Subject: IMS 2005: First announcement and call for submissions With many apologies for multiple postings. ------------------------------------------------------------- ------------ 7TH INTERNATIONAL MATHEMATICA SYMPOSIUM 2005 The University of Western Australia Perth, Western Australia AUSTRALIA 5-8 August 2005 THE SYMPOSIUM The International Mathematica Symposium is an interdisciplinary conference for users of Mathematica in mathematics, natural and life sciences, social sciences and law, engineering, graphics and design, arts and music, education, industry, and commerce. Held six times since its inception in 1995, IMS 1995 (Southampton, United Kingdom), IMS 1997 (Rovaniemi, Finland), IMS 1999 (Linz, Austria), IMS 2001 (Tokyo, Japan), this is the [CapitalThorn]rst time it will be held in the southern hemisphere. The Symposium is refereed, and a published Proceedings (book or CD with ISBN) is produced for each conference. If you use Mathematica in research or teaching, or if you have developed or are developing products based on Mathematica, then the Symposium is an opportunity to share your results with like-minded colleagues. IMS has also built up a deserved reputation as an exceptionally convivial and friendly gathering. In 2005 it will be held at the School of Physics of The University of Western Australia. The Symposium will run from 5-8 August, including optional Mathematica training sessions. Since the conference is being held during our second semester, College accommodation is not available. However special rates with local hotels and serviced apartments have been negotiated to make this conference affordable. CALL FOR PAPERS The closing date for abstracts is February 28, 2005. Please submit your proposals by email to Paul Abbott CALL FOR CONTRIBUTIONS The IMS 2005 Organizing Committee also seeks proposals for * Discussion Panels and Workshops, * Art Exhibitions & Installations, * Poster Presentations, * Software Demonstrations, and * Displays / Exhibition Booths by vendors and sponsors. The closing date for such submissions is April 30 2005. CONFERENCE WEBSITE The conference website is under construction and its URL will be announced, along with a list of plenary speakers and details of the paper format and submission procedure, in the Second announcement. -- Paul Abbott Phone: +61 8 6488 2734 School of Physics, M013 Fax: +61 8 6488 1014 The University of Western Australia (CRICOS Provider No 00126G) 35 Stirling Highway Crawley WA 6009 mailto:paul@physics.uwa.edu.au AUSTRALIA http://physics.uwa.edu.au/~paul === Subject: 3D Fourier transform of a radial function I would like to compute the 3D Fourier transform F(k) of a radial function f(r)=f(|r|) : F(k) = int_{0}^{infty} f(r) 4 pi sin(k r)/(k r) dr where the angular integrations have been performed. Is there an ef[CapitalThorn]cient algorithm (and available routine) for computing F(k) like for FFT? How to handle the oscillatory behavior of the integrand in a numerical integration? Julien Toulouse === Subject: Re: 3D Fourier transform of a radial function Sorry, there was a mistake in the formula. The correct one is of course F(k) = int_{0}^{infty} f(r) 4 pi k sin(k r)/r dr Julien Toulouse === Subject: Re: 3D Fourier transform of a radial function I don't suppose the polar fourier transform is what you're looking for? === Subject: Matrix inversion by Gauss-Jordan elimination Hi. I'm trying to write a computer program to invert a matrix. Unfortunately I don't have much experience or knowledge of linear algebra. I have successfully implemented a matrix inverse function which uses determinants and the adjoint matrix. However, just as I [CapitalThorn]nished that code, I found a web page describing this method as slow. Also, my code allocates and deallocates a lot of memory, which is bad as well. Most of the matrices I will have to invert will be of the range 20x20 to 100x100. However, later on I'm likely to need to invert matrices of sizes similar to 1000x1000. Any recommendations of other methods (that I'm likely to be able to understand) suitable for computer programs would be appreciated. What I'm not con[CapitalThorn]dent is that the method by which I can successfully invert small matrices by hand is the correct method for use in a computer program. I.e. will it succeed in [CapitalThorn]nding the inverse for all invertible matrices? I'll list here a worked example done by my current (correct? incorrect?) version of my program. If anyone would be so kind as to read this and criticse my method as correct or incorrect, it would be greatly appreciated. What I'm not sure about is choosing the proper pivots (I believe they are called). I was going to post an example done by hand, but eventually found it easier to write the program for the method I *think* might be right, rather than do all the working with no mistakes :-(. It does calculate an inverse (checked by multiplying against the original matrix), but is it guaranteed to always get an inverse where possible? First, take a matrix: 0 5 6 1 2 3 6 2 3 Append the identity matrix. 0 5 6 1 0 0 1 2 3 0 1 0 6 2 3 0 0 1 The next step is looped for column 1 to 3. I'll start with column 1. Find the [CapitalThorn]rst row which has a number other than 0 in column 1. I'm assuming that I can choose ANY such row (this assumption is the one I'm most worried about, please advise. Can I just choose ANY such row, or is the real situation more complicated?). In the above case, I can swap rows 1 and 2. 1 2 3 0 1 0 0 5 6 1 0 0 6 2 3 0 0 1 Now, we need a 1 in the [CapitalThorn]rst column of the [CapitalThorn]rst row, and I have one. So onto the next step. I need to get rid of the 6 in the [CapitalThorn]rst column of the last row. So, I minus 6 x the [CapitalThorn]rst row from the last one. 1 2 3 0 1 0 0 5 6 1 0 0 0 -10 -15 0 -6 1 Now move onto the second column. We [CapitalThorn]nd any row (other than the [CapitalThorn]rst one) that has a number other than 0 in the second column. The second row will do. This has a 5 rather than a 1, so we'll divide the entire row by 5. This gives: 1 2 3 0 1 0 0 1 1.2 0.2 0 0 0 -10 -15 0 -6 1 Now we need to remove the 2 in the [CapitalThorn]rst row. We minus 2 * row 2 from the [CapitalThorn]rst row. 1 0 0.6 -0.4 1 0 0 1 1.2 0.2 0 0 0 -10 -15 0 -6 1 And, now we remove -1/10 * the second row from the last row. 1 0 0.6 -0.4 1 0 0 1 1.2 0.2 0 0 0 0 -3 2 -6 1 Finally we get to the last row. We have -3 instead of 1 in the third column. So, we divide row 3 by -3. 1 0 0.6 -0.4 1 0 0 1 1.2 0.2 0 0 0 0 1 -0.666667 2 -0.333333 Now we need to remove the numbers in the last column from rows 1 and 2. For the [CapitalThorn]rst row, we remove 0.6 * row3. I.e. 1 0 0 0 -0.2 0.2 0 1 1.2 0.2 0 0 0 0 1 -0.666667 2 -0.333333 And [CapitalThorn]nally, we remove 1.2 * row3 from row2. 1 0 0 0 -0.2 0.2 0 1 0 1 -2.4 0.4 0 0 1 -0.666667 2 -0.333333 Then, the matrix on the right hand side is the inverse of our original matrix. 0 -0.2 0.2 1 -2.4 0.4 -0.666667 2 -0.333333 Then, I multiply my original matrix with the inverse. 1 0 0 0 1 0 0 0 1 Note: I did round the number -5.17978e-17 to zero in the above working, but otherwise it's the same as my program output. Can anyone criticise my interpretation of the Gauss-Jordan elimination method? Please?!?!? Ross-c === Subject: Re: Matrix inversion by Gauss-Jordan elimination Since you asked this question, it IS guaranteed to give you an inverse whenever one exists. And here's why: You're essentially solving A*x = e_n where e_n is a column vector of zeros with a 1 in the nth place. You are then using the de[CapitalThorn]nition of the inverse as being x = inv(A) * e_n But inv(A) * e_n is by de[CapitalThorn]nition the nth column of inv(A). So when you have x, you have the nth column of your inverse. The method you're using has a shortcut in it, where instead of doing the process one e_n vector at a time, it uses an identity matrix. This doesn't change the process itself, it just saves some tedious recalculations. Hope that helps... I haven't done enough matrix programming to know shortcuts for you. clemenr@wmin.ac.uk says... (snip) > I was going to post an example done by hand, but eventually found it > easier to write the program for the method I *think* might be right, > rather than do all the working with no mistakes :-(. It does calculate > an inverse (checked by multiplying against the original matrix), but > is it guaranteed to always get an inverse where possible? (snip) === Subject: Re: Matrix inversion by Gauss-Jordan elimination > Can anyone criticise my interpretation of the Gauss-Jordan elimination > method? Please?!?!? No, nothing to critizise. You'll only encounter some problems when you are dealing with general matrices: - accumulation of rounding-off errors - division of a big number by a very small number - zero at any pivot-position. The exchange of rows does not affect the result, except you should keep track of this exchanges to reorder your result later approriately. I have implemented that the way, that I only access the matrix-rows by an index-array and can reorder the result easily at the end. If it is useful in your case, you could consider to not to divide at each step. You could always do: a1 a2 a3 | 1 0 0 b1 b2 b3 | 0 1 0 -> 0 b2' b3' | y1' y2' y3' c1 c2 c3 | 0 0 1 0 c2' c3' | z1' z2' z3' -> 0 0 c3 | z1 z2 z3 where b2' = a1 b2 - a2 b1 instead of the common b2' = b2- a2b1/a1 b3' = a1 b3 - a3 b1 c2' = a1 c3 - a2 c1 and so on. For matrix-inversion of that type nothing changes (only if you would compute the determinant you have to keep track of the factors of omitted divisions for later use) Then you need only to divide at *the last step* z1/c3 and so on. Also you can perform that process inplace, you don't need temporary matrices - just compute the new values in the current cells. The second problem is inevitable. If any matrix *has* a big ratio between its biggest and smallest eigenvalue, then you will have to deal with very big relative numerical errors. --- With symmetric matrices the eigenvalue/eigenvector decomposition is (relatively) simple; in this case you could then simply compute the reciprocal of the eigenvalues: (let A be the given matirx, t an orthogonal rotation matrix with t*t'=I) A = t' * D * t where D is diagonal then simply all diagonal-elements of D have to be inverted and inv(A) = t * inv(D) * t' This process of [CapitalThorn]nding a rotation-matrix t involves cos/sin- computations, which seems to be costly, but it is known, that the computational-process is numerically very stable against round-off errors. --- matrix-inversion-procedures, even for large matrices like that of size 1000*1000, which discuss rounding errors in detail as well problems were discussed in a very instructive manner is 19 dubious ways to compute the matrix exponential (search HTH - Gottfried Helms === Subject: How to [CapitalThorn]t an equation by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8IFma129265; Hi all, I have a scenario with three variables, X,Y,Z and Result This is what I know about them: X could go be from 1 100 say meters Y could be 0 31 say ranking Z could be 1- 100 say meters Result is in meters (1-100) For values of X between say 1-20 meters, and 80-100 meters it impacts the result very much i.e low values of Result i.e. like a bell shaped curve. If Y increases then the Result increases for the most part of course there could be some exceptions. IF Z increases then the Result increases again with an exception that if Z becomes like 50 meters then the probability of achieving that high Result (meters) is very low. How do I put together an equation that consists of X, Y, Z to achieve the Result. Should I assume a correlation coef[CapitalThorn]cient and then try to [CapitalThorn]t an equation. I have no clue about this. Any help is greatly appreciated. === Subject: Re: Golf--shooting your age by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8IFmbi29334; Are ther records for golfers who shoot their age on their birthday? I campton, nh. === Subject: Re: zeros of a polynomial of third order by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8IFmcV29356; >Given the following monic polynomial: >P=xi^3 - (mu+1)*(mu+2)/2*rho*xi^2 + mu*(mu+2)*rho*xi - mu*(mu+1)/2*rho=0 >with mu a real number and 0|rho|<1. >Suppose that mu and rho are such that the largest root (the root which >has the largest modulus) of P, has a modulus equal to one. >Then we want to show that, if mu increases while rho is kept constant, >the modulus of the largest root of P also increases. >It seems a simple problem (and it probably is), but I can't [CapitalThorn]nd a proof >for it. Does anyone has some idea? >Christophe Try using Cardan's formula to express the roots in terms of p, mu, and rho. The required variations can then be studied. Otolorin === Subject: Re: zeros of a polynomial of third order by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8HHJMH21332; >Given the following monic polynomial: >P=xi^3 - (mu+1)*(mu+2)/2*rho*xi^2 + mu*(mu+2)*rho*xi - mu*(mu+1)/2*rho=0 >with mu a real number and 0|rho|<1. >Suppose that mu and rho are such that the largest root (the root which >has the largest modulus) of P, has a modulus equal to one. >Then we want to show that, if mu increases while rho is kept constant, >the modulus of the largest root of P also increases. >It seems a simple problem (and it probably is), but I can't [CapitalThorn]nd a proof >for it. Does anyone has some idea? >Christophe Try express the roots of the cubic equation using Cardan's formular. The variations of the parameters can then be studied. Otolorin === Subject: Re: zeros of a polynomial of third order >Given the following monic polynomial: >P=xi^3 - (mu+1)*(mu+2)/2*rho*xi^2 + mu*(mu+2)*rho*xi - mu*(mu+1)/2*rho=0 >with mu a real number and 0Suppose that mu and rho are such that the largest root (the root which >has the largest modulus) of P, has a modulus equal to one. >Then we want to show that, if mu increases while rho is kept constant, >the modulus of the largest root of P also increases. You were probably right to ask this in a numerical analysis forum, but I can only think of how to do with in a symbolic-algebra way. Sorry, I'm a guy of limited talents. I can show that the largest root of P increases for _small_ changes in mu. Write rho = r1 + r2 i and the roots as xi = r(c+si). Expanding out into real and imaginary parts gives two equations, which, together with c^2+s^2=1, enable us to solve for r, c, s in terms of mu, r1, r2. (That's no surprise, of course: You're still just solving for xi in terms of mu and rho of course, but you're doing so in a different way.) Since you are only interested in (the largest value of) r , not c and s, you can eliminate c and s and obtain a single polynomial Q whose roots are the values of r . It's not pretty: it's of degree 18 in r. I can try to write it a little more compactly: let nu = mu + 1 and write rr for |rho|^2 and R for r^2; then we can eliminate mu, r2, and r. I get Q = (nu-1)^6*nu^6*rr^3-4*(nu-1)^6*(nu+1)^2*nu^4*rr^3*R+2*(nu-1)^4 *(-4+3*nu^2) *(nu+1)^2*nu^4*rr^3*R^2-4*(nu-1)^4*rr^2*nu^2*(-8*r1+3*nu^2+rr *nu^6+4*rr*nu^5 +6*rr*nu^4+4*rr*nu^3+rr*nu^2+2*r1*nu^4+4*r1*nu^3-6*r1*nu^2-16 *r1*nu)*R^3 +(nu-1)^2*rr^2*(nu+1)^2*nu^2*(-16+32*r1+32*nu-16*nu^2+rr*nu^6 +2*rr*nu^5 +rr*nu^4+16*r1*nu^4-48*r1*nu^2)*R^4-4*(nu-1)^2*rr^2*(nu+1)^2* (16-nu^4 -16*nu^2+2*r1*nu^6+4*r1*nu^5+2*r1*nu^4)*R^5+8*(nu-1)*rr*nu^2* (-6+12*r1 +2*r1^2*nu^5+6*r1^2*nu^4+6*r1^2*nu^3+2*r1^2*nu^2+6*nu-2*rr+rr *nu^5+3*rr*nu^4 +rr*nu^3-5*rr*nu^2-6*rr*nu-12*r1*nu^3-12*r1*nu^2+12*r1*nu)*R^ 6-32*(nu-1)*rr *(nu+1)^2*(r1*nu^3+r1*nu^2-4*nu+4)*R^7+16*(nu+1)^2*nu^2*rr*R^ 8-64*R^9 You can decide whether R is increasing as mu increases by computing dR/d(mu) = - (dQ/d(nu)) / (dQ/dR). Now, you are stating that 1 < nu < 2 and that 0 < rr < 1 and that one of the roots of this polynomial is R = 1. Under those conditions there are numbers t and u with nu = (1+t^2)/(2t) and rr = (1+u)^2/(2(1+u^2)); the fact that R=1 then becomes an equation in t, u, and r1 which we can solve for r1; for one of the choices of u we will have r1 = (-1+2*t-2*u-11*t^2-19*t^4+7*t^6-14*t^5+4*t^7-u^2-7*t^6*u-3*t^ 6*u^2+45*t^4*u- 45 *t^4*u^2+t^8*u+2*t^8*u^2+18*t^5*u^2+6*t^7*u+7*t^2*u^2-18*t^3* u-4*t^3*u^2+4*t ^5 *u+3*t^2*u-6*t*u^2-7*u^3*t^2+19*u^3*t^4+11*u^3*t^6+u^3*t^8-4* u^3*t+14*u^3*t^ 3 -2*u^3*t^7)/(t+1)^3/(1+t^2)^2/(t-1)/(1+u^2)/(1+u) Then we can compute the derivative above at R = 1 ; it's miraculously simple: -32*(u-1)^2*(2*t^4-t^3-t+2)*t^3/(-3*u^2+16*t*u^2-30*t^2*u^2+t ^4*u^2-2*u+16*t *u -12*t^2*u+16*t^3*u-2*t^4*u+1-30*t^2+16*t^3-3*t^4)/(1+t^2)/(t- 1)^2/(t+1)^2 Many of the factors are square, or clearly positive. (Note that we may always take t between 1 and 2+sqrt(3) because of the inequalities on mu.) The only complicated factor is a quadratic in u, whose discriminant never vanishes for t in (1 , 2+sqrt(3) ), and which is positive at u=0 (at least, it is for those t's). So the quadratic is always positive for these t, and hence the derivative dR/d(mu) > 0 under the conditions given in the problem. By the way, not every u and t (in this range) give rise to a mu and rho which satisfy the premises of the problem. For one thing, the value of r2 will have to be one of the square roots of rr - r1^2 which puts the constraint that this expression is indeed a square; it's actually a bunch of square factors times -2*(-1-2*t^2+t^4-u+2*t^2*u+t^4*u)*(u-1) so that's what must be positive. For our values of t this means we must have u in the interval (-1 + 4t^2/(t^4+2t^2-1) , 1 ) . The other problem is that I have parameterized the set of all mu and rho which have _a_ root of Q equal to 1; that includes all the mu's and rho's whose largest root of P has magnitude 1 but it may include others with (say) their smallest root of this magnitude. dave === Subject: Re: tackling singular matrix by support1.mathforum.org (8.11.6/8.11.6/The Math Forum, $Revision: 1.9 primary) id i8IJ1ao13750; why dont you ask Dr. Chiranjeeb Bhattacharya? >HI GROUP >IVE TRIED LINEAR LEAST SQUARE FITTING TO A SET OF DATA AND SOLVED THE >NORMAL EQUATIONS BY GAUSSIAN ELIMINATION (NORMALISATION FOLLOWED BY >PARTIAL PIVOTING STRATEGY). BUT THE RESULTANT MATRIX PRIOR TO >BACKSUBSTITUTION >I KNOW THERE ARE MANY COMPLEX STRATEGIES LIKE SVD AND SO ON, BUT I >WANT TO IMPLEMENT A RELATIVELY SIMPLER ONE. ALSO IT WOULD BE OF >IMMENSE HELP TO ME IF YOU CAN GIVE A BRIEF DESCRIPTION OF THE >ALGORITHM TO USE. FOR YOUR CONVENIENCE IM GIVING BELOW THE SINGULAR >MARTRIX THAT RESULTED: >2.9E-5 2.9E-5 3.9E-3 6.1E-2 1 >-8.4E-22 1.5E-4 3.01E-3 5.5E-2 1 >6.3E-22 -2.7E-21 1.4E-3 4.3E-2 1 >-4.8E-22 3.6E-21 -2.11E-21 2.5E-2 1 >6.8E-22 5.9E-21 7.1E-20 -7E-19 1.7E-2 >NB: I TRIED TO FIT A POLYNOMIAL OF DEGREE 4. > > ....DHRUBOJYOTI SINHA === Subject: Re: tackling singular matrix >HI GROUP >I?VE TRIED LINEAR LEAST SQUARE FITTING TO A SET OF DATA AND SOLVED > THE >NORMAL EQUATIONS BY GAUSSIAN ELIMINATION (NORMALISATION FOLLOWED BY >PARTIAL PIVOTING STRATEGY). BUT THE RESULTANT MATRIX PRIOR TO >BACKSUBSTITUTION >I KNOW THERE ARE MANY COMPLEX STRATEGIES LIKE SVD AND SO ON, BUT I >WANT TO IMPLEMENT A RELATIVELY SIMPLER ONE. ALSO IT WOULD BE OF >IMMENSE HELP TO ME IF YOU CAN GIVE A BRIEF DESCRIPTION OF THE >ALGORITHM TO USE. FOR YOUR CONVENIENCE I?M GIVING BELOW THE SINGULAR >MARTRIX THAT RESULTED: >2.9E-5 2.9E-5 3.9E-3 6.1E-2 1 >-8.4E-22 1.5E-4 3.01E-3 5.5E-2 1 >6.3E-22 -2.7E-21 1.4E-3 4.3E-2 1 >-4.8E-22 3.6E-21 -2.11E-21 2.5E-2 1 >6.8E-22 5.9E-21 7.1E-20 -7E-19 1.7E-2 > >NB: I TRIED TO FIT A POLYNOMIAL OF DEGREE 4. > > ....DHRUBOJYOTI SINHA Hei, if the matrix is the one you posted, you can still use a trick to invert it. That's because it's not really singular, but only badly scaled. A simple way is to use the same scale for columns and rows: If you apply A^-1 = D * (D*A*D)^-1 * D with D = diag(1.0/sqrt(abs(diag(A)))) The matrix D*A*D has now 1.0 or -1.0 on the diagonal elements. In your example, the determinant of D*A*D is virtually 1.0, so no problem to invert, while the non-scaled matrix has det A = 2.5883e-15. In the Gaussian elimination, you might be confronted with tiny pivot-elements, even though the matrix isn't really singular (your example), but only badly scaled. Your algroithm can't handle that, so just test the selected pivot element for its absolute value and drop out, if that is too low (e.g. < 1e15). Volker === Subject: expand the right-hand side on the basis of the eigenvectors of the matrix Hello! I have a problem: Ax=b, where A = [ 1001 1000; 1000 1001] x = [x1 ; x2] b = [ 2001; 2001] a small change of b db = [1; -1] Could somebody explain why the small variation in the right hand side produces large variations in the solution? Here is a hint: expand the right-hand side on the basis of the eigenvectors of the matrix. SO. I found eigenvectos: x01 = [1; x02 = [1; 1] -1] It forms an orthogonal basis, because the matrix A is symmetric. Then, when we expand the right hand side in the basis of the eigenvectors, then we have: b = c1 * x01 + c2 * x02, Hence c1 = 2001 and c2 = 0 But, when we use (b + db) = c1 * x01 + c2 * x02, then c1 = 2001.5 and c2 = 0.5 So, in the [CapitalThorn]rst case c2 = 0 and in the second c2 = 0.5 . I believe that the answer to the question: why the small variation in the right hand side produces large variations in the solution? should be somewhere here... But what is a name of a theorem or a method which will help me to anser such question. Sinserely, Taglit === Subject: Re: expand the right-hand side on the basis of the eigenvectors of the matrix X-RFC2646: Original > I have a problem: Ax=b, where > A = [ 1001 1000; > 1000 1001] > b = [ 2001; > 2001] > a small change of b db = [1; > -1] > Could somebody explain why the small variation in the right hand side > produces large variations in the solution? > Here is a hint: expand the right-hand side on the basis of the > eigenvectors of the matrix. A is badly conditioned. Hint: plot the two equations. === Subject: Re: expand the right-hand side on the basis of the eigenvectors of the matrix > I have a problem: Ax=b, where > A = [ 1001 1000; > 1000 1001] > b = [ 2001; > 2001] > a small change of b db = [1; > -1] > Could somebody explain why the small variation in the right hand side > produces large variations in the solution? > Here is a hint: expand the right-hand side on the basis of the > eigenvectors of the matrix. > A is badly conditioned. Hint: plot the two equations. It's not enough, I have to expand the right-hand side on the basis of the eigenvectors of the matrix to [CapitalThorn]nd the answer.... === Subject: Re: Noise in linearized exponential decay [CapitalThorn]tting Just some random thoughts... since the main problem I see with the linearized model is at the end of the decay where the signal is small then the log values can spray around (wildly). Say my decay starts at maximum amplitude of 1 and the later points are close to zero (10^-2 or so). Then with the addition of noise the later points end up varying from -3 to -12 or so and they have an undue inßuence on the linear [CapitalThorn]t. So, since it is the small values which appear to be problematic, what if I simply weight the [CapitalThorn]t using the signal value at that point? It seems to work OK, but gives different results from both the simple linearized and full non-lin-LS [CapitalThorn]tting. Is this a previously studied method of [CapitalThorn]tting? === Subject: Re: Noise in linearized exponential decay [CapitalThorn]tting >Just some random thoughts... since the main problem I see with the >linearized model is at the end of the decay where the signal is small >then the log values can spray around (wildly). Say my decay starts at >maximum amplitude of 1 and the later points are close to zero (10^-2 >or so). Then with the addition of noise the later points end up >varying from -3 to -12 or so and they have an undue inßuence on the >linear [CapitalThorn]t. >So, since it is the small values which appear to be problematic, what >if I simply weight the [CapitalThorn]t using the signal value at that point? It >seems to work OK, but gives different results from both the simple >linearized and full non-lin-LS [CapitalThorn]tting. Is this a previously studied >method of [CapitalThorn]tting? you mean ??? y(i)= a*exp(b*x(i)) + noise => log(y(i)) = log(a*exp(b*x(i)) +noise) = = log(a) + b*x(i) + log(1+noise/y(i)) (assuming small residuals such that y(i) approx =a*exp(b*x(i)) and by weighting the data by y(i) to make the variances in the new model of equal size? this is only approximately true yes, the problem has been often studied and concerns the introduction of bias in transformaing model equations. there is much literature for solving nonlinear regression models bias free. (-> applied statistics) hth peter === New job listings at http://jobs.phds.org - Jobs for PhDs List your job at no cost! http://jobs.phds.org/jobs/post * PhD Position / Research Assistant at the Department of Engineering- and Business Informatics: Graz University of Technology, Graz University of Technology, Austria. PhD Position / Research Assistant at the Department of Engineering- and Business Informatics PhD Research Areas: Informatics and Engineering Informatics (Design, Control, Optimization, numerical Methods) and/or Business... * Senior Quantitative Analyst Optimization: IJC Partners, LLC., New York, NY. Global hedge fund client with over $7 Billion under management is looking to add a Senior Quantitative Analyst to their team. You will have experience in mathematical modelling and proprietary trading systems design; constrained non-linear non-smooth convex... * Ph.D Quantitative Analyst: The Execu|Search Group, New York, NY. Top Hedge Fund in New York is looking for exceptionally bright quantitative Ph.D candidates to join its [CapitalThorn]nancial trading group. Work will involve model development, implementation and overall strategy and will encompass formulating strategies using a broad... * Post Doctoral Position in Parallel Computing Applications for Genetic Epidemiology : University of Utah, University of Utah. NIH Post Doctoral Position in Parallel Computing Applications for Genetic Epidemiology The Department of Medical Informatics and the Center for High Performance Computing at the University of Utah anticipate the opening of at least one post doctoral position... * Senior Quantitative Researcher: The Execu|Search Group, New York, NY. Quant Hedge Fund seeks seasoned market professional having 5+ yrs experience in leading a team of modelers and researchers. Ideal candidate would been an Ivy League University Professor/Researcher with a PhD in Mathematical Finance/Econometrics. Experience in... === 7.67816092 sub 7.6 = 0.07816092 0.078160919 * 88 = 6.87816092(1) 6.87816092 sub 6.8 = 0.07816092 0.078160919 * 88 = 6.878160918(2) 6.878160918 sub 6.8 = 0.078160918 0.078160918 * 88 = 6.878160763(3) 6.878160763 sub 6.8 = 0.078160763 0.078160763 * 88 = 6.878147133(4) 6.878147133 sub 6.8 = 0.078147133 0.078147133 * 88 = 6.876947743(5) 6.876947743 sub 6.8 = 0.076947742 0.076947742 * 88 = 6.771401296 6.8 * 5 = 34 sqr3 34 = 3.239611801 3.239611801 * pi = 10.17754064 10.17754064 * 6.771401296 = 68.91621188 88 constellations, 68th constellation Crux === Subject: Complexity optimisation for a block matrix inversion I know, I shouldn't do this, but after posting my problem in comp.theory without success, I found that it's maybe better to ask here, too. I described my problem behind this link: In the mean time, I found the Dijkstra-algorithm to have a complexity of n^2*2^(2*n), which is exponential and therefore not suitable for me. Is there heuristics, how to pivot block matrices in order to minimise numerical effort? Volker === Subject: 64 - is this the only number that is both a sq and a cube? Hi - I am trying to [CapitalThorn]n out if this is the only number that is both a square and a cube, and if any one is working on the signi[CapitalThorn]cance of this. === Subject: Re: 64 - is this the only number that is both a sq and a cube? 16^3=64^2=4096 256^3=4096^2=16777216 .... > Hi - I am trying to [CapitalThorn]n out if this is the only number that is both a square > and a cube, and if any one is working on the signi[CapitalThorn]cance of this. === Subject: Re: 64 - is this the only number that is both a sq and a cube? >16^3=64^2=4096 >256^3=4096^2=16777216 more generally, any N^p, where p is divisible by 6, is both a square and a cube. >..... > Hi - I am trying to [CapitalThorn]n out if this is the only number that is both a >square > and a cube, and if any one is working on the signi[CapitalThorn]cance of this. === Subject: Re: 64 - is this the only number that is both a sq and a cube? X-RFC2646: Original thank you, that's great - all makes sense now. >16^3=64^2=4096 >256^3=4096^2=16777216 > more generally, any N^p, where p is divisible by 6, is both a square and a > cube. >..... > Hi - I am trying to [CapitalThorn]n out if this is the only number that is both a >square > and a cube, and if any one is working on the signi[CapitalThorn]cance of this. === Subject: Proof of Cholesky decomposition Does someone know how is proven, by recurrence, the existence of Cholesky decomposition for a symmetric positive de[CapitalThorn]nite matrix? Franck === Subject: Re: Proof of Cholesky decomposition >Does someone know how is proven, by recurrence, the existence of Cholesky >decomposition for a symmetric positive de[CapitalThorn]nite matrix? > Franck cholesky=> positive de[CapitalThorn]nite: obvious. positive de[CapitalThorn]nite=> all leading minors positive. use [CapitalThorn]rst LU-decomp ; show that product of pivots=minor. make LU-> LDL' using the fact that R=DL' (no pivoting , symmetry) done (other possibilities exist ) hth peter === Subject: CumulativeInquiry BB (re DAGs/perms/dim2 posets) now functional USENET posters and perusers who are interested in certain problems arising from the interplay of theory on DAGs, perms, and dim2 posets may be interested in a new BB available at: http://www.CumulativeInquiry.com/Forums Visitors can peruse WITHOUT registering or logging in; posting requires both. Background to the issues being thrashed out on this BB can be found at: http://www.CumulativeInquiry.com/Problems Visitors should also feel free to request membership in the CI (Cumulative Inquiry) list-server by sending a message WITH NO SUBJECT to: Majordomo@cumulativeinquiry.com and the following single line in the message: subscribe ci_discuss_001 You will receive a reply message containing an auth command with a key. Then send a second message back to the CI major domo with NO SUBJECT line and the entire auth command as the [CapitalThorn]rst and only line in the message body itself. Although some members of this list-server also read the BB, the best way to receive and send messages is via the list server. All messages to this list server are archived to the BB in chronological order. === Subject: number of intersection points Suppose k is a positive integer and mu is a real number in [0,1]. Then consider the complex number c=( (exp(i*theta))2/(exp(i*theta)*(1+mu)-mu) )^(1/k) (i is the complex unit (sqrt(-1))). If we plot these complex values in the complex plane (for theta=0..Pi), we become a (continuous) curve C in the complex plane. If theta=0 for example, then c=1+0i, and this is one point of this curve. Then de[CapitalThorn]ne the points A=exp(i*2*Pi/k) and B=1. Now I would like to proove that the curve C has at most 2 intersections with the line between the complex points A and B, with theta in ]0,Pi] (thus max 2 intersections next to the trivial case c=1). Christophe === Subject: Re: Bessel Function - J0(x) charset=iso-8859-1 : Perhaps you should offer a version suitable for benchmarking the accuracy : and speed. This version can serve as a benchmark. D. Baruth === Subject: Re: Bessel Function - J0(x) > : Perhaps you should offer a version suitable for benchmarking the accuracy > : and speed. > This version can serve as a benchmark. > D. Baruth Sigh ... nobody (here?) wants only your programm but if you want to discuss your solutions you may provide more. Either do it or not. Anyway there are some real goodies on C R Bond's URL & they are open ... -- use mail for mail not nonail