# GroupMetaprogramming Math Metafunctions for mathematical computations.

## Grouped Metafunction Overview

• `__uint64 Log2<NUMERUS>::VALUE;`
Compute ceiled logarithm to base 2 using metaprogramming.
• `__uint64 Log2Floor<NUMERUS>::VALUE;`
Compute floored logarithm to base 2 using metaprogramming.
• `__uint64 Power<BASE, EXPONENT>::VALUE;`
Compute power of a number.

## Grouped Metafunctions Detail

### `__uint64 Log2<NUMERUS>::VALUE;`

Compute ceiled logarithm to base 2 using metaprogramming.

#### Template Parameters

`NUMERUS` __int64 value to use for the numerus.

#### Returns

`__uint64` ceil(log2(NUMERUS))

#### Example

```    std::cout << Log2<10>::VALUE << "\n";  // => "4"
```

### `__uint64 Log2Floor<NUMERUS>::VALUE;`

Compute floored logarithm to base 2 using metaprogramming.

#### Template Parameters

`NUMERUS` __int64 value to use for the numerus.

#### Returns

`__uint64` floor(log2(NUMERUS))

#### Example

```    std::cout << Log2Floor<10>::VALUE << "\n";  // => "3""
```

### `__uint64 Power<BASE, EXPONENT>::VALUE;`

Compute power of a number.

#### Template Parameters

`BASE` The base of the term (__int64). The exponent of the term (__int64).

#### Returns

`__uint64` be
```    std::cout << Power<2, 4>::VALUE << "\n";  // => "16"
```