FORM v5.0.0-35-g6318119
Public Member Functions | Data Fields
Fraction Class Reference

Public Member Functions

 Fraction (BigInt n, BigInt d)
 
void print (const char *msg)
 
void setValue (BigInt n, BigInt d)
 
void setValue (Fraction &f)
 
void add (BigInt n, BigInt d)
 
void add (Fraction f)
 
void sub (Fraction f)
 
BigInt gcd (BigInt n0, BigInt n1)
 
void normal (void)
 
Bool isEq (Fraction f)
 

Data Fields

BigInt num
 
BigInt den
 
double ratio
 

Detailed Description

Definition at line 204 of file grcc.h.

Constructor & Destructor Documentation

◆ Fraction() [1/2]

Fraction ( )
inline

Definition at line 209 of file grcc.h.

◆ Fraction() [2/2]

Fraction ( BigInt  n,
BigInt  d 
)

Definition at line 10450 of file grcc.cc.

Member Function Documentation

◆ print()

void print ( const char *  msg)

Definition at line 10461 of file grcc.cc.

◆ setValue() [1/2]

void setValue ( BigInt  n,
BigInt  d 
)

Definition at line 10473 of file grcc.cc.

◆ setValue() [2/2]

void setValue ( Fraction f)

Definition at line 10481 of file grcc.cc.

◆ add() [1/2]

void add ( BigInt  n,
BigInt  d 
)

Definition at line 10526 of file grcc.cc.

◆ add() [2/2]

void add ( Fraction  f)

Definition at line 10549 of file grcc.cc.

◆ sub()

void sub ( Fraction  f)

Definition at line 10558 of file grcc.cc.

◆ gcd()

BigInt gcd ( BigInt  n0,
BigInt  n1 
)

Definition at line 10489 of file grcc.cc.

◆ normal()

void normal ( void  )

Definition at line 10509 of file grcc.cc.

◆ isEq()

Bool isEq ( Fraction  f)

Definition at line 10567 of file grcc.cc.

Field Documentation

◆ num

BigInt num

Definition at line 206 of file grcc.h.

◆ den

BigInt den

Definition at line 206 of file grcc.h.

◆ ratio

double ratio

Definition at line 207 of file grcc.h.


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