Movatterモバイル変換


[0]ホーム

URL:


PHP 8.5.0 Alpha 2 available for testing
    hexdec »
    « fmod

    fpow

    (PHP 8 >= 8.4.0)

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

    Description

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

    Returns the floating point result of raisingnum to the power ofexponent. Ifnum is zero andexponent is less than zero, thenINF is returned.

    Parameters

    num
    The base to use.
    exponent
    The exponent.

    Return Values

    Returns afloat corresponding to$num$exponent.

    Examples

    Example #1fpow() example

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

    The above example will output:

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

    See Also

    • Exponentiation operator**
    • pow() - Exponential expression
    • fdiv() - Divides two numbers, according to IEEE 754
    • fmod() - Returns the floating point remainder (modulo) of the division of the arguments

    Found A Problem?

    Learn How To Improve This PageSubmit a Pull RequestReport a Bug
    add a note

    User Contributed Notes

    There are no user contributed notes for this page.
    To Top
    and to navigate •Enter to select •Esc to close
    PressEnter without selection to search using Google

    [8]ページ先頭

    ©2009-2025 Movatter.jp