php man page for gmp_pow

Query: gmp_pow

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

GMP_POW(3)								 1								GMP_POW(3)

gmp_pow - Raise number into power

SYNOPSIS
GMP gmp_pow (GMP $base, int $exp)
DESCRIPTION
Raise $base into power $exp.
PARAMETERS
o $base - The base number. Either a GMP number resource in PHP 5.5 and earlier, a GMP object in PHP 5.6 and later, or a numeric string provided that it is possible to convert the latter to a number. o $exp - The positive power to raise the $base.
RETURN VALUES
The new (raised) number, as a GMP number. The case of 0^0 yields 1.
EXAMPLES
Example #1 gmp_pow(3) example <?php $pow1 = gmp_pow("2", 31); echo gmp_strval($pow1) . " "; $pow2 = gmp_pow("0", 0); echo gmp_strval($pow2) . " "; $pow3 = gmp_pow("2", -1); // Negative exp, generates warning echo gmp_strval($pow3) . " "; ?> The above example will output: 2147483648 1 PHP Documentation Group GMP_POW(3)
Related Man Pages
gmp_clrbit(3) - php
gmp_div_qr(3) - php
gmp_div_r(3) - php
gmp_gcdext(3) - php
gmp_init(3) - php
Similar Topics in the Unix Linux Community
Simple rules of the UNIX.COM forums:
User Guide: Posting in the Emergency Forum
Forum Video Tutorial: How to Use Code Tags
Please Welcome Don Cragun as Lead Moderator
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun