perm filename TEST.SAI[HAK,ROB]2 blob sn#473899 filedate 1979-09-07 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	begin "bug"
C00005 ENDMK
C⊗;
begin "bug"

REQUIRE "{}<>" DELIMITERS;

DEFINE !={COMMENT};

LET ⊂ = BEGIN, ⊃ = END, S⊂ = START_CODE, Q⊂ = QUICK_CODE;

DEFINE
  SP={" "}, CR={('15&"")}, LF={('12&"")}, ↓={(CR&LF)}, TAB={('11&"")},
  FF={('14&"")}, ALT={('175&"")},comma={", "};
DEFINE
  THRU={STEP 1 UNTIL};
DEFINE
  D$PRINT(str) = {IFC D$BUG THENC PRINT(str) ENDC},
  D$ONLY(s) = {IFC D$BUG THENC ⊂ s ⊃ ENDC},
  D$BUG ← {-1};

DEFINE PI = { 3.1415926536 };
DEFINE pos_int_infinity = { '377777777777 }; ! = 34359738367;
DEFINE neg_int_infinity = { '400000000000 }; ! = -34359738368;
DEFINE pos_real_infinity = {  1.70141182@38 }; ! just weird numbers that work;
DEFINE neg_real_infinity = { -1.69808878@38 };

DEFINE clear_screen = { CALL ((-1 LSH 18) + LOCATION ('004000000516), "TTYSET") };
DEFINE Quit = { BEGIN CALL(1,"EXIT"); END };
DEFINE ErrQuit(s) = { BEGIN PRINT(S); CALL(1,"EXIT"); END };

DEFINE LeftMask=(-1 LSH 18); ! Left half-word mask;
DEFINE RightMask=(-1 LSH -18); ! Right half-word mask;
DEFINE LeftHalf(Word)={((Word) LSH -18)}; ! Left half-word;
DEFINE RightHalf(Word)={((Word) LAND RightMask)}; ! Right half-word;
DEFINE XWD(Left,Right)={( ((Left) LSH 18) LOR ((Right) LAND RightMask) )};

long real A, B;
if A > 0.0 then B ← A else ⊂ S⊂ ⊃; B ← B * exp (-A/2) ⊃

end "bug"