s_nearbyint.c 593 B

12345678910111213141516171819202122232425
  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. libm_hidden_proto(nearbyint)
  14. #ifdef __STDC__
  15. double nearbyint(double x)
  16. #else
  17. double nearbyint(x)
  18. double x;
  19. #endif
  20. {
  21. return rint(x);
  22. }
  23. libm_hidden_def(nearbyint)