Re: beginner’s question with Maxi ma

[email protected]
Newsgroups gmane.comp.mathematics.maxima.general
Message-ID <[email protected]>
Hi, Robert,

thanks for your message.

> I was a little worried that the nested sum/product expressions 
> wouldn't turn out right, but I was at least able to get to a 
> result — you can say whether it's correct.

Your corrections, including with the placement of parentheses, are similar to mine, though I’d made LISP versions of ∏() and ∑() before Stavros pointed me to buildq() as the key to keeping them as Maxima functions. In the “semi‐major_axis” identifier, I’d replaced the U+002D hyphen-minus with the U+2010 hyphen [and kept that declare() statement, and updated my comment accordingly] to avoid interfering with the “-” operator. I’d used backslashes because they seemed to be necessary when entering a multi-line function interactively; I didn’t know that they wouldn’t be needed in a .mac file.

> Let me know if [the output] does or does not look correct.

Your output from the for…do statement looks like my results, so I believe that your output is correct. For the sake of polishing a cannonball ;*) , I subsequently increased fpprec and fpprintprec to 39 and the for…do statement to a maximum of 9 to see how many iterations would be needed for quectometer accuracy. For simple millimeter accuracy (and rounded micrometer accuracy), a maximum of 2 suffices. Its rapid convergence led me to conclude that S[] could be “de-memoized” to S().

An additional correction is needed in one of my comments: the “a bit less than” comment should have read “semi‐major_axis*π/4” rather than “semi‐major_axis/2”, since the ellipsoidal 45° meridian arc is approximately one-half of a quadrant (or one-eighth of a polar circumference).

Have you used, or tried to use, both the ezunits package and the unit package? Perhaps I’m missing something regarding the unit package, but judging from the Maxima manual, its main purpose seems to be in providing unit conversion factors rather than to perform calculations with units. I wasn’t able to figure out how to express the semi‐major_axis value with the unit package, so I went with the ezunits package instead.


_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.