#include <cassert>#include <cmath>#include <iomanip>#include <ios>#include <istream>#include <locale>#include <ostream>#include <sstream>#include <stdexcept>#include <string>#include "ioflags.hpp"#include "power10.hpp"Go to the source code of this file.
Classes | |
| class | fixed< T, N > |
Implement a fixed-point number class template. Values have N places after the decimal point. All arithmetic follows the usual rules. More... | |
Functions | |
| template<class T, int N, class Char, class Traits> | |
| std::basic_istream < Char, Traits > & | operator>> (std::basic_istream< Char, Traits > &strm, fixed< T, N > &f) |
| template<class T, int N, class Char, class Traits> | |
| std::basic_ostream < Char, Traits > & | operator<< (std::basic_ostream< Char, Traits > &strm, fixed< T, N > f) |
| template<class T, int N> | |
| fixed< T, N > | operator+ (fixed< T, N > a, fixed< T, N > b) |
| template<class T, int N> | |
| fixed< T, N > | operator+ (fixed< T, N > a, T b) |
| template<class T, int N> | |
| fixed< T, N > | operator+ (T a, fixed< T, N > b) |
| template<class T, int N> | |
| fixed< T, N > | operator- (fixed< T, N > a, fixed< T, N > b) |
| template<class T, int N> | |
| fixed< T, N > | operator- (fixed< T, N > a, T b) |
| template<class T, int N> | |
| fixed< T, N > | operator- (T a, fixed< T, N > b) |
| template<class T, int N> | |
| fixed< T, N > | operator * (fixed< T, N > a, fixed< T, N > b) |
| template<class T, int N> | |
| fixed< T, N > | operator * (fixed< T, N > a, T b) |
| template<class T, int N> | |
| fixed< T, N > | operator * (T a, fixed< T, N > b) |
| template<class T, int N> | |
| fixed< T, N > | operator/ (fixed< T, N > a, fixed< T, N > b) |
| template<class T, int N> | |
| fixed< T, N > | operator/ (fixed< T, N > a, T b) |
| template<class T, int N> | |
| fixed< T, N > | operator/ (T a, fixed< T, N > b) |
| template<class T, int N> | |
| fixed< T, N > | operator- (fixed< T, N > a) |
| template<class T, int N> | |
| bool | operator== (fixed< T, N > a, fixed< T, N > b) |
| template<class T, int N> | |
| bool | operator== (T a, fixed< T, N > b) |
| template<class T, int N> | |
| bool | operator== (fixed< T, N > a, T b) |
| template<class T, int N> | |
| bool | operator!= (fixed< T, N > a, fixed< T, N > b) |
| template<class T, int N> | |
| bool | operator!= (T a, fixed< T, N > b) |
| template<class T, int N> | |
| bool | operator!= (fixed< T, N > a, T b) |
| template<class T, int N> | |
| bool | operator< (fixed< T, N > a, fixed< T, N > b) |
| template<class T, int N> | |
| bool | operator< (T a, fixed< T, N > b) |
| template<class T, int N> | |
| bool | operator< (fixed< T, N > a, T b) |
| template<class T, int N> | |
| bool | operator> (fixed< T, N > a, fixed< T, N > b) |
| template<class T, int N> | |
| bool | operator> (T a, fixed< T, N > b) |
| template<class T, int N> | |
| bool | operator> (fixed< T, N > a, T b) |
| template<class T, int N> | |
| bool | operator<= (fixed< T, N > a, fixed< T, N > b) |
| template<class T, int N> | |
| bool | operator<= (T a, fixed< T, N > b) |
| template<class T, int N> | |
| bool | operator<= (fixed< T, N > a, T b) |
| template<class T, int N> | |
| bool | operator>= (fixed< T, N > a, fixed< T, N > b) |
| template<class T, int N> | |
| bool | operator>= (T a, fixed< T, N > b) |
| template<class T, int N> | |
| bool | operator>= (fixed< T, N > a, T b) |
Definition in file fixed.hpp.
| bool operator!= | ( | fixed< T, N > | a, | |
| T | b | |||
| ) | [inline] |
| bool operator!= | ( | T | a, | |
| fixed< T, N > | b | |||
| ) | [inline] |
Negate a fixed value
| a | The value to negate |
Definition at line 518 of file fixed.hpp.
References fixed< T, N >::negate().
| bool operator< | ( | fixed< T, N > | a, | |
| T | b | |||
| ) | [inline] |
| bool operator< | ( | T | a, | |
| fixed< T, N > | b | |||
| ) | [inline] |
| std::basic_ostream<Char, Traits>& operator<< | ( | std::basic_ostream< Char, Traits > & | strm, | |
| fixed< T, N > | f | |||
| ) | [inline] |
| bool operator<= | ( | fixed< T, N > | a, | |
| T | b | |||
| ) | [inline] |
| bool operator<= | ( | T | a, | |
| fixed< T, N > | b | |||
| ) | [inline] |
| bool operator== | ( | fixed< T, N > | a, | |
| T | b | |||
| ) | [inline] |
Compare a fixed value and an integer for equality
| a | The left-hand operand | |
| b | The right-hand operand |
Definition at line 544 of file fixed.hpp.
References fixed< T, N >::value().
| bool operator== | ( | T | a, | |
| fixed< T, N > | b | |||
| ) | [inline] |
Compare a fixed value and an integer for equality
| a | The left-hand operand | |
| b | The right-hand operand |
Definition at line 536 of file fixed.hpp.
References fixed< T, N >::value().
Compare fixed values for equality by comparing the underlying values.
| a | The left-hand operand | |
| b | The right-hand operand |
Definition at line 528 of file fixed.hpp.
References fixed< T, N >::value().
| bool operator> | ( | fixed< T, N > | a, | |
| T | b | |||
| ) | [inline] |
| bool operator> | ( | T | a, | |
| fixed< T, N > | b | |||
| ) | [inline] |
| bool operator>= | ( | fixed< T, N > | a, | |
| T | b | |||
| ) | [inline] |
| bool operator>= | ( | T | a, | |
| fixed< T, N > | b | |||
| ) | [inline] |
| std::basic_istream<Char, Traits>& operator>> | ( | std::basic_istream< Char, Traits > & | strm, | |
| fixed< T, N > & | f | |||
| ) | [inline] |
Read a fixed value
| strm | The input stream | |
| f | The result |
Definition at line 377 of file fixed.hpp.
References fixed< T, N >::read().
1.5.3