0
$\begingroup$

So I'm a bit confused. I asked Mathematica to evaluate

PolyLog[3, -4.900612445719819`*^-15 + 8.488109744191103`*^-15 I]

and it refused to do so

I assume it has something to do with the values being "too small", since It seems to work fine for other values, e.g.

enter image description here

Does anyone know how to make Mathematica evaluate this input?

$\endgroup$
2
  • 1
    $\begingroup$ Do you get a warning that looks like "General::munfl: Internal`AbsSquare[-8.94349*10^-198-1.75784*10^-198 I] is too small to represent as a normalized machine number; precision may be lost." ? $\endgroup$
    – JimB
    Aug 14, 2020 at 21:27
  • 2
    $\begingroup$ Applying the definition almost directly: z = Rationalize[-4.900612445719819*^-15 + 8.488109744191103*^-15 I, 0]; n = 3; NSum[z^k/k^n, {k, 1, \[Infinity]}]. $\endgroup$
    – JimB
    Aug 14, 2020 at 21:29

1 Answer 1

4
$\begingroup$
Clear["Global`*"]

It's a precision issue, don't use machine precision.

Use Rationalize so that the calculation can be done with arbitrary-precision

N[
 PolyLog @@
  ({3, -4.900612445719819`*^-15 + 8.488109744191103`*^-15 I} // 
    Rationalize[#, 0] &),
 25]

(* -4.900612445719824749854156*10^-15 + 8.488109744191092161335110*10^-15 I )

% // N

(* -4.90061*10^-15 + 8.48811*10^-15 I *)

Alternatively, use SetPrecision

PolyLog @@
 SetPrecision[
  {3, -4.900612445719819`*^-15 + 8.488109744191103`*^-15 I},
  25]

(* -4.900612445719825135980700*10^-15 + 8.488109744191092254166590*10^-15 I *)

% // N

(* -4.90061*10^-15 + 8.48811*10^-15 I *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.