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

Argument 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

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

Console.WriteLine(result);
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', err))
[ 8, 25 ]
result = client.query(
  [
    q.pow(2, 3),
    q.pow(5, 2),
  ]
)
print(result)
[8.0, 25.0]
println(Await.result(
  client.query(
    Arr(
      Pow(2, 3),
      Pow(5, 2)
    )
  ),
  5.seconds
))
[8.0, 25.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!