Closed fchapoton closed 2 years ago
New commits:
f1cdb5e | adding some conversions to/from Fricas functions |
Branch: u/chapoton/33204
Wouldn't it be good to have some doctests? I know very little about these functions, but at the very least it appears that the function names do not quite match up. Possibly, fricas is missing some. For example, at https://fricas.github.io/api/SpecialFunctionCategory.html I cannot find jacobiCs
.
One place for such tests might be fricas.py
, line 1510.
I guess one could systematically compare some numerical values, to make sure that the definitions agree. For example
sage: jacobi_cn(0.9,2.1) - fricas("jacobiCn")(0.9,2.1).sage()
-7.04818555476145e-20*I
but I have absolutely no idea which values would make sense.
Changed keywords from none to FriCAS
Would you be willing to add a doctest for each of these to show the conversions are working correctly?
Branch pushed to git repo; I updated commit sha1. New commits:
772487a | more doctests for fricas conversions of orthogonal polynomials |
now with doctests
Thank you.
Martin, if there is something else you would want to see, you can revert the positive review.
Reviewer: Martin Rubey, Travis Scrimshaw
I'm sorry to be pedantic, but I find doctests like
sage: fricas(gen_legendre_P(2,1/2,x)) # optional - fricas
1
legendreP(2,-,x)
2
not very informative. All this tests is that there is a trivariate fricas function legendreP
. It does not test, for example, that the ordering of the variables is as suggested.
I admit that it is a bit of work to find out how much information fricas actually has about these functions. I did some digging:
sage: fricas.legendreP(4,x)
35 4 15 2 3
-- x - -- x + -
8 4 8
sage: fricas.series(fricas.jacobiCn(x,4), x=0)
1 2 17 4 433 6 2903 8 226327 10 11
1 - - x + -- x - --- x + ---- x - ------ x + O(x )
2 24 720 5760 518400
sage: fricas.series(fricas.ellipticF(x,2), x=0)
1 3 19 5 9 7 289 9 279 11 12
x + - x + -- x + -- x + --- x + --- x + O(x )
2 40 16 384 256
Branch pushed to git repo; I updated commit sha1. New commits:
46d0501 | doctest fricas conversions, comment out some dubious ones |
here are some refined doctests. I will not add more, but feel free to do so.
Great, thank you!
bump to 9.7
Changed branch from u/chapoton/33204 to 46d0501
just a few more missing conversions, for Jacobi functions, orthogonal polynomials, etc
CC: @mantepse
Component: interfaces: optional
Keywords: FriCAS
Author: Frédéric Chapoton
Branch/Commit:
46d0501
Reviewer: Martin Rubey, Travis Scrimshaw
Issue created by migration from https://trac.sagemath.org/ticket/33204