原创 Mathcad and its evolving face

2011-6-21 10:32 3484 27 27 分类: 消费电子

There's some exciting news about a product I've lived with—and sometimes praised, sometimes cursed—for decades: Mathcad, PTC's premier math analysis tool.


Regular readers know that most of my columns are math-oriented, as is most of my work. For that reason, I'm a heavy user of Mathcad. For more than 15 years, I've maintained a love-hate relationship with Mathcad. I've mentioned it many times in my columns, in terms ranging from wholehearted endorsements to heated, curmudgeonly rants. Although I often curse Mathcad as I use it, the reality is it remains, by far, the most oft-used tool in my toolbox.


Why do I continue to use Mathcad when it frustrates me so? To quote the old joke, it's the only game in town. Oh, yes, other math analysis tools exist—some with more impressive resumes, more respected pedigrees, and much higher prices. But none of them do quite what I want done. For me, Mathcad stands alone. The reasons are part of this story.


I've not told just you readers my beefs about Mathcad. I've also communicated them to Mathsoft and now PTC. I've talked to people from technical support—very excellent people, by the way—to vice presidents. I've posted my opinions on their web sites and blogs. I was a long-time member of their "Power Users' Group," and I still post from time to time in the Mathcad Community site. I've given them so much "feedback," I think they must surely cringe when they hear my cybernetic footsteps.


Do you get the idea that I am not among Mathcad's biggest fans? Then what I have to tell you next should carry all the more weight.


PTC has recently announced a new version of Mathcad. It's called Mathcad Prime 1.0, and it represents a bold and dramatic departure from older versions.


No, belay that. Prime 1.0 isn't just yet another version, the 16th of 16. It's a brand new product, written on a blank sheet of paper and built from scratch to new specifications. You have to admire the courage of a company willing to invest the time and money in these precarious times.


More importantly for me, the user interface—the part that elicited most of my rants—is radically new. I don't deceive myself that PTC made the changes just for me, but it's as though they were reading my mail (hey, maybe they were). As near as I can tell, every one of the idiosyncrasies I used to fuss about has not just been changed, but changed in just the way I'd hoped for, It's an awesome turn of events, and I'm very excited about it. Can you tell?


The back story
What is a math aid, anyhow? Well, it's something that makes doing math easier. Until the advent of digital computers, we all used to do math the same way the Sumerians and Egyptians did it: First with stylus and clay, then quill and papyrus, later pencil and paper. What alternatives did we have?


When you're doing long math calculations, it's easy to get something wrong. The great astronomer, Ernest William Brown, developed a theory for the motion of the Moon, in terms of a trigonometric series with some 1,500 terms. Later, it was discovered that he'd made an error in the 500th term, give or take, rendering the next 1,000 terms useless.


My own favorite errors were stupid ones; getting a sign wrong, or leaving out a factor of 2. I often wished I could hire an apprentice, whose only job would be to check my math and catch those errors. Or, better yet, do the tedious, turn-the-crank manipulations for me. Just say, "start with these equations, and solve for x." The ideal apprentice would know the rules of algebra, trig, and calculus.


Such an idea became practical with the advent of digital computers. Computers don't just crunch numbers. They can also deal with concepts. The rules of algebra, operator precedence, and so forth, are well known and never change. Ditto for the rules of calculus and trig identities. If we can explain the rules, a computer program can do all the tedious work. And it won't get the sign wrong.


One of the earliest math analysis tools was Macsyma, developed at MIT and refined in various commercial forms. Versions of Macsyma, highly refined, are still with us today.


You must understand: in those days, the acronym WYSIWYG wasn't even on the radar. We gave computers data by punching text into IBM cards or paper tape, and they gave stuff back by printing them on a chain printer (very fast, very loud). In a real sense, a computer program only changed one text string to another. There was no hope to input formulas as they'd look in a math textbook. If you wanted to write an equation like the quadratic formula:

0611esdcrenshaweq01.gif



You had to convert it to its equivalent Fortran form:


X1 = (-B + SQRT(B**2—4*A*C)/(2*A)
X2 = (-B—SQRT(B**2—4*A*C)/(2*A)


Macsyma's forte' was symbolic processing. That is, it could take an expression and transform it into an equivalent one, using the rules of algebra, trig, and calculus. Macsyma was, in fact, one of the very first knowledge-based systems. But it could only operate on Fortran inputs, and it could only give back more of the same. One of its most important applications was in taking the calculus derivatives of expressions.


I once got to see Macsyma used—or misused. A company building robotics controllers was writing new embedded software, and they needed to implement the rather complicated vector/matrix math and Euler angle rotations. The project lead had a most boneheaded idea. Arguing that calling functions and subroutines would be "too inefficient," he decided to get Macsyma to expand them all into scalar equations involving a whole lot of trig functions. He chose Macsyma to expand the equations into Fortran. Pages and pages of it. Then he turned the Fortran over to a bunch of new-hire programmers, trained in C. Their job: To turn the Fortran into yet another language: Pascal. Think that was efficient?


Most computer programs don't yet have the intelligence to say, "You want me to do WHAT?"


Maple and friends
The folks at Waterloo University in Waterloo, Ontario, Canada enjoy a long and honored reputation in the fields of language translation and symbolic computations. In the 1960s, computer science departments all over the world were hurting because of all the students running Fortran jobs for class credit. What the world needed, the educators pleaded, was a Fortran compiler system that would read the students' programs, compile, link, and run them, all in one batch process. IBM experts said building such a system was impractical, if not impossible.


Someone forgot to tell the folks at Waterloo, so they just went and built it. They called it Watfor.


A similar situation came up around 1980. The story goes that the Waterloo folks wanted to run Macsyma, but couldn't afford the large mainframe computer it required. So they wrote a symbolic engine of their own. They called it Maple. Over the years, Maple has continued to evolve and is generally considered to be one of the premier symbolic engines of all time. It's commercially available today, from Maplesoft.


The printed page
While we technical types were learning to computerize the processing of math equations, another group had been routinely creating more beautiful equations for centuries. These were the book publishers, who published, among other things, the math textbooks from which we learned our craft. It was only natural that typesetting systems evolved into computer systems capable of driving automated typesetting machinery.

 

[To be continued on The evolving face of Mathcad (Part 2)]

文章评论0条评论)

登录后参与讨论
我要评论
0
27
关闭 站长推荐上一条 /2 下一条