Givaro 4.2.1
Rational Class Reference

Rationals. No doc. More...

#include <givrational.h>

Public Types

enum  ReduceFlag { Reduce = 0x1 , NoReduce = 0x0 }
 

Public Member Functions

 Rational (Neutral n=Neutral::zero)
 
 Rational (int32_t n)
 
 Rational (uint32_t n)
 
 Rational (int64_t n)
 
 Rational (uint64_t n)
 
 Rational (int64_t n, int64_t d)
 
 Rational (uint64_t n, uint64_t d)
 
 Rational (int32_t n, int32_t d)
 
 Rational (uint32_t n, uint32_t d)
 
 Rational (double x)
 
 Rational (const char *s)
 
 Rational (const Integer &n)
 
 Rational (const Integer &n, const Integer &d, int red=1)
 
 Rational (const Integer &f, const Integer &m, const Integer &k, bool recurs=false)
 Rational number reconstruction.
 
 Rational (const Rational &)
 
Rationaloperator= (const Rational &)
 
Rationallogcpy (const Rational &)
 
Rationalcopy (const Rational &)
 
Rational operator+ (const Rational &r) const
 
Rational operator- (const Rational &r) const
 
Rational operator- () const
 
Rational operator+ () const
 
Rational operator* (const Rational &r) const
 
Rational operator/ (const Rational &r) const
 
Rationaloperator+= (const Rational &r)
 
Rationaloperator-= (const Rational &r)
 
Rationaloperator*= (const Rational &r)
 
Rationaloperator/= (const Rational &r)
 
Integer operator% (const Integer &r) const
 
const Integer nume () const
 
const Integer deno () const
 
std::ostream & print (std::ostream &o) const
 
Rational reduce (const Rational &R) const
 
 operator short () const
 
 operator uint16_t () const
 
 operator uint8_t () const
 
 operator uint32_t () const
 
 operator int () const
 
 operator signed char () const
 
 operator uint64_t () const
 
 operator int64_t () const
 
 operator std::string () const
 
 operator float () const
 
 operator double () const
 
 Rational (givNoInit)
 

Static Public Member Functions

static void SetReduce ()
 
static void SetNoReduce ()
 
static bool ratrecon (Integer &num, Integer &den, const Integer &f, const Integer &m, const Integer &k, bool forcereduce=true, bool recurs=true)
 
static bool RationalReconstruction (Integer &num, Integer &den, const Integer &f, const Integer &m)
 
static bool RationalReconstruction (Integer &num, Integer &den, const Integer &f, const Integer &m, const Integer &numbound, bool forcereduce=true, bool recursive=true)
 
static bool RationalReconstruction (Integer &num, Integer &den, const Integer &f, const Integer &m, const Integer &numbound, const Integer &denbound)
 

Static Public Attributes

static const Rational zero
 
static const Rational one
 
static const Rational mOne
 
static GivModule Module
 

Protected Member Functions

Rationalreduce ()
 
bool ratrecon (const Integer &f, const Integer &m, const Integer &k, bool forcereduce=true, bool recurs=false)
 num/den \equiv f modulo m, with a bound k on num forcereduce : must return a reduced fraction num/den recurs : tries to augment the given bound k if failure
 

Static Protected Member Functions

static void Init (int *argc, char ***argv)
 
static void End ()
 

Protected Attributes

Integer num
 
Integer den
 

Static Protected Attributes

static ReduceFlag flags = Rational::Reduce
 

Friends

class GivModule
 
class QField< Rational >
 
int compare (const Rational &a, const Rational &b)
 
int absCompare (const Rational &a, const Rational &b)
 
const Rational pow (const Rational &r, const int64_t l)
 
const Integer floor (const Rational &r)
 
const Integer ceil (const Rational &r)
 
const Integer round (const Rational &r)
 
const Integer trunc (const Rational &r)
 
const Rational abs (const Rational &r)
 
const Rational pow (const Rational &n, uint32_t l)
 
const Rational pow (const Rational &n, uint64_t l)
 
uint64_t length (const Rational &r)
 
int sign (const Rational &r)
 
int isZero (const Rational &r)
 
int isOne (const Rational &r)
 
int isMOne (const Rational &r)
 
int isInteger (const Rational &r)
 

Comparison operators.

Compare with operators.

