Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libm/complex Add missing catanh variant (and readd it to...



details:   https://anonhg.NetBSD.org/src/rev/e74d5ee61a9f
branches:  trunk
changeset: 802959:e74d5ee61a9f
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Oct 10 08:19:37 2014 +0000

description:
Add missing catanh variant (and readd it to the Makefile list)

diffstat:

 lib/libm/complex/Makefile.inc |   4 ++--
 lib/libm/complex/catanhl.c    |  42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 2 deletions(-)

diffs (62 lines):

diff -r c682a3203ff4 -r e74d5ee61a9f lib/libm/complex/Makefile.inc
--- a/lib/libm/complex/Makefile.inc     Fri Oct 10 08:18:04 2014 +0000
+++ b/lib/libm/complex/Makefile.inc     Fri Oct 10 08:19:37 2014 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile.inc,v 1.6 2014/10/10 08:13:07 martin Exp $
+# $NetBSD: Makefile.inc,v 1.7 2014/10/10 08:19:37 martin Exp $
 
 .PATH: ${.CURDIR}/complex
 
 COMPLEX_SRCS = cabs.c cacos.c cacosh.c carg.c casin.c casinh.c catan.c \
        ccos.c ccosh.c cephes_subr.c cexp.c clog.c conj.c cpow.c cproj.c\
-       cimag.c creal.c csin.c csinh.c csqrt.c ctan.c ctanh.c
+       cimag.c creal.c csin.c csinh.c csqrt.c ctan.c ctanh.c catanh.c
 
 .for i in ${COMPLEX_SRCS}
 SRCS+= $i ${i:S/.c/f.c/} ${i:S/.c/l.c/}
diff -r c682a3203ff4 -r e74d5ee61a9f lib/libm/complex/catanhl.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/libm/complex/catanhl.c        Fri Oct 10 08:19:37 2014 +0000
@@ -0,0 +1,42 @@
+/* $NetBSD: catanhl.c,v 1.1 2014/10/10 08:19:37 martin Exp $ */
+
+/*-
+ * Copyright (c) 2007 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software written by Stephen L. Moshier.
+ * It is redistributed by the NetBSD Foundation by permission of the author.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "../src/namespace.h"
+#include <complex.h>
+
+long double complex
+catanh(long double complex z)
+{
+       long double complex w;
+
+       w = -1.0 * I * catanl(z * I);
+       return w;
+}



Home | Main Index | Thread Index | Old Index