Re: ideas about representing degrees as Maxima expressions
Robert Dodier <[email protected]> Fri, 1 May 2026 22:29:49 -0700
| Newsgroups | gmane.comp.mathematics.maxima.general |
|---|---|
| Message-ID | <CAAsY_sT0f4XR6fcUtHtRwDLhP9HNmeeTbT_pc4uqWAr+AgRqyQ@mail.gmail.com> |
On Fri, May 1, 2026 at 3:54 PM Stavros Macrakis <[email protected]> wrote: > On Thu, Apr 30, 2026 at 12:43 AM Robert Dodier <[email protected]> wrote: >> modulo 360. This last bit produces degrees(-10) --> degrees(350). > Really? Why are you doing modular arithmetic on degrees? I guess that doesn't really make much sense. I will cut out that bit and try it again. > I'd think you want a global option for how to present them: fractional degrees or degrees/minutes/seconds. Well, so far I am assuming that the user inputs stuff the way they want to see it, either as degrees only or degrees with minutes or minutes and seconds. For purely numerical values, a canonical representation as just one number is workable, but when variables are allowed, as I think they must be, then I don't see a way to make that work. E.g. suppose a user writes degrees(x, y, z) so the canonical representation could be either x + y/60 + z/3600 (degrees) or x*3600 + y*60 + z (seconds). That seems to make a mess when you try to extract bits for display; Maxima doesn't recover x from floor((x + 60*y + 3600*z)/3600), even after assuming that y and z are >= 0 and < 60. Maybe I'm overlooking something obvious. > How do you handle the inverse functions? i.e. how do you get asin(1/2) => 30° ? Is that degrees(asin(1/2))? Almost. It has to be degrees(from_radians(asin(1/2))) since asin(1/2) is just a number, so degrees(asin(1/2)) is valid and it represents %pi/6 degrees. best Robert _______________________________________________ Maxima-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/maxima-discuss