Absence of trigonometric/hyperbolic functions in complex.h

Steve Kargl sgk at troutmask.apl.washington.edu
Fri Mar 21 16:00:07 UTC 2014

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'.


More information about the freebsd-numerics mailing list