maTH
  • 👋Welcome!
  • 🗿Installation
  • Reference
    • 😱Mathematical operations
      • add
      • pascal
      • factorial
      • factorialL
      • GCD
      • LCM
      • pow
      • permutations
      • combinations
      • combinationsWithRep
      • subtract
      • multiply
      • divide
      • sin
      • cos
      • ln
      • log
      • radToDeg
      • degToRad
      • mod
      • abs
      • floor
      • ceil
      • root
      • exp
      • tan
      • arcsin
      • arccos
      • arctan
      • sinh
      • cosh
      • round
    • 🥶Statistics
      • Binomial
      • Poisson
      • Geometric
      • Pascal
      • Hypergeometric
      • Exponential
      • Uniform
    • 🥵Data structures
      • Stack
      • Queue
      • LinkedList
    • 🤓Algorithms
      • Bubble sort
      • Insertion sort
      • Selection sort
      • Merge sort
      • Quicksort
      • Heap sort
      • Count sort
      • Bucket sort
      • Radix sort
    • 😳Constants
Powered by GitBook
On this page
  1. Reference
  2. Mathematical operations

pow

Calculate the raising of a base number to the exponent power

int pow(int a, int n);
double pow(double a, int n);
double pow(int a, double n);
double pow(double a, double n);

will return the power function of the two given numbers. Depending on the function overloads, it can either return an integer if both arguments data types are an integer, or a double in every other scenario.

pow(2, 4); //16
pow(7.89, 3); //491.169
pow(5, 2.52); //57.7304
pow(5.12, 3.77); //472.006
PreviousLCMNextpermutations

Last updated 11 months ago

😱