Pow

Pow( value, exponent)
Pow( value, exponent)
Pow( value, exponent)
Pow( value, exponent)
pow( value, exponent)
Pow( value, exponent)

Description

The Pow function raises its first numeric argument, the base, to the power of its second numeric argument, the exponent.

Parameters

Parameter Type Definition and Requirements

base

Number

The base.

exponent

Number

The exponent.

Returns

The result of raising a number (base) to the power of another number (exponent).

Examples

try
{
    Value result = await client.Query(
        Arr(
            Pow(2, 3),
            Pow(5, 2)
        )
    );

    Console.WriteLine(result);
}
catch (Exception e)
{
    Console.WriteLine($"ERROR: {e.Message}");
}
Arr(DoubleV(8), DoubleV(25))
result, err := client.Query(
	f.Arr{
		f.Pow(2, 3),
		f.Pow(5, 2),
	})

if err != nil {
	fmt.Fprintln(os.Stderr, err)
} else {
	fmt.Println(result)
}
[8 25]
System.out.println(
    client.query(
        Arr(
            Pow(Value(2), Value(3)),
            Pow(Value(5), Value(2))
        )
    ).get());
[8.0, 25.0]
client.query(
  [
    q.Pow(2, 3),
    q.Pow(5, 2),
  ]
)
.then((ret) => console.log(ret))
.catch((err) => console.error(
  'Error: [%s] %s: %s',
  err.name,
  err.message,
  err.errors()[0].description,
))
[ 8, 25 ]
result = client.query(
  [
    q.pow(2, 3),
    q.pow(5, 2),
  ]
)
print(result)
[8.0, 25.0]
[
  Pow(2, 3),
  Pow(5, 2),
]
[ 8, 25 ]
Query metrics:
  •    bytesIn:  37

  •   bytesOut:  23

  • computeOps:   1

  •    readOps:   0

  •   writeOps:   0

  •  readBytes:   0

  • writeBytes:   0

  •  queryTime: 5ms

  •    retries:   0

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!