source: trunk/Softwares/MiBench/src/include/basicmath-snipmath.h @ 117

Last change on this file since 117 was 117, checked in by rosiere, 15 years ago

1) Platforms : add new organization for test
2) Load_Store_Unit : add array to count nb_check in store_queue
3) Issue_queue and Core_Glue : rewrite the issue network
4) Special_Register_Unit : add reset value to register CID
5) Softwares : add multicontext test
6) Softwares : add SPECINT
7) Softwares : add MiBench?
7) Read_queue : inhib access for r0
8) Change Core_Glue (network) - dont yet support priority and load balancing scheme

  • Property svn:executable set to *
  • Property svn:keywords set to Id
File size: 3.0 KB
Line 
1/* +++Date last modified: 05-Jul-1997 */
2
3/*
4**  SNIPMATH.H - Header file for SNIPPETS math functions and macros
5*/
6
7#ifndef SNIPMATH__H
8#define SNIPMATH__H
9
10#include <math.h>
11#include "basicmath-sniptype.h"
12#include "basicmath-round.h"
13
14/*
15**  Callable library functions begin here
16*/
17
18void    SetBCDLen(int n);                             /* Bcdl.C         */
19long    BCDtoLong(char *BCDNum);                      /* Bcdl.C         */
20void    LongtoBCD(long num, char BCDNum[]);           /* Bcdl.C         */
21double  bcd_to_double(void *buf, size_t len,          /* Bcdd.C         */
22                      int digits);
23int     double_to_bcd(double arg, char *buf,          /* Bcdd.C         */
24                      size_t length, size_t digits );
25DWORD   ncomb1 (int n, int m);                        /* Combin.C       */
26DWORD   ncomb2 (int n, int m);                        /* Combin.C       */
27void    SolveCubic(double a, double b, double c,      /* Cubic.C        */
28                  double d, int *solutions,
29                  double *x);
30DWORD   dbl2ulong(double t);                          /* Dbl2Long.C     */
31long    dbl2long(double t);                           /* Dbl2Long.C     */
32double  dround(double x);                             /* Dblround.C     */
33
34/* Use #defines for Permutations and Combinations     -- Factoryl.C     */
35
36#define log10P(n,r) (log10factorial(n)-log10factorial((n)-(r)))
37#define log10C(n,r) (log10P((n),(r))-log10factorial(r))
38
39double  log10factorial(double N);                     /* Factoryl.C     */
40
41double  fibo(unsigned short term);                    /* Fibo.C         */
42double  frandom(int n);                               /* Frand.C        */
43double  ipow(double x, int n);                        /* Ipow.C         */
44int     ispow2(int x);                                /* Ispow2.C       */
45long    double ldfloor(long double a);                /* Ldfloor.C      */
46int     initlogscale(long dmax, long rmax);           /* Logscale.C     */
47long    logscale(long d);                             /* Logscale.C     */
48
49float   MSBINToIEEE(float f);                         /* Msb2Ieee.C     */
50float   IEEEToMSBIN(float f);                         /* Msb2Ieee.C     */
51int     perm_index (char pit[], int size);            /* Perm_Idx.C     */
52int     round_div(int n, int d);                      /* Rnd_Div.C      */
53long    round_ldiv(long n, long d);                   /* Rnd_Div.C      */
54double  rad2deg(double rad);                          /* Rad2Deg.C      */
55double  deg2rad(double deg);                          /* Rad2Deg.C      */
56
57#include "basicmath-pi.h"
58#ifndef PHI
59 #define PHI      ((1.0+sqrt(5.0))/2.0)         /* the golden number    */
60 #define INV_PHI  (1.0/PHI)                     /* the golden ratio     */
61#endif
62
63/*
64**  File: ISQRT.C
65*/
66
67struct int_sqrt {
68      unsigned sqrt,
69               frac;
70};
71
72void usqrt(unsigned long x, struct int_sqrt *q);
73
74
75#endif /* SNIPMATH__H */
Note: See TracBrowser for help on using the repository browser.