Article View: net.lang.ada
Article #974Re: The AFT Attribute
From: Doug Bryan
Date: Wed, 24 Sep 1986 05:11
Date: Wed, 24 Sep 1986 05:11
40 lines
1905 bytes
1905 bytes
Dale brings up a few more interesting points concerning 'Aft. Consider:
type Fix is delta 1.0 / 3.0 range 0.0 .. 1.0;
Given the definition of Aft, Fix'Aft must return 1. As Dale points out,
there is no way to exactly represent Fix'Delta in any finite number of digits.
It is interesting to note that Aft is defined in terms of delta, not small.
Thus Aft may not reflect the precision of the actual model numbers of the
type. (?)
Perhaps our question can more precisely be stated as follows:
What was the rationale for defining Aft to return the smallest
positive integer N such that (10 ** N) * T'Delta >= 1?
Why was T'Small not used? Surely T'Aft is not enough digits to precisely
display the decimal form of a model number of T. (We need
not even consider representation clauses.) Is Aft sufficient digits
to display the model numbers of T such that one does not display the
same value more than once?
type T is delta 1.0/16 range 0.0 .. 1.0;
T'Aft = 2
let us look at some model numbers...
0.0625 0.125 0.1875 0.25
If one were to print these model numbers using
Put (X, Fore => 2, Aft => T'Aft, Exp => 0), we would see:
0.06 0.12 0.18 0.25
No values are repeated. Is this the intended use for 'Aft?
Has anybody ever used 'Aft? How (campers) ?
doug and geoff
-------
Technical Details
Message-ID:
<12241395032.15.BRYAN@Sierra.Stanford.EDU>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!cbosgd!ucbvax!SIERRA.STANFORD.EDU!BryanReferences:
<350@cullvax.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!cbosgd!ucbvax!SIERRA.STANFORD.EDU!Bryan From: Bryan@SIERRA.STANFORD.EDU (Doug Bryan) Newsgroups: net.lang.ada Subject: Re: The AFT Attribute Message-ID: <12241395032.15.BRYAN@Sierra.Stanford.EDU> Date: Wed, 24-Sep-86 01:11:16 EDT Article-I.D.: Sierra.12241395032.15.BRYAN Posted: Wed Sep 24 01:11:16 1986 Date-Received: Tue, 30-Sep-86 03:15:32 EDT References: <350@cullvax.UUCP> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 40