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