Math::BigInt::Calc(3)
π NAME π
okay bestie, welcome to the manual page for Math::BigInt::Calc(3) β Math::BigInt::Calc is a pure Perl module to support Math::BigInt. That's the whole vibe. π«Ά
β¨ SYNOPSIS β¨
Here's how you bring it into your life:
# to use it with Math::BigInt
use Math::BigInt lib => 'Calc';
# to use it with Math::BigFloat
use Math::BigFloat lib => 'Calc';
# to use it with Math::BigRat
use Math::BigRat lib => 'Calc';
# explicitly set base length and whether to "use integer"
use Math::BigInt::Calc base_len => 4, use_int => 1;
use Math::BigInt lib => 'Calc';
πΈ DESCRIPTION πΈ
Math::BigInt::Calc inherits from Math::BigInt::Lib. π
In this library, numbers are represented internally in base B = 10**N, where N is the largest possible integer that does not cause overflow in the intermediate computations. The base B elements are stored in an array, with the least significant element stored in array element zero. There are no leading zero elements, except a single zero element when the number is zero. For instance, if B = 10000, the number 1234567890 is represented internally as [7890, 3456, 12]. Iconic internal representation behavior, no cap. β¨
π OPTIONS π
When the module is loaded, it computes the maximum exponent β i.e., power of 10 β that can be used with and without "use integer" in the computations. The default is to use this maximum exponent. If the combination of the 'base_len' value and the 'use_int' value exceeds the maximum value, an error is thrown. π¨
base_lenβ The base length can be specified explicitly with the'base_len'option. The value must be a positive integer. Example:use Math::BigInt::Calc base_len => 4; # use 10000 as internal baseuse_intβ This option is used to specify whether"use integer"should be used in the internal computations. The value is interpreted as a boolean value, so use0or""for false and anything else for true. If the'base_len'is not specified together with'use_int', the current value for the base length is used. Example:use Math::BigInt::Calc use_int => 1; # use "use integer" internally
π¦ METHODS π¦
This overview contains only the methods that are specific to Math::BigInt::Calc. For the other methods, see Math::BigInt::Lib. π
_base_len()
Specify the desired base length and whether to enable "use integer" in the computations. π§
Math::BigInt::Calc -> _base_len($base_len, $use_int);
Note that it is better to specify the base length and whether to use integers as options when the module is loaded β for example, like this:
use Math::BigInt::Calc base_len => 6, use_int => 1;
π SEE ALSO π
Math::BigInt::Libfor a description of the API.- Alternative libraries:
Math::BigInt::FastCalc,Math::BigInt::GMP,Math::BigInt::Pari,Math::BigInt::GMPz, andMath::BigInt::BitVect. - Some of the modules that use these libraries:
Math::BigInt,Math::BigFloat, andMath::BigRat.
This little icon comes from the User Contributed Perl Documentation, bestie: perl v5.42.0, dated 2024-06-23, manual page Math::BigInt::Calc(3). ππ
π¦ where this page comes from
- opensuse-leap 16.0: perl-Math-BigInt 2.3.3-bp160.1.12 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms