aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/brick/math/src/BigInteger.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-11 18:18:57 +0000
committerMario <mario@mariovavti.com>2022-10-11 18:18:57 +0000
commit5e5f0aa955d86743a14531bed98501b59140ab1f (patch)
treef8a7bbff876adf28d03cc005b8e0a0602886ffc8 /vendor/brick/math/src/BigInteger.php
parentf9a4c53e3feb07e5319b110b25b4746ae839c420 (diff)
downloadvolse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.tar.gz
volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.tar.bz2
volse-hubzilla-5e5f0aa955d86743a14531bed98501b59140ab1f.zip
update composer libs
Diffstat (limited to 'vendor/brick/math/src/BigInteger.php')
-rw-r--r--vendor/brick/math/src/BigInteger.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/vendor/brick/math/src/BigInteger.php b/vendor/brick/math/src/BigInteger.php
index f213fbedb..f58e1c595 100644
--- a/vendor/brick/math/src/BigInteger.php
+++ b/vendor/brick/math/src/BigInteger.php
@@ -26,10 +26,8 @@ final class BigInteger extends BigNumber
*
* No leading zeros must be present.
* No leading minus sign must be present if the number is zero.
- *
- * @var string
*/
- private $value;
+ private string $value;
/**
* Protected constructor. Use a factory method to obtain an instance.
@@ -361,6 +359,21 @@ final class BigInteger extends BigNumber
return $ten;
}
+ public static function gcdMultiple(BigInteger $a, BigInteger ...$n): BigInteger
+ {
+ $result = $a;
+
+ foreach ($n as $next) {
+ $result = $result->gcd($next);
+
+ if ($result->isEqualTo(1)) {
+ return $result;
+ }
+ }
+
+ return $result;
+ }
+
/**
* Returns the sum of this number and the given one.
*