fennec
Loading...
Searching...
No Matches
Exponential

The Exponential Functions defined in the OpenGL 4.6 Shading Language Specification.

Exponential Functions

Syntax Description

genFType pow(genFType x, genFType y)

Returns
\(x\) raised to the \(y\) power, i.e., \(x^y\).

Results are undefined if \(x<0\).

Results are undefined if \(x=0\) and \({y}\le{0}\).

Parameters
xthe base
ythe exponent

genFType exp(genFType x)

Returns
the natural exponentiation of \(x\), i.e., \(e^x\).

Parameters
xthe exponent

genFType exp2(genFType x)

Returns
2 raised to the \(x\) power, i.e., \(e^x\)

Parameters
xthe exponent

genFType log(genFType x)

Returns
the natural logarithm of \(x\), i.e., returns the value \(y\) which satisfies the equation \(x=e^y\).

Results are undefined if \({x}\le{0}\).

Parameters
xthe input value

genFType log2(genFType x)

Returns
the base 2 logarithm of \(x\), i.e., returns the value \(y\) which satisfies the equation \(x=2^y\).

Results are undefined if \({x}\le{0}\).

Parameters
xthe input value

genFType sqrt(genFType x)

Returns
\(\sqrt{x}\).

Results are undefined if \(x<0\)

Parameters
xthe input value

genFType inversesqrt(genFType x)

Returns
\(\frac{1}{\sqrt{x}}\).

Results are undefined if \(x<0\).

Parameters
xthe input value