"Fossies" - the Fresh Open Source Software Archive

Member "ccmath-2.2.1/xarm/supp/big-end/xpre.h" (24 Oct 2000, 1827 Bytes) of package /linux/misc/old/ccmath-2.2.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "xpre.h" see the Fossies "Dox" file reference documentation.

    1 /*  xpre.h    CCMATH mathematics library source code.
    2  *
    3  *  Copyright (C)  2000   Daniel A. Atkinson    All rights reserved.
    4  *  This code may be redistributed under the terms of the GNU library
    5  *  public license (LGPL). ( See the lgpl.license file for details.)
    6  * ------------------------------------------------------------------------
    7  */
    8 #define XDIM 7
    9 struct xpr {unsigned short nmm[XDIM+1];};
   10 extern unsigned short m_sgn,m_exp;
   11 extern short bias;
   12 extern int itt_div,k_tanh;
   13 extern int ms_exp,ms_trg,ms_hyp;
   14 extern short max_p,k_lin;
   15 extern short d_bias,d_max,d_lex;
   16 extern struct xpr zero,one,two,ten;
   17 extern struct xpr x_huge;
   18 extern struct xpr pi,pi2,pi4;
   19 extern struct xpr ee,srt2,ln2;
   20 struct xpr xadd(struct xpr a,struct xpr b,int k);
   21 struct xpr xmul(struct xpr s,struct xpr t);
   22 struct xpr xdiv(struct xpr s,struct xpr t);
   23 struct xpr atox(char *s);
   24 struct xpr dubtox(double y);
   25 struct xpr inttox(int n);
   26 int xprcmp(struct xpr *p,struct xpr *q);
   27 int neg(struct xpr *p);
   28 int xex(struct xpr *p);
   29 struct xpr sfmod(struct xpr t,int *p);
   30 struct xpr xpwr(struct xpr s,int n);
   31 struct xpr xpr2(struct xpr s,int n);
   32 struct xpr xneg(struct xpr s);
   33 struct xpr xabs(struct xpr s);
   34 struct xpr xfrex(struct xpr s,int *p);
   35 struct xpr xfmod(struct xpr s,struct xpr t,int *p);
   36 double xtodub(struct xpr s);
   37 struct xpr xtan(struct xpr x);
   38 struct xpr xsin(struct xpr x);
   39 struct xpr xcos(struct xpr x);
   40 struct xpr xatan(struct xpr a);
   41 struct xpr xasin(struct xpr a);
   42 struct xpr xacos(struct xpr a);
   43 struct xpr xsqrt(struct xpr u);
   44 struct xpr xexp(struct xpr u);
   45 struct xpr xlog(struct xpr u);
   46 struct xpr xtanh(struct xpr v);
   47 struct xpr xsinh(struct xpr v);
   48 struct xpr xcosh(struct xpr v);
   49 void prxpr(struct xpr u,int m);
   50 void xprint(struct xpr u);
   51 void lshift(int i,unsigned short *p,int k);
   52 void rshift(int i,unsigned short *p,int k);