Daemon News Ezine BSD News BSD Mall BSD Support Forum BSD Advocacy BSD Updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: complex.h math functions



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

> >>use it.  Listing all the special cases also serves as documentation.
> >>I think the current order of special cases is not quite the best,
> >>however.
> >
> >I don't follow why you think the special cases need to be re-order.
> >Without knowing how the user base will abuse ccosh, there should
> >be no prefered order.
> 
> 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.

(discussion man page diff)
> >>OK; could be more detailed.
> >
> >Do you want a section that describes the range of inputs that
> >return a non-infinite results?  Do you want a section that
> >describes the return value and the exceptional cases?  I'll
> >have to do this later because I'll need to learning some
> >additional mdoc features.
> 
> Exceptional cases are mostly not described at all for the real functions,
> so I wouldn't describe them better for the complex functions.  I was
> thinking mainly of doumenting the intention that the error is < 2 ulps
> and noting cases where this isn't implemented in the BUGS section.

You understand the ULPs better than I.  If you don't have time or
want to mess with mdoc, I'll write the section but you need to supply
the knowledge.

-- 
Steve