#5396: [with patch, needs work] Wrapping lcalc library
---------------------------+------------------------------------------------
Reporter: rishi | Owner: Rishi
Type: enhancement | Status: new
Priority: major | Milestone: sage-4.1.2
Component: number theory | Keywords: lcalc
Reviewer: | Author:
Merged: |
---------------------------+------------------------------------------------
Old description:
> Thanks John for your feedback. I was looking at the patch again, I am
> indeed seeing the typos, and places where documentation is far from
> clear.
>
> While I was writing, I did think of having a base class and have various
> L series derive from it, but it had taken me several weeks of
> manipulation just to get a compilable code out of cython, so I balked. I
> will go back and see how to reduce the clutter.
New description:
Wrapping lcalc library
--
Comment(by rishi):
Replying to [comment:14 rishi]:
Thanks John for your feedback. I was looking at the patch again, I am
indeed seeing the typos, and places where documentation is far from clear.
While I was writing, I did think of having a base class and have various L
series derive from it, but it had taken me several weeks of manipulation
just to get a compilable code out of cython, so I balked. I will go back
and see how to reduce the clutter.
Rishi
> Replying to [comment:13 cremona]:
> > Thanks for the explanation.
> >
> > I successfully installed the new lcalc spkg; then I successfully
applied the patch and rebuilt sage.
> >
> > Now testing sage/libs/lcalc gives this:
> > {{{
> > sage -t "devel/sage-tests/sage/libs/lcalc/lcalc_Lfunction.pyx"
> > **********************************************************************
> > File "/home/john/sage-4.1.1/devel/sage-
tests/sage/libs/lcalc/lcalc_Lfunction.pyx", line 411:
> > sage: L.value(.6)
> > Expected:
> > 0.274633355856348 - 6.59869267328213e-18*I
> > Got:
> > 0.274633355856341 - 6.59869267328188e-18*I
> > **********************************************************************
> > File "/home/john/sage-4.1.1/devel/sage-
tests/sage/libs/lcalc/lcalc_Lfunction.pyx", line 413:
> > sage: L.value(.6+1*I)
> > Expected:
> > 0.362258705721100 + 0.433888250620852*I
> > Got:
> > 0.362258705721102 + 0.433888250620855*I
> > **********************************************************************
> > File "/home/john/sage-4.1.1/devel/sage-
tests/sage/libs/lcalc/lcalc_Lfunction.pyx", line 450:
> > sage: L.find_zeros(1,15,.1)
> > Expected:
> > [6.64845334472771, 9.83144443288668, 11.9588456260835]
> > Got:
> > [6.64845334472771, 9.83144443288667, 11.9588456260835]
> > **********************************************************************
> > File "/home/john/sage-4.1.1/devel/sage-
tests/sage/libs/lcalc/lcalc_Lfunction.pyx", line 491:
> > sage: L.find_zeros_via_N(3)
> > Expected:
> > [6.64845334472771, 9.83144443288668, 11.9588456260835]
> > Got:
> > [6.64845334472772, 9.83144443288667, 11.9588456260835]
> > **********************************************************************
> > File "/home/john/sage-4.1.1/devel/sage-
tests/sage/libs/lcalc/lcalc_Lfunction.pyx", line 642:
> > sage: L.value(.5)
> > Expected:
> > 0.763747880117299 + 0.216964767518864*I
> > Got:
> > 0.763747880117295 + 0.216964767518863*I
> > **********************************************************************
> > File "/home/john/sage-4.1.1/devel/sage-
tests/sage/libs/lcalc/lcalc_Lfunction.pyx", line 644:
> > sage: L.value(.6+5*I)
> > Expected:
> > 0.702723260619684 - 1.10178575243940*I
> > Got:
> > 0.702723260619682 - 1.10178575243940*I
> > **********************************************************************
> > File "/home/john/sage-4.1.1/devel/sage-
tests/sage/libs/lcalc/lcalc_Lfunction.pyx", line 789:
> > sage: lcalc_zeta.value(CC(.4,.5))
> > Expected:
> > -0.450728958517113 - 0.780511403019070*I
> > Got:
> > -0.450728958517121 - 0.780511403019071*I
> > **********************************************************************
> > File "/home/john/sage-4.1.1/devel/sage-
tests/sage/libs/lcalc/lcalc_Lfunction.pyx", line 852:
> > sage: lcalc_zeta.find_zeros_via_N(3)
> > Expected:
> > [14.1347251417347, 21.0220396387715, 25.0108575801457]
> > Got:
> > [14.1347251417347, 21.0220396387716, 25.0108575801457]
> > **********************************************************************
> > File "/home/john/sage-4.1.1/devel/sage-
tests/sage/libs/lcalc/lcalc_Lfunction.pyx", line 174:
> > sage: L.value(.5)
> > Expected:
> > 0.231750947504015 + 5.75329642226134e-18*I
> > Got:
> > 0.231750947504012 + 5.75329642226126e-18*I
> > **********************************************************************
> > File "/home/john/sage-4.1.1/devel/sage-
tests/sage/libs/lcalc/lcalc_Lfunction.pyx", line 176:
> > sage: L.value(CC(.2,.4))
> > Expected:
> > 0.102558603193338 + 0.190840777924700*I
> > Got:
> > 0.102558603193336 + 0.190840777924703*I
> > **********************************************************************
> > 7 items had failures:
> > }}}
> >
> > -- that is all just numerical noise probably because I'm testing on a
32-bit system and you made the tests on a 64-bit system (is that right?)
That is not serious (though will need to be fixed).
> >
> > In the "testing" file, are the functions intended for inclusion in
Sage? If so, they need doctesting (and the names are a little strange)
and they should perhaps be made into member functions of the appropriate
classes (e.g. ell_rational_field).
> >
> > In the docstrings explaining all the parameters, I don't think it is
enough to just refer to the lcacl documentation. These are Sage functions
and the inputs need to be documented withing Sage (however tedious that
might be!)
> >
> > There are quite a few typos in the documentation.
> >
> > Would it be possible to have a base class and have the various
L-series classes derive from it? That might reduce the code a little and
make the structure clearer.
> >
> > You have some input parameters which I think would more natually be
True/False instead of 1/0 as now.
> >
> > This has clearly been a huge amount of work and will be very useful.
The things I mentioned above are all minor, but still they should be
considered, so I have left the tag as "needs work", but I think this is
quite close to being includable.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5396#comment:15>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---