immutable class RAT < $RATIONAL{RAT}, $NIL, $OPTION, $ANCHORED_FMT |
---|
**** |
________This_class_implements_rational_numbers_as_a_numerator_and_denominator ___which_are_'infinite'_precision_integers._____Numbers_are_held_in ___normalised_form_such_that _____num.gcd(denom)_=_1_AND_denom_>_0 |
attr denom :INTI; |
---|
attr num:INTI; |
---|
const is_limited : BOOL := false ; |
---|
const is_signed : BOOL := true ; |
---|
const negatable : BOOL := true ; |
---|
abs : SAME |
---|
binstr : BINSTR |
---|
build(cursor : BIN_CURSOR) : SAME |
---|
card : CARD |
---|
ceiling : SAME |
---|
create(val : CARD) : SAME |
---|
**** |
__This_routine_creates_a_rational_number_which_has_the_same_value_as_the_argument. |
create(numerator, denominator : CARD) : SAME |
---|
**** | This routine creates a rational number which has the same value as
___the_result_of_dividing_the_numerator_by_the_denominator. |
create(val : FIELD) : SAME |
---|
**** |
__This_routine_creates_a_rational_number_which_has_the_same_value_as_the_argument. |
create(val : FLT) : SAME |
---|
**** |
__This_creation_routine_creates_a_rational_number_with_the_same_value_as_the_given_argument. |
create(val : FLTD) : SAME |
---|
**** |
__This_creation_routine_creates_a_rational_number_with_the_same_value ___as_the_given_argument. |
create(val : INT) : SAME |
---|
**** |
__This_routine_creates_a_rational_number_which_has_the_same_value_as_the_argument. |
create(numerator, denominator : INT) : SAME |
---|
**** |
__This_routine_creates_a_rational_number_which_has_the_same_value_as ___the_result_of_dividing_the_numerator_by_the_denominator. |
create(val : INTI) : SAME |
---|
**** |
__This_routine_creates_a_rational_number_which_has_the_same_value_as_the_argument. |
create( numerator, denominator : INTI) : SAME |
---|
**** | This routine creates a rational number which has the same value as
___the_result_of_dividing_the_numerator_by_the_denominator. |
create(val : RAT) : SAME |
---|
**** |
__This_routine_creates_a_rational_number_which_has_the_same_value_as ___the_argument_-_merely_returning_the_argument. |
cube : SAME |
---|
div(other : SAME) : SAME |
---|
divmod(other, out quotient, out residue: SAME) |
---|
exp : SAME |
---|
field : FIELD |
---|
floor : SAME |
---|
flt : FLT |
---|
fltd : FLTD |
---|
hash : CARD |
---|
**** |
in_range(lower,upper : SAME) : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_has_a_value_between ___lower_and_upper_inclusive. |
in_range(rng : $RANGE{RAT} ) : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_has_a_value_within ___the_given_range. |
in_tolerance(tolerance, val : SAME) : BOOL |
---|
**** | This predicate returns true if and only if self is within the given
___tolerance_of_val. |
int : INT |
---|
inti : INTI |
---|
inverse:SAME |
---|
is_card : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_a_non-negative ___exact_number_in_the_range_of_the_class_CARD. |
is_eq(other : SAME) : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_and_other_are_the_same_value. |
is_exact : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_an_exact(integer)_number. |
is_int : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_an_exact_number ___in_the_range_of_the_class_INT. |
is_inti : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_an_exact_number ___in_the_range_of_the_class_INT. |
is_lt(other : SAME) : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_less_than_other. |
is_neg : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_less_than_zero. |
is_nil : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_has_the_value_nil. |
is_non_neg : BOOL |
---|
is_non_pos : BOOL |
---|
is_non_zero : BOOL |
---|
is_pos : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_greater_than_zero. |
is_zero : BOOL |
---|
**** | This predicate returns true if and only if self is zero. |
log : SAME |
---|
max(other : SAME ) : SAME |
---|
min(other : SAME) : SAME |
---|
minus(other : SAME ) : SAME |
---|
mod(other : SAME) : SAME |
---|
negate : SAME |
---|
nil : SAME |
---|
**** |
__This_routine_returns_a_nil_value_which_may_not_be_used_in_arithmetic. |
one : SAME |
---|
**** |
__This_routine_returns_a_'constant'_value_of_1. |
plus(other : SAME ) : SAME |
---|
pow(x : CARD) : SAME |
---|
pow(x : INT) : SAME |
---|
pow(x:INTI):SAME |
---|
**** |
__This_routine_returns_the_result_of_raising_self_to_the_power_exp. |
pow(exp : SAME) : SAME |
---|
**** |
__This_routine_returns_the_result_of_raising_self_to_the_power_exp. |
rat : SAME |
---|
round : SAME |
---|
sgn:SAME |
---|
**** |
__1/0/-1 |
sign : NUM_SIGNS |
---|
sqrt : SAME |
---|
square : SAME |
---|
times(other : SAME) : SAME |
---|
truncate : SAME |
---|
two : SAME |
---|
**** |
__This_routine_returns_a_'constant'_value_of_2. |
zero : SAME |
---|
**** |
__This_routine_returns_a_'constant'_value_of_0. |
product!(val : SAME) : SAME |
---|
sum!(val : SAME) : SAME |
---|
attr denom :INTI; |
---|
attr num:INTI; |
---|