Add missing <complex.h> functions.
FreeBSD doesn't seem interested in having low-quality implementations of
these functions:
cacoshl, cacosl, casinhl, casinl, catanhl, catanl, ccoshl, ccosl, cexpl,
clog, clogf, clogl, cpow, cpowf, cpowl, csinhl, csinl, ctanhl, ctanl.
And they still haven't got round to writing good implementations, so for
now let's just take the NetBSD ones so we have the full set.
Bug: http://b/27555792
Change-Id: I6b72003cf749b1043f006377a01fffe5e1d659bc
diff --git a/libm/include/math.h b/libm/include/math.h
index ce8e3b2..8e193cb 100644
--- a/libm/include/math.h
+++ b/libm/include/math.h
@@ -108,6 +108,22 @@
extern int signgam;
#endif /* __BSD_VISIBLE || __XSI_VISIBLE */
+#if __USE_GNU
+#define M_El 2.718281828459045235360287471352662498L /* e */
+#define M_LOG2El 1.442695040888963407359924681001892137L /* log 2e */
+#define M_LOG10El 0.434294481903251827651128918916605082L /* log 10e */
+#define M_LN2l 0.693147180559945309417232121458176568L /* log e2 */
+#define M_LN10l 2.302585092994045684017991454684364208L /* log e10 */
+#define M_PIl 3.141592653589793238462643383279502884L /* pi */
+#define M_PI_2l 1.570796326794896619231321691639751442L /* pi/2 */
+#define M_PI_4l 0.785398163397448309615660845819875721L /* pi/4 */
+#define M_1_PIl 0.318309886183790671537767526745028724L /* 1/pi */
+#define M_2_PIl 0.636619772367581343075535053490057448L /* 2/pi */
+#define M_2_SQRTPIl 1.128379167095512573896158903121545172L /* 2/sqrt(pi) */
+#define M_SQRT2l 1.414213562373095048801688724209698079L /* sqrt(2) */
+#define M_SQRT1_2l 0.707106781186547524400844362104849039L /* 1/sqrt(2) */
+#endif
+
#if __BSD_VISIBLE
#if 0
/* Old value from 4.4BSD-Lite math.h; this is probably better. */