@@ -69,7 +69,7 @@ |
||
69 | 69 | * |
70 | 70 | * @return bool |
71 | 71 | */ |
72 | - public function isEqual(NumberInterface|int|string|float $value): bool; |
|
72 | + public function isEqual(NumberInterface | int | string | float $value): bool; |
|
73 | 73 | |
74 | 74 | /** |
75 | 75 | * @return int|null |
@@ -24,7 +24,7 @@ |
||
24 | 24 | * |
25 | 25 | * @return DecimalInterface |
26 | 26 | */ |
27 | - public function continuousModulo(NumberInterface|string|int|float $mod): DecimalInterface; |
|
27 | + public function continuousModulo(NumberInterface | string | int | float $mod): DecimalInterface; |
|
28 | 28 | |
29 | 29 | /** |
30 | 30 | * @param $num |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | $calcMode = $this->getMode(); |
24 | 24 | |
25 | 25 | return match ($calcMode) { |
26 | - CalcMode::Native => (string)$this->expNative(), |
|
26 | + CalcMode::Native => (string) $this->expNative(), |
|
27 | 27 | default => $this->expScale($scale) |
28 | 28 | }; |
29 | 29 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | $calcMode = $this->getMode(); |
40 | 40 | |
41 | 41 | return match ($calcMode) { |
42 | - CalcMode::Native => (string)$this->lnNative(), |
|
42 | + CalcMode::Native => (string) $this->lnNative(), |
|
43 | 43 | default => $this->lnScale($scale) |
44 | 44 | }; |
45 | 45 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $calcMode = $this->getMode(); |
55 | 55 | |
56 | 56 | return match ($calcMode) { |
57 | - CalcMode::Native => (string)$this->log10Native(), |
|
57 | + CalcMode::Native => (string) $this->log10Native(), |
|
58 | 58 | default => $this->log10Scale($scale) |
59 | 59 | }; |
60 | 60 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $calcMode = $this->getMode(); |
21 | 21 | |
22 | 22 | return match ($calcMode) { |
23 | - CalcMode::Native => (string)$this->sinNative(), |
|
23 | + CalcMode::Native => (string) $this->sinNative(), |
|
24 | 24 | default => $this->sinScale($scale) |
25 | 25 | }; |
26 | 26 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | $calcMode = $this->getMode(); |
35 | 35 | |
36 | 36 | return match ($calcMode) { |
37 | - CalcMode::Native => (string)$this->cosNative(), |
|
37 | + CalcMode::Native => (string) $this->cosNative(), |
|
38 | 38 | default => $this->cosScale($scale) |
39 | 39 | }; |
40 | 40 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $calcMode = $this->getMode(); |
49 | 49 | |
50 | 50 | return match ($calcMode) { |
51 | - CalcMode::Native => (string)$this->tanNative(), |
|
51 | + CalcMode::Native => (string) $this->tanNative(), |
|
52 | 52 | default => $this->tanScale($scale) |
53 | 53 | }; |
54 | 54 | } |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $calcMode = $this->getMode(); |
64 | 64 | |
65 | 65 | return match ($calcMode) { |
66 | - CalcMode::Native => (string)$this->secNative(), |
|
66 | + CalcMode::Native => (string) $this->secNative(), |
|
67 | 67 | default => $this->secScale($scale) |
68 | 68 | }; |
69 | 69 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $calcMode = $this->getMode(); |
79 | 79 | |
80 | 80 | return match ($calcMode) { |
81 | - CalcMode::Native => (string)$this->cscNative(), |
|
81 | + CalcMode::Native => (string) $this->cscNative(), |
|
82 | 82 | default => $this->cscScale($scale) |
83 | 83 | }; |
84 | 84 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | $calcMode = $this->getMode(); |
94 | 94 | |
95 | 95 | return match ($calcMode) { |
96 | - CalcMode::Native => (string)$this->cotNative(), |
|
96 | + CalcMode::Native => (string) $this->cotNative(), |
|
97 | 97 | default => $this->cotScale($scale) |
98 | 98 | }; |
99 | 99 | } |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | $calcMode = $this->getMode(); |
108 | 108 | |
109 | 109 | return match ($calcMode) { |
110 | - CalcMode::Native => (string)$this->sinhNative(), |
|
110 | + CalcMode::Native => (string) $this->sinhNative(), |
|
111 | 111 | default => $this->sinhScale($scale) |
112 | 112 | }; |
113 | 113 | } |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | $calcMode = $this->getMode(); |
122 | 122 | |
123 | 123 | return match ($calcMode) { |
124 | - CalcMode::Native => (string)$this->coshNative(), |
|
124 | + CalcMode::Native => (string) $this->coshNative(), |
|
125 | 125 | default => $this->coshScale($scale) |
126 | 126 | }; |
127 | 127 | } |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | $calcMode = $this->getMode(); |
136 | 136 | |
137 | 137 | return match ($calcMode) { |
138 | - CalcMode::Native => (string)$this->tanhNative(), |
|
138 | + CalcMode::Native => (string) $this->tanhNative(), |
|
139 | 139 | default => $this->tanhScale($scale) |
140 | 140 | }; |
141 | 141 | } |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | $calcMode = $this->getMode(); |
151 | 151 | |
152 | 152 | return match ($calcMode) { |
153 | - CalcMode::Native => (string)$this->sechNative(), |
|
153 | + CalcMode::Native => (string) $this->sechNative(), |
|
154 | 154 | default => $this->sechScale($scale) |
155 | 155 | }; |
156 | 156 | } |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $calcMode = $this->getMode(); |
165 | 165 | |
166 | 166 | return match ($calcMode) { |
167 | - CalcMode::Native => (string)$this->cschNative(), |
|
167 | + CalcMode::Native => (string) $this->cschNative(), |
|
168 | 168 | default => $this->cschScale($scale) |
169 | 169 | }; |
170 | 170 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | $calcMode = $this->getMode(); |
180 | 180 | |
181 | 181 | return match ($calcMode) { |
182 | - CalcMode::Native => (string)$this->cothNative(), |
|
182 | + CalcMode::Native => (string) $this->cothNative(), |
|
183 | 183 | default => $this->cothScale($scale) |
184 | 184 | }; |
185 | 185 | } |
@@ -68,7 +68,7 @@ |
||
68 | 68 | $thisNum = self::translateToNative($this); |
69 | 69 | $piDiv2 = M_PI_2; |
70 | 70 | |
71 | - return $piDiv2 - atan($thisNum); |
|
71 | + return $piDiv2-atan($thisNum); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | } |
75 | 75 | \ No newline at end of file |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | $calcMode = $this->getMode(); |
20 | 20 | |
21 | 21 | return match ($calcMode) { |
22 | - CalcMode::Native => (string)$this->arcsinNative(), |
|
22 | + CalcMode::Native => (string) $this->arcsinNative(), |
|
23 | 23 | default => $this->arcsinScale($scale) |
24 | 24 | }; |
25 | 25 | } |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | $calcMode = $this->getMode(); |
34 | 34 | |
35 | 35 | return match ($calcMode) { |
36 | - CalcMode::Native => (string)$this->arccosNative(), |
|
36 | + CalcMode::Native => (string) $this->arccosNative(), |
|
37 | 37 | default => $this->arccosScale($scale) |
38 | 38 | }; |
39 | 39 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $calcMode = $this->getMode(); |
48 | 48 | |
49 | 49 | return match ($calcMode) { |
50 | - CalcMode::Native => (string)$this->arctanNative(), |
|
50 | + CalcMode::Native => (string) $this->arctanNative(), |
|
51 | 51 | default => $this->arctanScale($scale) |
52 | 52 | }; |
53 | 53 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | $calcMode = $this->getMode(); |
62 | 62 | |
63 | 63 | return match ($calcMode) { |
64 | - CalcMode::Native => (string)$this->arcsecNative(), |
|
64 | + CalcMode::Native => (string) $this->arcsecNative(), |
|
65 | 65 | default => $this->arcsecScale($scale) |
66 | 66 | }; |
67 | 67 | } |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | $calcMode = $this->getMode(); |
76 | 76 | |
77 | 77 | return match ($calcMode) { |
78 | - CalcMode::Native => (string)$this->arccscNative(), |
|
78 | + CalcMode::Native => (string) $this->arccscNative(), |
|
79 | 79 | default => $this->arccscScale($scale) |
80 | 80 | }; |
81 | 81 | } |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | $calcMode = $this->getMode(); |
90 | 90 | |
91 | 91 | return match ($calcMode) { |
92 | - CalcMode::Native => (string)$this->arccotNative(), |
|
92 | + CalcMode::Native => (string) $this->arccotNative(), |
|
93 | 93 | default => $this->arccotScale($scale) |
94 | 94 | }; |
95 | 95 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * @param DecimalInterface $num |
16 | 16 | * @return float|int |
17 | 17 | */ |
18 | - abstract protected static function translateToNative(DecimalInterface $num): float|int; |
|
18 | + abstract protected static function translateToNative(DecimalInterface $num): float | int; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * @return float |
@@ -41,7 +41,7 @@ |
||
41 | 41 | * @return bool |
42 | 42 | * @throws IntegrityConstraint |
43 | 43 | */ |
44 | - public function isEqual(NumberInterface|int|string|float $value): bool |
|
44 | + public function isEqual(NumberInterface | int | string | float $value): bool |
|
45 | 45 | { |
46 | 46 | |
47 | 47 | $check = $this->checkComparisonTraitAndInterface(); |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * @param DecimalInterface $num |
16 | 16 | * @return int|float |
17 | 17 | */ |
18 | - protected static function translateToNative(DecimalInterface $num): int|float |
|
18 | + protected static function translateToNative(DecimalInterface $num): int | float |
|
19 | 19 | { |
20 | 20 | return ($num->isInt() ? $num->asInt() : $num->asFloat()); |
21 | 21 | } |
@@ -24,74 +24,74 @@ discard block |
||
24 | 24 | * @param DecimalInterface $num |
25 | 25 | * @return int|float |
26 | 26 | */ |
27 | - protected function addNative(DecimalInterface $num): int|float |
|
27 | + protected function addNative(DecimalInterface $num): int | float |
|
28 | 28 | { |
29 | 29 | $left = self::translateToNative($this); |
30 | 30 | $right = self::translateToNative($num); |
31 | 31 | |
32 | - $value = $left + $right; |
|
33 | - return (string)$value; |
|
32 | + $value = $left+$right; |
|
33 | + return (string) $value; |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |
37 | 37 | * @param DecimalInterface $num |
38 | 38 | * @return int|float |
39 | 39 | */ |
40 | - protected function subtractNative(DecimalInterface $num): int|float |
|
40 | + protected function subtractNative(DecimalInterface $num): int | float |
|
41 | 41 | { |
42 | 42 | $left = self::translateToNative($this); |
43 | 43 | $right = self::translateToNative($num); |
44 | 44 | |
45 | - $value = $left - $right; |
|
46 | - return (string)$value; |
|
45 | + $value = $left-$right; |
|
46 | + return (string) $value; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
50 | 50 | * @param DecimalInterface $num |
51 | 51 | * @return int|float |
52 | 52 | */ |
53 | - protected function multiplyNative(DecimalInterface $num): int|float |
|
53 | + protected function multiplyNative(DecimalInterface $num): int | float |
|
54 | 54 | { |
55 | 55 | $left = self::translateToNative($this); |
56 | 56 | $right = self::translateToNative($num); |
57 | 57 | |
58 | - $value = $left * $right; |
|
59 | - return (string)$value; |
|
58 | + $value = $left*$right; |
|
59 | + return (string) $value; |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
63 | 63 | * @param DecimalInterface $num |
64 | 64 | * @return int|float |
65 | 65 | */ |
66 | - protected function divideNative(DecimalInterface $num): int|float |
|
66 | + protected function divideNative(DecimalInterface $num): int | float |
|
67 | 67 | { |
68 | 68 | $left = self::translateToNative($this); |
69 | 69 | $right = self::translateToNative($num); |
70 | 70 | |
71 | - $value = $left / $right; |
|
72 | - return (string)$value; |
|
71 | + $value = $left/$right; |
|
72 | + return (string) $value; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | 76 | * @param DecimalInterface $num |
77 | 77 | * @return int|float |
78 | 78 | */ |
79 | - protected function powNative(DecimalInterface $num): int|float |
|
79 | + protected function powNative(DecimalInterface $num): int | float |
|
80 | 80 | { |
81 | 81 | $left = self::translateToNative($this); |
82 | 82 | $right = self::translateToNative($num); |
83 | 83 | |
84 | 84 | $value = pow($left, $right); |
85 | - return (string)$value; |
|
85 | + return (string) $value; |
|
86 | 86 | } |
87 | 87 | |
88 | 88 | /** |
89 | 89 | * @return int|float |
90 | 90 | */ |
91 | - protected function sqrtNative(): int|float |
|
91 | + protected function sqrtNative(): int | float |
|
92 | 92 | { |
93 | 93 | $value = sqrt($this->asFloat()); |
94 | - return (string)$value; |
|
94 | + return (string) $value; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | } |
98 | 98 | \ No newline at end of file |