#include <perms.h>

                                                                //      1  %external %routine vaxprintfl(%long %real r, %integer places)
#line 1 "regression-bugs-tmp/vaxprint.imp"
void VAXPRINTFL( double R, int PLACES )
#line 1 "regression-bugs-tmp/vaxprint.imp"
{
  __label__ _imp_endofblock;
                                                                //      2     {%external} %string (63) %fn ftos(%long %real r, %integer p)
_imp_current_line = 2; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 2 "regression-bugs-tmp/vaxprint.imp"
_imp_string /*%string(63)*/ FTOS( double R, int P )
#line 2 "regression-bugs-tmp/vaxprint.imp"
{
  __label__ _imp_endofblock;
                                                                //      3        %routine fraction(%long %real r, %integer places, %string (*) %name s)
_imp_current_line = 3; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 3 "regression-bugs-tmp/vaxprint.imp"
void FRACTION( double R, int PLACES, _imp_string /*%string(255)*/ /*name*/*S )
#line 3 "regression-bugs-tmp/vaxprint.imp"
{
  __label__ _imp_endofblock;
                                                                //      4           {%external} %long %real %fn fracpt(%long %real x)
_imp_current_line = 4; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 4 "regression-bugs-tmp/vaxprint.imp"
double FRACPT( double X )
#line 4 "regression-bugs-tmp/vaxprint.imp"
{
  __label__ _imp_endofblock;
                                                                //      5              %long %real z
_imp_current_line = 5; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 5 "regression-bugs-tmp/vaxprint.imp"
double Z;
/*promote*/                                                                //      6              z = x - intpt(x)
_imp_current_line = 6; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 6 "regression-bugs-tmp/vaxprint.imp"
Z = ((X) - ((double)(_imp_INTPT(X))));
                                                                //      7              z = z + 1.0 %if z < 0
_imp_current_line = 7; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 7 "regression-bugs-tmp/vaxprint.imp"
if (((Z) >= (0))) goto L_0002;
#line 7 "regression-bugs-tmp/vaxprint.imp"
Z = (((double)(Z)) + (1.0));
#line 7 "regression-bugs-tmp/vaxprint.imp"
L_0002:;
                                                                //      8              %result = z
_imp_current_line = 8; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 8 "regression-bugs-tmp/vaxprint.imp"
return Z;
                                                                //      9           %end
_imp_current_line = 9; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 9 "regression-bugs-tmp/vaxprint.imp"
_imp_endofblock: ;
} // End of block FRACPT at level 4
                                                                //     10           %return %if places <= 0
_imp_current_line = 10; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 10 "regression-bugs-tmp/vaxprint.imp"
if (((PLACES) > (0))) goto L_0003;
#line 10 "regression-bugs-tmp/vaxprint.imp"
return;
#line 10 "regression-bugs-tmp/vaxprint.imp"
L_0003:;
                                                                //     11           s = s . "."
_imp_current_line = 11; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 11 "regression-bugs-tmp/vaxprint.imp"
*S = _imp_join((_imp_string)*S,(_imp_string)_imp_str_literal("."));
                                                                //     12           %while places > 0 %cycle
_imp_current_line = 12; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 12 "regression-bugs-tmp/vaxprint.imp"
L_0004:;
#line 12 "regression-bugs-tmp/vaxprint.imp"
if (((PLACES) <= (0))) goto L_0005;
                                                                //     13              places = places - 1
_imp_current_line = 13; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 13 "regression-bugs-tmp/vaxprint.imp"
PLACES = (((int)(PLACES)) - (1));
/*promote*/                                                                //     14              r = fracpt(r) * 10
_imp_current_line = 14; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 14 "regression-bugs-tmp/vaxprint.imp"
R = ((FRACPT(R)) * ((double)(10)));
                                                                //     15              s = s . tostring(intpt(r) + '0')
_imp_current_line = 15; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 15 "regression-bugs-tmp/vaxprint.imp"
*S = _imp_join((_imp_string)*S,(_imp_string)_imp_TOSTRING((((int)(_imp_INTPT(R))) + (48))));
                                                                //     16           %repeat
_imp_current_line = 16; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 16 "regression-bugs-tmp/vaxprint.imp"
goto L_0004;
#line 16 "regression-bugs-tmp/vaxprint.imp"
L_0005:;
                                                                //     17        %end
_imp_current_line = 17; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 17 "regression-bugs-tmp/vaxprint.imp"
return;
_imp_endofblock: ;
} // End of block FRACTION at level 3
                                                                //     18        %routine round(%long %real %name v, %integer p)
_imp_current_line = 18; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 18 "regression-bugs-tmp/vaxprint.imp"
void ROUND( double /*name*/*V, int P )
#line 18 "regression-bugs-tmp/vaxprint.imp"
{
  __label__ _imp_endofblock;
                                                                //     19           %long %real x
_imp_current_line = 19; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 19 "regression-bugs-tmp/vaxprint.imp"
double X;
                                                                //     20           %return %if v = 0
_imp_current_line = 20; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 20 "regression-bugs-tmp/vaxprint.imp"
if (((*V) != (0))) goto L_0007;
#line 20 "regression-bugs-tmp/vaxprint.imp"
return;
#line 20 "regression-bugs-tmp/vaxprint.imp"
L_0007:;
                                                                //     21           %if v < 0 %then x = -0.5 %else x = 0.5
_imp_current_line = 21; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 21 "regression-bugs-tmp/vaxprint.imp"
if (((*V) >= (0))) goto L_0008;
#line 21 "regression-bugs-tmp/vaxprint.imp"
X = (-0.5);
#line 21 "regression-bugs-tmp/vaxprint.imp"
goto L_0009;
#line 21 "regression-bugs-tmp/vaxprint.imp"
L_0008:;
#line 21 "regression-bugs-tmp/vaxprint.imp"
X = 0.5;
#line 21 "regression-bugs-tmp/vaxprint.imp"
L_0009:;
                                                                //     22           %cycle 
_imp_current_line = 22; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 22 "regression-bugs-tmp/vaxprint.imp"
L_000a:;
                                                                //     23              p = p - 1
_imp_current_line = 23; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 23 "regression-bugs-tmp/vaxprint.imp"
P = (((int)(P)) - (1));
                                                                //     24              %exit %if p < 0
_imp_current_line = 24; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 24 "regression-bugs-tmp/vaxprint.imp"
if (((P) >= (0))) goto L_000d;
#line 24 "regression-bugs-tmp/vaxprint.imp"
goto L_000b;
#line 24 "regression-bugs-tmp/vaxprint.imp"
L_000d:;
                                                                //     25              x = x / 10
_imp_current_line = 25; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 25 "regression-bugs-tmp/vaxprint.imp"
X = (double)((double)((double)(X)) / (double)((float)(10)));
                                                                //     26           %repeat
_imp_current_line = 26; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 26 "regression-bugs-tmp/vaxprint.imp"
goto L_000a;
#line 26 "regression-bugs-tmp/vaxprint.imp"
L_000b:;
                                                                //     27           v = v + x
_imp_current_line = 27; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 27 "regression-bugs-tmp/vaxprint.imp"
*V = ((*(double *)(V)) + (X));
                                                                //     28        %end
_imp_current_line = 28; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 28 "regression-bugs-tmp/vaxprint.imp"
return;
_imp_endofblock: ;
} // End of block ROUND at level 3
                                                                //     29        {XOWN}%string (63) s = ""
_imp_current_line = 29; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 29 "regression-bugs-tmp/vaxprint.imp"
_imp_string /*%string(63)*/ S;
#line 29 "regression-bugs-tmp/vaxprint.imp"
S = _imp_str_literal("");
                                                                //     30        %integer exp, sym
_imp_current_line = 30; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 30 "regression-bugs-tmp/vaxprint.imp"
int EXP;
#line 30 "regression-bugs-tmp/vaxprint.imp"
int SYM;
                                                                //     31        p = 7 %if p > 7
_imp_current_line = 31; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 31 "regression-bugs-tmp/vaxprint.imp"
if (((P) <= (7))) goto L_000e;
#line 31 "regression-bugs-tmp/vaxprint.imp"
P = 7;
#line 31 "regression-bugs-tmp/vaxprint.imp"
L_000e:;
                                                                //     32        %if r < 0 %then sym = '-' %and r = -r %else sym = ' '
_imp_current_line = 32; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 32 "regression-bugs-tmp/vaxprint.imp"
if (((R) >= (0))) goto L_000f;
#line 32 "regression-bugs-tmp/vaxprint.imp"
SYM = 45;
#line 32 "regression-bugs-tmp/vaxprint.imp"
R = (-(R));
#line 32 "regression-bugs-tmp/vaxprint.imp"
goto L_0010;
#line 32 "regression-bugs-tmp/vaxprint.imp"
L_000f:;
#line 32 "regression-bugs-tmp/vaxprint.imp"
SYM = 32;
#line 32 "regression-bugs-tmp/vaxprint.imp"
L_0010:;
                                                                //     33        %if r = 0 %start
_imp_current_line = 33; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 33 "regression-bugs-tmp/vaxprint.imp"
if (((R) != (0))) goto L_0011;
                                                                //     34           exp = -99
_imp_current_line = 34; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 34 "regression-bugs-tmp/vaxprint.imp"
EXP = (-99);
                                                                //     35        %else
_imp_current_line = 35; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 35 "regression-bugs-tmp/vaxprint.imp"
goto L_0012;
#line 35 "regression-bugs-tmp/vaxprint.imp"
L_0011:;
                                                                //     36           exp = 0
_imp_current_line = 36; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 36 "regression-bugs-tmp/vaxprint.imp"
EXP = 0;
                                                                //     37           exp = exp + 1 %and r = r / 10 %while r >= 10
_imp_current_line = 37; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 37 "regression-bugs-tmp/vaxprint.imp"
L_0013:;
#line 37 "regression-bugs-tmp/vaxprint.imp"
if (((R) < (10))) goto L_0014;
#line 37 "regression-bugs-tmp/vaxprint.imp"
EXP = (((int)(EXP)) + (1));
#line 37 "regression-bugs-tmp/vaxprint.imp"
R = (double)((double)((double)(R)) / (double)((float)(10)));
#line 37 "regression-bugs-tmp/vaxprint.imp"
goto L_0013;
#line 37 "regression-bugs-tmp/vaxprint.imp"
L_0014:;
/*promote*/                                                                //     38           exp = exp - 1 %and r = r * 10 %while r < 1
_imp_current_line = 38; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 38 "regression-bugs-tmp/vaxprint.imp"
L_0016:;
#line 38 "regression-bugs-tmp/vaxprint.imp"
if (((R) >= (1))) goto L_0017;
#line 38 "regression-bugs-tmp/vaxprint.imp"
EXP = (((int)(EXP)) - (1));
#line 38 "regression-bugs-tmp/vaxprint.imp"
R = ((R) * ((double)(10)));
#line 38 "regression-bugs-tmp/vaxprint.imp"
goto L_0016;
#line 38 "regression-bugs-tmp/vaxprint.imp"
L_0017:;
                                                                //     39        %finish
_imp_current_line = 39; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 39 "regression-bugs-tmp/vaxprint.imp"
L_0012:;
                                                                //     40        round(r, p)
_imp_current_line = 40; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 40 "regression-bugs-tmp/vaxprint.imp"
ROUND(&R, P);
                                                                //     41        exp = exp + 1 %and r = r / 10 %if r >= 10
_imp_current_line = 41; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 41 "regression-bugs-tmp/vaxprint.imp"
if (((R) < (10))) goto L_0019;
#line 41 "regression-bugs-tmp/vaxprint.imp"
EXP = (((int)(EXP)) + (1));
#line 41 "regression-bugs-tmp/vaxprint.imp"
R = (double)((double)((double)(R)) / (double)((float)(10)));
#line 41 "regression-bugs-tmp/vaxprint.imp"
L_0019:;
                                                                //     42        s = s . tostring(intpt(r) + '0')
_imp_current_line = 42; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 42 "regression-bugs-tmp/vaxprint.imp"
S = _imp_join((_imp_string)S,(_imp_string)_imp_TOSTRING((((int)(_imp_INTPT(R))) + (48))));
                                                                //     43        fraction(r, p, s)
_imp_current_line = 43; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 43 "regression-bugs-tmp/vaxprint.imp"
FRACTION(R, P, &S);
                                                                //     44        %result = tostring(sym) . s . "@" . itos(exp, 0)
_imp_current_line = 44; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 44 "regression-bugs-tmp/vaxprint.imp"
return _imp_join((_imp_string)_imp_join((_imp_string)_imp_join((_imp_string)_imp_TOSTRING(SYM),(_imp_string)S),(_imp_string)_imp_str_literal("@")),(_imp_string)_imp_ITOS(EXP, 0));
                                                                //     45     %end
_imp_current_line = 45; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 45 "regression-bugs-tmp/vaxprint.imp"
_imp_endofblock: ;
} // End of block FTOS at level 2
                                                                //     46     places = \places %if places < 0
_imp_current_line = 46; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 46 "regression-bugs-tmp/vaxprint.imp"
if (((PLACES) >= (0))) goto L_001a;
#line 46 "regression-bugs-tmp/vaxprint.imp"
PLACES = (~(PLACES));
#line 46 "regression-bugs-tmp/vaxprint.imp"
L_001a:;
                                                                //     47     spaces(places - 62)
_imp_current_line = 47; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 47 "regression-bugs-tmp/vaxprint.imp"
_imp_SPACES((((int)(PLACES)) - (62)));
                                                                //     48     printstring(ftos(r, places))
_imp_current_line = 48; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 48 "regression-bugs-tmp/vaxprint.imp"
_imp_PRINTSTRING(FTOS(R, PLACES));
                                                                //     49  %end
_imp_current_line = 49; _imp_current_file = "regression-bugs-tmp/vaxprint.imp";
#line 49 "regression-bugs-tmp/vaxprint.imp"
return;
_imp_endofblock: ;
} // End of block VAXPRINTFL at level 1
                                                                //     50  
                                                                //     51  %endoffile
#line 51 "regression-bugs-tmp/vaxprint.imp"
// End of file
