Opened 4 years ago
Closed 2 years ago
#19906 closed defect (wontfix)
Doctest fix for: dilog(RR) should return an element of RR
Reported by:  zimmerma  Owned by:  

Priority:  minor  Milestone:  sageduplicate/invalid/wontfix 
Component:  basic arithmetic  Keywords:  
Cc:  Merged in:  
Authors:  Reviewers:  
Report Upstream:  Reported upstream. Developers acknowledge bug.  Work issues:  
Branch:  Commit:  
Dependencies:  Stopgaps: 
Description (last modified by )
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 floatingpoint input.
Reported as https://github.com/pynac/pynac/issues/219
Change History (13)
comment:1 Changed 3 years ago by
 Description modified (diff)
 Report Upstream changed from N/A to Reported upstream. Developers acknowledge bug.
comment:2 Changed 3 years ago by
 Branch set to u/rws/dilog_rr__should_return_an_element_of_rr
comment:3 Changed 3 years ago by
 Commit set to 896bdc714d486dedda490f5949afd261bcb25ca3
 Dependencies set to pynac0.7.2
 Status changed from new to needs_review
 Summary changed from dilog(RR) should return an element of RR to Doctest fix for: dilog(RR) should return an element of RR
comment:4 Changed 3 years ago by
 Dependencies changed from pynac0.7.2 to #21963
comment:5 Changed 3 years ago by
You need to set your name in the Authors field.
comment:6 Changed 3 years ago by
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.
comment:7 Changed 3 years ago by
 Status changed from needs_review to needs_work
comment:8 Changed 3 years ago by
 Branch changed from u/rws/dilog_rr__should_return_an_element_of_rr to u/rws/19906
comment:9 Changed 3 years ago by
 Commit changed from 896bdc714d486dedda490f5949afd261bcb25ca3 to 4f451a479be21b5eeac4ca4dccf934203f5a4166
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:
4f451a4  19906: doctest fix for: dilog(RR) should return an element of RR

comment:10 followup: ↓ 11 Changed 3 years ago by
For me, the last commit 4f451a4 fixes the issue raised in 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
comment:11 in reply to: ↑ 10 Changed 3 years ago by
 Branch u/rws/19906 deleted
 Commit 4f451a479be21b5eeac4ca4dccf934203f5a4166 deleted
 Dependencies #21963 deleted
 Milestone changed from sage7.0 to sageduplicate/invalid/wontfix
 Status changed from needs_work to positive_review
Replying to zimmerma:
For me, the last commit 4f451a4 fixes the issue raised in 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 https://trac.sagemath.org/ticket/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 https://github.com/pynac/pynac/issues/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.
comment:12 Changed 3 years ago by
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).
comment:13 Changed 2 years ago by
 Resolution set to wontfix
 Status changed from positive_review to closed
Closing tickets in the sageduplicate/invalid/wontfix module with positive_review (i.e. someone has confirmed they should be closed).
This is fixed in Pynac git master. This ticket has doctests but they depend on a pynac0.7.2 upgade.
New commits:
19906: doctest fix for: dilog(RR) should return an element of RR