SHARE
TWEET

Untitled

a guest May 29th, 2018 136 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  function iabs(const x: interval): interval;
  2.   begin
  3.     if (x.a <= 0) and (x.b <= 0) then
  4.     begin
  5.       Result.a := abs(x.b);
  6.       Result.b := abs(x.a);
  7.     end
  8.     else if (x.a < 0) and (x.b > 0) then
  9.     begin
  10.       Result.a := 0;
  11.       Result.b := max(abs(x.a), x.b);
  12.     end
  13.     else
  14.     begin
  15.       Result.a := x.a;
  16.       Result.b := x.b;
  17.     end;
  18.   end { iabs };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top