giv_all_inlined friend int32_t operator>= (uint32_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator>= (float l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator>= (double l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator>= (int32_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator>= (int64_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator>= (uint64_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator<= (uint32_t l, const Rational &n)
 less or equal
 
giv_all_inlined friend int32_t operator<= (float l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator<= (double l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator<= (int32_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator<= (int64_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator<= (uint64_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator!= (uint32_t l, const Rational &n)
 operator != (not equal)
 
giv_all_inlined friend int32_t operator!= (float l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator!= (double l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator!= (int32_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator!= (int64_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator!= (uint64_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator== (uint32_t l, const Rational &n)
 Equality.
 
giv_all_inlined friend int32_t operator== (float l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator== (double l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator== (int32_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator== (int64_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator== (uint64_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator> (uint32_t l, const Rational &n)
 greater (strict)
 
giv_all_inlined friend int32_t operator> (float l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator> (double l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator> (int32_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator> (int64_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator> (uint64_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator< (uint32_t l, const Rational &n)
 less (strict)
 
giv_all_inlined friend int32_t operator< (float l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator< (double l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator< (int32_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator< (int64_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined friend int32_t operator< (uint64_t l, const Rational &n)
 greater or equal.
 
giv_all_inlined int32_t operator>= (const Integer &l) const
 greater or equal.
 
giv_all_inlined int32_t operator>= (const int32_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator>= (const int64_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator>= (const uint64_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator>= (const uint32_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator>= (const double l) const
 greater or equal.
 
giv_all_inlined int32_t operator>= (const float l) const
 greater or equal.
 
giv_all_inlined int32_t operator<= (const Rational &l) const
 less or equal
 
giv_all_inlined int32_t operator<= (const int32_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator<= (const int64_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator<= (const uint64_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator<= (const uint32_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator<= (const double l) const
 greater or equal.
 
giv_all_inlined int32_t operator<= (const float l) const
 greater or equal.
 
giv_all_inlined int32_t operator!= (const Integer &l) const
 operator != (not equal)
 
giv_all_inlined int32_t operator!= (const int32_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator!= (const int64_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator!= (const uint64_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator!= (const uint32_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator!= (const double l) const
 greater or equal.
 
giv_all_inlined int32_t operator!= (const float l) const
 greater or equal.
 
giv_all_inlined int32_t operator== (const Integer &l) const
 Equality.
 
giv_all_inlined int32_t operator== (const int32_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator== (const int64_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator== (const uint64_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator== (const uint32_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator== (const double l) const
 greater or equal.
 
giv_all_inlined int32_t operator== (const float l) const
 greater or equal.
 
giv_all_inlined int32_t operator> (const Integer &l) const
 greater (strict)
 
giv_all_inlined int32_t operator> (const int32_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator> (const int64_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator> (const uint64_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator> (const uint32_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator> (const double l) const
 greater or equal.
 
giv_all_inlined int32_t operator> (const float l) const
 greater or equal.
 
giv_all_inlined int32_t operator< (const Integer &l) const
 less (strict)
 
giv_all_inlined int32_t operator< (const int32_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator< (const int64_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator< (const uint64_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator< (const uint32_t l) const
 greater or equal.
 
giv_all_inlined int32_t operator< (const double l) const
 greater or equal.
 
giv_all_inlined int32_t operator< (const float l) const
 greater or equal.
 

Detailed Description

Rationals. No doc.

Examples
examples/Rational/iratrecon.C.

Member Enumeration Documentation

◆ ReduceFlag

enum ReduceFlag
Enumerator
Reduce 
NoReduce 

Constructor & Destructor Documentation

◆ Rational() [1/16]

◆ Rational() [2/16]

Rational ( int32_t n)

◆ Rational() [3/16]

Rational ( uint32_t n)

◆ Rational() [4/16]

Rational ( int64_t n)

◆ Rational() [5/16]

Rational ( uint64_t n)

◆ Rational() [6/16]

Rational ( int64_t n,
int64_t d )

◆ Rational() [7/16]

Rational ( uint64_t n,
uint64_t d )

◆ Rational() [8/16]

Rational ( int32_t n,
int32_t d )

◆ Rational() [9/16]

Rational ( uint32_t n,
uint32_t d )

◆ Rational() [10/16]

Rational ( double x)

◆ Rational() [11/16]

Rational ( const char * s)

◆ Rational() [12/16]

Rational ( const Integer & n)

◆ Rational() [13/16]

Rational ( const Integer & n,
const Integer & d,
int red = 1 )

◆ Rational() [14/16]

Rational ( const Integer & f,
const Integer & m,
const Integer & k,
bool recurs = false )

Rational number reconstruction.

\( num/den \equiv f \mod m\), with \(|num|<k\) and \(0 < |den| \leq f/kf\)

Bibliography
  • von zur Gathen & Gerhard Modern Computer Algebra, 5.10, Cambridge Univ. Press 1999]

◆ Rational() [15/16]

Rational ( const Rational & r)

◆ Rational() [16/16]

Member Function Documentation

◆ operator=()

Rational & operator= ( const Rational & r)

◆ logcpy()

Rational & logcpy ( const Rational & r)

◆ copy()

Rational & copy ( const Rational & r)

◆ operator+() [1/2]

Rational operator+ ( const Rational & r) const

◆ operator-() [1/2]

Rational operator- ( const Rational & r) const

◆ operator-() [2/2]

Rational operator- ( ) const

◆ operator+() [2/2]

Rational operator+ ( ) const
inline

◆ operator*()

Rational operator* ( const Rational & r) const

◆ operator/()

Rational operator/ ( const Rational & r) const

◆ operator+=()

Rational & operator+= ( const Rational & r)

◆ operator-=()

Rational & operator-= ( const Rational & r)

◆ operator*=()

Rational & operator*= ( const Rational & r)

◆ operator/=()

Rational & operator/= ( const Rational & r)

◆ operator%()

Integer operator% ( const Integer & r) const

◆ operator>=() [1/7]

giv_all_inlined int32_t operator>= ( const Integer & l) const

greater or equal.

Parameters
linteger to be compared to

◆ operator>=() [2/7]

giv_all_inlined int32_t operator>= ( const int32_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator>=() [3/7]

giv_all_inlined int32_t operator>= ( const int64_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator>=() [4/7]

giv_all_inlined int32_t operator>= ( const uint64_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator>=() [5/7]

giv_all_inlined int32_t operator>= ( const uint32_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator>=() [6/7]

giv_all_inlined int32_t operator>= ( const double l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator>=() [7/7]

giv_all_inlined int32_t operator>= ( const float l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator<=() [1/7]

giv_all_inlined int32_t operator<= ( const Rational & l) const

less or equal

Parameters
lrational to be compared to

◆ operator<=() [2/7]

giv_all_inlined int32_t operator<= ( const int32_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator<=() [3/7]

giv_all_inlined int32_t operator<= ( const int64_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator<=() [4/7]

giv_all_inlined int32_t operator<= ( const uint64_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator<=() [5/7]

giv_all_inlined int32_t operator<= ( const uint32_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator<=() [6/7]

giv_all_inlined int32_t operator<= ( const double l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator<=() [7/7]

giv_all_inlined int32_t operator<= ( const float l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator!=() [1/7]

giv_all_inlined int32_t operator!= ( const Integer & l) const

operator != (not equal)

Parameters
lrational
Returns
1 iff l == this

◆ operator!=() [2/7]

giv_all_inlined int32_t operator!= ( const int32_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator!=() [3/7]

giv_all_inlined int32_t operator!= ( const int64_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator!=() [4/7]

giv_all_inlined int32_t operator!= ( const uint64_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator!=() [5/7]

giv_all_inlined int32_t operator!= ( const uint32_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator!=() [6/7]

giv_all_inlined int32_t operator!= ( const double l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator!=() [7/7]

giv_all_inlined int32_t operator!= ( const float l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator==() [1/7]

giv_all_inlined int32_t operator== ( const Integer & l) const

Equality.

Parameters
lrational to be compared to

◆ operator==() [2/7]

giv_all_inlined int32_t operator== ( const int32_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator==() [3/7]

giv_all_inlined int32_t operator== ( const int64_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator==() [4/7]

giv_all_inlined int32_t operator== ( const uint64_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator==() [5/7]

giv_all_inlined int32_t operator== ( const uint32_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator==() [6/7]

giv_all_inlined int32_t operator== ( const double l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator==() [7/7]

giv_all_inlined int32_t operator== ( const float l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator>() [1/7]

giv_all_inlined int32_t operator> ( const Integer & l) const

greater (strict)

Parameters
lrational to be compared to

◆ operator>() [2/7]

giv_all_inlined int32_t operator> ( const int32_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator>() [3/7]

giv_all_inlined int32_t operator> ( const int64_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator>() [4/7]

giv_all_inlined int32_t operator> ( const uint64_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator>() [5/7]

giv_all_inlined int32_t operator> ( const uint32_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator>() [6/7]

giv_all_inlined int32_t operator> ( const double l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator>() [7/7]

giv_all_inlined int32_t operator> ( const float l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator<() [1/7]

giv_all_inlined int32_t operator< ( const Integer & l) const

less (strict)

Parameters
lrational to be compared to

◆ operator<() [2/7]

giv_all_inlined int32_t operator< ( const int32_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator<() [3/7]

giv_all_inlined int32_t operator< ( const int64_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator<() [4/7]

giv_all_inlined int32_t operator< ( const uint64_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator<() [5/7]

giv_all_inlined int32_t operator< ( const uint32_t l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator<() [6/7]

giv_all_inlined int32_t operator< ( const double l) const

greater or equal.

Parameters
l,nrationals to compare

◆ operator<() [7/7]

giv_all_inlined int32_t operator< ( const float l) const

greater or equal.

Parameters
l,nrationals to compare

◆ nume()

const Integer nume ( ) const
inline

◆ deno()

const Integer deno ( ) const
inline

◆ print()

std::ostream & print ( std::ostream & o) const

◆ reduce() [1/2]

Rational reduce ( const Rational & R) const
inline

◆ SetReduce()

void SetReduce ( )
static

◆ SetNoReduce()

void SetNoReduce ( )
static

◆ operator short()

operator short ( ) const
inline

◆ operator uint16_t()

operator uint16_t ( ) const
inline

◆ operator uint8_t()

operator uint8_t ( ) const
inline

◆ operator uint32_t()

operator uint32_t ( ) const
inline

◆ operator int()

operator int ( ) const
inline

◆ operator signed char()

operator signed char ( ) const
inline

◆ operator uint64_t()

operator uint64_t ( ) const
inline

◆ operator int64_t()

operator int64_t ( ) const
inline

◆ operator std::string()

operator std::string ( ) const
inline

◆ operator float()

operator float ( ) const
inline

◆ operator double()

operator double ( ) const
inline

◆ reduce() [2/2]

Rational & reduce ( )
protected

◆ Init()

void Init ( int * argc,
char *** argv )
staticprotected

◆ End()

void End ( )
staticprotected

◆ ratrecon() [1/2]

bool ratrecon ( const Integer & f,
const Integer & m,
const Integer & k,
bool forcereduce = true,
bool recurs = false )
protected

num/den \equiv f modulo m, with a bound k on num forcereduce : must return a reduced fraction num/den recurs : tries to augment the given bound k if failure

◆ ratrecon() [2/2]

bool ratrecon ( Integer & num,
Integer & den,
const Integer & f,
const Integer & m,
const Integer & k,
bool forcereduce = true,
bool recurs = true )
static

◆ RationalReconstruction() [1/3]

bool RationalReconstruction ( Integer & num,
Integer & den,
const Integer & f,
const Integer & m )
static

◆ RationalReconstruction() [2/3]

bool RationalReconstruction ( Integer & num,
Integer & den,
const Integer & f,
const Integer & m,
const Integer & numbound,
bool forcereduce = true,
bool recursive = true )
static

◆ RationalReconstruction() [3/3]

bool RationalReconstruction ( Integer & num,
Integer & den,
const Integer & f,
const Integer & m,
const Integer & numbound,
const Integer & denbound )
static

Friends And Related Symbol Documentation

◆ GivModule

friend class GivModule
friend

◆ QField< Rational >

friend class QField< Rational >
friend

◆ compare

int compare ( const Rational & a,
const Rational & b )
friend

◆ absCompare

int absCompare ( const Rational & a,
const Rational & b )
friend

◆ operator>= [1/6]

giv_all_inlined friend int32_t operator>= ( uint32_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator>= [2/6]

giv_all_inlined friend int32_t operator>= ( float l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator>= [3/6]

giv_all_inlined friend int32_t operator>= ( double l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator>= [4/6]

giv_all_inlined friend int32_t operator>= ( int32_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator>= [5/6]

giv_all_inlined friend int32_t operator>= ( int64_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator>= [6/6]

giv_all_inlined friend int32_t operator>= ( uint64_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator<= [1/6]

giv_all_inlined friend int32_t operator<= ( uint32_t l,
const Rational & n )
friend

less or equal

Parameters
l,nrationals to compare

◆ operator<= [2/6]

giv_all_inlined friend int32_t operator<= ( float l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator<= [3/6]

giv_all_inlined friend int32_t operator<= ( double l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator<= [4/6]

giv_all_inlined friend int32_t operator<= ( int32_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator<= [5/6]

giv_all_inlined friend int32_t operator<= ( int64_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator<= [6/6]

giv_all_inlined friend int32_t operator<= ( uint64_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator!= [1/6]

giv_all_inlined friend int32_t operator!= ( uint32_t l,
const Rational & n )
friend

operator != (not equal)

Parameters
l,nrational
Returns
1 iff l == n

◆ operator!= [2/6]

giv_all_inlined friend int32_t operator!= ( float l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator!= [3/6]

giv_all_inlined friend int32_t operator!= ( double l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator!= [4/6]

giv_all_inlined friend int32_t operator!= ( int32_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator!= [5/6]

giv_all_inlined friend int32_t operator!= ( int64_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator!= [6/6]

giv_all_inlined friend int32_t operator!= ( uint64_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator== [1/6]

giv_all_inlined friend int32_t operator== ( uint32_t l,
const Rational & n )
friend

Equality.

Parameters
l,nrationals to compare

◆ operator== [2/6]

giv_all_inlined friend int32_t operator== ( float l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator== [3/6]

giv_all_inlined friend int32_t operator== ( double l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator== [4/6]

giv_all_inlined friend int32_t operator== ( int32_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator== [5/6]

giv_all_inlined friend int32_t operator== ( int64_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator== [6/6]

giv_all_inlined friend int32_t operator== ( uint64_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator> [1/6]

giv_all_inlined friend int32_t operator> ( uint32_t l,
const Rational & n )
friend

greater (strict)

Parameters
l,nrationals to compare

◆ operator> [2/6]

giv_all_inlined friend int32_t operator> ( float l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator> [3/6]

giv_all_inlined friend int32_t operator> ( double l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator> [4/6]

giv_all_inlined friend int32_t operator> ( int32_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator> [5/6]

giv_all_inlined friend int32_t operator> ( int64_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator> [6/6]

giv_all_inlined friend int32_t operator> ( uint64_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator< [1/6]

giv_all_inlined friend int32_t operator< ( uint32_t l,
const Rational & n )
friend

less (strict)

Parameters
l,nrationals to compare

◆ operator< [2/6]

giv_all_inlined friend int32_t operator< ( float l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator< [3/6]

giv_all_inlined friend int32_t operator< ( double l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator< [4/6]

giv_all_inlined friend int32_t operator< ( int32_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator< [5/6]

giv_all_inlined friend int32_t operator< ( int64_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ operator< [6/6]

giv_all_inlined friend int32_t operator< ( uint64_t l,
const Rational & n )
friend

greater or equal.

Parameters
l,nrationals to compare

◆ pow [1/3]

const Rational pow ( const Rational & r,
const int64_t l )
friend

◆ floor

const Integer floor ( const Rational & r)
friend

◆ ceil

const Integer ceil ( const Rational & r)
friend

◆ round

const Integer round ( const Rational & r)
friend

◆ trunc

const Integer trunc ( const Rational & r)
friend

◆ abs

const Rational abs ( const Rational & r)
friend

◆ pow [2/3]

const Rational pow ( const Rational & n,
uint32_t l )
friend

◆ pow [3/3]

const Rational pow ( const Rational & n,
uint64_t l )
friend

◆ length

uint64_t length ( const Rational & r)
friend

◆ sign

int sign ( const Rational & r)
friend

◆ isZero

int isZero ( const Rational & r)
friend

◆ isOne

int isOne ( const Rational & r)
friend

◆ isMOne

int isMOne ( const Rational & r)
friend

◆ isInteger

int isInteger ( const Rational & r)
friend

Field Documentation

◆ zero

const Rational zero
static

◆ one

const Rational one
static

◆ mOne

const Rational mOne
static

◆ num

Integer num
protected

◆ den

Integer den
protected

◆ flags

Rational::ReduceFlag flags = Rational::Reduce
staticprotected

◆ Module

GivModule Module
static

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