++ed by:
1 non-PAUSE user
Author image Daniel Șuteu

NAME

Math::Sidef - Perl interface to Sidef's mathematical library.

SYNOPSIS

  use 5.018;
  use Math::Sidef qw(factor composite prime ipow);

  say prime(1e9);       # 10^9-th prime number
  say composite(1e9);   # 10^9-th composite number

  # Prime factorization of 2^128 + 1
  say join ' * ', factor(ipow(2, 128) + 1);

  # Iterate over prime numbers in range 1..100
  Math::Sidef::each_prime(1, 100, sub {
     say $_[0];
  });

DESCRIPTION

Math::Sidef provides an easy interface to the numerical built-in system of Sidef.

It supports all the numerical functions provided by Sidef::Types::Number::Number.

The returned values are Math::AnyNum objects.

IMPORT

Any function can be imported, using the following syntax:

    use Math::Sidef qw(function_name);

Additionally, for importing all the functions, use:

    use Math::Sidef qw(:all);

The list of functions available for importing, can be listed with:

    CORE::say join ", ", sort @Math::Sidef::EXPORT_OK;

SEE ALSO

  • Sidef - The Sidef programming language.

  • Math::AnyNum - Arbitrary size precision for integers, rationals, floating-points and complex numbers.

  • Math::Prime::Util - Utilities related to prime numbers, including fast sieves and factoring.

  • Math::Prime::Util::GMP - Utilities related to prime numbers, using GMP.

REPOSITORY

https://github.com/trizen/Math-Sidef

AUTHOR

Daniel "Trizen" Șuteu, <trizen@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2021 by Daniel "Trizen" Șuteu

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.32.0 or, at your option, any later version of Perl 5 you may have available.