immutable class FLTD < $REAL{FLTD}, $FLT_FMT |
---|
**** |
________This_class_embodies_normal_arithmetic_(NOT_including_trigonometric) ___operations_on_a_floating_point_approximate_number_representation.___This ___has_been_chosn_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. ________This_source_text_provides_for_optional_inclusion_of_logarithmic ___and_exponential_functions_as_a_group_using_the_LOG_EXP_FUNCTIONS_partial ___class.___Bessel,_gamma_and_erf_functions_may_additionally_be_included ___from_the_partial_class_MATH_FUNCTIONS. ___NOTE_1.___The_class_ANGLED_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_FLT_are_exceptions_to_the_general_rule_in ________the_required_library_that_immutable_classes_all_inherit_from_$BINARY. |
const Decimal_Multiplier : SAME := 10.0d ; |
---|
**** |
const Max_Precision : CARD := 16 ; |
---|
**** | digits for representation! |
const Num_Bits : CARD := 64 ; |
---|
**** | IEEE double size numbers |
const digits : INT := 15 ; |
---|
**** | No of decimal digits of precn |
const epsilon : SAME := 2.2204460492503131e-16d ; |
---|
**** | min x > 0.0 s.t, 1.0+x/=x |
const half : SAME := 0.5d ; |
---|
**** | used in rounding! |
const is_limited : BOOL := true ; .. Included as is_limited |
---|
const is_signed : BOOL := true ; .. Included as is_signed |
---|
const mantissa_bits : INT := 53 ; |
---|
**** | No of bits in the significand, including an implied bit. |
const max_exp10 : INT := 308 ; |
---|
**** | max x s.t 10^x is in range. |
const max_exp : INT := 1024 ; |
---|
**** | maximum permissible exponent |
const min_exp10 : INT := -307 ; |
---|
const min_exp : INT := -1021 ; |
---|
const one : SAME := 1.0d ; |
---|
const zero : SAME := 0.0d ; |
---|
**** | See $NFE. |
abs : SAME |
---|
acosh : FLTD .. Included as acosh |
---|
aget( .. Included as aget |
---|
aset( .. Included as aset |
---|
asinh : FLTD .. Included as asinh |
---|
atanh : FLTD .. Included as atanh |
---|
bessel_j0 : FLTD .. Included as bessel_j0 |
---|
bessel_j1 : FLTD .. Included as bessel_j1 |
---|
bessel_jn( .. Included as bessel_jn |
---|
bessel_y0 : FLTD .. Included as bessel_y0 |
---|
bessel_y1 : FLTD .. Included as bessel_y1 |
---|
bessel_yn( .. Included as bessel_yn |
---|
binstr : BINSTR .. Included as binstr |
---|
build(cursor : BIN_CURSOR) : SAME .. Included as build |
---|
build( .. Included as build |
---|
card : CARD |
---|
ceiling : SAME |
---|
copysign(other : SAME) : SAME |
---|
cos:SAME |
---|
cosh : FLTD .. Included as cosh |
---|
create(str : BINSTR) : SAME .. Included as create |
---|
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 converted to a floating point representation. |
create(val : FLTD) : SAME |
---|
**** | This routine returns the value of val. It is provided to ensure
___symmetry_of_arithmetic_conversion/creation_routines. |
create(val : INT) : SAME |
---|
**** | This routine returns the value of val converted to a floating point
___representation. |
create(val : INTI) : SAME |
---|
create(val : RAT) : SAME |
---|
create( .. Included as create |
---|
cube : SAME .. Included as cube |
---|
cube_root : SAME |
---|
div(other : SAME) : SAME |
---|
double_inv_pi : SAME |
---|
**** | This is a 'routine' returning the implementation-dependent
___approximation_to_twice_the_inverse_of_pi.___Built-in_to_this ___implementation. |
double_sqrt_pi : SAME |
---|
**** | This is a 'routine' returning the implementation-dependent
___approximation_to_twice_the_inverse_of_the_square_root_of_pi.___Built-in_to ___this_implementation. |
e : SAME |
---|
**** | This is a 'routine' returning the implementation-dependent
___approximation_to_the_mathematical_natural_logarithm_base.___Built-in_to ___this_implementation. |
eng_str( .. Included as eng_str |
---|
eng_str : STR .. Included as eng_str |
---|
erf : FLTD .. Included as erf |
---|
exp10 : FLTD .. Included as exp10 |
---|
exp2 : FLTD .. Included as exp2 |
---|
exp : SAME |
---|
**** | This routine returns the exponential e^self. Built-in. |
exp_minus_one : FLTD .. Included as exp_minus_one |
---|
field : FIELD |
---|
floor : SAME |
---|
flt : FLT |
---|
fltd : FLTD |
---|
fmt( .. Included as fmt |
---|
fmt( .. Included as fmt |
---|
gamma : FLTD .. Included as gamma |
---|
**** |
________This_routine_implements_the_Gamma_function. |
get_representation(out sign : BOOL,out exp : INT,out mantissa_lo,out mantissa_hi : CARD) |
---|
half_pi : SAME |
---|
**** |
__This_is_a_'routine'_returning_the_implementation-dependent ___approximation_to_pi/2.___Built-in_to_this_implementation. |
hash : CARD .. Included as hash |
---|
**** |
hypot( .. Included as hypot |
---|
in_range(lower, upper : SAME) : BOOL .. Included as in_range |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_has_a_value_between ___lower_and_upper_inclusive. |
in_range(rng : $RANGE{ATP}) : BOOL .. Included as in_range |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_has_a_value_within_the_given_range. |
in_tolerance(tolerance, val : SAME) : BOOL .. Included as in_tolerance |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_within_the_given_tolerance_of_val. |
infinity : SAME |
---|
**** | This routine returns the representation of infinity -- which is
___implementation-dependent.___Built-in_to_this_implementation. |
int : INT |
---|
inti : INTI |
---|
inv_pi : SAME |
---|
**** | This is a 'routine' returning the implementation-dependent
___approximation_to_the_inverse_of_pi.___Built-in_to_this_implementation. |
inv_sqrt_2 : SAME |
---|
**** |
__This_is_a_'routine'_returning_the_implementation-dependent __approximation_to_one_divided_by_the_square-root_of_2.___Built-in_to_this __implementation. |
is_eq(other : SAME) : BOOL |
---|
**** | This routine returns tru if and only if self and other have the same
___value.___Built-in_to_this_implementation. |
is_eq(other : $OB) : BOOL .. Included as is_eq |
---|
**** | This is the generic equality predicate. c.f. the class $IS_EQ |
is_exact : BOOL .. Included as is_exact |
---|
**** | This predicate returns true if and only if self is an exact integral value. |
is_finite : BOOL |
---|
**** | This routine returns true if and only if self is zero, subnormal
___or_normal.___Built-in_to_this_implementation. |
is_inf : BOOL |
---|
**** | This routine returns true if and only if self is infinite. Built-in
___to_this_implementation. |
is_lt(other : SAME) : BOOL |
---|
**** | This rouitne returns true if and only if other is less than self. Built-in to this implementation. |
is_nan : BOOL .. Included as is_nan |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_the_NaN_value. ___This_implementatioin_makes_use_of_the_fact_that_in_the_IEEE_arithmetic ___model_the_only_value_which_will_not_compare_with_anything_is_the ___signalling_NaN. |
is_neg : BOOL .. Included as is_neg |
---|
**** |
__This_predicate_returns_true_if_and_only_if_the_value_of_self_is_less_than_zero. |
is_nil : BOOL .. Included as is_nil |
---|
**** |
__This_predicate_returns_true_if_and_only_if_self_is_the_nil_value. ___This_implementatioin_makes_use_of_the_fact_that_in_the_IEEE_arithmetic ___model_the_only_value_which_will_not_compare_with_anything_is_the ___signalling_NaN. |
is_non_neg : BOOL is return is_neg.not; end; .. Included as is_non_neg |
---|
is_non_pos : BOOL is return is_pos.not; end; .. Included as is_non_pos |
---|
is_non_zero : BOOL is return is_zero.not; end; .. Included as is_non_zero |
---|
is_normal : BOOL |
---|
**** | This routine returns true if and only if self is a normalised number. Built-in to this implementation. |
is_pos : BOOL .. Included as is_pos |
---|
**** |
__This_predicate_returns_true_if_and_only_if_the_value_of_self_is ___greater_than_zero. |
is_real( .. Included as is_real |
---|
is_subnormal : BOOL |
---|
**** | This routine returns true if and only if self is an un-normalised
___number.___Built-in_to_this_implementation. |
is_zero : BOOL |
---|
**** | This routine returns true if and only if self is zero. Built-in to
___this_implementation. |
log10 : FLTD .. Included as log10 |
---|
log10_e : SAME |
---|
**** | This is a 'routine' returning the implementation-dependent
___approximation_to_e.log10. |
log2 : FLTD .. Included as log2 |
---|
log2_e : SAME |
---|
**** | This is a 'routine' returning the implementation-dependent
___approximation_to_e.log2. |
log : SAME |
---|
**** | This routine returns the natural logarithm of self. Built-in. |
log_10 : SAME |
---|
**** | This is a 'routine' returning the implementation-dependent
___approximation_to_the_natural_logarithm_of_10. |
log_2 : SAME |
---|
**** | This is a 'routine' returning the implementation-dependent
___approximation_to_the_natural_logarithm_of_2. |
log_gamma : FLTD .. Included as log_gamma |
---|
max(other : SAME) : SAME .. Included as max |
---|
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. |
maxval : SAME .. Included as maxval |
---|
**** |
__This_routine_returns_the_maximum_representable_value_of_an_object_in_this_class. |
min(other : SAME) : SAME .. Included as min |
---|
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 |
---|
minval : SAME .. Included as minval |
---|
**** |
__This_routine_returns_the_maximum_representable_value_of_an_object_in_this_class. |
mod(other : SAME) : SAME |
---|
negatable : BOOL .. Included as negatable |
---|
**** |
__This_predicate_returns_true_if_and_only_if_this_class_is_numeric_and ___negatable_--_trivially_true! |
negate : SAME |
---|
nextdown : SAME |
---|
nextup : SAME |
---|
nil : SAME .. Included as nil |
---|
**** |
__This_routine_returns_the_value_used_to_represent_NIL_--_in_this ___case_the_signalling_NaN_value! |
num_chars : CARD .. Included as num_chars |
---|
one_minus_erf : FLTD .. Included as one_minus_erf |
---|
pi : SAME |
---|
**** | This is a 'routine' returning the implementation-dependent
___approximation_to_the_mathematical_number_pi.___Built-in_to_this ___implementation. |
plus(other : SAME) : SAME |
---|
plus_one_log : FLTD .. Included as plus_one_log |
---|
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. |
quarter_pi : SAME |
---|
**** |
__This_is_a_'routine'_returning_the_implementation-dependent ___approximation_to_pi/4.___Built-in_to_this_implementation. |
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 |
---|
raw_str( .. Included as raw_str |
---|
raw_str : STR .. Included as raw_str |
---|
read(index : BIN_CURSOR) : SAME .. Included as read |
---|
remainder(other : SAME) : SAME |
---|
round : SAME |
---|
scale_by(exp : INT) : SAME |
---|
sgn : SAME .. Included as sgn |
---|
sign : NUM_SIGNS .. Included as sign |
---|
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 routine returns true if and only if the sign bit of self is
___set.___Built-in_to_this_implementation. |
sin:SAME |
---|
sinh : FLTD .. Included as sinh |
---|
sqrt : SAME |
---|
sqrt_2 : SAME |
---|
**** |
__This_is_a_'routine'_returning_the_implementation-dependent ___approximation_to_the_square_root_of_2.___Built-in_to_this_implementation. |
square : SAME .. Included as square |
---|
str( .. Included as str |
---|
str( .. Included as str |
---|
str( .. Included as str |
---|
str : STR .. Included as str |
---|
tan:SAME |
---|
tanh : FLTD .. Included as tanh |
---|
times(other : SAME) : SAME |
---|
truncate : SAME |
---|
unbiassed_exponent : INT |
---|
write(fyle : BIN_FILE) .. Included as write |
---|
aelt!( .. Included as aelt! |
---|
aelt!( .. Included as aelt! |
---|
aelt!( .. Included as aelt! |
---|
aelt! : T .. Included as aelt! |
---|
aind! : CARD .. Included as aind! |
---|
product!(val : SAME) : SAME .. Included as product! |
---|
sum!(val : SAME) : SAME .. Included as sum! |
---|
const Decimal_Base : CARD := 10 ; .. Included as Decimal_Base |
---|
const Eng_Places : CARD := 3 ; .. Included as Eng_Places |
---|
Infinity, Not_a_Number ; .. Included as Infinity |
---|
const Msg_Cnt : CARD := Not_a_Number + 1 ; .. Included as Msg_Cnt |
---|
shared Names : ARRAY{STR} ; .. Included as Names |
---|
**** | for external representation! |
shared Names : ARRAY{STR} ; .. Included as Names |
---|
**** | for external representation! |
Infinity, Not_a_Number ; .. Included as Not_a_Number |
---|
const asize : CARD := 8 ; |
---|
**** | ---------------???????? FUDGE!! |
assemble( .. Included as assemble |
---|
check_names( .. Included as check_names |
---|
cos_approx(x2, xn:SAME, n:CARD):SAME |
---|
**** | n+2-th and later terms of Tayler series. x2=x^2, xn=(+-1) x^n/n! |
cos_approx:SAME |
---|
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. |
do_specials( .. Included as do_specials |
---|
do_value( .. Included as do_value |
---|
eval_exponent : INT .. Included as eval_exponent |
---|
exp_scan( .. Included as exp_scan |
---|
fraction_part( .. Included as fraction_part |
---|
integral_part( .. Included as integral_part |
---|
is_legal_aelts_arg( .. Included as is_legal_aelts_arg |
---|
shared lib : LIBCHARS ; .. Included as lib |
---|
shared lib : LIBCHARS ; .. Included as lib |
---|
make_val( .. Included as make_val |
---|
mantissa : FLIST{CARD} .. Included as mantissa |
---|
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. |
resize( .. Included as resize |
---|
roundup( .. Included as roundup |
---|
scan( .. Included as scan |
---|
sig_figs( .. Included as sig_figs |
---|
sin_approx(x2, xn:SAME, n:CARD):SAME |
---|
**** | n+2-th and later terms of Tayler series. x2=x^2, xn=(+-1) x^n/n! |
sin_approx: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. |