Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Feb 2017 18:57:58 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-standards@FreeBSD.org
Subject:   [Bug 216858] C11 conformance: catanhl() is missing
Message-ID:  <bug-216858-15-gHEKzpFwjW@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-216858-15@https.bugs.freebsd.org/bugzilla/>
References:  <bug-216858-15@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216858

--- Comment #5 from sgk@troutmask.apl.washington.edu ---

* Makefile:
  . Fix build on mips.
  . Add MLINKS for the long double inverse trignometric and
    hyperbolic functions

* man/cacos.3:
  . Document cacosl, cacoshl, casinl, casinhl, catanl, catanhl

* src/catrig.c:
  . Use weak references for LDBL_MANT_DIG =3D=3D 53 targets.


Index: Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- Makefile    (revision 313777)
+++ Makefile    (working copy)
@@ -94,7 +94,8 @@
 COMMON_SRCS+=3D  s_copysignl.c s_fabsl.c s_llrintl.c s_lrintl.c s_modfl.c
 .if ${LDBL_PREC} !=3D 53
 # If long double !=3D double use these; otherwise, we alias the double ver=
sions.
-COMMON_SRCS+=3D  e_acoshl.c e_acosl.c e_asinl.c e_atan2l.c e_atanhl.c \
+COMMON_SRCS+=3D  catrigl.c \
+       e_acoshl.c e_acosl.c e_asinl.c e_atan2l.c e_atanhl.c \
        e_coshl.c e_fmodl.c e_hypotl.c \
        e_lgammal.c e_lgammal_r.c \
        e_remainderl.c e_sinhl.c e_sqrtl.c \
@@ -107,7 +108,7 @@
 .endif

 # C99 complex functions
-COMMON_SRCS+=3D  catrig.c catrigf.c catrigl.c \
+COMMON_SRCS+=3D  catrig.c catrigf.c \
        s_ccosh.c s_ccoshf.c s_cexp.c s_cexpf.c \
        s_cimag.c s_cimagf.c s_cimagl.c \
        s_conj.c s_conjf.c s_conjl.c \
@@ -147,9 +149,12 @@
 MLINKS+=3Datanh.3 atanhf.3 atanh.3 atanhl.3
 MLINKS+=3Datan2.3 atan2f.3 atan2.3 atan2l.3 \
        atan2.3 carg.3 atan2.3 cargf.3 atan2.3 cargl.3
-MLINKS+=3Dcacos.3 cacosf.3 cacos.3 cacosh.3 cacos.3 cacoshf.3 \
-       cacos.3 casin.3 cacos.3 casinf.3 cacos.3 casinh.3 cacos.3 casinhf.3=
 \
-       cacos.3 catan.3 cacos.3 catanf.3 cacos.3 catanh.3 cacos.3 catanhf.3
+MLINKS+=3Dcacos.3 cacosf.3 cacos.3 cacosl.3 \
+       cacos.3 cacosh.3 cacos.3 cacoshf.3 cacos.3 cacoshl.3 \
+       cacos.3 casin.3 cacos.3 casinf.3 cacos.3 casinl.3 \
+       cacos.3 casinh.3 cacos.3 casinhf.3 cacos.3 casinhl.3 \
+       cacos.3 catan.3 cacos.3 catanf.3 cacos.3 catanl.3 \
+       cacos.3 catanh.3 cacos.3 catanhf.3 cacos.3 catanhl.3
 MLINKS+=3Dccos.3 ccosf.3 ccos.3 csin.3 ccos.3 csinf.3 ccos.3 ctan.3 ccos.3
ctanf.3
 MLINKS+=3Dccosh.3 ccoshf.3 ccosh.3 csinh.3 ccosh.3 csinhf.3 \
        ccosh.3 ctanh.3 ccosh.3 ctanhf.3
Index: man/cacos.3
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- man/cacos.3 (revision 313777)
+++ man/cacos.3 (working copy)
@@ -24,23 +24,29 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd Jul 14, 2015
+.Dd February 15, 2017
 .Dt CACOS 3
 .Os
 .Sh NAME
 .Nm cacos ,
 .Nm cacosf ,
+.Nm cacosl ,
 .Nm cacosh ,
 .Nm cacoshf ,
+.Nm cacoshl ,
 .Nm casin ,
-.Nm casinf
+.Nm casinf ,
+.Nm casinl ,
 .Nm casinh ,
-.Nm casinhf
-.Nm catan ,
-.Nm catanf
+.Nm casinhf ,
+.Nm casinhl ,
+.Nm catan  ,
+.Nm catanf ,
+.Nm catanl ,
 .Nm catanh ,
