mydouble.c 262 B

123456789101112131415161718
  1. /*
  2. * File: dclxvi-20130329/mydouble.c
  3. * Author: Ruben Niederhagen, Peter Schwabe
  4. * Public Domain
  5. */
  6. #include "mydouble.h"
  7. #ifndef CHECK
  8. #include <math.h>
  9. double remround(double a, double d)
  10. {
  11. double carry = round(a/d);
  12. return a - carry*d;
  13. }
  14. #endif