Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doctest fix for: dilog(RR) should return an element of RR #19906

Closed
zimmermann6 opened this issue Jan 18, 2016 · 19 comments
Closed

Doctest fix for: dilog(RR) should return an element of RR #19906

zimmermann6 opened this issue Jan 18, 2016 · 19 comments

Comments

@zimmermann6
Copy link

in Sage 6.10:

sage: dilog(-1.0)
-1/12*pi^2
sage: dilog(1)
1/6*pi^2
sage: dilog(0.5)
1/12*pi^2 - 1/2*log(2)^2

we should not get symbolic output with floating-point input.

Reported as pynac/pynac#219

Upstream: Reported upstream. Developers acknowledge bug.

Component: basic arithmetic

Issue created by migration from https://trac.sagemath.org/ticket/19906

@rwst

This comment has been minimized.

@rwst
Copy link

rwst commented Dec 4, 2016

Upstream: Reported upstream. Developers acknowledge bug.

@rwst
Copy link

rwst commented Dec 5, 2016

@rwst
Copy link

rwst commented Dec 5, 2016

Commit: 896bdc7

@rwst
Copy link

rwst commented Dec 5, 2016

Dependencies: pynac-0.7.2

@rwst
Copy link

rwst commented Dec 5, 2016

comment:3

This is fixed in Pynac git master. This ticket has doctests but they depend on a pynac-0.7.2 upgade.


New commits:

896bdc719906: doctest fix for: dilog(RR) should return an element of RR

@rwst rwst changed the title dilog(RR) should return an element of RR Doctest fix for: dilog(RR) should return an element of RR Dec 5, 2016
@rwst
Copy link

rwst commented Dec 6, 2016

Changed dependencies from pynac-0.7.2 to #21963

@videlec
Copy link
Contributor

videlec commented Dec 19, 2016

comment:5

You need to set your name in the Authors field.

@videlec
Copy link
Contributor

videlec commented Dec 19, 2016

comment:6

Could you be more careful and actually check the parent of the output? In other words something like

sage: y = dilog( RealField(13)(1.0))
sage: assert parent(y) is RealField(13)
sage: y = dilog( RealField(100)(1.0))
sage: assert parent(y) is RealField(100)

I don't know to which extent this function is available on intervals, balls and complexes but they should be tested as well with various precision.

@rwst
Copy link

rwst commented Apr 25, 2017

Changed branch from u/rws/dilog_rr__should_return_an_element_of_rr to u/rws/19906

@rwst
Copy link

rwst commented Apr 26, 2017

comment:9

Note also

sage: polylog(3,RBF(1.1))      # there is a polylog RBF member!
1.37625299668538 - 0.0142691615444952*I
sage: dilog(RBF(1.1))
1.96199910130557 - 0.299425760685590*I

New commits:

4f451a419906: doctest fix for: dilog(RR) should return an element of RR

@rwst
Copy link

rwst commented Apr 26, 2017

Changed commit from 896bdc7 to 4f451a4

@zimmermann6
Copy link
Author

comment:10

For me, the last commit 4f451a4 fixes the issue raised in comment [comment:6].
We could proceed and give a positive review. (The case of intervals, balls and complexes can be dealt with in a different ticket.)

Paul

@rwst
Copy link

rwst commented Apr 26, 2017

Changed branch from u/rws/19906 to none

@rwst
Copy link

rwst commented Apr 26, 2017

comment:11

Replying to @zimmermann6:

For me, the last commit 4f451a4 fixes the issue raised in comment [comment:6].
We could proceed and give a positive review. (The case of intervals, balls and complexes can be dealt with in a different ticket.)

No, actually the given doctest fails (that's why I didn't set needs review). But the notion that dilog(RealField(13)(1.0)) should return anything real I commented on in #18386 comment:8. More obviously, demanding that dilog(RealField(13)(1.1)) should have RealField(13) as parent is a red herring because the result just is complex.

However, there are still issues with polylog (and thus dilog) , I just reopened pynac/pynac#219 to fix them. I believe #18386 is more fitting to be the ticket to add a doctest once it's fixed so I propose to make this a duplicate. As you seem to be of similar attitude I take the liberty to set positive all at once.

@rwst
Copy link

rwst commented Apr 26, 2017

Changed dependencies from #21963 to none

@rwst
Copy link

rwst commented Apr 26, 2017

Changed commit from 4f451a4 to none

@rwst rwst removed this from the sage-7.0 milestone Apr 26, 2017
@zimmermann6
Copy link
Author

comment:12

since the initial issue in the description of this ticket is now fixed (here with Sage 7.6):

sage: dilog(-1.0)
-0.822467033424113
sage: dilog(0.5)
0.582240526465012

I would simply add those two tests in the doctests, maybe with one test checking the parent:

sage: y = dilog(RealField(13)(0.5))
sage: parent(y)
Real Field with 13 bits of precision

and indeed defer to #18386 the other issues (branch point, complex values).

@embray
Copy link
Contributor

embray commented Jul 13, 2017

comment:13

Closing tickets in the sage-duplicate/invalid/wontfix module with positive_review (i.e. someone has confirmed they should be closed).

@embray embray closed this as completed Jul 13, 2017
This was referenced Dec 10, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants