Rational Class Reference

Rationals. No doc. More...

`#include <givrational.h>`

Collaboration diagram for Rational:
[legend]

## Public Member Functions

| Rational (const Integer &f, const Integer &m, const Integer &k, bool recurs=false)
| Rational number reconstruction.

## Protected Member Functions

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

## 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.

## Constructor & Destructor Documentation

## Rational()

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

Rational number reconstruction.

, with and

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

## Member Function Documentation

## operator>=() [1/7]

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

greater or equal.

Parameters

  l | integer to be compared to

## operator>=() [2/7]

giv_all_inlined int32_t operator>= | ( | const int32_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator>=() [3/7]

giv_all_inlined int32_t operator>= | ( | const int64_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator>=() [4/7]

giv_all_inlined int32_t operator>= | ( | const uint64_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator>=() [5/7]

giv_all_inlined int32_t operator>= | ( | const uint32_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator>=() [6/7]

giv_all_inlined int32_t operator>= | ( | const double | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator>=() [7/7]

giv_all_inlined int32_t operator>= | ( | const float | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator<=() [1/7]

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

less or equal

Parameters

  l | rational to be compared to

## operator<=() [2/7]

giv_all_inlined int32_t operator<= | ( | const int32_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator<=() [3/7]

giv_all_inlined int32_t operator<= | ( | const int64_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator<=() [4/7]

giv_all_inlined int32_t operator<= | ( | const uint64_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator<=() [5/7]

giv_all_inlined int32_t operator<= | ( | const uint32_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator<=() [6/7]

giv_all_inlined int32_t operator<= | ( | const double | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator<=() [7/7]

giv_all_inlined int32_t operator<= | ( | const float | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator!=() [1/7]

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

operator != (not equal)

Parameters

  l | rational

Returns
  `1` iff l == this

## operator!=() [2/7]

giv_all_inlined int32_t operator!= | ( | const int32_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator!=() [3/7]

giv_all_inlined int32_t operator!= | ( | const int64_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator!=() [4/7]

giv_all_inlined int32_t operator!= | ( | const uint64_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator!=() [5/7]

giv_all_inlined int32_t operator!= | ( | const uint32_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator!=() [6/7]

giv_all_inlined int32_t operator!= | ( | const double | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator!=() [7/7]

giv_all_inlined int32_t operator!= | ( | const float | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator==() [1/7]

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

Equality.

Parameters

  l | rational to be compared to

## operator==() [2/7]

giv_all_inlined int32_t operator== | ( | const int32_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator==() [3/7]

giv_all_inlined int32_t operator== | ( | const int64_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator==() [4/7]

giv_all_inlined int32_t operator== | ( | const uint64_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator==() [5/7]

giv_all_inlined int32_t operator== | ( | const uint32_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator==() [6/7]

giv_all_inlined int32_t operator== | ( | const double | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator==() [7/7]

giv_all_inlined int32_t operator== | ( | const float | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator>() [1/7]

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

greater (strict)

Parameters

  l | rational to be compared to

## operator>() [2/7]

giv_all_inlined int32_t operator> | ( | const int32_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator>() [3/7]

giv_all_inlined int32_t operator> | ( | const int64_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator>() [4/7]

giv_all_inlined int32_t operator> | ( | const uint64_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator>() [5/7]

giv_all_inlined int32_t operator> | ( | const uint32_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator>() [6/7]

giv_all_inlined int32_t operator> | ( | const double | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator>() [7/7]

giv_all_inlined int32_t operator> | ( | const float | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator<() [1/7]

giv_all_inlined int32_t operator< | ( | const Integer & | l | ) | const

less (strict)

Parameters

  l | rational to be compared to

## operator<() [2/7]

giv_all_inlined int32_t operator< | ( | const int32_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator<() [3/7]

giv_all_inlined int32_t operator< | ( | const int64_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator<() [4/7]

giv_all_inlined int32_t operator< | ( | const uint64_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator<() [5/7]

giv_all_inlined int32_t operator< | ( | const uint32_t | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator<() [6/7]

giv_all_inlined int32_t operator< | ( | const double | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## operator<() [7/7]

giv_all_inlined int32_t operator< | ( | const float | l | ) | const

greater or equal.

Parameters

  l,n | rationals to compare

## Friends And Related Symbol Documentation

## operator>= [1/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator>= [2/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator>= [3/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator>= [4/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator>= [5/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator>= [6/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator<= [1/6]

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

friend

less or equal

Parameters

  l,n | rationals to compare

## operator<= [2/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator<= [3/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator<= [4/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator<= [5/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator<= [6/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator!= [1/6]

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

friend

operator != (not equal)

Parameters

  l,n | rational

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,n | rationals to compare

## operator!= [3/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator!= [4/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator!= [5/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator!= [6/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator== [1/6]

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

friend

Equality.

Parameters

  l,n | rationals to compare

## operator== [2/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator== [3/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator== [4/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator== [5/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator== [6/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator> [1/6]

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

friend

greater (strict)

Parameters

  l,n | rationals to compare

## operator> [2/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator> [3/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator> [4/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator> [5/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator> [6/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator< [1/6]

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

friend

less (strict)

Parameters

  l,n | rationals to compare

## operator< [2/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator< [3/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator< [4/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator< [5/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

## operator< [6/6]

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

friend

greater or equal.

Parameters

  l,n | rationals to compare

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

- givrational.h
- givrataddsub.C
- givratcpy.C
- givratcstor.C
- givratio.C
- givrational.inl
- givratmisc.C
- givratmuldiv.C
- givratreconstruct.C