https://github.com/xp-framework/math
Big number handling
https://github.com/xp-framework/math
bc math php xp-framework
Last synced: 3 months ago
JSON representation
Big number handling
- Host: GitHub
- URL: https://github.com/xp-framework/math
- Owner: xp-framework
- Created: 2015-12-08T22:56:46.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-03-24T12:16:07.000Z (about 2 years ago)
- Last Synced: 2024-04-25T14:02:23.343Z (almost 2 years ago)
- Topics: bc, math, php, xp-framework
- Language: PHP
- Size: 53.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
Awesome Lists containing this project
README
Math
====
[](https://github.com/xp-framework/math/actions)
[](https://github.com/xp-framework/core)
[](https://github.com/xp-framework/core/blob/master/LICENCE.md)
[](http://php.net/)
[](http://php.net/)
[](https://packagist.org/packages/xp-framework/math)
Big number handling
API: BigInt
-----------
```php
public class math.BigInt extends math.BigNum {
public math.BigInt __construct(int|float|string|parent $in)
public math.BigNum add(int|float|string|parent $other)
public math.BigNum subtract(int|float|string|parent $other)
public math.BigNum multiply(int|float|string|parent $other)
public math.BigNum divide(int|float|string|parent $other)
public math.BigNum add0(int|float|string|parent $other)
public math.BigNum subtract0(int|float|string|parent $other)
public math.BigNum multiply0(int|float|string|parent $other)
public math.BigNum divide0(int|float|string|parent $other)
public math.BigNum power(int|float|string|parent $other)
public math.BigNum modulo(int|float|string|parent $other)
public math.BigNum bitwiseAnd(int|float|string|parent $other)
public math.BigNum bitwiseOr(int|float|string|parent $other)
public math.BigNum bitwiseXor(int|float|string|parent $other)
public math.BigNum shiftRight(int|float|string|parent $shift)
public math.BigNum shiftLeft(int|float|string|parent $shift)
public int byteValue()
public int intValue()
public float floatValue()
}
```
API: BigFloat
-------------
```php
public class math.BigFloat extends math.BigNum {
public math.BigFloat __construct(int|float|string|parent $in)
public math.BigNum add(int|float|string|parent $other)
public math.BigNum subtract(int|float|string|parent $other)
public math.BigNum multiply(int|float|string|parent $other)
public math.BigNum divide(int|float|string|parent $other)
public math.BigNum power(int|float|string|parent $other)
public math.BigFloat ceil()
public math.BigFloat floor()
public math.BigFloat round([int $precision= 0])
public int compare(int|float|string|parent $other, ?int $precision= null)
public bool equals(int|float|string|parent $other, ?int $precision= null)
public int intValue()
public float floatValue()
}
```