I reposted the ezunits stuff on Slashdot. I couldn't find my original
post for a while, then I realized I had to move the slider bar to see
posts with a score of `zero'. This revealed that rjf had posted
earlier. I am pretty sure the score of zero is only a result of
posting late. I have not looked at slashdot for 10 years. One of the
main reasons is that a high proportion of posts were rumors,
misinformation, or misunderstanding. But it is true that, at least in
the past, and perhaps still, it was read (maybe 'followed' is more
accurate than 'read') by 'zillions' of high-school and college
students with an interest in open-source software.
Regarding ezunits. Here is the result of evaluating
sin(30 ` degree) twice, with six different lisps. There is
a huge difference between implmentations. I did not look into
why.
(%i2) build_info()
(%o2)
Maxima version: "5.28.0"
Maxima build date: "2012-11-06 19:40:25"
Host type: "x86_64-unknown-linux-gnu"
Lisp implementation type: "SBCL"
Lisp implementation version: "1.0.57.0.debian"
(%i5) load(ezunits)
Evaluation took 9.0500 seconds (19.4200 elapsed) using 832.575 MB.
(%i6) sin(30 ` degree)
ezunits: computing conversions to base units; may take a moment.
Evaluation took 4.2600 seconds (8.9670 elapsed) using 391.129 MB.
(%o6) 1/2
(%i7) sin(30 ` degree)
Evaluation took 1.1000 seconds (1.9770 elapsed) using 108.171 MB.
(%o7) 1/2
--------------------------------------------
Lisp implementation version: "GCL 2.6.7"
(%i5) load(ezunits)
Evaluation took 0.3300 seconds (2.3700 elapsed)
(%i6) sin(30 ` degree)
ezunits: computing conversions to base units; may take a moment.
Evaluation took 0.2500 seconds (0.4900 elapsed)
(%o6) 1/2
(%i7) sin(30 ` degree)
Evaluation took 0.0200 seconds (0.0200 elapsed)
(%o7) 1/2
--------------------------------------------
Lisp implementation type: "CLISP"
Lisp implementation version: "2.49 (2010-07-07) (built 3538483872)
(memory 3562145853)"
(%i5) load(ezunits)
Evaluation took 1.7900 seconds (4.0840 elapsed) using 18.965 MB.
(%i6) sin(30 ` degree)
ezunits: computing conversions to base units; may take a moment.
Evaluation took 1.3200 seconds (2.7085 elapsed) using 14.646 MB.
(%o6) 1/2
(%i7) sin(30 ` degree)
Evaluation took 0.0800 seconds (0.1650 elapsed) using 912.953 KB.
(%o7) 1/2
--------------------------------------------
Lisp implementation type: "ECL"
Lisp implementation version: "11.1.1"
(%i5) load(ezunits)
Evaluation took 1.1100 seconds (5.3980 elapsed)
(%i6) sin(30 ` degree)
ezunits: computing conversions to base units; may take a moment.
Evaluation took 0.7400 seconds (1.7810 elapsed)
(%o6) 1/2
(%i7) sin(30 ` degree)
Evaluation took 0.0500 seconds (0.0920 elapsed)
(%o7) 1/2
--------------------------------------------
Lisp implementation type: "CMU Common Lisp"
Lisp implementation version: "20c release-20c (20C Unicode)"
(%i5) load(ezunits)
Evaluation took 2.4000 seconds (4.8800 elapsed) using 93.268 MB.
(%i6) sin(30 ` degree)
Evaluation took 1.2400 seconds (2.5700 elapsed) using 45.025 MB.
(%o6) 1/2
(%i7) sin(30 ` degree)
Evaluation took 0.2400 seconds (0.4600 elapsed) using 11.098 MB.
(%o7) 1/2
--------------------------------------------
Lisp implementation type: "Clozure Common Lisp"
Lisp implementation version: "Version 1.8-r15286M (LinuxX8664)"
(%i5) load(ezunits)
Evaluation took 3.6500 seconds (7.8039 elapsed)
(%i6) sin(30 ` degree)
ezunits: computing conversions to base units; may take a moment.
Evaluation took 1.7500 seconds (3.9752 elapsed)
(%o6) 1/2
(%i7) sin(30 ` degree)
Evaluation took 0.3700 seconds (0.7396 elapsed)
(%o7) 1/2
On 12/17/2012 12:15 AM, Robert Dodier wrote:
> On 2012-12-16, Barton Willis <willisb at unk.edu> wrote:
>
> > Maxima doesn't have an entirely satisfactory way to automatically
> > scale all arguments to the trigonometric functions by %pi/180.
>
> Well, whether it is satisfactory is a matter of taste, but as an update
> to the messages cited, there is this:
>
> load (ezunits);
> sin (1 ` degree);
> => sin(%pi/180)
> sin (10 ` degree);
> => sin(%pi/18)
> sin (30 ` degree);
> => 1/2
> atan2 (3, 4) `` degree;
> => 180*atan(3/4)/%pi ` degree
> float (%);
> => 36.86989764584403 ` degree
>
> All the best,
>
> Robert Dodier
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima