BSD 3 development
[unix-history] / usr / src / cmd / eqn / sqrt.c
CommitLineData
42d6e430
BJ
1# include "e.h"
2
3sqrt(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}