immutable class CARD < $CARDINAL{CARD}, $OPTION, $EXACT_FMT
****

________This_immutable_class_is_one_of_the_most_fundamental_exact_number
___classes.__It_has_the_value_domain_from_0_to_some_maximum_value_determined
___by_the_machine_representation_provided.___All_arithmetic_on_values_of_this
___class_is_unsigned,_whether_involving_overflow_detection_or_modular
___operations.__This_class_inherits_from_AVAL{BIT}._The_number_of_bits
___in_the_representation_is_identical_to_NUM_BITS::Num_Bits.

___NOTE_The_Sather_language_requires_that_Num_Bits_be_at_least_32_to_ensure
________portability_of_INT_literals_up_to_this_size.

________Many_of_the_operations_are_specified_to_raise_exceptions_on_overflow.
___They_are,_however,_only_guaranteed_to_do_this_if_checking_is_enabled!
___Enabling_checking,_however,_may_affect_performance._Certain_machines_with
___appropriate_hardware_may_perform_these_checks_even_when_checking_is_not
___enabled.

___References_:
________Keith_O._Geddes,_Stephen_R._Czapor,_and_George_Labahn,_"Algorithms
________for_Computer_Algebra",_Kluwer_Academic_Publishers,_Boston,_1992.


Flattened version is here

Ancestors
$EXACT_FMT $FMT $STR $OPTION
$CARDINAL{_} $VALUE_ITERS{_} $LIMITED{_} $WHOLE_NUM{_}
$SIMPLE_NUM{_} $HASH $IS_EQ $SEQUENCERS{_}
$COUNTS{_} $ARITHMETIC{_} $ADD_OPS{_} $ZERO{_}
$NFE{_} $TEXT $BINARY $ORDERED{_}
$IS_LT{_} $VALUE{_} $NIL $IS_NIL
$CONVERSION{_}



Public


Constants

Features
abs : SAME
card : SAME
**** This routine returns a copy of self. Built-in to this implementation.
create(val : CARD) : SAME
create(val : FIELD) : SAME
create(val : QUADBITS) : SAME
**** This returns a cardinal value from the given bit-pattern.
div(other : SAME) : SAME
field : FIELD
****
________This_routine_returns_a_copy_of_self.__Built-in_to_this_implementation.
hex_create(str : STR) : SAME
int : INT
is_card(str : STR) : BOOL
**** This predicate returns true if and only if str represents a cardinal
___number_in_decimal_notation.
is_prime : BOOL
**** This predicate returns true if and only if self is a prime number.
log2 : SAME
minus(other : SAME) : SAME
mod(other : SAME) : SAME
next_exp2 : SAME
oct_create(str : STR) : SAME
plus(other : SAME) : SAME
str_base(b:SAME):STR
**** str in base b for debug
times(other : SAME) : SAME

Iters
uptoward!(once limit : SAME) : SAME
****
__This_iter_yields_successive_numbers_self<=result<limit.


Private

p_str:STR

The Sather Home Page