[Bug fortran/46416] libquadmath: missing functions

2011-01-17 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46416

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #9 from Jakub Jelinek jakub at gcc dot gnu.org 2011-01-17 
08:27:28 UTC ---
Fixed.


[Bug fortran/46416] libquadmath: missing functions

2011-01-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46416

--- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org 2011-01-16 
16:42:41 UTC ---
Author: jakub
Date: Sun Jan 16 16:42:37 2011
New Revision: 168853

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=168853
Log:
PR fortran/46416
* quadmath.h (cacosq, cacoshq, casinq, casinhq, catanq, catanhq):
New prototypes.
(M_Eq, M_LOG2Eq, M_LOG10Eq, M_LN2q, M_LN10q, M_PIq, M_PI_2q, M_PI_4q,
M_1_PIq, M_2_PIq, M_2_SQRTPIq, M_SQRT2q, M_SQRT1_2q): Define.
* quadmath_weak.h (cacosq, cacoshq, casinq, casinhq, catanq,
catanhq): Add.
* quadmath-imp.h (fpclassifyq, QUADFP_NAN, QUADFP_INFINITE,
QUADFP_ZERO, QUADFP_SUBNORMAL, QUADFP_NORMAL): Define.
* quadmath.map (QUADMATH_1.0): Add cacosq, cacoshq, casinq, casinhq,
catanq and catanhq.
* Makefile.am (libquadmath_la_SOURCES): Add math/cacosq.c,
math/cacoshq.c, math/casinq.c, math/casinhq.c, math/catanq.c
and math/catanhq.c.
* Makefile.in: Regenerated.
* libquadmath.texi (cacosq, cacoshq, casinq, casinhq,
catanq, catanhq): Add.
* math/cacoshq.c: New file.
* math/cacosq.c: New file.
* math/catanq.c: New file.
* math/catanhq.c: New file.
* math/casinq.c: New file.
* math/casinhq.c: New file.

* math/hypotq.c (hypotq): Use Q suffix instead of L.
* math/atan2q.c (tiny, pi_o_4, pi_o_2, pi, pi_lo, atan2q): Likewise.
* math/cosq.c (cosq): Likewise.

Added:
trunk/libquadmath/math/cacoshq.c
trunk/libquadmath/math/cacosq.c
trunk/libquadmath/math/casinhq.c
trunk/libquadmath/math/casinq.c
trunk/libquadmath/math/catanhq.c
trunk/libquadmath/math/catanq.c
Modified:
trunk/libquadmath/ChangeLog
trunk/libquadmath/Makefile.am
trunk/libquadmath/Makefile.in
trunk/libquadmath/libquadmath.texi
trunk/libquadmath/math/atan2q.c
trunk/libquadmath/math/cosq.c
trunk/libquadmath/math/hypotq.c
trunk/libquadmath/quadmath-imp.h
trunk/libquadmath/quadmath.h
trunk/libquadmath/quadmath.map
trunk/libquadmath/quadmath_weak.h


[Bug fortran/46416] libquadmath: missing functions

2011-01-16 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46416

--- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org 2011-01-16 
16:44:39 UTC ---
Author: jakub
Date: Sun Jan 16 16:44:35 2011
New Revision: 168854

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=168854
Log:
PR fortran/46416
* quadmath.h (cbrtq, finiteq, isnanq, signbitq, sqrtq): Remove
const from prototype argument.
(cimagq, conjq, cprojq, crealq, fdimq, fmaxq, fminq, ilogbq,
llrintq, log2q, lrintq, nearbyintq, remquoq): New prototypes.
(__quadmath_extern_inline): Define.
(cimagq, conjq, crealq): New inlines.
* Makefile.am (libquadmath_la_SOURCES): Add math/cimagq.c,
math/conjq.c, math/cprojq.c, math/crealq.c, math/fdimq.c,
math/fmaxq.c, math/fminq.c, math/ilogbq.c, math/llrintq.c,
math/log2q.c, math/lrintq.c, math/nearbyintq.c and math/remquoq.c.
* Makefile.in: Regenerated.
* quadmath_weak.h (cimagq, conjq, cprojq, crealq, fdimq, fmaxq,
fminq, ilogbq, llrintq, log2q, lrintq, nearbyintq, remquoq): Add.
* quadmath-imp.h (__LITTLE_ENDIAN__): Don't define.
(ieee854_float128): Use __BYTE_ORDER == __ORDER_BIG_ENDIAN__
tests instead of __BIG_ENDIAN__.
* quadmath.map (QUADMATH_1.0): Add cimagq, conjq, cprojq, crealq,
fdimq, fmaxq, fminq, ilogbq, llrintq, log2q, lrintq, nearbyintq
and remquoq.
* libquadmath.texi (cimagq, conjq, cprojq, crealq, fdimq, fmaxq,
fminq, ilogbq, llrintq, log2q, lrintq, nearbyintq, remquoq): Add.
* math/cprojq.c: New file.
* math/ilogbq.c: New file.
* math/fminq.c: New file.
* math/llrintq.c: New file.
* math/log2q.c: New file.
* math/lrintq.c: New file.
* math/crealq.c: New file.
* math/nearbyintq.c: New file.
* math/fmaxq.c: New file.
* math/conjq.c: New file.
* math/remquoq.c: New file.
* math/cimagq.c: New file.
* math/fdimq.c: New file.

* math/ldexpq.c: Include errno.h.  Set errno to ERANGE if needed.

