numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Namespace of classes of numbers. More...
Namespaces | |
namespace | impl |
Namespace of internal implementations. | |
Classes | |
class | custom_float |
Class of floating numbers in a custom number system with given radix. More... | |
class | fraction |
Class of fractions. More... | |
Functions | |
template<num_collect::base::concepts::integral Integer> | |
constexpr auto | operator* (const fraction< Integer > &left, const fraction< Integer > &right) -> fraction< Integer > |
Multiply two fractions. | |
template<num_collect::base::concepts::integral Integer> | |
constexpr auto | operator+ (const fraction< Integer > &left, const fraction< Integer > &right) -> fraction< Integer > |
Add two fractions. | |
template<num_collect::base::concepts::integral Integer> | |
constexpr auto | operator- (const fraction< Integer > &left, const fraction< Integer > &right) -> fraction< Integer > |
Subtract a fraction from another fraction. | |
template<num_collect::base::concepts::integral Integer> | |
constexpr auto | operator/ (const fraction< Integer > &left, const fraction< Integer > &right) -> fraction< Integer > |
Divide a fraction by another fraction. | |
template<num_collect::base::concepts::integral Integer> | |
auto | operator<< (std::ostream &stream, const fraction< Integer > &val) -> std::ostream & |
Format a fraction. | |
Namespace of classes of numbers.
|
constexpr |
Multiply two fractions.
Integer | Type of integers in the fractions. |
[in] | left | Left-hand-side value. |
[in] | right | Right-hand-side value. |
Definition at line 331 of file fraction.h.
|
constexpr |
Add two fractions.
Integer | Type of integers in the fractions. |
[in] | left | Left-hand-side value. |
[in] | right | Right-hand-side value. |
Definition at line 303 of file fraction.h.
|
constexpr |
Subtract a fraction from another fraction.
Integer | Type of integers in the fractions. |
[in] | left | Left-hand-side value. |
[in] | right | Right-hand-side value. |
Definition at line 317 of file fraction.h.
|
constexpr |
Divide a fraction by another fraction.
Integer | Type of integers in the fractions. |
[in] | left | Left-hand-side value. |
[in] | right | Right-hand-side value. |
Definition at line 345 of file fraction.h.
|
inline |
Format a fraction.
Integer | Type of integers in the fraction. |
[in] | stream | Output stream. |
[in] | val | Fraction value. |
Definition at line 400 of file fraction.h.