aboutsummaryrefslogtreecommitdiff
path: root/math
diff options
context:
space:
mode:
authorLiubov Dmitrieva <liubov.dmitrieva@gmail.com>2012-09-03 15:32:13 +0200
committerAndreas Jaeger <aj@suse.de>2012-09-03 15:32:13 +0200
commit4ffffbd272264f083f35783ed81339304025f855 (patch)
treecdd72337981ee00f9c6e48c80905918d8d7feaab /math
parent511fa2864a8d01a09b23a6b8b9a599429b7055f6 (diff)
downloadglibc-4ffffbd272264f083f35783ed81339304025f855.tar
glibc-4ffffbd272264f083f35783ed81339304025f855.tar.gz
glibc-4ffffbd272264f083f35783ed81339304025f855.tar.bz2
glibc-4ffffbd272264f083f35783ed81339304025f855.zip
Add optimized sinf and cosf routines for x86 and x86-64
* sysdeps/i386/i686/fpu/multiarch/Makefile (sysdep_routines): Add s_sinf-sse2, s_conf-sse2. * sysdeps/i386/i686/fpu/multiarch/s_sinf-sse2.S: New file. * sysdeps/i386/i686/fpu/multiarch/s_cosf-sse2.S: New file. * sysdeps/i386/i686/fpu/multiarch/s_sinf.c: New file. * sysdeps/i386/i686/fpu/multiarch/s_cosf.c: New file. * sysdeps/ieee754/flt-32/s_sinf.c (SINF, SINF_FUNC): Add macros for using routine as __sinf_ia32. Use macro for function declaration and weak_alias. * sysdeps/ieee754/flt-32/s_cosf.c (COSF, COSF_FUNC): Add macros for using routine as __cosf_ia32. Use macro for function declaration and weak_alias. * sysdeps/i386/i686/fpu/multiarch/e_expf-sse2.S: Fix Copyright. * sysdeps/i386/i686/fpu/multiarch/e_expf.c: Fix Copyright. * sysdeps/x86_64/fpu/s_sinf.S: New file. * sysdeps/x86_64/fpu/s_cosf.S: New file. * sysdeps/x86_64/fpu/libm-test-ulps: Update. * math/libm-test.inc (cos_test): Add more test cases. (sin_test): Likewise. (sincos_test): Likewise.
Diffstat (limited to 'math')
-rw-r--r--math/libm-test.inc21
1 files changed, 21 insertions, 0 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 0f64ea4971..fa781fc592 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -2752,6 +2752,13 @@ cos_test (void)
TEST_f_f (cos, 0x1p16383L, 0.9210843909921906206874509522505756251609L);
#endif
+ TEST_f_f (cos, 0x1p+120, -9.25879022854837867303861764107414946730833e-01L);
+ TEST_f_f (cos, 0x1p+127, 7.81914638714960072263910298466369236613162e-01L);
+ TEST_f_f (cos, 0x1.fffff8p+127, 9.98819362551949040703862043664101081064641e-01L);
+ TEST_f_f (cos, 0x1.fffffep+127, 8.53021039830304158051791467692161107353094e-01L);
+ TEST_f_f (cos, 0x1p+50, 8.68095904660550604334592502063501320395739e-01L);
+ TEST_f_f (cos, 0x1p+28, -1.65568979490578758865468278195361551113358e-01L);
+
END (cos);
}
@@ -8179,6 +8186,13 @@ sin_test (void)
TEST_f_f (sin, 0x1p16383L, 0.3893629985894208126948115852610595405563L);
#endif
+ TEST_f_f (sin, 0x1p+120, 3.77820109360752022655548470056922991960587e-01L);
+ TEST_f_f (sin, 0x1p+127, 6.23385512955870240370428801097126489001833e-01L);
+ TEST_f_f (sin, 0x1.fffff8p+127, 4.85786063130487339701113680434728152037092e-02L);
+ TEST_f_f (sin, 0x1.fffffep+127, -5.21876523333658540551505357019806722935726e-01L);
+ TEST_f_f (sin, 0x1p+50, 4.96396515208940840876821859865411368093356e-01L);
+ TEST_f_f (sin, 0x1p+28, -9.86198211836975655703110310527108292055548e-01L);
+
END (sin);
}
@@ -8362,6 +8376,13 @@ sincos_test (void)
TEST_extra (sincos, 0x1p16383L, 0.3893629985894208126948115852610595405563L, 0.9210843909921906206874509522505756251609L);
#endif
+ TEST_extra (sincos, 0x1p+120, 3.77820109360752022655548470056922991960587e-01L, -9.25879022854837867303861764107414946730833e-01L);
+ TEST_extra (sincos, 0x1p+127, 6.23385512955870240370428801097126489001833e-01L, 7.81914638714960072263910298466369236613162e-01L);
+ TEST_extra (sincos, 0x1.fffff8p+127, 4.85786063130487339701113680434728152037092e-02L, 9.98819362551949040703862043664101081064641e-01L);
+ TEST_extra (sincos, 0x1.fffffep+127, -5.21876523333658540551505357019806722935726e-01L, 8.53021039830304158051791467692161107353094e-01L);
+ TEST_extra (sincos, 0x1p+50, 4.96396515208940840876821859865411368093356e-01L, 8.68095904660550604334592502063501320395739e-01L);
+ TEST_extra (sincos, 0x1p+28, -9.86198211836975655703110310527108292055548e-01L, -1.65568979490578758865468278195361551113358e-01L);
+
END (sincos);
}