--  Static universal expressions that mix root_real and root_integer (RM 4.5.5(19)), and real
--  type definitions whose delta or bounds are values of other real types (RM 3.5.7, 3.5.9).
with Ada.Text_IO;
procedure Main is
   Scale : constant := 2 ** 4;
   Del   : constant := 0.5 / Scale;
   Rng   : constant := Scale * 0.5;
   Twice : constant := Del * 2;
   type Fx is delta Del * 1 range -0.5 .. 0.5 - Del * 1;
   type Fix is delta 0.125 range 0.0 .. 10.0;
   C : constant Fix := 0.25;
   type Fix2 is delta C range 0.0 .. 10.0;
   type Fix3 is delta Fix'(0.125) range 0.0 .. 5.0;
   type Flt is digits 5 range -100.0 .. 100.0;
   type Flt3 is digits 3 range 5.0 .. Flt'Last;
   X : constant Fx := Fx'Last;
begin
   pragma Assert (Rng = 8.0 and Twice = 0.0625);
   pragma Assert (Fx'Small = Del and Fix2'Small = 0.25 and Fix3'Small = 0.125);
   pragma Assert (Flt3'Last = 100.0);
   Ada.Text_IO.Put_Line (Fx'Image (X) & Fix2'Image (Fix2'Last) & Flt3'Image (Flt3'First));
end Main;
