** Exponentiation

 **
 Exponentiation--binary                          (Mathematical)
------------------------------------------------------------------------------
 Syntax

     <nNumber1> ** <nNumber2>
     <nNumber1> ^  <nNumber2>

 Type

     Numeric

 Operands

     <nNumber1> is the numeric value to raise to a power.

     <nNumber2> is the power to raise <nNumber1>.

 Description

     The exponentiation operator (**) is a binary operator that raises
     <nNumber1> to the power of <nNumber2>.

 Examples

     .  This example shows exponentiation results to 16 decimal
        places, using different operands:

        SET DECIMALS TO 16
        ?  3 **  0            // Result:  1.000000000
        ?  3 **  1            // Result:  3.000000000
        ?  3 ** -2            // Result:  0.111111111
        ? -3 **  2            // Result:  9.000000000
        ? -3 **  0            // Result:  1.000000000
        ? -1 **  3            // Result: -1.000000000
        ? -2 **  3            // Result: -8.000000000
        ?  2 ** -3            // Result:  0.125000000
        ?  1 ** -3            // Result:  1.000000000

See Also: % * + – / = (compound) SET DECIMALS SET FIXED

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.