Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 May 2012 18:44:42 -0500
From:      Stephen Montgomery-Smith <stephen@missouri.edu>
To:        Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Use of C99 extra long double math functions after r236148
Message-ID:  <4FC40DEA.8030703@missouri.edu>
In-Reply-To: <20120528233035.GA77157@troutmask.apl.washington.edu>
References:  <4FC30090.4070003@gwdg.de> <4D8CF7D2-CBEE-438E-A9E7-9C47A8892622@FreeBSD.org> <4FC36FE1.9080908@gwdg.de> <DFE44442-A1B1-40B3-9A79-874BD2BE45E7@FreeBSD.org> <4FC38B81.6000302@gwdg.de> <4FC3A154.8030702@missouri.edu> <20120528203159.GA76340@troutmask.apl.washington.edu> <4FC3EBDA.2080502@missouri.edu> <20120528221731.GA76723@troutmask.apl.washington.edu> <4FC40449.3040602@missouri.edu> <20120528233035.GA77157@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 05/28/2012 06:30 PM, Steve Kargl wrote:

>
>> From clog.c in http://www.netlib.org/cephes/c9x-complex
>
> double complex
> ccosh (z)
>       double complex z;
> {
>    double complex w;
>    double x, y;
>
>    x = creal(z);
>    y = cimag(z);
>    w = cosh (x) * cos (y)  +  (sinh (x) * sin (y)) * I;
>    return (w);
> }
>
> See math_private.h about the above.
>

I looked in math_private.h - I presume you meant 
lib/msun/src/math_private.h.  I wasn't able to find anything about ccosh 
there.

I think that for a rough and ready ccosh, this is high enough quality 
for a math/cephes port.

I do agree that it might not be high enough quality to make FreeBSD base.

(Although I don't think I have ever been in a situation where I would 
have been tripped up by a transcendental function that responded 
incorrectly to exceptional input.)



> And, finally,

Yes, it is very nice.

>
> Who's writing the code to test the implementations?  That is
> better much the problem.  Without testing, one might get an
> implementation that appears to work until it doesn't!  It took
> me 3+ years to get sqrtl() into libm, but bde and das (and
> myself) wanted to make sure the code worked.

Fair enough if we are talking about the base system.

> I haven't looked at glibc code in years, because I hack on libm
> when I can.  I do not want to run into questions about whether
> my code is tainted by the gpl.
>

They had similar lists of exceptions.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FC40DEA.8030703>