s_nearbyint.c 564 B

123456789101112131415161718192021222324
  1. /*
  2. * ====================================================
  3. * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
  4. *
  5. * Developed at SunPro, a Sun Microsystems, Inc. business.
  6. * Permission to use, copy, modify, and distribute this
  7. * software is freely granted, provided that this notice
  8. * is preserved.
  9. * ====================================================
  10. */
  11. #include "math.h"
  12. #include "math_private.h"
  13. #ifdef __STDC__
  14. double nearbyint(double x)
  15. #else
  16. double nearbyint(x)
  17. double x;
  18. #endif
  19. {
  20. return rint(x);
  21. }
  22. libm_hidden_def(nearbyint)