[Bug 240295] math(3): Add Complex Arithmetic functions and their hyperbolic counterparts

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Sep 6 20:24:05 UTC 2019


--- Comment #9 from Steve Kargl <kargl at FreeBSD.org> ---
(In reply to Gordon Bergling from comment #8)
> I hope this was good for you, and you were able to direct all your anger,
> fear and uncertainty towards this problem report.
> For my perspective, I just saw at [1] that there is an unresolved
> issue with FreeBSD's math(3) implementation and I thought, that
> this could be solved by stepping a few steps backwards and looking
> at what the other BSDs have done to overcome that issue.

There is no anger, fear, or uncertainty in my response.
More likely disillusionment in that it seems that you 
have made no effort to review the freebsd-numerics
mailing list archive or what libm currently has implemented.

Why does your patch have float complex and double complex
versions of the functions?  FreeBSD's libm has had those
since 2011.

ccos() already implement in src/s_ccosh.c
 * Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl

ccosf() already implement in src/s_ccoshf.c
 * Copyright (c) 2005 Bruce D. Evans and Steven G. Kargl

(Yes, the Copyright year is correct as it is likely that
 some code came from other files hwne ccos and ccosf

> The tickets I mentioned within my original ticket were open
> for years

Yeah, I know.  I'm the person who filed those PRs.  I'm also
the only person for the last 20 years who has consistently 
tried to fix FreeBSD libm to be C99 compliant with quality

> and you are about to attacking the first person, who tries to
> address that issues. I am quite sure that is not the spirit
> what the FreeBSD project is about.

You're not the first person, and you're not the first person
who tries to grab code from one of the other BSDs as a solution
without understanding some of the nuances of the floating point
environment of FreeBSD.

Did you actually test the functions?  Here's a test for your
ccoshl, and its wrong results

ccoshl(-0,-inf) = (nan,nan) expecting (nan,+0)
ccoshl(-0,+inf) = (nan,nan) expecting (nan,-0)
ccoshl(+0,+nan) = (nan,nan) expecting (nan,+0)
ccoshl(+0,-nan) = (nan,nan) expecting (nan,-0)
ccoshl(-0,-nan) = (nan,nan) expecting (nan,+0)
ccoshl(-0,+nan) = (nan,nan) expecting (nan,-0)
ccoshl(+inf,+0) = (nan,nan) expecting (+inf,+0)
ccoshl(+inf,-0) = (nan,nan) expecting (+inf,-0)
ccoshl(-inf,-0) = (nan,nan) expecting (+inf,+0)
ccoshl(-inf,+0) = (nan,nan) expecting (+inf,-0)
ccoshl(+nan,+0) = (nan,nan) expecting (nan,+0)
ccoshl(+nan,-0) = (nan,nan) expecting (nan,-0)
ccoshl(-nan,-0) = (nan,nan) expecting (nan,+0)
ccoshl(-nan,+0) = (nan,nan) expecting (nan,-0)
ccoshl(+inf,+nan) = (nan,nan) expecting (+inf,nan)
ccoshl(+inf,-nan) = (nan,nan) expecting (+inf,nan)
ccoshl(-inf,-nan) = (nan,nan) expecting (+inf,nan)
ccoshl(-inf,+nan) = (nan,nan) expecting (+inf,nan)
ccoshl(+inf,+inf) = (nan,nan) expecting (+inf,nan)
ccoshl(+inf,-inf) = (nan,nan) expecting (+inf,nan)
ccoshl(-inf,-inf) = (nan,nan) expecting (+inf,nan)
ccoshl(-inf,+inf) = (nan,nan) expecting (+inf,nan)
ccoshl(+inf,1) = (nan,+inf) expecting (+inf*cos(y),+inf*sin(y))
ccoshl(-inf,1) = (nan,-inf) expecting (+inf*cos(y),-inf*sin(y))

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-numerics mailing list