NUMmachar.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef _NUMmachar_h_
  2. #define _NUMmachar_h_
  3. /* NUMmachar.h
  4. *
  5. * Copyright (C) 1994-2011 David Weenink
  6. *
  7. * This code is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * This code is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. * General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this work. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. /*
  21. djmw 20020812 GPL header
  22. djmw 20110308 Latest modification
  23. */
  24. struct structmachar_Table
  25. {
  26. int base; /* Radix in which numbers are presented. */
  27. int t; /* Number of base digits in mantissa*/
  28. int emin; /* Minimum exponent before (gradual) underflow */
  29. int emax; /* Largest exponent before overflow */
  30. int rnd; /* 1 when rounding occurs in addition, 0 otherwise */
  31. double prec; /* Quantization step (eps*base) */
  32. double eps; /* Quantization error (relative machine precision) */
  33. double rmin; /* Underflow threshold - base**(emin-1) */
  34. double sfmin; /* Safe minimum, such that 1/sfmin does not overflow */
  35. double rmax; /* Overflow threshold - (base**emax)*(1-eps)*/
  36. };
  37. typedef struct structmachar_Table *machar_Table;
  38. extern machar_Table NUMfpp;
  39. void NUMmachar ();
  40. #endif /* _NUMmachar_h_ */