MLIB
Loading...
Searching...
No Matches
ipow.h File Reference

Integer exponentiation function template. More...

#include <assert.h>

Go to the source code of this file.

Functions

template<typename T >
mlib::ipow (T base, int exp)
 Integer exponentiation function.
 
template<>
double mlib::ipow (double base, int exp)
 Specialization for double, can handle negative exponents.
 
template<typename T >
mlib::squared (T base)
 Return squared value of argument: baseĀ²
 
template<typename T >
mlib::cubed (T base)
 Return the cubed value of argument: baseĀ³
 

Detailed Description

Integer exponentiation function template.