Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Calculator.php

function Calculator::modPow

Raises a number into power with modulo.

Parameters

string $base The base number; must be positive or zero.:

string $exp The exponent; must be positive or zero.:

string $mod The modulus; must be strictly positive.:

3 methods override Calculator::modPow()
BcMathCalculator::modPow in vendor/brick/math/src/Internal/Calculator/BcMathCalculator.php
Raises a number into power with modulo.
GmpCalculator::modPow in vendor/brick/math/src/Internal/Calculator/GmpCalculator.php
Raises a number into power with modulo.
NativeCalculator::modPow in vendor/brick/math/src/Internal/Calculator/NativeCalculator.php
Algorithm from: https://www.geeksforgeeks.org/modular-exponentiation-power-in-modular-a…

File

vendor/brick/math/src/Internal/Calculator.php, line 261

Class

Calculator
Performs basic operations on arbitrary size integers.

Namespace

Brick\Math\Internal

Code

public abstract function modPow(string $base, string $exp, string $mod) : string;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal