Figure 8.
Precise division.
---------------------------------------------------------
-- The Dimensionless function can be used to obtain a
-- ridiculously precise ratio.
with DIM_INT_32; use DIM_INT_32;
procedure Program_Fragment is
type Feet is new DIM_INT_32.Units;
type Float_15 is digits 15;
PRESENT_POSITION, PAST_POSITION : Feet;
PRECISE_RATIO : Float_15;
begin
-- Missing statements here have assigned values to
-- PRESENT_POSITION and PAST_POSITION.
PRECISE_RATIO := Float_15(Dimensionless(PRESENT_POSITION))
/ Float_15(Dimensionless(PAST_POSITION));
end Program_Fragment;