
%BEGIN
%INTEGER I,J,K,ERRS
%CONSTREAL EPS=1@-6
%REAL X
%LONGREAL Y
%LONGLONGREAL Z
      ERRS=0
      %CYCLE I=1,1,16
         K=2
         K=K****I
         %CYCLE  J=0,1,4
            %IF K<<J#K*2****J %THEN PRINTSTRING("<< ERROR") %AND ERRS=ERRS+1
            %IF K>>J#K//(2****J) %THEN PRINTSTRING(">> ERROR") %AND ERRS=ERRS+1
         %REPEAT
      %REPEAT
      %CYCLE I=1,1,16
         %CYCLE J=0,1,4
            X=I; Y=I; Z=I
            K=I****J
            %UNLESS MOD(K-X**J)<EPS*K %AND MOD(K-Y**J)<EPS*EPS*K %AND %C
               MOD(K-Z**J)<EPS*EPS*K %THEN PRINTSTRING("EXPR+ERROR") %AND ERRS=ERRS+1
            %UNLESS MOD(K-1/(X**(-J)))<EPS*K %%start
            printstring("real exp error on "); write(i,1)
            printstring("** -"); write(j,1); newline
            errs=errs+1
         %finish
            %unless MOD(K-1/(Y**(-J)))<EPS*EPS*K %start
            printstring("double exp error on "); write(i,1)
            printstring("** -"); write(j,1); newline
            errs=errs+1
         %finish
             %unless MOD(K-1/(Z**(-J)))<EPS*EPS*K %THEN %Start
            printstring("quad exp error on "); write(i,1)
            printstring("** -"); write(j,1); newline
            errs=errs+1
         %finish
         %REPEAT
      %REPEAT
      %IF ERRS=0 %THEN PRINTSTRING("TEST OK")
%ENDOFPROGRAM
