|
2 | 2 |
|
3 | 3 | /** @generate-class-entries */
|
4 | 4 |
|
5 |
| -/** @refcount 1 */ |
6 |
| -function bcadd(string $num1, string $num2, ?int $scale = null): string {} |
| 5 | +namespace |
| 6 | +{ |
| 7 | + /** @refcount 1 */ |
| 8 | + function bcadd(string $num1, string $num2, ?int $scale = null): string {} |
7 | 9 |
|
8 |
| -/** @refcount 1 */ |
9 |
| -function bcsub(string $num1, string $num2, ?int $scale = null): string {} |
| 10 | + /** @refcount 1 */ |
| 11 | + function bcsub(string $num1, string $num2, ?int $scale = null): string {} |
10 | 12 |
|
11 |
| -/** @refcount 1 */ |
12 |
| -function bcmul(string $num1, string $num2, ?int $scale = null): string {} |
| 13 | + /** @refcount 1 */ |
| 14 | + function bcmul(string $num1, string $num2, ?int $scale = null): string {} |
13 | 15 |
|
14 |
| -/** @refcount 1 */ |
15 |
| -function bcdiv(string $num1, string $num2, ?int $scale = null): string {} |
| 16 | + /** @refcount 1 */ |
| 17 | + function bcdiv(string $num1, string $num2, ?int $scale = null): string {} |
16 | 18 |
|
17 |
| -/** @refcount 1 */ |
18 |
| -function bcmod(string $num1, string $num2, ?int $scale = null): string {} |
| 19 | + /** @refcount 1 */ |
| 20 | + function bcmod(string $num1, string $num2, ?int $scale = null): string {} |
19 | 21 |
|
20 |
| -/** @refcount 1 */ |
21 |
| -function bcpowmod(string $num, string $exponent, string $modulus, ?int $scale = null): string {} |
| 22 | + /** @refcount 1 */ |
| 23 | + function bcpowmod(string $num, string $exponent, string $modulus, ?int $scale = null): string {} |
22 | 24 |
|
23 |
| -/** @refcount 1 */ |
24 |
| -function bcpow(string $num, string $exponent, ?int $scale = null): string {} |
| 25 | + /** @refcount 1 */ |
| 26 | + function bcpow(string $num, string $exponent, ?int $scale = null): string {} |
25 | 27 |
|
26 |
| -/** @refcount 1 */ |
27 |
| -function bcsqrt(string $num, ?int $scale = null): string {} |
| 28 | + /** @refcount 1 */ |
| 29 | + function bcsqrt(string $num, ?int $scale = null): string {} |
28 | 30 |
|
29 |
| -function bccomp(string $num1, string $num2, ?int $scale = null): int {} |
| 31 | + function bccomp(string $num1, string $num2, ?int $scale = null): int {} |
30 | 32 |
|
31 |
| -function bcscale(?int $scale = null): int {} |
| 33 | + function bcscale(?int $scale = null): int {} |
32 | 34 |
|
33 |
| -/** @refcount 1 */ |
34 |
| -function bcfloor(string $num): string {} |
| 35 | + /** @refcount 1 */ |
| 36 | + function bcfloor(string $num): string {} |
35 | 37 |
|
36 |
| -/** @refcount 1 */ |
37 |
| -function bcceil(string $num): string {} |
| 38 | + /** @refcount 1 */ |
| 39 | + function bcceil(string $num): string {} |
38 | 40 |
|
39 |
| -/** @refcount 1 */ |
40 |
| -function bcround(string $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): string {} |
| 41 | + /** @refcount 1 */ |
| 42 | + function bcround(string $num, int $precision = 0, int $mode = PHP_ROUND_HALF_UP): string {} |
| 43 | +} |
| 44 | + |
| 45 | +namespace BcMath |
| 46 | +{ |
| 47 | + final readonly class Number implements \Stringable |
| 48 | + { |
| 49 | + public string $value; |
| 50 | + public int $scale; |
| 51 | + |
| 52 | + public function __construct(string|int $num) {} |
| 53 | + |
| 54 | + public function add(Number|string|int $num, ?int $scale = null): Number {} |
| 55 | + |
| 56 | + public function sub(Number|string|int $num, ?int $scale = null): Number {} |
| 57 | + |
| 58 | + public function mul(Number|string|int $num, ?int $scale = null): Number {} |
| 59 | + |
| 60 | + public function div(Number|string|int $num, ?int $scale = null): Number {} |
| 61 | + |
| 62 | + public function mod(Number|string|int $num, ?int $scale = null): Number {} |
| 63 | + |
| 64 | + public function powmod(Number|string|int $exponent, Number|string|int $modulus, ?int $scale = null): Number {} |
| 65 | + |
| 66 | + public function pow(Number|string|int $exponent, ?int $scale = null): Number {} |
| 67 | + |
| 68 | + public function sqrt(?int $scale = null): Number {} |
| 69 | + |
| 70 | + public function floor(): Number {} |
| 71 | + |
| 72 | + public function ceil(): Number {} |
| 73 | + |
| 74 | + public function round(int $precision = 0, int $mode = PHP_ROUND_HALF_UP): Number {} |
| 75 | + |
| 76 | + public function comp(Number|string|int $num, ?int $scale = null): int {} |
| 77 | + |
| 78 | + public function __toString(): string {} |
| 79 | + |
| 80 | + public function __serialize(): array {} |
| 81 | + |
| 82 | + public function __unserialize(array $data): void {} |
| 83 | + } |
| 84 | +} |
0 commit comments