Module Name: src
Committed By: martin
Date: Fri Oct 10 08:19:37 UTC 2014
Modified Files:
src/lib/libm/complex: Makefile.inc
Added Files:
src/lib/libm/complex: catanhl.c
Log Message:
Add missing catanh variant (and readd it to the Makefile list)
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/libm/complex/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libm/complex/catanhl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libm/complex/Makefile.inc
diff -u src/lib/libm/complex/Makefile.inc:1.6 src/lib/libm/complex/Makefile.inc:1.7
--- src/lib/libm/complex/Makefile.inc:1.6 Fri Oct 10 08:13:07 2014
+++ src/lib/libm/complex/Makefile.inc Fri Oct 10 08:19:37 2014
@@ -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/}
Added files:
Index: src/lib/libm/complex/catanhl.c
diff -u /dev/null src/lib/libm/complex/catanhl.c:1.1
--- /dev/null Fri Oct 10 08:19:37 2014
+++ src/lib/libm/complex/catanhl.c Fri Oct 10 08:19:37 2014
@@ -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;
+}