-.Nm catanhf
-.Nd complex arc trigonometric and hyperbolic functions
+.Nm catanhf ,
+.Nm catanhl
+.Nd complex inverse trigonometric and hyperbolic functions
 .Sh LIBRARY
 .Lb libm
 .Sh SYNOPSIS
@@ -49,26 +55,39 @@
 .Fn cacos "double complex z"
 .Ft float complex
 .Fn cacosf "float complex z"
+.Ft long double complex
+.Fn cacosl "long double complex z"
 .Ft double complex
 .Fn cacosh "double complex z"
 .Ft float complex
 .Fn cacoshf "float complex z"
+.Ft long double complex
+.Fn cacoshl "long double complex z"
 .Ft double complex
 .Fn casin "double complex z"
 .Ft float complex
 .Fn casinf "float complex z"
+.Ft long double complex
+.Fn casinl "long double complex z"
 .Ft double complex
 .Fn casinh "double complex z"
 .Ft float complex
 .Fn casinhf "float complex z"
+.Ft long double complex
+.Fn casinhl "long double complex z"
 .Ft double complex
 .Fn catan "double complex z"
 .Ft float complex
 .Fn catanf "float complex z"
+.Ft long double complex
+.Fn catanl "long double complex z"
 .Ft double complex
 .Fn catanh "double complex z"
 .Ft float complex
 .Fn catanhf "float complex z"
+.Ft long double complex
+.Fn catanhl "long double complex z"
+
 .Sh DESCRIPTION
 The
 .Fn cacos ,
@@ -97,10 +116,23 @@
 functions perform the same operations in
 .Fa float
 precision.
+The
+.Fn cacosl ,
+.Fn casinl ,
+.Fn catanl
+.Fn cacoshl ,
+.Fn casinhl ,
+and
+.Fn catanhl
+functions perform the same operations in
+.Fa long double
+precision.
+
 .Pp
 .ds Un \[cu]
 There is no universal convention for defining the principal values of
-these functions. The following table gives the branch cuts, and the
+these functions.
+The following table gives the branch cuts, and the
 corresponding ranges for the return values, adopted by the C language.
 .Bl -column ".Sy Function" ".Sy (-\*(If*I, -I) \*(Un (I, \*(If*I)" ".Sy
[-\*(Pi/2*I, \*(Pi/2*I]"
 .It Sy Function Ta Sy Branch Cut(s) Ta Sy Range
Index: src/catrig.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- src/catrig.c        (revision 313777)
+++ src/catrig.c        (working copy)
@@ -328,6 +328,10 @@
        return (CMPLX(copysign(rx, x), copysign(ry, y)));
 }

+#if (LDBL_MANT_DIG =3D=3D 53)
+__weak_reference(casinh, casinhl);
+#endif
+
 /*
  * casin(z) =3D reverse(casinh(reverse(z)))
  * where reverse(x + I*y) =3D y + I*x =3D I*conj(z).
@@ -340,6 +344,10 @@
        return (CMPLX(cimag(w), creal(w)));
 }

+#if (LDBL_MANT_DIG =3D=3D 53)
+__weak_reference(casin, casinl);
+#endif
+
 /*
  * cacos(z) =3D PI/2 - casin(z)
  * but do the computation carefully so cacos(z) is accurate when z is
@@ -422,6 +430,10 @@
        return (CMPLX(rx, ry));
 }

+#if (LDBL_MANT_DIG =3D=3D 53)
+__weak_reference(cacos, cacosl);
+#endif
+
 /*
  * cacosh(z) =3D I*cacos(z) or -I*cacos(z)
  * where the sign is chosen so Re(cacosh(z)) >=3D 0.
@@ -448,6 +460,10 @@
        return (CMPLX(fabs(ry), copysign(rx, cimag(z))));
 }

+#if (LDBL_MANT_DIG =3D=3D 53)
+__weak_reference(cacosh, cacoshl);
+#endif
+
 /*
  * Optimized version of clog() for |z| finite and larger than ~RECIP_EPSIL=
ON.
  */
@@ -626,6 +642,10 @@
        return (CMPLX(copysign(rx, x), copysign(ry, y)));
 }

+#if (LDBL_MANT_DIG =3D=3D 53)
+__weak_reference(catanh, catanhl);
+#endif
+
 /*
  * catan(z) =3D reverse(catanh(reverse(z)))
  * where reverse(x + I*y) =3D y + I*x =3D I*conj(z).
@@ -637,3 +657,7 @@

        return (CMPLX(cimag(w), creal(w)));
 }
+
+#if (LDBL_MANT_DIG =3D=3D 53)
+__weak_reference(catan, catanl);
+#endif

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-216858-15-gHEKzpFwjW>