Math::Libgsl::Series

An interface to libgsl, the Gnu Scientific Library - Series Acceleration

NAME

Math::Libgsl::Series - An interface to libgsl, the Gnu Scientific Library - Series Acceleration

SYNOPSIS

use Math::Libgsl::Series;

SYNOPSIS

use Math::Libgsl::Series;

my Math::Libgsl::Series $s .= new: N;
constant \N = 20;
my @array := Array[Num].new;
(^N).map: -> $n { my $np1 = $n + 1e0; @array[$n] = 1e0 / ($np1 * $np1) }
my ($sum, $err) = $s.levin-accel: @array;
say "The series' sum is $sum, with an estimated error $err";

DESCRIPTION

Math::Libgsl::Series is an interface to the Series Acceleration functions of libgsl, the Gnu Scientific Library.

new(UInt:D() truncation? = False)

new(UInt:D() :truncation? = False)

The constructor accepts one or optionally two simple or named arguments: the mandatory series size and the optional error estimation type. This last argoment may have two values: propagation of rounding error or truncation error in the estrapolation. If the Bool :truncation parameter is False then the error is estimated by means of the propagation of rounding errors.

levin-accel(_@array where _.all > 0 --> List)

This method computes the extrapolated limit of the series using a Levin u-transform. It returns a List: the extrapolated error, and the number of $terms-used during the computation.

C Library Documentation

For more details on libgsl see https://www.gnu.org/software/gsl/. The excellent C Library manual is available here https://www.gnu.org/software/gsl/doc/html/index.html, or here https://www.gnu.org/software/gsl/doc/latex/gsl-ref.pdf in PDF format.

Prerequisites

This module requires the libgsl library to be installed. Please follow the instructions below based on your platform:

Debian Linux and Ubuntu 20.04+

sudo apt install libgsl23 libgsl-dev libgslcblas0

That command will install libgslcblas0 as well, since it's used by the GSL.

Ubuntu 18.04

libgsl23 and libgslcblas0 have a missing symbol on Ubuntu 18.04. I solved the issue installing the Debian Buster version of those three libraries:

Installation

To install it using zef (a module management tool):

$ zef install Math::Libgsl::Series

AUTHOR

Fernando Santagata [email protected]

COPYRIGHT AND LICENSE

Copyright 2022 Fernando Santagata

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

Math::Libgsl::Series v0.0.1

An interface to libgsl, the Gnu Scientific Library - Series Acceleration

Authors

  • Fernando Santagata

License

Artistic-2.0

Dependencies

Math::Libgsl::Constants

Test Dependencies

Provides

  • Math::Libgsl::Raw::Series
  • Math::Libgsl::Series

Documentation

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.