Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Oct 2005 18:56:48 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc:        freebsd-standards@freebsd.org
Subject:   Re: complex.h math functions
Message-ID:  <20051031184647.Q38664@delplex.bde.org>
In-Reply-To: <20051030182702.GA18998@troutmask.apl.washington.edu>
References:  <20051005032400.GA6736@troutmask.apl.washington.edu> <20051005191936.N51036@delplex.bde.org> <20051006212602.GA40609@troutmask.apl.washington.edu> <20051007231439.F58005@delplex.bde.org> <20051007190239.GA78674@troutmask.apl.washington.edu> <20051008052850.S59139@delplex.bde.org> <20051010185153.GA55589@troutmask.apl.washington.edu> <20051012160109.I73531@delplex.bde.org> <20051016184129.GA24651@troutmask.apl.washington.edu> <20051021194624.H598@epsplex.bde.org> <20051030182702.GA18998@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 30 Oct 2005, Steve Kargl wrote:

> On Fri, Oct 21, 2005 at 08:50:53PM +1000, Bruce Evans wrote:
>> On Sun, 16 Oct 2005, Steve Kargl wrote:
>>
>>> On Wed, Oct 12, 2005 at 05:23:28PM +1000, Bruce Evans wrote:
>>
>>> Hopefully, this new version is closer to KNF.
>>
>> It still has only 4 chars for all secondary indents
>
> Strange.  Hopefully fixed.

It's not :-).  E.g.:

% 	/* Handle the nearly-non-exceptional cases where x and y are finite. */
% 	if (ix < 0x7ff00000 && iy < 0x7ff00000) {
% 	    if ((iy | ly) == 0)
  	^^^^
% 		return (cpack(cosh(x), x * y));
% 	    return (cpack(cosh(x) * cos(y), sinh(x) * sin(y)));
% 	}

fdlibm actually mostly uses this style, with all indents 4 chars after the
first normal 1-tab one.  I don't want to use this for new code and the
fdlibm maintainers show signs of switching to normal indentation in
k_tan.c.

> I also removed the additional
> space in the comments after the *.  This, of course, will
> make a diff fairly large, so I've attached s_ccosh.c.
> ...
>> The current order is almost that in the standard.  This order is not
>> bad but it might not give the simplest or shortest classification.
>> In particular, I think it might be better to group by 0's before
>> grouping by Infs and NaNs.
>
> I've re-arrange the code to do x = 0 and then y = 0 cases
> after the nearly-non-exceptional case.  You may want to
> flip x = 0 and y = 0.  I did not do this because I did not
> want to mess up your explanation of choice of signs.

I'll merge with it and see if there is more to clean up.

Bruce



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