Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))

Pow Function

Class

System.Math

Syntax

Dim result As Double = Math.Pow(x, y)

x (required; Double)

The base number to be raised to a power

y (required; Double)

The exponent by which to raise the base number

Description

The Pow function returns the base x raised to the power (exponent) y.

Usage at a Glance

  • This is a shared member of the System.Math class, so it can be used without an instance.

  • Visual Basic also includes an intrinsic ^ exponentiation operator that performs the same function.

Version Differences

The Pow function did not exist in VB 6.

See Also

Exp Function

Категории