home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V7 / usr / src / cmd / eqn / sqrt.c < prev    next >
Encoding:
C/C++ Source or Header  |  1979-01-10  |  500 b   |  18 lines

  1. # include "e.h"
  2.  
  3. sqrt(p2) int p2; {
  4.     int nps;
  5.     nps = EFFPS(((eht[p2]*9)/10+5)/6);
  6.     yyval = p2;
  7.     eht[yyval] = VERT( (nps*6*12)/10 );
  8.     if(dbg)printf(".\tsqrt: S%d <- S%d;b=%d, h=%d\n", 
  9.         yyval, p2, ebase[yyval], eht[yyval]);
  10.     if (rfont[yyval] == ITAL)
  11.         printf(".as %d \\|\n", yyval);
  12.     nrwid(p2, ps, p2);
  13.     printf(".ds %d \\v'%du'\\s%d\\v'-.2m'\\(sr\\l'\\n(%du\\(rn'\\v'.2m'\\s%d", 
  14.         yyval, ebase[p2], nps, p2, ps);
  15.     printf("\\v'%du'\\h'-\\n(%du'\\*(%d\n", -ebase[p2], p2, p2);
  16.     lfont[yyval] = ROM;
  17. }
  18.