error in elliptic_e ?



I think it's preferable to return something messy and correct,
rather than something simple and incorrect.
Ideally the messy return value is something that can be
simplified in the presence of further information
(e.g. value assigned to x) although I don't think that's
an absolute requirement.

FWIW

Robert Dodier

On 11/17/11, Raymond Toy <toy.raymond at gmail.com> wrote:
> On Tue, Nov 15, 2011 at 2:45 PM, Raymond Toy <toy.raymond at gmail.com> wrote:
>
>>
>>
>> On Tue, Nov 15, 2011 at 1:59 PM, Raymond Toy <toy.raymond at gmail.com>wrote:
>>
>>>
>>>
>>> On Tue, Nov 15, 2011 at 1:11 PM, Edwin Woollett
>>> <woollett at charter.net>wrote:
>>>
>>>> Perhaps I am not invoking elliptic_e
>>>> correctly, but it appears that the definition
>>>> given in the help manual does not agree
>>>> with interactive use of elliptic_e.
>>>>
>>>
>>> Looks like a bug.  Not sure what the problem is, though.
>>>
>>
>> It's because elliptic_e doesn't handle the quasi-periodicity of
>> elliptic_e.  I think elliptic_k has the same problem.  I'll fix this soon.
>>
>>
> Fixed in git.  Also fixed the same problem with elliptic_f.
>
> But there's still a problem with symbolic computations.  elliptic_e(%pi,1)
> returns 0.  It should return 2.  This is caused by elliptic_e(x,1)
> simplifying to sin(x).  Should we return something complicated like
> sin(x-%pi*round(x/%pi)) + 2*round(x/%pi)?
>
> (I see there's also a bug:  elliptic_ec(1) should return 1 but doesn't.)
>
> Ray
>