C++ Math functions

Header file

functions built into c++ library.

#include <cmath>

example functions

std::floor and std::ceil

std::abs

std::exp

std::pow

std::log and std::log10

log is the reverse function of power.

  • log – by default compute the log in base e.
  • log10 – computes the log against base 10.

std::sqrt

to calculate square root

std::round