0.0.0 • Published 5 years ago

the-module v0.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

modular-power Travis CI Build Status

Find the modulo of a number raised to a power. Similar to the pow() function in Python.

NPM Badge

Install

npm install modular-power

Usage

const modularPower = require("modular-power")

modularPower(2, 3, 3)
//=> 2

modularPower(2, 3, 5)
//=> 3

API

modularPower(base, exponent, modulo)

base

Type: number

The base number to get the exponent of.

exponent

Type: number

The exponent to apply to the base.

modulo

Type: number

The modulus to apply to the exponent of the base.