# man > Math::BigInt::Calc

---
type: CommandReference
command: Math::BigInt::Calc
mode: perldoc
section: 3pm
source: perldoc
---

## Quick Reference

- `use Math::BigInt lib => 'Calc';` — use with Math::BigInt
- `use Math::BigFloat lib => 'Calc';` — use with Math::BigFloat
- `use Math::BigRat lib => 'Calc';` — use with Math::BigRat
- `use Math::BigInt::Calc base_len => 4;` — set internal base to 10^4
- `use Math::BigInt::Calc use_int => 1;` — enable "use integer" internally
- `use Math::BigInt::Calc base_len => 6, use_int => 1;` — combine both options

## Name

Math::BigInt::Calc — pure Perl module to support Math::BigInt

## Synopsis

perl
# To use with Math::BigInt
use Math::BigInt lib => 'Calc';

# To use with Math::BigFloat
use Math::BigFloat lib => 'Calc';

# To use 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';
## Options

When loaded, the module computes the maximum exponent (power of 10) usable with and without `use integer`. The default is to use this maximum exponent. If the combination of `base_len` and `use_int` exceeds the maximum, an error is thrown.

- `base_len` — Specify the base length (positive integer). Sets internal base to `10**base_len`. Example: `base_len => 4` uses 10000 as internal base.
- `use_int` — Boolean flag to enable `use integer` in internal computations. Use 0 or "" for false, anything else for true. If `base_len` is not specified, the current value for base length is used.

## Methods

- `_base_len($base_len, $use_int)` — Set the base length and whether to enable `use integer` programmatically. Better to set these via options when loading the module.

## See Also

- [Math::BigInt::Lib](http://localhost/phpMan.php/perldoc/Math%3A%3ABigInt%3A%3ALib/markdown) — API description
- [Math::BigInt::FastCalc](http://localhost/phpMan.php/perldoc/Math%3A%3ABigInt%3A%3AFastCalc/markdown), [Math::BigInt::GMP](http://localhost/phpMan.php/perldoc/Math%3A%3ABigInt%3A%3AGMP/markdown), [Math::BigInt::Pari](http://localhost/phpMan.php/perldoc/Math%3A%3ABigInt%3A%3APari/markdown), [Math::BigInt::GMPz](http://localhost/phpMan.php/perldoc/Math%3A%3ABigInt%3A%3AGMPz/markdown), [Math::BigInt::BitVect](http://localhost/phpMan.php/perldoc/Math%3A%3ABigInt%3A%3ABitVect/markdown) — alternative libraries
- [Math::BigInt](http://localhost/phpMan.php/perldoc/Math%3A%3ABigInt/markdown), [Math::BigFloat](http://localhost/phpMan.php/perldoc/Math%3A%3ABigFloat/markdown), [Math::BigRat](http://localhost/phpMan.php/perldoc/Math%3A%3ABigRat/markdown) — modules that use these libraries