array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'function.fpow.php', 1 => 'fpow', 2 => 'Raise one number to the power of another, according to IEEE 754', ), 'up' => array ( 0 => 'ref.math.php', 1 => 'Math Funzioni', ), 'prev' => array ( 0 => 'function.fmod.php', 1 => 'fmod', ), 'next' => array ( 0 => 'function.hexdec.php', 1 => 'hexdec', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/math/functions/fpow.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

fpow

(PHP 8 >= 8.4.0)

fpowRaise one number to the power of another, according to IEEE 754

Descrizione

fpow(float $num, float $exponent): float

Returns the floating point result of raising num to the power of exponent. If num is zero and exponent is less than zero, then INF is returned.

Elenco dei parametri

num
The base to use.
exponent
The exponent.

Valori restituiti

Returns a float corresponding to $num$exponent.

Esempi

Example #1 fpow() example

<?php
var_dump
(fpow(10, 2));
var_dump(fpow(0, -3));
var_dump(fpow(-1, 5.5));
?>

Il precedente esempio visualizzerĂ :

float(100)
float(INF)
float(NAN)

Vedere anche: