comp • gb.gmp • rational

Rational (gb.gmp)

This class represents a rational number, i.e. a BigInt number divided by another BigInt number.

It implements standard arithmetic and comparison operators (i.e. +, -, *, /, ^, Abs, =, <>, <, >, <=, >=), and provides automatic conversions with BigInt and native Gambas numerical datatypes.

This class is
Create a new Rational number whose value is 0.
creatable
.

Static methods

Convert a string into a rational number.
FromString  

Properties

Methods
Return or set the rational denominator.
Den  
Return or set the rational numerator.
Num  
Convert the rational number to its string representation.
ToString