1 #ifndef lint 2 static char sccsid[] = "@(#)sqrt.c 2.1 (CWI) 85/07/18"; 3 #endif lint 4 # include "e.h" 5 6 sqrt(p2) 7 int p2; 8 { 9 int nps; 10 11 nps = ps * 0.95 * eht[p2] / EM(1.0,ps) + 0.99; /* kludgy */ 12 nps = max(EFFPS(nps), ps); 13 yyval = p2; 14 if (ttype != DEV202) 15 eht[yyval] = EM(1.2, nps); 16 else 17 eht[yyval] = EM(1.1, nps); 18 dprintf(".\tS%d <- sqrt S%d;b=%g, h=%g, nps=%d\n", 19 yyval, p2, ebase[yyval], eht[yyval], nps); 20 printf(".as %d \\|\n", yyval); 21 nrwid(p2, ps, p2); 22 printf(".ds %d \\v'%gm'%s", yyval, REL(ebase[p2],ps), DPS(ps,nps)); /* proper position for sqrt */ 23 if (ttype != DEV202) 24 printf("\\v'-.2m'\\(sr\\l'\\n(%du\\(rn'\\v'.2m'", p2); 25 else 26 printf("\\(sr\\l'\\n(%du\\(rn'", p2); 27 printf("%s\\v'%gm'\\h'-\\n(%du'\\*(%d\n", DPS(nps,ps), REL(-ebase[p2],ps), p2, p2); 28 lfont[yyval] = rfont[yyval] = ROM; 29 } 30