s_sincosl.c 714 B

12345678910111213141516171819202122232425262728293031
  1. /* s_sincosl.c -- long double version of s_sincos.c
  2. *
  3. * Copyright (C) 2013 Elliot Saba
  4. * Developed at the University of Washington
  5. *
  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 "cdefs-compat.h"
  12. #include <float.h>
  13. #include "openlibm.h"
  14. #include "math_private.h"
  15. #if LDBL_MANT_DIG == 64
  16. #include "../ld80/e_rem_pio2l.h"
  17. #elif LDBL_MANT_DIG == 113
  18. #include "../ld128/e_rem_pio2l.h"
  19. #else
  20. #error "Unsupported long double format"
  21. #endif
  22. DLLEXPORT void
  23. sincosl( long double x, long double * s, long double * c )
  24. {
  25. *s = cosl( x );
  26. *c = sinl( x );
  27. }