[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: complex.h math functions
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