File : numerics.ads


with Reps;
use Reps;

package Numerics is

  pragma Pure;

  type Numeric is new Rep;

  function IsNumeric(S: Numeric) return Boolean;
  function Scal(K: Integer) return Numeric;
  function Scal(R: Rep) return Numeric;
  function Ball(R: Rep) return Numeric;
  function Ball(S: Numeric) return Numeric;
  function Err0(S: Numeric) return Boolean renames IsNumeric;
  function IntFloor(S: Numeric) return Integer;
  function IntCeiling(S: Numeric) return Integer;
  function Approx(S: Numeric) return Rep;
  function Up(R: Rep; Dummy: Numeric) return Rep;
  function Center(S: Numeric) return Numeric;
  procedure ResetCenter(S: in out Numeric);
  function ResetCenter(S: Numeric) return Numeric renames Ball;
  procedure Split(S: in Numeric; S0,SE: out Numeric);
  procedure ErrMult(R: in Rep; S: in out Numeric);
  function Inf(S: Numeric) return Rep renames Approx;
  function Sup(S: Numeric) return Rep renames Approx;
  function SupAbs(S: Numeric) return Rep;
  function Min(S1,S2: Numeric) return Numeric renames Numeric'Min;
  function Max(S1,S2: Numeric) return Numeric renames Numeric'Max;
  function Cap(R: Radius; S: Numeric) return Numeric;

  pragma Inline (IsNumeric,Scal,Ball,Err0,IntFloor,IntCeiling,
                Approx,Center,ResetCenter,Split, ErrMult,Inf,Sup,SupAbs,Max);
  pragma Inline_Always (IsNumeric,Scal,Ball,Err0,IntFloor,IntCeiling,
                Approx,Center,ResetCenter,Split, ErrMult,Inf,Sup,SupAbs,Max);

end Numerics;