EETimes

Embedded Systems September 2000 Vol13_10

Issue link: http://dc.ee.ubm-us.com/i/71837

Contents of this Issue

Navigation

Page 33 of 229

PROGRAMMER'S TOOLBOX e That was then, this is now. Nowadays, companies all over the world write packages for solving math problems in Fortran, C, and other languages. On the Internet, applied mathematicians in academia pass around algorithms for solving all manner of complex problems. Brent's method, Fortran version if (dabs(d).lt.tol1) then if(d.le.O.odo) then u+x-tol1 else u=x+tol1 endif else u=x+d endif fu=f(u) i ter=i ter+1 c c c update a, b, v, w, and x if (fx.le.fu) then if (u.ge.x) then b=u else a=u endif endif if (fu.gt.fx) then if ((fu.gt.fw).and.(w.ne.x)) then if ((fu.le.fv).or.(v.eq.x).or.(v.eq.w)) then v--u fv=fu endif else v=w fv=fw w=u fw=fu endif else if (u .ge. x) then a=x else b=x endif v=w fv=fw w=x fw=fx Listing 1 continued on p. 36 "Giant Brain" would have researched the math algorithms needed to solve virtually any pro bl em, and ke pt canned ve rsio ns handy to give to their engineers. If such a group existed at IBM, it's n ews to me. I think it's a case whe re the cobbler 's childre n have no shoes. Far from getting the best software IBM had to offer, we IBM program- me rs got to be the beta teste rs for th e rest of the company. We didn't even get the same quality that customers did . As usual, I ended up writing my own algorithms. My next job was with Northrop Corporation, which had a small IBM mini (the 1130, my only favorite IBM compute r). Ironically enough, that compute r came with a docume nt called the IBM Scientific Subroutine Package (SSP). IBM did have a col- lection of tools; it's just that I had to leave IBM to find it. Though written in the worst kind of spaghetti-code Fortran II, the algorithms were pret- ty good, and to thi s day, I still use many of them. That was th e n , this is now. Nowadays, companies all over the world write packages for so lving math problems in Fortran, C, and other languages. On the Interne t, applied mathematicians in academ ia pass around algorithms for solving all manne r of complex pro bl ems. Authors like Press et al. write books like Numerical Recipes, 1 which must contain the best algorithms of each kind. Surely I can be forgive n for assuming that I'd be able to pick up one such algorithm and present it to you in the form of a ro bust and gen- e ra l-purpose minimum-finde r. I thought that in Bre nt's method I'd found one. Alas, it was not to be. Not only did I not like the method, I couldn 't find the one thing I absolu tely insist on in this column: a cogent explanation of how it works. Who could have guessed th is turn of events? Nevertheless, like it or not, I seem to be at that branch point in this 32 SEPTEMBER 2000 Embedded Systems Programming

Articles in this issue

Archives of this issue

view archives of EETimes - Embedded Systems September 2000 Vol13_10