Added:
trunk/libquadmath/math/cimagq.c
trunk/libquadmath/math/conjq.c
trunk/libquadmath/math/cprojq.c
trunk/libquadmath/math/crealq.c
trunk/libquadmath/math/fdimq.c
trunk/libquadmath/math/fmaxq.c
trunk/libquadmath/math/fminq.c
trunk/libquadmath/math/ilogbq.c
trunk/libquadmath/math/llrintq.c
trunk/libquadmath/math/log2q.c
trunk/libquadmath/math/lrintq.c
trunk/libquadmath/math/nearbyintq.c
trunk/libquadmath/math/remquoq.c
Modified:
trunk/libquadmath/ChangeLog
trunk/libquadmath/Makefile.am
trunk/libquadmath/Makefile.in
trunk/libquadmath/libquadmath.texi
trunk/libquadmath/math/ldexpq.c
trunk/libquadmath/quadmath-imp.h
trunk/libquadmath/quadmath.h
trunk/libquadmath/quadmath.map
trunk/libquadmath/quadmath_weak.h


[Bug fortran/46416] libquadmath: missing functions

2011-01-06 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46416

--- Comment #5 from Tobias Burnus burnus at gcc dot gnu.org 2011-01-06 
11:11:27 UTC ---
(In reply to comment #4)
 Very lightly tested patch to add ca{sin,cos,tan}{,h}q and fix broken atan2q.

Now posted to: http://gcc.gnu.org/ml/gcc-patches/2011-01/msg00279.html

 * * *

(In reply to comment #3)
 c) complex.h functions
 - casinq, cacosq, catanq, casinhq, cacoshq, catanhq
 - cimagq, conjq, cprojq, crealq

Regarding the latter (except for the projection to the Riemann sphere, cprojq),
it should suffice if one adds the following to the .h file. (GLIBC defines 
__extern_inline in sys/cdefs.h, which is included in features.h.)

#ifndef __extern_inline
#  define extern __inline __attribute__ ((__gnu_inline__))
#endif

__extern_inline __real128
cimagq (__complex128 __z) __THROW
{
  return __imag__ __z;
}

__extern_inline __real128
crealq (__complex128 __z) __THROW
{
  return __real__ __z;
}

__extern_inline __complex128
conjq (__complex128 __z) __THROW
{
  return __extension__ ~__z;
}


[Bug fortran/46416] libquadmath: missing functions

2011-01-06 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46416

--- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org 2011-01-06 
11:40:38 UTC ---
There is no __real128, just __float128.  Also, I think either it should use
some extern inlinish quadmath.h specific macro (and it needs to care about g++
vs. gcc difference and which gcc versions support gnu_inline attribute).
And also even if you have those extern inlines in the header, you still have to
provide an out of line definition for them, i.e. in libquadmath sources, not
headers.

I'll take care of it.


[Bug fortran/46416] libquadmath: missing functions

2011-01-05 Thread burnus at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46416

--- Comment #3 from Tobias Burnus burnus at gcc dot gnu.org 2011-01-05 
18:00:00 UTC ---
I now compared the list of libquadmath functions at
http://gcc.gnu.org/onlinedocs/libquadmath/Math-Library-Routines.html  with the
C99 functions in math.h and complex.h (cf. http://en.wikipedia.org/wiki/Math.h
and http://en.wikipedia.org/wiki/Complex.h).

Missing (no guarantee for completeness or correctness)

a) fmaq, cf. Jakub's patch at PR 46402

b) math.h functions:

fdimq, fmaq [cf. above], fmaxq, fminq, ilogbq, llrintq, lrintq, log2q,
nearbyintq, nexttowardq, remquoq

c) complex.h functions

- casinq, cacosq, catanq, casinhq, cacoshq, catanhq
- cimagq, conjq, cprojq, crealq


[Bug fortran/46416] libquadmath: missing functions

2011-01-05 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46416

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2011.01.05 21:14:44
 AssignedTo|unassigned at gcc dot   |jakub at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #4 from Jakub Jelinek jakub at gcc dot gnu.org 2011-01-05 
21:14:44 UTC ---
Created attachment 22910
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=22910
gcc46-pr46416.patch

Very lightly tested patch to add ca{sin,cos,tan}{,h}q and fix broken atan2q.


[Bug fortran/46416] libquadmath: missing functions

2010-12-27 Thread dfranke at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46416

--- Comment #2 from Daniel Franke dfranke at gcc dot gnu.org 2010-12-27 
23:54:38 UTC ---
*** Bug 46402 has been marked as a duplicate of this bug. ***


[Bug fortran/46416] libquadmath: missing functions

2010-12-27 Thread dfranke at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46416

Daniel Franke dfranke at gcc dot gnu.org changed:

   What|Removed |Added

 CC||dfranke at gcc dot gnu.org
Summary|libquadmath: Complex|libquadmath: missing
   |inverse |functions
   |hyperbolic/trigonometric|
   |function missing: casinhq   |
   |etc.|

--- Comment #1 from Daniel Franke dfranke at gcc dot gnu.org 2010-12-27 
23:54:32 UTC ---
Merging in PR46402, fmalq missing in libquadmath.

Comment #0:
[2010-10-27 21:45:00] jakub_ fx_: btw, you want to resync with glibc to get
quad mode fmal (well, fmaq in your case)

Cf. http://sourceware.org/git/?p=glibc.gita=searchh=HEADst=commits=fmal