"rational". Más...
#include <iostream>
Ir al código fuente de este archivo.
Namespaces | |
| namespace | std |
Clases | |
| class | rational |
La clase rational implementa las operaciones aritméticas principales para números rationales. Más... | |
Definiciones | |
| #define | rational_h |
Funciones | |
| long | mcd (long x, long y) |
Calcula el Máximo Común Divisor de los números "x" y "y". | |
| long | gcd (long x, long y) |
| bool | operator== (const rational &x, const rational &y) |
| ¿ x == y ? | |
| bool | operator< (const rational &x, const rational &y) |
| ¿ x < y ? | |
| bool | operator> (const rational &x, const rational &y) |
| ¿ x > y ? | |
| bool | operator!= (const rational &x, const rational &y) |
| ¿ x != y ? | |
| bool | operator<= (const rational &x, const rational &y) |
| ¿ x <= y ? | |
| bool | operator>= (const rational &x, const rational &y) |
| ¿ x >= y ? | |
| double | real (const rational &num) |
| Convertidor a punto flotante. | |
| long | integer (const rational &num) |
| Convertidor a punto fijo. | |
"rational".
rational implementa las operaciones aritméticas principales para números rationales.
[1/3] == [2/6] == ... [9/27] == ...
|
|
|
|
||||||||||||
|
Calcula el Máximo Común Divisor de los números
|
|
||||||||||||
|
|
|
||||||||||||
|
¿ x == y ?
|
|
||||||||||||
|
¿ x < y ?
|
|
||||||||||||
|
¿ x > y ?
|
|
||||||||||||
|
¿ x != y ?
|
|
||||||||||||
|
¿ x <= y ?
|
|
||||||||||||
|
¿ x >= y ?
|
|
|
Convertidor a punto flotante.
|
|
|
Convertidor a punto fijo.
|
1.4.4