@@ -18649,12 +18649,37 @@ public void testPolyGamma() {
18649
18649
18650
18650
@Test
18651
18651
public void testPolyLog() {
18652
+ check("PolyLog(-42,Infinity)", //
18653
+ "Indeterminate");
18654
+ check("PolyLog(0,Infinity)", //
18655
+ "Indeterminate");
18656
+ check("PolyLog(2,Infinity)", //
18657
+ "-Infinity");
18658
+ check("PolyLog(42,-Infinity)", //
18659
+ "-Infinity");
18660
+
18661
+ checkNumeric("PolyLog(1, 0.333333)", //
18662
+ "0.4054646081082894");
18663
+
18664
+
18665
+ checkNumeric("PolyLog(2, 0.9)", //
18666
+ "1.2997147230049588");
18667
+ checkNumeric("PolyLog(0, 5.0)", //
18668
+ "-1.25");
18669
+
18670
+ checkNumeric("N(PolyLog(1, 1/3), 50)", //
18671
+ "0.40546510810816438197801311546434913657199042346249");
18672
+ checkNumeric("PolyLog(2, 0.300000000000000000)", //
18673
+ "0.326129510075476069");
18674
+ checkNumeric("PolyLog(0.2 + I, 0.5 - I)", //
18675
+ "-0.08985258966284129+I*(-0.5958648241210646)");
18676
+
18652
18677
// issue #929
18653
18678
// message Infinite or NaN number in z1 calculation.
18654
- check ("(PolyLog(2,E^(I*1/270*Pi^2)))/Pi // N", //
18655
- "0.31831*PolyLog(2.0,0.999332 +I*0.036546) ");
18656
- check ("PolyLog(2,0.9993319736282411 + 0.03654595031305655*I)", //
18657
- "PolyLog(2,0.9993319736282411 +I*0.03654595031305655) ");
18679
+ checkNumeric ("(PolyLog(2,E^(I*1/270*Pi^2)))/Pi // N", //
18680
+ "0.5054280619497805 +I*0.0501372676125785 ");
18681
+ checkNumeric ("PolyLog(2,0.9993319736282411 + 0.03654595031305655*I)", //
18682
+ "1.5878490863395573 +I*0.1575108716027421 ");
18658
18683
18659
18684
check("PolyLog(2,z) + PolyLog(2,1-z)", //
18660
18685
"Pi^2/6-Log(1-z)*Log(z)");
@@ -18667,6 +18692,11 @@ public void testPolyLog() {
18667
18692
"Pi^2/6");
18668
18693
check("PolyLog(2,E^(41*I*Pi))", //
18669
18694
"-Pi^2/12");
18695
+
18696
+
18697
+
18698
+
18699
+
18670
18700
// TODO https://github.com/mtommila/apfloat/issues/34
18671
18701
// check("PolyLog(2147483647,-3.1415)", //
18672
18702
// " ");
@@ -18683,15 +18713,6 @@ public void testPolyLog() {
18683
18713
check("PolyLog(-2147483648,2.718281828459045)", //
18684
18714
"PolyLog(-2.14748*10^9,2.71828)");
18685
18715
18686
- check("PolyLog(0.2 + I, 0.5 - I)", //
18687
- "-0.0898526+I*(-0.595865)");
18688
- check("PolyLog(2, 0.9)", //
18689
- "1.29971");
18690
- check("PolyLog(0, 5.0)", //
18691
- "-1.25");
18692
- check("PolyLog(1, 0.333333)", //
18693
- "0.405465");
18694
-
18695
18716
check("PolyLog(2,0)", //
18696
18717
"0");
18697
18718
check("PolyLog(2,-1)", //
0 commit comments