cppx-core
Namespaces | Functions
floating-point-operations.hpp File Reference

Useful common “calculator” operations: intpow, squared and cubed. More...

#include <cppx-core/language/calc/integer-operations.hpp>
#include <cppx-core/language/syntax/macro-use.hpp>
Include dependency graph for floating-point-operations.hpp:

Go to the source code of this file.

Namespaces

 cppx
 
 cppx::calc
 Functions and constants typically available on a scientific calculator, but somehow missing from the standard library.
 

Functions

template<class Number = double>
auto cppx::intpow (const Number base, const int exponent) -> Number
 Efficient x to the n'th power, when n is an integer. More...
 
auto cppx::squared (const double x) -> double
 The square (second power) of the argument. More...
 
auto cppx::cubed (const double x) -> double
 The cube (third power) of the argument. More...
 
 cppx::calc::CPPX_USE_CPPX (intpow, squared, cubed)
 

Detailed Description

Useful common “calculator” operations: intpow, squared and cubed.

Definition in file floating-point-operations.hpp.