Complex Trilogarithm

= Spence's tri-Logarithm.
1 Download
Updated 7 Sep 2023

View License

function t = trilog(z)
trilog = Spence's tri-Logarithm.
t = trilog(z) = Li_3(z)
= Sum From n=1 To n=Infinity Of z^n/n^3 if |z|<=1.
INPUT z: real or complex, scalar, vector or matrix.
OUTPUT t: component-wise trilogarithm of z (accuracy around machine precision).
Depending on the size of the matrix z and of the magnitude of its
components, trilog(z) is 2 to 5 (and more) orders of magnitude
faster than the polylog(3,z) from the Matlab symbolic toolbox.
EXAMPLE: trilog(z) vs polylog(3,z).
N = 10000;
z = 200*( rand(N) + i*rand(N) ) - 100 - i*100;
tic; t=trilog(z); toc;
Elapsed time is 12.081650 seconds.
N = 160;
z = 200*( rand(N) + i*rand(N) ) - 100 - i*100;
tic; t=polylog(3,z); toc;
Elapsed time is 12.289606 seconds.

Cite As

Didier Clamond (2024). Complex Trilogarithm (https://www.mathworks.com/matlabcentral/fileexchange/134986-complex-trilogarithm), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2023a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.0.1

Update title

1.0.0