PrevUpHomeNext

utx::pow2/3/5/7


utx::pow2, utx::pow3, utx::pow5, utx::pow7

utx::pow2 is an object of the class utx::pow2_class.

utx::pow3 is an object of the class utx::pow3_class.

utx::pow5 is an object of the class utx::pow5_class.

utx::pow7 is an object of the class utx::pow7_class.

Calculate the result of 2,3,5,7 to the power of base.

The result type is the same as base type.

constexpr support.

Calling Sig

constexpr auto result1 = utx::pow2(base_value);

constexpr auto result2 = utx::pow3(base_value);

constexpr auto result3 = utx::pow5(base_value);

constexpr auto result4 = utx::pow7(base_value);

Header

#include <utxcpp/math.hpp>

Example

#include <utxcpp/math.hpp>
#include <utxcpp/core.hpp>

int main()
{
	constexpr auto x = utx::pow3(10); // 1000
	constexpr auto y = utx::pow3(10.0f, 3); // 1000.0f
	utx::print(x, y);
}

See Also

utx::npow

utx::print


PrevUpHomeNext

utx::print

esv::print