Public Member Functions | Public Attributes

dyadic Class Reference

A dyadic number. More...

#include <dyadic.h>

Inheritance diagram for dyadic:
dyadic_interval

List of all members.

Public Member Functions

 dyadic (const int k1, const int n1)
 operator double () const
 Conversion to double.
 dyadic (const double Arg, const unsigned int RelativeTolerance=1024)
dyadicmove_forward (const unsigned int Arg)
 Move from k/2^n -> (k + Arg)/2^n.
dyadicoperator++ ()
 The next dyadic time prefix.
dyadic operator++ (int)
 The next dyadic time postfix.
dyadicoperator-- ()
 The previous dyadic time prefix.
dyadic operator-- (int)
 The previous dyadic time postfix.
dyadic operator+ (const dyadic &Arg) const
 Arithmetic operators.
dyadicoperator+= (const dyadic &Arg)
dyadic operator- (const dyadic &Arg) const
dyadicoperator-= (const dyadic &Arg)
bool operator< (const dyadic &Arg) const
bool operator> (const dyadic &Arg) const

Public Attributes

int k
 The numerator.
int n
 2^n is the denominator.

Detailed Description

A dyadic number.

Class to hold a dyadic number with functionality to produce dyadics from doubles, standard arithmetic and more.


Constructor & Destructor Documentation

dyadic::dyadic ( const double  Arg,
const unsigned int  RelativeTolerance = 1024 
) [inline, explicit]

Explicit construction that when given a double, returns a dyadic accurate to tolerance sig bits and with absolute value just larger than that of the double; 0 returns 0/2^INT_MAX.


The documentation for this class was generated from the following file: