ada Fixed Point (Ordinary)


A fixed point type definition specifies a delta, and a range. Together, they describe how precisely real values should be approximated as they are represented by powers of two, not using floating point hardware.

Shoe_Ounce : constant := 2.54 / 64.0;
type Thickness is delta Shoe_Ounce range 0.00 .. 1.00;

Strop : Thickness := 0.1;  -- could actually be 0.09375