From owner-freebsd-numerics@FreeBSD.ORG Fri Mar 21 16:00:07 2014 Return-Path: Delivered-To: freebsd-numerics@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1B49A541 for ; Fri, 21 Mar 2014 16:00:07 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EDF0FCEA for ; Fri, 21 Mar 2014 16:00:06 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.8/8.14.8) with ESMTP id s2LG06LV084345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 21 Mar 2014 09:00:06 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.8/8.14.8/Submit) id s2LG055V084344; Fri, 21 Mar 2014 09:00:05 -0700 (PDT) (envelope-from sgk) Date: Fri, 21 Mar 2014 09:00:05 -0700 From: Steve Kargl To: Jo?e Zobec Subject: Re: Absence of trigonometric/hyperbolic functions in complex.h Message-ID: <20140321160005.GA78939@troutmask.apl.washington.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-numerics@freebsd.org X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Discussions of high quality implementation of libm functions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Mar 2014 16:00:07 -0000 On Fri, Mar 21, 2014 at 01:11:48PM +0100, Jo?e Zobec wrote: > > I'm wondering, how come that trigonometric and hyperbolic functions have > not been implemented yet. I would like to offer you some help if you need > it. > The float and double precision versions of ccos, csin, ctan, ccosh, csinh, and ctanh have been implemented. The long double versions have not been implement, yet. Those will be done eventually. These functions should be present in FreeBSD 10 and trunk. If you want to take a shot at implementing the ld80 and ld128 version, you should copy s_ccosh.c, s_csinh.c, s_ctanh.c to the directories ld80/ and ld128/. With the ld80 version, you'll need to use the LD80C, ENTERI, and RETURNI macros from src/math_private.h. Note, one might be able to do both ld80 and ld128 in a single file, but this would require conditional compilation with something like '#if LDBL_MANT_DIG == 64'. -- Steve