🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
733 B

  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. /*
  12. * fabs(x) returns the absolute value of x.
  13. */
  14. /*#include <features.h>*/
  15. /* Prevent math.h from defining a colliding inline */
  16. #undef __USE_EXTERN_INLINES
  17. #include "math_libm.h"
  18. #include "math_private.h"
  19. double fabs(double x)
  20. {
  21. u_int32_t high;
  22. GET_HIGH_WORD(high,x);
  23. SET_HIGH_WORD(x,high&0x7fffffff);
  24. return x;
  25. }
  26. libm_hidden_def(fabs)