On 6/9/10 9:35 AM, Raymond Toy wrote:
> On 6/9/10 9:28 AM, Raymond Toy wrote:
>> While playing around, I noticed that maxima doesn't know the value of
>> cot(%pi/8). This can obviously be derived using the half-angle formula
>> from cot(%pi/4), which maxima knows.
>>
>> I noticed that ntrig1 handled multiples of %pi/10 but nothing else. So
>> I updated it to handle multiples of %pi/2^n, %pi/3/2^n, and %pi/5/2^n.
>> I was debating on whether to just post the code somewhere or updating
>> ntrig1. Any objections to updating ntrig1?
>
> Oops. Just found that spangl.mac can handle %pi/8 and other cases, and
> produces much simpler results.
>
> ntrig1 and spangl and my own code should be merged and rationalized into
> one, I think.
Here's something that's a little bit better. Some judicious use of
ratsimp/algebraic and sqrtdenest produces results as simple as spangl.
<http://common-lisp.net/~rtoy/maxima/ntrig.mac>
Ray