immutable class FLT < $REAL{FLT}, $OPTION, $FLT_FMT |
---|
**** |
________This_class_embodies_normal_arithmetic_(NOT_including_trigonometric) ___operations_on_a_floating_point_approximate_number_representation.___This ___has_been_chosen_to_be_the_single_32-bit_IEEE_754-1984_standard ___representation.___For_convenience_of_implementation,_most_of_the_operations ___are_done_in_terms_of_the_double_length_version_operations_for_portability. ___NOTE_1.___The_class_ANGLE_in_the_Geometric_section_of_this_library_has ________been_extracted_from_here_since_the_(inverse)_trigonometric_operations ________are_conversions_between_an_angle_domain_and_the_domain_of_numbers ________or_factors. ________2.___This_class_and_FLTD_are_exceptions_to_the_general_rule_in ________the_required_library_that_immutable_classes_all_inherit_from_$BINARY |
const Decimal_Multiplier : SAME := 10.0 ; |
---|
**** |
const Max_Precision : CARD := 6 ; |
---|
**** | digits before rounding problems |
const Num_Bits : CARD := 32 ; |
---|
**** | IEEE Single size numbers |
const digits : INT := 6 ; |
---|
**** | No of decimal digits of precn |
const double_inv_pi : SAME := FLTD::double_inv_pi.flt ; |
---|
**** | Approx 2/pi |
const double_sqrt_pi : SAME := FLTD::double_sqrt_pi.flt ; |
---|
**** | App 2*(pi.sqrt) |
const e : SAME := FLTD::e.flt ; |
---|
**** | approximately |
const epsilon : SAME := 1.19209290e-07 ; |
---|
**** | min x > 0.0 s.t, 1.0+x/=x |
const half : SAME := 0.5 ; |
---|
**** | used in rounding! |
const half_pi : SAME := FLTD::half_pi.flt ; |
---|
**** | Approx pi/2. |
const inv_pi : SAME := FLTD::inv_pi.flt ; |
---|
**** | Approx 1/pi. |
const inv_sqrt_2 : SAME := FLTD::inv_sqrt_2.flt ; |
---|
**** | Approx 1/(2.sqrt). |
const log10_e : SAME := FLTD::log10_e.flt ; |
---|
**** | Approx e.log10. |
const log2_e : SAME := FLTD::log2_e.flt ; |
---|
**** | Approx e.log2. |
const log_10 : SAME := FLTD::log_10.flt ; |
---|
**** | Approx 10.log. |
const log_2 : SAME := FLTD::log_2.flt ; |
---|
**** | Approx 2.log. |
const mantissa_bits : INT := 24 ; |
---|
**** | No of bits in the significand, including an implied bit. |
const max_exp10 : INT := 38 ; |
---|
**** | max x s.t 10^x is in range. |
const max_exp : INT := 128 ; |
---|
**** | maximum permissible exponent |
const min_exp10 : INT := -37 ; |
---|
const min_exp : INT := -125 ; |
---|
const one : SAME := 1.0 ; |
---|
const pi : SAME := FLTD::pi.flt ; |
---|
**** | approximately! |
const quarter_pi : SAME := FLTD::quarter_pi.flt ; |
---|
**** | Approx pi/4. |
const sqrt_2 : SAME := FLTD::sqrt_2.flt ; |
---|
**** | Approx 2.sqrt. |
const zero : SAME := 0.0 ; |
---|
**** | See $NFE. |
abs : SAME |
---|
card : CARD |
---|
ceiling : SAME |
---|
copysign(other : SAME) : SAME |
---|
cos:SAME |
---|
create(val : CARD) : SAME |
---|
**** |
__This_routine_returns_the_value_of_val_converted_to_a_floating_point_representation. |
create(val : FIELD) : SAME |
---|
**** |
__This_routine_returns_the_value_of_val_converted_to_a_floating_point_representation. |
create(val : FLT) : SAME |
---|
**** |
__This_routine_returns_the_value_of_val_since_this_routine_is_provided ___for_symmetry_between_numeric_conversion/creation_routines. |
create(val : FLTD) : SAME |
---|
create(val : INT) : SAME |
---|
**** | This routine returns the value of val converted to a floating point representation. |
create(val : INTI) : SAME |
---|
**** | pre (val < maxval.round.inti) and (val > minval.round.inti) |
create(val : RAT) : SAME |
---|
cube_root : SAME |
---|
div(other : SAME) : SAME |
---|
exp : SAME |
---|
**** |
__This_routine_returns_the_exponential_e^self.___Built-in. |
field : FIELD |
---|
floor : SAME |
---|
flt : FLT |
---|
fltd : FLTD |
---|
get_representation(out sign : BOOL, out exp : INT, out mantissa : INT) |
---|
infinity : SAME |
---|
**** |
__This_routine_returns_the_representation_of_infinity_--_which_is ___implementation-dependent.___Built-in_to_this_implementation. |
int : INT |
---|
inti : INTI |
---|
is_eq(other : SAME) : BOOL |
---|
**** | This predicate returns tru if and only if self and other have the same value. Built-in to this implementation. |
is_finite : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_zero,_subnormal ___or_normal. |
is_inf : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_infinite. |
is_lt(other : SAME ) : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_other_is_less_than_self. ___Built-in_to_this_implementation. |
is_normal : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_a_normalised ___number.___Built-in_to_this_implementation. |
is_subnormal : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_an_un-normalised ___number.___Built-in_to_this_implementation. |
is_zero : BOOL |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_zero.___Built-in_to ___this_implementation. |
log : SAME |
---|
**** |
__This_routine_returns_the_natural_logarithm_of_self.__Built-in. |
max_normal : SAME |
---|
**** |
__This_routine_returns_the_largest_normalized_positive_number ___in_this_class.___Built-in_to_this_implementation. |
max_subnormal : SAME |
---|
**** |
__This_routine_returns_the_largest_un-normalized_positive_number ___in_this_class.___Built-in_to_this_implementation. |
min_normal : SAME |
---|
**** |
__This_routine_returns_the_smallest_normalized_positive_number ___in_this_class.___Built-in_to_this_implementation. |
min_subnormal : SAME |
---|
**** | This routine returns the smallest un-normalized positive number
___in_this_class.___Built-in_to_this_implementation. |
minus(other : SAME) : SAME |
---|
mod( other : SAME) : SAME |
---|
negate : SAME |
---|
nextdown : SAME |
---|
nextup : SAME |
---|
plus(other : SAME) : SAME |
---|
pow(arg : SAME) : SAME |
---|
**** |
__This_routine_returns_self_raised_to_the_arg'th_power. ___Note_that_self.pow(0.0)_=_1.0_for_all_self.___Built-in. |
quiet_NaN(sig : INT) : SAME |
---|
**** |
__This_routine_returns_the_representation_which_is_interpreted_by ___the_IEEE_arithmetic_model_as_being_a_quiet_(ie_non-interrupting)_NaN. ___The_argument_is_not_used_in_this_implementation.___Built-in_to_this_implementation. |
rat : RAT |
---|
remainder(other : SAME) : SAME |
---|
round : SAME |
---|
scale_by(exp : INT) : SAME |
---|
signalling_NaN(sig : INT) : SAME |
---|
**** |
__This_routine_returns_the_representation_which_is_interpreted_by ___the_IEEE_arithmetic_model_as_a_signalling_(ie_interrupt_generating)_NaN. ___The_argument_is_unused_in_this_implementation.___Built-in_to_this_implementation. |
signbit_set : BOOL |
---|
**** | This predicate returns true if and only if the sign bit of self is
___set.___Built-in_to_this_implementation. |
sin:SAME |
---|
sqrt : SAME |
---|
tan:SAME |
---|
times(other : SAME) : SAME |
---|
truncate : SAME |
---|
unbiassed_exponent : INT |
---|
const asize : CARD := 4 ; |
---|
**** | ---------------???????? FUDGE!! |
cuberoot : SAME |
---|
**** |
__This_routine_returns_the_cube_root_of_self.____It_is_provided ___to_avoid_the_circularity_in_cube_and_cube-root_pre-requisites!__Built-in ___to_this_implementation. |
next_down : SAME |
---|
**** | This routine returns the next lower representable number from self.
___Note_that_this_version_has_NO_pre_requisites_in_order_to_prevent ___circularity_between_the_public_versions_of_nextup_and_nextdown.__Built-in ___to_this_implementation. |
next_up : SAME |
---|
**** | This private routine returns the next higher representable number
___from_self.___Note_that_this_version_has_NO_pre_requisites_in_order_to ___prevent_circularity_between_the_public_versions_of_nextup_and_nextdown. ___Built-in_to_this_implementation. |
scale_by_builtin(exp : INT) : SAME |
---|
square_root : SAME |
---|
**** |
__This_private_routine_returns_the_square_root_of_self.__It_is_provided ___to_avoid_the_circularity_in_square_and_square-root_pre-requisites! ___Built-in_to_this_implementation. |