Claw  1.7.3
Classes | Namespaces | Functions
real_number.hpp File Reference

Custom precision real numbers. More...

#include <iostream>
#include <limits>
#include "claw/impl/real_number.tpp"

Go to the source code of this file.

Classes

struct  claw::make_epsilon< T >
 This class generates an epsilon value of a given precision. More...
class  claw::real_number< T >
 Custom precision real numbers. More...
struct  std::numeric_limits< claw::real_number< T > >

Namespaces

namespace  claw
 This is the main namespace.

Functions

template<typename T >
std::istream & operator>> (std::istream &is, claw::real_number< T > &self)
 Read a number from a stream.
template<typename T >
claw::real_number< T > std::abs (const claw::real_number< T > &v)
 Get the absolute value of a number.
template<typename T >
claw::real_number< T > operator- (const claw::real_number< T > &self)
 Get the opposite value of a number.
template<typename T >
claw::real_number< T > operator- (T v, const claw::real_number< T > &self)
 Subtract a number to an other value.
template<typename T >
std::ostream & operator<< (std::ostream &os, const claw::real_number< T > &self)
 Output a number in a stream.

Detailed Description

Custom precision real numbers.

Author
Julien Jorge

Definition in file real_number.hpp.

Function Documentation

template<typename T >
claw::real_number<T> operator- ( const claw::real_number< T > &  self)

Get the opposite value of a number.

Parameters
selfThe number.

Definition at line 303 of file real_number.tpp.

template<typename T >
claw::real_number<T> operator- ( v,
const claw::real_number< T > &  self 
)

Subtract a number to an other value.

Parameters
vThe other value.
selfThe number.

Definition at line 315 of file real_number.tpp.

template<typename T >
std::ostream& operator<< ( std::ostream &  os,
const claw::real_number< T > &  self 
)

Output a number in a stream.

Parameters
osThe stream in which the value is written.
selfThe number.

Definition at line 327 of file real_number.tpp.

References claw::real_number< T >::output().

template<typename T >
std::istream& operator>> ( std::istream &  is,
claw::real_number< T > &  self 
)

Read a number from a stream.

Parameters
isThe stream from which the value is read.
selfThe number.

Definition at line 339 of file real_number.tpp.