cxxomfort  rel.20211024
Simple backports for C++ - https://ryan.gulix.cl/fossil.cgi/cxxomfort/
Namespaces | Functions
math.hpp File Reference

Math functions particular to cxxomfort. More...

Namespaces

 cxxomfort
 Namespace of the cxxomfort library.
 

Functions

template<typename N >
CXXO_CONSTEXPR int sign (N n) CXXO_NOEXCEPTNOTHROW
 Returns the sign of n . More...
 
template<typename I >
uintmax_t factors (I n, uintmax_t f) CXXO_NOEXCEPTNOTHROW
 Returns the number of times that f appears as factor of n . More...
 

Detailed Description

Math functions particular to cxxomfort.

Function Documentation

◆ sign()

CXXO_CONSTEXPR int cxxomfort::impl::sign ( n)

Returns the sign of n .

Precondition
n is of a real-like type.

Referenced by cxxomfort::impl::sign().

◆ factors()

uintmax_t cxxomfort::impl::factors ( n,
uintmax_t  f 
)

Returns the number of times that f appears as factor of n .

Precondition
n is of integer-like type; n > 0; f > 1

Referenced by cxxomfort::impl::factors().