/* prxpr.c CCMATH mathematics library source code. * * Copyright (C) 2000 Daniel A. Atkinson All rights reserved. * This code may be redistributed under the terms of the GNU library * public license (LGPL). ( See the lgpl.license file for details.) * ------------------------------------------------------------------------ */ #include #include "xpre.h" static double ltn2=.3010299956639812; static int q[5*XDIM+4]; void prxpr(struct xpr u,int lim) { int *p=q,k,m=0; unsigned short *pa=(unsigned short *)&u; if((*pa&m_sgn)){ *pa^=m_sgn; printf(" -");} else printf(" "); if(*pa==0){ printf("0."); for(k=0; k=5) ++(*p); while(*p==10){ *p=0; ++(*--p);} } p=q; if(*p==0) ++p; else ++m; printf("%d.",*p++); for(k=0; k=0) printf("e+%d\n",m); else printf("e%d\n",m); } void xprint(struct xpr u) { int i; printf("%04x.",u.nmm[0]); for(i=0; i