public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/33197]  New: Fortran 2008: gamma() and other small changes
@ 2007-08-26 18:25 burnus at gcc dot gnu dot org
  2007-08-28 14:46 ` [Bug fortran/33197] " fxcoudert at gcc dot gnu dot org
                   ` (43 more replies)
  0 siblings, 44 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-08-26 18:25 UTC (permalink / raw)
  To: gcc-bugs

Split of from PR32980 (collected by FX and me)

Fortran 2008 status: http://www.nag.co.uk/sc22wg5/ ; time table:
   First working draft available                     2007-12
   WG5 review of working draft                       2008-02
   WG5 approval of draft CD                          2008-04
   First CD submitted for registration and approval  2008-05
   First CD ballot initiated                         2008-05
   First CD ballot comments available                2008-10
   WG5 ballot resolution meeting                     2008-11
   WG5 review meeting                                2009-05
   Final CD submitted for approval                   2009-07
(The question is when we should start supporting Fortran 2008 (-std=f2008) /
Fortran 2008 features (as -std=gnu).)

Currently proposed additional intrinsic procedures:

- ACOSH, ASINH, ATANH, ERF, ERF_C, GAMMA: Exist in gfortran (STD_GNU)
- BESSEL_J0, _J1, _JN, _Y0, _Y1, _YN: Exist as BESJ0 etc.
- log_gamma: Exists as lgamma
- Not in gfortran: ERFC_SCALED (Exponentially scaled ERFC), HYPOT (=
sqrt(x**2+y**2)), NORM2  (L_2 norm).

(For erfc_scaled: Needs a library function; see e.g.
http://www.netlib.org/specfun/erf)

- "The intrinsic function ATAN is extended so that ATAN (Y, X) is ATAN2 (Y,X)."
- -stf=f2008 needs to be supported
- File extensions .f08
- Fortran 2008 allows "CONTAINS" with no procedures following in PROGRAM and
MODULE. (Change STD_GNU to STD_F2008.)


-- 
           Summary: Fortran 2008: gamma() and other small changes
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: gamma() and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
@ 2007-08-28 14:46 ` fxcoudert at gcc dot gnu dot org
  2008-02-17 16:01 ` fxcoudert at gcc dot gnu dot org
                   ` (42 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-08-28 14:46 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-08-28 14:46:00
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: gamma() and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
  2007-08-28 14:46 ` [Bug fortran/33197] " fxcoudert at gcc dot gnu dot org
@ 2008-02-17 16:01 ` fxcoudert at gcc dot gnu dot org
  2008-02-17 18:52 ` burnus at gcc dot gnu dot org
                   ` (41 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-02-17 16:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from fxcoudert at gcc dot gnu dot org  2008-02-17 16:01 -------
Created an attachment (id=15177)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15177&action=view)
Patch for some of these points

This patch adds all new intrinsics listed in the report except NORM2, and the
modification to ATAN that adds a second, optional argument. It adds support for
-std=2008 and empty CONTAINS. It includes a library support function for
ERFC_SCALED, which is a C translation of the Netlib routine.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: gamma() and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
  2007-08-28 14:46 ` [Bug fortran/33197] " fxcoudert at gcc dot gnu dot org
  2008-02-17 16:01 ` fxcoudert at gcc dot gnu dot org
@ 2008-02-17 18:52 ` burnus at gcc dot gnu dot org
  2008-02-17 18:57 ` fxcoudert at gcc dot gnu dot org
                   ` (40 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-02-17 18:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2008-02-17 18:51 -------
+#define GFC_STD_F2008  (1<<7)  /* New in F2008.  */
 #define GFC_STD_LEGACY (1<<6)  /* Backward compatibility.  */
 #define GFC_STD_GNU    (1<<5)  /* GNU Fortran extension.  */
 #define GFC_STD_F2003  (1<<4)  /* New in F2003.  */

I fear this will break some std tests. You should better use:

 #define GFC_STD_LEGACY (1<<7)  /* Backward compatibility.  */
 #define GFC_STD_GNU    (1<<6)  /* GNU Fortran extension.  */
 #define GFC_STD_F2008  (1<<5)  /* New in F2008.  */
 #define GFC_STD_F2003  (1<<4)  /* New in F2003.  */

which is also more readable - especially when we will have F2013 etc.

decl.c also contains two STD_F2008: "Fortran 2008 draft allows BIND(C) for
internal procedures.".

Additionally, one needs to update *texi for the new -std=f2008 option.

Also the .F08/.f08 should be supported, cf.
http://gcc.gnu.org/ml/fortran/2007-01/msg00410.html
and note that also the CPP section has to updated.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: gamma() and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-02-17 18:52 ` burnus at gcc dot gnu dot org
@ 2008-02-17 18:57 ` fxcoudert at gcc dot gnu dot org
  2008-02-17 19:09 ` burnus at gcc dot gnu dot org
                   ` (39 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-02-17 18:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from fxcoudert at gcc dot gnu dot org  2008-02-17 18:56 -------
(In reply to comment #2)
> I fear this will break some std tests. You should better use:
> 
>  #define GFC_STD_LEGACY (1<<7)  /* Backward compatibility.  */
>  #define GFC_STD_GNU    (1<<6)  /* GNU Fortran extension.  */
>  #define GFC_STD_F2008  (1<<5)  /* New in F2008.  */
>  #define GFC_STD_F2003  (1<<4)  /* New in F2003.  */

It shouldn't break any tests if they're well written, so it gives us an
opportunity to check that :)
Also, and more importantly, what you suggest means breaking the ABI, because
this information is passed to libgfortran.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: gamma() and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-02-17 18:57 ` fxcoudert at gcc dot gnu dot org
@ 2008-02-17 19:09 ` burnus at gcc dot gnu dot org
  2008-02-19 16:15 ` burnus at gcc dot gnu dot org
                   ` (38 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-02-17 19:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from burnus at gcc dot gnu dot org  2008-02-17 19:08 -------
Of cause, also the added/modified intrinsics mandate a *texi update.
BTW: Thanks for the patch.

(In reply to comment #3)
> It shouldn't break any tests if they're well written, so it gives us an
> opportunity to check that :) Also, and more importantly, what you suggest 
> means breaking the ABI, because this information is passed to libgfortran.

Forgot that :-/  Actually, I think the tests are better written than I
remembered - at least I could not find "std < GFC_..." only
"gfc_option.allow_std & GFC_STD_*".


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: gamma() and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-02-17 19:09 ` burnus at gcc dot gnu dot org
@ 2008-02-19 16:15 ` burnus at gcc dot gnu dot org
  2008-02-27 18:38 ` fxcoudert at gcc dot gnu dot org
                   ` (37 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-02-19 16:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from burnus at gcc dot gnu dot org  2008-02-19 16:14 -------
New version of the Fortran 2008 draft (candiate draft, before was working
draft):
ftp://ftp.nag.co.uk/sc22wg5/N1701-N1750/N1718.pdf
http://www.nag.co.uk/sc22wg5/
Thus things should be settled enough for this patch.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: gamma() and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-02-19 16:15 ` burnus at gcc dot gnu dot org
@ 2008-02-27 18:38 ` fxcoudert at gcc dot gnu dot org
  2008-02-27 21:03 ` fxcoudert at gcc dot gnu dot org
                   ` (36 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-02-27 18:38 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |fxcoudert at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-08-28 14:46:00         |2008-02-27 18:37:40
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: gamma() and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-02-27 18:38 ` fxcoudert at gcc dot gnu dot org
@ 2008-02-27 21:03 ` fxcoudert at gcc dot gnu dot org
  2008-02-28 17:58 ` fxcoudert at gcc dot gnu dot org
                   ` (35 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-02-27 21:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from fxcoudert at gcc dot gnu dot org  2008-02-27 21:02 -------
Two more remarks on that: ASINH, ACOSH and ATANH need to accept COMPLEX
arguments. Some other functions also should be extended that way (ASIN, ACOS...
and probably many more).

Also, one very annoying feature: BESSEL_JN and BESSEL_YN have two forms, with 2
or 3 arguments. What's more, these two forms have very different properties
(the first one is elemental, the second one is transformational), and I don't
know how to implement that in the current handling of intrinsics!


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: gamma() and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2008-02-27 21:03 ` fxcoudert at gcc dot gnu dot org
@ 2008-02-28 17:58 ` fxcoudert at gcc dot gnu dot org
  2008-03-03 23:47 ` fxcoudert at gcc dot gnu dot org
                   ` (34 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-02-28 17:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from fxcoudert at gcc dot gnu dot org  2008-02-28 17:57 -------
One more remark: checking of intrinsics and compliance to the -std option
specified is lacking, and this is a generic issue of gfortran. Maybe there's a
PR open about it?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: gamma() and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2008-02-28 17:58 ` fxcoudert at gcc dot gnu dot org
@ 2008-03-03 23:47 ` fxcoudert at gcc dot gnu dot org
  2008-03-03 23:52 ` [Bug fortran/33197] Fortran 2008: math functions " fxcoudert at gcc dot gnu dot org
                   ` (33 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-03-03 23:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from fxcoudert at gcc dot gnu dot org  2008-03-03 23:46 -------
Subject: Bug 33197

Author: fxcoudert
Date: Mon Mar  3 23:46:20 2008
New Revision: 132846

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132846
Log:
        PR fortran/33197

gcc/fortran/
        * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
        ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
        ERFC_SCALED, LOG_GAMMA and HYPOT.
        * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
        gfc_resolve_hypot): New prototypes.
        * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
        ACOSH, ASINH and ATANH available.
        * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
        * lang.opt: Add -std=f2008 option.
        * libgfortran.h: Define GFC_STD_F2008.
        * lang-specs.h: Add .f08 and .F08 file suffixes.
        * iresolve.c (gfc_resolve_hypot): New function.
        * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
        * check.c (gfc_check_hypot): New function.
        * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
        * options.c (set_default_std_flags): Allow Fortran 2008 by default.
        (form_from_filename): Add .f08 suffix.
        (gfc_handle_option): Handle -std=f2008 option.
        * simplify.c (gfc_simplify_hypot): New function.
        * gfortran.texi: Document Fortran 2008 status and file extensions.
        * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
        as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
        ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
        * invoke.texi: Document the new -std=f2008 option.

libgomp/
        * testsuite/libgomp.fortran/fortran.exp: Add .f08 and
        .F08 file suffixes.

gcc/testsuite/
        * gfortran.dg/gomp/gomp.exp: Add .f08 and .F08 file suffixes.
        * gfortran.dg/dg.exp: Likewise.
        * gfortran.dg/vect/vect.exp: Likewise.
        * gfortran.fortran-torture/execute/execute.exp: Likewise.
        * gfortran.fortran-torture/compile/compile.exp: Likewise.
        * gfortran.dg/gamma_1.f90: Also check log_gamma.
        * gfortran.dg/invalid_contains_1.f90: Remove warning about
        empty CONTAINS.
        * gfortran.dg/gamma_2.f90: Add a few error messages.
        * gfortran.dg/invalid_contains_2.f90: Remove warning about
        empty CONTAINS.
        * gfortran.dg/gamma_3.f90: Adjust error message.
        * gfortran.dg/gamma_4.f90: Test for log_gamma instead of lgamma.
        * gfortran.dg/bind_c_usage_9.f03: Adjust error messages.
        * gfortran.dg/bessel_1.f90: New test.
        * gfortran.dg/recursive_check_3.f90: Remove warnings.
        * gfortran.dg/besxy.f90: Also check for new F2008 intrinsics.
        * gfortran.dg/derived_function_interface_1.f90: Remove warning.
        * gfortran.dg/contains_empty_1.f03: New test.
        * gfortran.dg/erfc_scaled_1.f90: New test.
        * gfortran.dg/hypot_1.f90: New test.
        * gfortran.dg/contains_empty_2.f03: New test.

libgfortran/
        * intrinsics/erfc_scaled_inc.c: New file.
        * intrinsics/erfc_scaled.c: New file.
        * gfortran.map (GFORTRAN_1.0): Add _gfortran_erfc_scaled_r*.
        * Makefile.am: Add intrinsics/erfc_scaled.c.
        * config.h.in: Regenerate.
        * configure: Regenerate.
        * Makefile.in: Regenerate.

Added:
    trunk/gcc/testsuite/gfortran.dg/bessel_1.f90
    trunk/gcc/testsuite/gfortran.dg/contains_empty_1.f03
    trunk/gcc/testsuite/gfortran.dg/contains_empty_2.f03
    trunk/gcc/testsuite/gfortran.dg/erfc_scaled_1.f90
    trunk/gcc/testsuite/gfortran.dg/hypot_1.f90
    trunk/libgfortran/intrinsics/erfc_scaled.c
    trunk/libgfortran/intrinsics/erfc_scaled_inc.c
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/gfortran.texi
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/invoke.texi
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/fortran/lang-specs.h
    trunk/gcc/fortran/lang.opt
    trunk/gcc/fortran/libgfortran.h
    trunk/gcc/fortran/mathbuiltins.def
    trunk/gcc/fortran/options.c
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/simplify.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/besxy.f90
    trunk/gcc/testsuite/gfortran.dg/bind_c_usage_9.f03
    trunk/gcc/testsuite/gfortran.dg/derived_function_interface_1.f90
    trunk/gcc/testsuite/gfortran.dg/dg.exp
    trunk/gcc/testsuite/gfortran.dg/gamma_1.f90
    trunk/gcc/testsuite/gfortran.dg/gamma_2.f90
    trunk/gcc/testsuite/gfortran.dg/gamma_3.f90
    trunk/gcc/testsuite/gfortran.dg/gamma_4.f90
    trunk/gcc/testsuite/gfortran.dg/gomp/gomp.exp
    trunk/gcc/testsuite/gfortran.dg/invalid_contains_1.f90
    trunk/gcc/testsuite/gfortran.dg/invalid_contains_2.f90
    trunk/gcc/testsuite/gfortran.dg/recursive_check_3.f90
    trunk/gcc/testsuite/gfortran.dg/vect/vect.exp
    trunk/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp
    trunk/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/Makefile.am
    trunk/libgfortran/Makefile.in
    trunk/libgfortran/config.h.in
    trunk/libgfortran/configure
    trunk/libgfortran/gfortran.map
    trunk/libgomp/ChangeLog
    trunk/libgomp/testsuite/libgomp.fortran/fortran.exp


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2008-03-03 23:47 ` fxcoudert at gcc dot gnu dot org
@ 2008-03-03 23:52 ` fxcoudert at gcc dot gnu dot org
  2008-03-04 14:22 ` fxcoudert at gcc dot gnu dot org
                   ` (32 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-03-03 23:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from fxcoudert at gcc dot gnu dot org  2008-03-03 23:51 -------
Tobias noted the following also need updating:

3999:      /* Fortran 2008 draft allows BIND(C) for internal procedures.  */
4000-      if (gfc_current_state () == COMP_CONTAINS
4001-     && sym->ns->proc_name->attr.flavor != FL_MODULE
4002-     && gfc_notify_std (GFC_STD_GNU, "Extension: BIND(C) attribute at %L "
4003-                        "may not be specified for an internal procedure",
--
4733:      /* The following is allowed in the Fortran 2008 draft.  */
4734-      if (gfc_current_state () == COMP_CONTAINS
4735-     && sym->ns->proc_name->attr.flavor != FL_MODULE
4736-     && gfc_notify_std (GFC_STD_GNU, "Extension: BIND(C) attribute at "
4737-                        "%L may not be specified for an internal
procedure",

ERF and ERFC should be simplified, it's easy since MPFR has these functions.

And, quoting my comment #6:
"Two more remarks on that: ASINH, ACOSH and ATANH need to accept COMPLEX
arguments. Some other functions also should be extended that way (ASIN, ACOS...
and probably many more).

Also, one very annoying feature: BESSEL_JN and BESSEL_YN have two forms, with 2
or 3 arguments. What's more, these two forms have very different properties
(the first one is elemental, the second one is transformational), and I don't
know how to implement that in the current handling of intrinsics!"


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://gcc.gnu.org/ml/gcc-  |
                   |patches/2008-               |
                   |02/msg01430.html            |
           Keywords|patch                       |
            Summary|Fortran 2008: gamma() and   |Fortran 2008: math functions
                   |other small changes         |and other small changes


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2008-03-03 23:52 ` [Bug fortran/33197] Fortran 2008: math functions " fxcoudert at gcc dot gnu dot org
@ 2008-03-04 14:22 ` fxcoudert at gcc dot gnu dot org
  2008-03-04 14:26 ` fxcoudert at gcc dot gnu dot org
                   ` (31 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-03-04 14:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from fxcoudert at gcc dot gnu dot org  2008-03-04 14:21 -------
A bit of experimentation reveals that we can use the asymptotic expression at
http://en.wikipedia.org/wiki/Error_function#Asymptotic_expansion for arguments
larger than 7, and it does converge with less than 100 terms (for x86 long
double, arg = 7.0 requires 30 terms, arg = 8.0 requires 22, arg = 10.0 requires
16 and arg = 18.0 requires 10 terms; allow a bit more for ppc long doubles).
So, I rank this as costly but doable, and we frankly don't care too much about
the cost at the moment (people relying on heavy simplification of ERFC_SCALED
intrinsic, well... I don't see that coming too soon). For smaller arguments,
using mpfr_erfc and mpfr_exp should be fine. Does that sound like a plan?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2008-03-04 14:22 ` fxcoudert at gcc dot gnu dot org
@ 2008-03-04 14:26 ` fxcoudert at gcc dot gnu dot org
  2008-03-06 12:42 ` fxcoudert at gcc dot gnu dot org
                   ` (30 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-03-04 14:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from fxcoudert at gcc dot gnu dot org  2008-03-04 14:26 -------
On ppc longdouble, convergence requires argument >= 8.6 and, again, less than
100 terms. Why does convergence radius depend on the format of the
floating-point type, I wonder... For the record, here's the small C program I
use for testing:

#include <math.h>
#include <float.h>
#include <stdio.h>

#define PI 3.1415926535897932384626433832795029L

extern long double asympt (long double);

long double asympt (long double x)
{
  long double res, f, y, z;
  int n;

  y = 1 / (2 * x * x);
  z = 1;
  res = 1;
  f = 1;
  for (n = 1; n < 100; n++)
  {
    f *= 2 * n - 1;
    z *= y;
    res += (n % 2 ? -1 : 1) * f * z;
    if (f*z <= DBL_MIN)
      break;
    if (f*z <= (nextafterl (res, __builtin_infl()) - res))
      break;
  }
  if (n >= 100)
  {
    printf ("@@@@ failed\n");
    return -1;
  }

  printf ("#### %d %Lg\n", n, f*z);
  return res / (x * sqrtl (PI));
}

int main(void)
{
  int i;

  for (i = 20; i < 10000; i++)
    printf ("%Lg %Lg\n", i * 0.1L, asympt(i * 0.1L));
  return 0;
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions and other small changes
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2008-03-04 14:26 ` fxcoudert at gcc dot gnu dot org
@ 2008-03-06 12:42 ` fxcoudert at gcc dot gnu dot org
  2008-03-06 12:46 ` [Bug fortran/33197] Fortran 2008: math functions fxcoudert at gcc dot gnu dot org
                   ` (29 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-03-06 12:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from fxcoudert at gcc dot gnu dot org  2008-03-06 12:41 -------
Subject: Bug 33197

Author: fxcoudert
Date: Thu Mar  6 12:40:28 2008
New Revision: 132970

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132970
Log:
        PR fortran/33197
        * intrinsic.c (add_functions): Add simplification routines for
        ERF, DERF, ERFC and DERFC.
        * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
        extensions into Fortran 2008 features.
        * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
        prototypes.
        * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/simplify.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2008-03-06 12:42 ` fxcoudert at gcc dot gnu dot org
@ 2008-03-06 12:46 ` fxcoudert at gcc dot gnu dot org
  2008-03-06 13:11 ` burnus at gcc dot gnu dot org
                   ` (28 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-03-06 12:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from fxcoudert at gcc dot gnu dot org  2008-03-06 12:45 -------
Remaining tasks in this PR: taking care of math functions that now accept
complex args (in particular, A{SIN,COS,TAN}{,H}), taking care of the two
arguments form of ATAN, and deal with the 3 args form of BESSEL_JN and
BESSEL_YN.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Fortran 2008: math functions|Fortran 2008: math functions
                   |and other small changes     |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2008-03-06 12:46 ` [Bug fortran/33197] Fortran 2008: math functions fxcoudert at gcc dot gnu dot org
@ 2008-03-06 13:11 ` burnus at gcc dot gnu dot org
  2008-03-06 13:16 ` fxcoudert at gcc dot gnu dot org
                   ` (27 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-03-06 13:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from burnus at gcc dot gnu dot org  2008-03-06 13:10 -------
> Remaining tasks in this PR: [...]
I think also missing are:
- Compile-time evaluation of erfc_scaled
- Implementation of NORM2


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2008-03-06 13:11 ` burnus at gcc dot gnu dot org
@ 2008-03-06 13:16 ` fxcoudert at gcc dot gnu dot org
  2008-03-06 13:50 ` burnus at gcc dot gnu dot org
                   ` (26 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-03-06 13:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from fxcoudert at gcc dot gnu dot org  2008-03-06 13:15 -------
(In reply to comment #14)
> I think also missing are:
> - Compile-time evaluation of erfc_scaled

Right. A though one.

> - Implementation of NORM2

There are quite a few other new F2008 intrinsics, including other
transformational intrinsics, so I think it's better to focus this PR on math
intrinsics.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (16 preceding siblings ...)
  2008-03-06 13:16 ` fxcoudert at gcc dot gnu dot org
@ 2008-03-06 13:50 ` burnus at gcc dot gnu dot org
  2008-03-11 16:54 ` fxcoudert at gcc dot gnu dot org
                   ` (25 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-03-06 13:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from burnus at gcc dot gnu dot org  2008-03-06 13:50 -------
(In reply to comment #15)
> > - Implementation of NORM2
> There are quite a few other new F2008 intrinsics, including other
> transformational intrinsics, so I think it's better to focus this PR on math
> intrinsics.

I would regard the L2 norm as mathematical
(http://mathworld.wolfram.com/L2-Norm.html)
y = NORM2(x) is for rank one arrays simply:

y = 0
do i=lbound(x,dim=1),ubound(x,dim=1)
   y = y + x(i)**2
enddo
y = sqrt(y).

For a rank-one, size-two array it is the same as hypot(x(1),x(2)). Actually,
using hypot is an optimization one should do for size-2 arrays.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (17 preceding siblings ...)
  2008-03-06 13:50 ` burnus at gcc dot gnu dot org
@ 2008-03-11 16:54 ` fxcoudert at gcc dot gnu dot org
  2008-06-15 15:11 ` fxcoudert at gcc dot gnu dot org
                   ` (24 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-03-11 16:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from fxcoudert at gcc dot gnu dot org  2008-03-11 16:53 -------
Adding a note: fallback formulas for systems that lack C99 complex functions
can be found in Cephes (http://www.netlib.org/cephes/)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (18 preceding siblings ...)
  2008-03-11 16:54 ` fxcoudert at gcc dot gnu dot org
@ 2008-06-15 15:11 ` fxcoudert at gcc dot gnu dot org
  2009-02-17 20:59 ` burnus at gcc dot gnu dot org
                   ` (23 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2008-06-15 15:11 UTC (permalink / raw)
  To: gcc-bugs



-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|fxcoudert at gcc dot gnu dot|unassigned at gcc dot gnu
                   |org                         |dot org
             Status|ASSIGNED                    |NEW


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (19 preceding siblings ...)
  2008-06-15 15:11 ` fxcoudert at gcc dot gnu dot org
@ 2009-02-17 20:59 ` burnus at gcc dot gnu dot org
  2009-05-02 13:47 ` fxcoudert at gcc dot gnu dot org
                   ` (22 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-02-17 20:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from burnus at gcc dot gnu dot org  2009-02-17 20:58 -------
Created an attachment (id=17315)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17315&action=view)
Complex (A)TAN(H), (A)COSH, (A)SINH, without no-C99 fallback & w/o tests

"Implementation" of the run-time version of (A)TAN(H), (A)COSH, (A)SINH with
complex arguments. Missing: (a) Fall back if libm does not have those C99
functions; (b) test cases; (c) compile-time evaluations -- this should use the
MPC library as soon as the middle end has support for it.

TODO (carried on from above):
- TAN(X,Y)  (= TAN2(X,Y))
- BESSEL_JN and BESSEL_YN: Transitional form is missing
- ERFC_SCALED: compile-time version
- NORM2


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #15177|0                           |1
        is obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (20 preceding siblings ...)
  2009-02-17 20:59 ` burnus at gcc dot gnu dot org
@ 2009-05-02 13:47 ` fxcoudert at gcc dot gnu dot org
  2009-05-16 17:33 ` fxcoudert at gcc dot gnu dot org
                   ` (21 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-05-02 13:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #19 from fxcoudert at gcc dot gnu dot org  2009-05-02 13:46 -------
Patch submitted for review for the ERFC_SCALED compile-time version here:
http://gcc.gnu.org/ml/fortran/2009-05/msg00012.html


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (21 preceding siblings ...)
  2009-05-02 13:47 ` fxcoudert at gcc dot gnu dot org
@ 2009-05-16 17:33 ` fxcoudert at gcc dot gnu dot org
  2009-05-16 18:10 ` fxcoudert at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-05-16 17:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from fxcoudert at gcc dot gnu dot org  2009-05-16 17:33 -------
Subject: Bug 33197

Author: fxcoudert
Date: Sat May 16 17:33:23 2009
New Revision: 147621

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147621
Log:
        PR fortran/33197

        * intrinsic.c (add_functions): Use ERFC_SCALED simplification.
        * intrinsic.h (gfc_simplify_erfc_scaled): New prototype.
        * simplify.c (fullprec_erfc_scaled, asympt_erfc_scaled,
        gfc_simplify_erfc_scaled): New functions.

        * gfortran.dg/erf_2.F90: New test.
        * gfortran.dg/erfc_scaled_2.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/erf_2.F90
    trunk/gcc/testsuite/gfortran.dg/erfc_scaled_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/simplify.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (22 preceding siblings ...)
  2009-05-16 17:33 ` fxcoudert at gcc dot gnu dot org
@ 2009-05-16 18:10 ` fxcoudert at gcc dot gnu dot org
  2009-07-10 11:46 ` burnus at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-05-16 18:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #21 from fxcoudert at gcc dot gnu dot org  2009-05-16 18:09 -------
ERFC_SCALED compile-time simplification was committed.

TODO (carried on from above):
- TAN(X,Y)  (= TAN2(X,Y))
- BESSEL_JN and BESSEL_YN: Transitional form is missing
- NORM2
- Finish complex (A)TAN(H), (A)COSH, (A)SINH, from comment #18


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (23 preceding siblings ...)
  2009-05-16 18:10 ` fxcoudert at gcc dot gnu dot org
@ 2009-07-10 11:46 ` burnus at gcc dot gnu dot org
  2009-07-10 15:45 ` burnus at gcc dot gnu dot org
                   ` (18 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-10 11:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #22 from burnus at gcc dot gnu dot org  2009-07-10 11:46 -------
For z a complex number: Patch for tan(z), sinh(z), cosh(z), tanh(z) - see at
http://gcc.gnu.org/ml/fortran/2009-07/msg00071.html

Remark: atan(z), asin(z) and acos(z) are also missing besides a{sin,cos,tan}h.

Additionally, I think the description for ATAN2 in the gfortran manual is
wrong:
  "ATAN2(Y, X) computes the arctangent of the complex number X + i Y"
while the standard has:
  "The result has a value equal ... to the principal value of the argument of
the complex number (X, Y), expressed in radians."
That is: atan2(y, x) = Pr arg(x+iy) = Arg(x+iy) =/= ATAN(X+i Y).

 * * *

Fallback implementations via complex logarithm: I have no idea about NaN, Inf
etc. nor about the precision (I do not know how precise the fall back needs to
be), but Abramowitz & Stegun has the following:

a{tan,sin,cos}: http://www.iopb.res.in/~somen/abramowitz_and_stegun/page_80.htm
and http://en.wikipedia.org/wiki/Arctangent#Logarithmic_forms

a{sin,tan,cos}h:
http://www.iopb.res.in/~somen/abramowitz_and_stegun/page_87.htm  However, the
equations might need to be slightly for complex arguments as written at
http://en.wikipedia.org/wiki/Inverse_hyperbolic_function#Logarithmic_representation


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (24 preceding siblings ...)
  2009-07-10 11:46 ` burnus at gcc dot gnu dot org
@ 2009-07-10 15:45 ` burnus at gcc dot gnu dot org
  2009-07-10 16:17 ` burnus at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-10 15:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #23 from burnus at gcc dot gnu dot org  2009-07-10 15:45 -------
Created an attachment (id=18173)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18173&action=view)
Test implementation in C for complex arc{tan,sin,cos}{,h}

> Fallback implementations via complex logarithm

Attached is an implementation of the complex arc{tan,sin,cos}{,h} using complex
log and complex sqrt; plus test cases comparing to libc version; plus result on
my system with Mathematica comparison).

The test show that the result is good unless either value is Inf. In that case,
NaN is returned instead of the proper result. The GLIBC also has problems,
often it returns "(something,Inf)" instead of "(0, Inf)".

The question is whether this is good enough for whether one needs a special
case for +/-Inf at the real/imaginary part. (Note: I only looked at (0,Inf),
(Inf,0), (Inf,Inf) and not at (Inf,finite) etc.)

FX: If you are interested in creating a fall-back version for libgfortran ...


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (25 preceding siblings ...)
  2009-07-10 15:45 ` burnus at gcc dot gnu dot org
@ 2009-07-10 16:17 ` burnus at gcc dot gnu dot org
  2009-07-11  0:03 ` burnus at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-10 16:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #24 from burnus at gcc dot gnu dot org  2009-07-10 16:17 -------
Regarding expressions with Inf with x being finite according to Mathematica 7:
ArcSin (+/-Inf,x) = (0, -/+Inf)
ArcSin (x,+/-Inf) = (0, +/-Inf)
ArcCos (+/-Inf,x) = (0, +/-Inf)
ArcCos (x,+/-Inf) = (0, -/+Inf)
ArcTan (+/-Inf,x) = (+/-Pi/2, 0)
ArcTan (x,+/-Inf) = (+/-Pi/2, 0)
ArcSinh (+/-Inf,x) = (+/-Inf,0)
ArcSinh (x,+/-Inf) = (+/-Inf,0)
ArcSinh (Inf,+/-Inf)  = (Inf,0)
ArcSinh (-Inf,+/-Inf) = (-Inf,0)
ArcCosh (+/-Inf,x) = (Inf,0)
ArcCosh (x,+/-Inf) = (Inf,0)
ArcTanh (+/-Inf,x) = (0,-/+Pi/2)
ArcTanh (x,+/-Inf) = (0,-/+Pi/2)

(For ArcSin, ArcCos, ArcTan, ArcCosh and ArcTanh an expression was returned for
(Inf,Inf).)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (26 preceding siblings ...)
  2009-07-10 16:17 ` burnus at gcc dot gnu dot org
@ 2009-07-11  0:03 ` burnus at gcc dot gnu dot org
  2009-07-14  7:44 ` burnus at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-11  0:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #25 from burnus at gcc dot gnu dot org  2009-07-11 00:03 -------
Subject: Bug 33197

Author: burnus
Date: Sat Jul 11 00:03:07 2009
New Revision: 149503

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=149503
Log:
2009-07-09  Tobias Burnus  <burnus@net-b.de>

        PR fortran/33197
        * check.c (gfc_check_fn_rc2008): New function.
        * intrinsic.h (gfc_check_fn_rc2008): New prototype.
        * intrinsic.c (add_functions): Add complex tan, cosh, sinh,
        and tanh.

2009-07-09  Tobias Burnus  <burnus@net-b.de>

        PR fortran/33197
        * gfortran.dg/complex_intrinsic_3.f90: New test.
        * gfortran.dg/complex_intrinsic_4.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/complex_intrinsic_3.f90
    trunk/gcc/testsuite/gfortran.dg/complex_intrinsic_4.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (27 preceding siblings ...)
  2009-07-11  0:03 ` burnus at gcc dot gnu dot org
@ 2009-07-14  7:44 ` burnus at gcc dot gnu dot org
  2009-07-15  2:37 ` kargl at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-14  7:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #26 from burnus at gcc dot gnu dot org  2009-07-14 07:43 -------
Patch: http://gcc.gnu.org/ml/gcc-patches/2009-07/msg00739.html
- MPC compile-time evaluation of complex tan and sinh/cosh/tanh
- Run-time complex a(sin,cos,tan)(h) with C99 fallback (for finite values only)

TODO:
- Check-in the patch above
- Support infinite arguments in the fallback?
- TAN(X,Y)  (= TAN2(X,Y)) - and fix wrong TAN2 description in the docs
- BESSEL_JN and BESSEL_YN: Transitional form is missing
- NORM2


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (28 preceding siblings ...)
  2009-07-14  7:44 ` burnus at gcc dot gnu dot org
@ 2009-07-15  2:37 ` kargl at gcc dot gnu dot org
  2009-07-15  6:08 ` burnus at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-07-15  2:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #27 from kargl at gcc dot gnu dot org  2009-07-15 02:36 -------
(In reply to comment #26)
> Patch: http://gcc.gnu.org/ml/gcc-patches/2009-07/msg00739.html
> - MPC compile-time evaluation of complex tan and sinh/cosh/tanh
> - Run-time complex a(sin,cos,tan)(h) with C99 fallback (for finite values only)
> 
> TODO:
> - Check-in the patch above

If no one else gets to a review by the weekend, I try to get one 
done.  In a quick scan of the patch, I note that the mpfr versions
of the simplifications weren't in the patch. I'll do those later.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (29 preceding siblings ...)
  2009-07-15  2:37 ` kargl at gcc dot gnu dot org
@ 2009-07-15  6:08 ` burnus at gcc dot gnu dot org
  2009-07-25 19:39 ` burnus at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-15  6:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #28 from burnus at gcc dot gnu dot org  2009-07-15 06:08 -------
> In a quick scan of the patch, I note that the mpfr versions
> of the simplifications weren't in the patch.

MPFR or MPC? The MPFR version should be there since years; the MPC version of
tan/sinh/cosh/tanh should be there (FX patch which is part of this patch) and
the MPC version of a{sin,cos,tan}{,h} does not exist, yet:
http://gforge.inria.fr/plugins/scmsvn/viewcvs.php/trunk/TODO?root=mpc&view=markup


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (30 preceding siblings ...)
  2009-07-15  6:08 ` burnus at gcc dot gnu dot org
@ 2009-07-25 19:39 ` burnus at gcc dot gnu dot org
  2009-07-25 19:45 ` burnus at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-25 19:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #29 from burnus at gcc dot gnu dot org  2009-07-25 19:39 -------
Subject: Bug 33197

Author: burnus
Date: Sat Jul 25 19:39:07 2009
New Revision: 150087

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150087
Log:
2009-07-25  Tobias Burnus  <burnus@net-b.de>
            Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>

        PR fortran/33197
        * intrinsic.c (add_functions): Support complex arguments for
        acos,acosh,asin,asinh,atan,atanh.
        * invoke.texi (ACOS,ACOSH,ASIN,ASINH,ATAN,ATANH): Support
        complex arguments.
        * simplify.c (gfc_simplify_acos,gfc_simplify_acosh,
        gfc_simplify_asin,gfc_simplify_asinh,gfc_simplify_atan,
        gfc_simplify_atanh,gfc_simplify_atan,gfc_simplify_asinh,
        gfc_simplify_acosh,gfc_simplify_atanh): Support
        complex arguments.

2009-07-25  Tobias Burnus  <burnus@net-b.de>

        PR fortran/33197
        * intrinsics/c99_functions.c (cacosf,cacos,cacosl,casinf,
        casin,casind,catanf,catan,catanl,cacoshf,cacosh,cacoshl,
        casinhf,casinh,casinhf,catanhf,catanh,catanhl): New functions.
        * c99_protos.h: Add prototypes for those.

2009-07-25  Tobias Burnus  <burnus@net-b.de>

        PR fortran/33197
        * gfortran.dg/complex_intrinsic_5.f90: New test.
        * gfortran.dg/complex_intrinsic_7.f90: New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/complex_intrinsic_5.f90
    trunk/gcc/testsuite/gfortran.dg/complex_intrinsic_6.f90
    trunk/gcc/testsuite/gfortran.dg/complex_intrinsic_7.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/simplify.c
    trunk/gcc/testsuite/ChangeLog
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/c99_protos.h
    trunk/libgfortran/intrinsics/c99_functions.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (31 preceding siblings ...)
  2009-07-25 19:39 ` burnus at gcc dot gnu dot org
@ 2009-07-25 19:45 ` burnus at gcc dot gnu dot org
  2009-07-26 17:26 ` burnus at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-25 19:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #30 from burnus at gcc dot gnu dot org  2009-07-25 19:44 -------
(Patch was approved by Steve on IRC.)

TODO (carried on):
- Support inverse functions as initialization expressions, when MPC is ready
- TAN(X,Y)  (= TAN2(X,Y)) - and fix wrong TAN2 description in intrinsic.texi
- BESSEL_JN and BESSEL_YN: Transitional form is missing
- NORM2 is missing


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (32 preceding siblings ...)
  2009-07-25 19:45 ` burnus at gcc dot gnu dot org
@ 2009-07-26 17:26 ` burnus at gcc dot gnu dot org
  2009-10-02  3:52 ` ghazi at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2009-07-26 17:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #31 from burnus at gcc dot gnu dot org  2009-07-26 17:26 -------
Subject: Bug 33197

Author: burnus
Date: Sun Jul 26 17:25:56 2009
New Revision: 150100

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=150100
Log:
2009-07-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/33197
        * intrinsic.c (make_generic): Remove assert as "atan" can be
        both ISYM_ATAN and ISYM_ATAN2.
        (add_functions): Add two-argument variant of ATAN.
        * intrinsic.h (gfc_check_atan_2): Add check for it.
        * intrinsic.texi (ATAN2): Correct and enhance description.
        (ATAN): Describe two-argument variant of ATAN.

2009-07-26  Tobias Burnus  <burnus@net-b.de>

        PR fortran/33197
        * gfortran.dg/atan2_1.f90: New test
        * gfortran.dg/atan2_2.f90: New test


Added:
    trunk/gcc/testsuite/gfortran.dg/atan2_1.f90
    trunk/gcc/testsuite/gfortran.dg/atan2_2.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (33 preceding siblings ...)
  2009-07-26 17:26 ` burnus at gcc dot gnu dot org
@ 2009-10-02  3:52 ` ghazi at gcc dot gnu dot org
  2010-05-02  8:48 ` dfranke at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: ghazi at gcc dot gnu dot org @ 2009-10-02  3:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #32 from ghazi at gcc dot gnu dot org  2009-10-02 03:52 -------
Subject: Bug 33197

Author: ghazi
Date: Fri Oct  2 03:52:05 2009
New Revision: 152394

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152394
Log:
        PR fortran/33197
        * gfortran.h (HAVE_mpc_arc): Define.
        * simplify.c (gfc_simplify_acos): Handle complex acos.
        (gfc_simplify_acosh): Likewise for acosh.
        (gfc_simplify_asin): Likewise for asin.
        (gfc_simplify_asinh): Likewise for asinh.
        (gfc_simplify_atan): Likewise for atan.
        (gfc_simplify_atanh): Likewise for atanh.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/simplify.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (34 preceding siblings ...)
  2009-10-02  3:52 ` ghazi at gcc dot gnu dot org
@ 2010-05-02  8:48 ` dfranke at gcc dot gnu dot org
  2010-08-19  7:28 ` burnus at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-02  8:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #33 from dfranke at gcc dot gnu dot org  2010-05-02 08:47 -------
TODO (carried on):
 - BESSEL_JN and BESSEL_YN: Transitional form is missing (c.f. PR36096,
PR36158)
 - NORM2 is missing


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (35 preceding siblings ...)
  2010-05-02  8:48 ` dfranke at gcc dot gnu dot org
@ 2010-08-19  7:28 ` burnus at gcc dot gnu dot org
  2010-08-21 10:13 ` burnus at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-19  7:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #34 from burnus at gcc dot gnu dot org  2010-08-19 07:28 -------
Subject: Bug 33197

Author: burnus
Date: Thu Aug 19 07:28:17 2010
New Revision: 163364

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163364
Log:
2010-08-19  Tobias Burnus  <burnus@net-b.de>

        PR fortran/36158
        PR fortran/33197
        * check.c (gfc_check_bessel_n2): New function.
        * gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
        * intrinsic.c (add_functions): Add transformational version
        of the Bessel_jn/yn intrinsics.
        * intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
        gfc_simplify_bessel_yn2): New prototypes.
        * intrinsic.texi (Bessel_jn, Bessel_yn): Document
        transformational variant.
        * simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
        Check for negative order.
        (gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
        gfc_simplify_bessel_yn2): New functions.

2010-08-19  Tobias Burnus  <burnus@net-b.de>

        PR fortran/36158
        PR fortran/33197
        * gfortran.dg/bessel_3.f90: New.
        * gfortran.dg/bessel_4.f90: New.
        * gfortran.dg/bessel_5.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/bessel_3.f90
    trunk/gcc/testsuite/gfortran.dg/bessel_4.f90
    trunk/gcc/testsuite/gfortran.dg/bessel_5.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/simplify.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (36 preceding siblings ...)
  2010-08-19  7:28 ` burnus at gcc dot gnu dot org
@ 2010-08-21 10:13 ` burnus at gcc dot gnu dot org
  2010-08-21 10:35 ` burnus at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-21 10:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #35 from burnus at gcc dot gnu dot org  2010-08-21 10:13 -------
Subject: Bug 33197

Author: burnus
Date: Sat Aug 21 10:12:53 2010
New Revision: 163440

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163440
Log:
2010-08-21  Tobias Burnus  <burnus@net-b.de>

        PR fortran/36158
        PR fortran/33197
        * intrinsic.c (add_sym): Init value attribute.
        (set_attr_value): New function.
        (add_functions) Use it and add JN/YN resolvers.
        * symbol.c (gfc_copy_formal_args_intr): Copy value attr.
        * intrinsic.h (gfc_resolve_bessel_n2): New prototype.
        * gfortran.h (gfc_intrinsic_arg): Add value attribute.
        * iresolve.c (gfc_resolve_bessel_n2): New function.
        * trans-intrinsic.c (gfc_get_symbol_for_expr): Create
        formal arg list.
        (gfc_conv_intrinsic_function,gfc_is_intrinsic_libcall):
        Add GFC_ISYM_JN2/GFC_ISYM_YN2 as case value.
        * simplify.c (): For YN set to -INF if previous values
        was -INF.
        * trans-expr.c (gfc_conv_procedure_call): Don't crash
        if sym->as is NULL.
        * iresolve.c (gfc_resolve_extends_type_of): Set the
        type of the dummy argument to the one of the actual.

2010-08-21  Tobias Burnus  <burnus@net-b.de>

        PR fortran/36158
        PR fortran/33197
        * m4/bessel.m4: Implement bessel_jn and bessel_yn.
        * gfortran.map: Add the generated bessel_jn_r{4,8,10,16}
        and bessel_yn_r{4,8,10,16}.
        * Makefile.am: Add bessel.m4.
        * Makefile.in: Regenerated.
        * generated/bessel_r4.c: Generated.
        * generated/bessel_r16.c: Generated.
        * generated/bessel_r8.c: Generated.
        * generated/bessel_r10.c: Generated.

2010-08-21  Tobias Burnus  <burnus@net-b.de>

        PR fortran/36158
        PR fortran/33197
        * gfortran.dg/bessel_6.f90: New.
        * gfortran.dg/bessel_7.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/bessel_6.f90
    trunk/gcc/testsuite/gfortran.dg/bessel_7.f90
    trunk/libgfortran/generated/bessel_r10.c
    trunk/libgfortran/generated/bessel_r16.c
    trunk/libgfortran/generated/bessel_r4.c
    trunk/libgfortran/generated/bessel_r8.c
    trunk/libgfortran/m4/bessel.m4
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/fortran/simplify.c
    trunk/gcc/fortran/symbol.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/testsuite/ChangeLog
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/Makefile.am
    trunk/libgfortran/Makefile.in
    trunk/libgfortran/gfortran.map


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (37 preceding siblings ...)
  2010-08-21 10:13 ` burnus at gcc dot gnu dot org
@ 2010-08-21 10:35 ` burnus at gcc dot gnu dot org
  2010-08-22 19:32 ` burnus at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-21 10:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #36 from burnus at gcc dot gnu dot org  2010-08-21 10:35 -------
TODO (carried on):

- NORM2 (L2 norm).

For size-2, one should simply call HYPOT.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (38 preceding siblings ...)
  2010-08-21 10:35 ` burnus at gcc dot gnu dot org
@ 2010-08-22 19:32 ` burnus at gcc dot gnu dot org
  2010-08-22 19:34 ` burnus at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-22 19:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #37 from burnus at gcc dot gnu dot org  2010-08-22 19:32 -------
Created an attachment (id=21545)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21545&action=view)
Draft patch for NORM2 -- and draft run-time test, early PARITY patch

Draft patch for NORM2; as PARITY is essentially the same -- thus, an untested
PARITY implementation is included as well.

TODO
- There is some bug in converting the call for NORM2 - probably in
trans-intrinsic.c; result: a segfault for the run-time version at compile time
- Inline run-time version missing, cf. ISYM_SUM - possibly use lib version with
-Os?
- Test cases

- PARITY: What about logical kinds 1 and 2? Or how to handle this better? --
and the same issues as for NORM2.
Note, a simple conversion only works for scalars not for arrays - which require
would require a temporary. I could image that INTEGER(1) is often used due to
its smaller storage size.

PS: NORM2 is described as "careful calculation of Euclidean norm" in the BCS
slides and in the what's new in F2008 article. Currently, I use the trivial
brute-force method. Maybe something more careful should be done?


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #17315|0                           |1
        is obsolete|                            |
  Attachment #18173|0                           |1
        is obsolete|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (39 preceding siblings ...)
  2010-08-22 19:32 ` burnus at gcc dot gnu dot org
@ 2010-08-22 19:34 ` burnus at gcc dot gnu dot org
  2010-08-22 21:02 ` burnus at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-22 19:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #38 from burnus at gcc dot gnu dot org  2010-08-22 19:34 -------
(In reply to comment #37)
> - PARITY: ... and the same issues as for NORM2.
And PARITY documentation is missing.

Reminder: For NORM2's inline version, think also about hypot.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (40 preceding siblings ...)
  2010-08-22 19:34 ` burnus at gcc dot gnu dot org
@ 2010-08-22 21:02 ` burnus at gcc dot gnu dot org
  2010-08-27 19:18 ` burnus at gcc dot gnu dot org
  2010-08-27 19:21 ` burnus at gcc dot gnu dot org
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-22 21:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #39 from burnus at gcc dot gnu dot org  2010-08-22 21:02 -------
(In reply to comment #37)
> PS: NORM2 is described as "careful calculation of Euclidean norm" in the BCS
> slides and in the what's new in F2008 article. Currently, I use the trivial
> brute-force method. Maybe something more careful should be done?

As Dominique points out - the algorithm can be made more robust by doing the
calculation as
  tmp = max(abs(a))
  NORM2(a) := tmp*sqrt(dot_product(a/tmp,a/tmp))
That helps a lot for "a" finite with (a^2 > huge(a)) [overflow] ;-)

However, there is a method which only requires a single pass, cf. p. 38/39 in 
http://cpc.cs.qub.ac.uk/MRSN/higham.pdf. The algorithm by Sven Hammarling is
also used in BLAS, cf. http://www.netlib.org/blas/snrm2.f


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (41 preceding siblings ...)
  2010-08-22 21:02 ` burnus at gcc dot gnu dot org
@ 2010-08-27 19:18 ` burnus at gcc dot gnu dot org
  2010-08-27 19:21 ` burnus at gcc dot gnu dot org
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-27 19:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #40 from burnus at gcc dot gnu dot org  2010-08-27 19:18 -------
Subject: Bug 33197

Author: burnus
Date: Fri Aug 27 19:17:45 2010
New Revision: 163595

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163595
Log:
gcc/fortran/
2010-08-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/33197
        * gcc/fortran/intrinsic.c (add_functions): Add norm2 and parity.
        * gcc/fortran/intrinsic.h (gfc_check_norm2, gfc_check_parity):
        gfc_simplify_norm2, gfc_simplify_parity, gfc_resolve_norm2,
        gfc_resolve_parity): New prototypes.
        * gcc/fortran/gfortran.h (gfc_isym_id): New enum items
        GFC_ISYM_NORM2 and GFC_ISYM_PARITY.
        * gcc/fortran/iresolve.c (gfc_resolve_norm2,
        gfc_resolve_parity): New functions.
        * gcc/fortran/check.c (gfc_check_norm2, gfc_check_parity):
        New functions.
        * gcc/fortran/trans-intrinsic.c (gfc_conv_intrinsic_arith,
        gfc_conv_intrinsic_function): Handle NORM2 and PARITY.
        * gcc/fortran/intrinsic.texi (NORM2, PARITY): Add.
        * gcc/fortran/simplify.c (simplify_transformation_to_array):
        Add post-processing opterator.
        (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
        gfc_simplify_product, gfc_simplify_sum): Update call.
        (add_squared, do_sqrt, gfc_simplify_norm2, do_xor,
        gfc_simplify_parity): New functions.

gcc/testsuite/
2010-08-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/33197
        * gcc/testsuite/gfortran.dg/norm2_1.f90: New.
        * gcc/testsuite/gfortran.dg/norm2_2.f90: New.
        * gcc/testsuite/gfortran.dg/norm2_3.f90: New.
        * gcc/testsuite/gfortran.dg/norm2_4.f90: New.
        * gcc/testsuite/gfortran.dg/parity_1.f90: New.
        * gcc/testsuite/gfortran.dg/parity_2.f90: New.
        * gcc/testsuite/gfortran.dg/parity_3.f90: New.

libgfortran/
2010-08-27  Tobias Burnus  <burnus@net-b.de>

        PR fortran/33197
        * libgfortran/m4/ifunction.m4 (FINISH_ARRAY_FUNCTION,
        ARRAY_FUNCTION): Allow expression after loop.
        * libgfortran/m4/norm2.m4: New for _gfortran_norm2_r{4,8,10,16}.
        * libgfortran/m4/parity.m4: New for
        * _gfortran_parity_l{1,2,4,8,16}.
        * libgfortran/gfortran.map: Add new functions.
        * libgfortran/Makefile.am: Ditto.
        * libgfortran/m4/minloc1.m4: Add empty argument for
        * ARRAY_FUNCTION.
        * libgfortran/m4/maxloc1.m4: Ditto.
        * libgfortran/m4/all.m4: Ditto.
        * libgfortran/m4/minval.m4: Ditto.
        * libgfortran/m4/maxval.m4: Ditto.
        * libgfortran/m4/count.m4: Ditto.
        * libgfortran/m4/product.m4: Ditto.
        * libgfortran/m4/any.m4: Ditto.
        * Makefile.in: Regenerated.
        * generated/minval_r8.c: Regenerated.
        * generated/maxloc1_4_r8.c: Regenerated.
        * generated/minloc1_16_r16.c: Regenerated.
        * generated/norm2_r4.c: Regenerated.
        * generated/sum_i8.c: Regenerated.
        * generated/parity_l2.c: Regenerated.
        * generated/any_l16.c: Regenerated.
        * generated/maxval_i2.c: Regenerated.
        * generated/any_l2.c: Regenerated.
        * generated/product_r4.c: Regenerated.
        * generated/maxloc1_8_i4.c: Regenerated.
        * generated/parity_l16.c: Regenerated.
        * generated/all_l1.c: Regenerated.
        * generated/product_i2.c: Regenerated.
        * generated/minloc1_8_r16.c: Regenerated.
        * generated/maxloc1_8_r16.c: Regenerated.
        * generated/sum_r16.c: Regenerated.
        * generated/sum_i1.c: Regenerated.
        * generated/minloc1_4_r8.c: Regenerated.
        * generated/maxloc1_16_r16.c: Regenerated.
        * generated/minloc1_16_i4.c: Regenerated.
        * generated/maxloc1_16_i4.c: Regenerated.
        * generated/maxval_r16.c: Regenerated.
        * generated/product_c10.c: Regenerated.
        * generated/minloc1_8_i4.c: Regenerated.
        * generated/all_l2.c: Regenerated.
        * generated/product_c4.c: Regenerated.
        * generated/sum_r4.c: Regenerated.
        * generated/all_l16.c: Regenerated.
        * generated/minloc1_16_r10.c: Regenerated.
        * generated/sum_i2.c: Regenerated.
        * generated/maxloc1_8_r8.c: Regenerated.
        * generated/minval_i16.c: Regenerated.
        * generated/parity_l4.c: Regenerated.
        * generated/maxval_i4.c: Regenerated.
        * generated/any_l4.c: Regenerated.
        * generated/minval_i8.c: Regenerated.
        * generated/maxloc1_4_i8.c: Regenerated.
        * generated/minloc1_4_i16.c: Regenerated.
        * generated/maxloc1_4_i16.c: Regenerated.
        * generated/minloc1_8_r10.c: Regenerated.
        * generated/product_i4.c: Regenerated.
        * generated/maxloc1_8_r10.c: Regenerated.
        * generated/sum_c16.c: Regenerated.
        * generated/minloc1_16_r8.c: Regenerated.
        * generated/maxloc1_16_r8.c: Regenerated.
        * generated/count_4_l.c: Regenerated.
        * generated/sum_r10.c: Regenerated.
        * generated/count_8_l.c: Regenerated.
        * generated/sum_c4.c: Regenerated.
        * generated/maxloc1_16_r10.c: Regenerated.
        * generated/minloc1_8_r8.c: Regenerated.
        * generated/maxval_r10.c: Regenerated.
        * generated/minval_i1.c: Regenerated.
        * generated/maxloc1_4_i1.c: Regenerated.
        * generated/minloc1_4_i8.c: Regenerated.
        * generated/product_i16.c: Regenerated.
        * generated/all_l4.c: Regenerated.
        * generated/norm2_r16.c: Regenerated.
        * generated/minval_r4.c: Regenerated.
        * generated/maxloc1_4_r4.c: Regenerated.
        * generated/sum_i4.c: Regenerated.
        * generated/maxval_r8.c: Regenerated.
        * generated/norm2_r8.c: Regenerated.
        * generated/minloc1_4_i1.c: Regenerated.
        * generated/minval_r16.c: Regenerated.
        * generated/minval_i2.c: Regenerated.
        * generated/maxloc1_4_i2.c: Regenerated.
        * generated/product_r8.c: Regenerated.
        * generated/maxloc1_8_i8.c: Regenerated.
        * generated/sum_c10.c: Regenerated.
        * generated/minloc1_4_r16.c: Regenerated.
        * generated/maxloc1_4_r16.c: Regenerated.
        * generated/count_1_l.c: Regenerated.
        * generated/minloc1_4_r4.c: Regenerated.
        * generated/minloc1_16_i8.c: Regenerated.
        * generated/maxloc1_16_i8.c: Regenerated.
        * generated/minloc1_4_i2.c: Regenerated.
        * generated/maxloc1_8_i1.c: Regenerated.
        * generated/minloc1_8_i8.c: Regenerated.
        * generated/product_r16.c: Regenerated.
        * generated/product_c8.c: Regenerated.
        * generated/sum_r8.c: Regenerated.
        * generated/norm2_r10.c: Regenerated.
        * generated/minloc1_16_i16.c: Regenerated.
        * generated/maxloc1_8_r4.c: Regenerated.
        * generated/minloc1_16_i1.c: Regenerated.
        * generated/maxloc1_16_i1.c: Regenerated.
        * generated/minval_r10.c: Regenerated.
        * generated/count_16_l.c: Regenerated.
        * generated/parity_l8.c: Regenerated.
        * generated/minloc1_8_i1.c: Regenerated.
        * generated/minval_i4.c: Regenerated.
        * generated/maxloc1_4_i4.c: Regenerated.
        * generated/maxloc1_8_i2.c: Regenerated.
        * generated/maxval_i8.c: Regenerated.
        * generated/any_l8.c: Regenerated.
        * generated/minloc1_4_r10.c: Regenerated.
        * generated/minloc1_8_i16.c: Regenerated.
        * generated/maxloc1_4_r10.c: Regenerated.
        * generated/maxloc1_8_i16.c: Regenerated.
        * generated/minloc1_16_r4.c: Regenerated.
        * generated/maxloc1_16_r4.c: Regenerated.
        * generated/product_i8.c: Regenerated.
        * generated/sum_i16.c: Regenerated.
        * generated/count_2_l.c: Regenerated.
        * generated/maxloc1_16_i16.c: Regenerated.
        * generated/minloc1_8_r4.c: Regenerated.
        * generated/sum_c8.c: Regenerated.
        * generated/minloc1_16_i2.c: Regenerated.
        * generated/maxloc1_16_i2.c: Regenerated.
        * generated/parity_l1.c: Regenerated.
        * generated/maxval_i16.c: Regenerated.
        * generated/maxval_i1.c: Regenerated.
        * generated/minloc1_4_i4.c: Regenerated.
        * generated/any_l1.c: Regenerated.
        * generated/minloc1_8_i2.c: Regenerated.
        * generated/product_c16.c: Regenerated.
        * generated/product_r10.c: Regenerated.
        * generated/product_i1.c: Regenerated.
        * generated/all_l8.c: Regenerated.
        * generated/maxval_r4.c: Regenerated.


Added:
    trunk/gcc/testsuite/gfortran.dg/norm2_1.f90
    trunk/gcc/testsuite/gfortran.dg/norm2_2.f90
    trunk/gcc/testsuite/gfortran.dg/norm2_3.f90
    trunk/gcc/testsuite/gfortran.dg/norm_4.f90
    trunk/gcc/testsuite/gfortran.dg/parity_1.f90
    trunk/gcc/testsuite/gfortran.dg/parity_2.f90
    trunk/gcc/testsuite/gfortran.dg/parity_3.f90
    trunk/libgfortran/generated/norm2_r10.c
    trunk/libgfortran/generated/norm2_r16.c
    trunk/libgfortran/generated/norm2_r4.c
    trunk/libgfortran/generated/norm2_r8.c
    trunk/libgfortran/generated/parity_l1.c
    trunk/libgfortran/generated/parity_l16.c
    trunk/libgfortran/generated/parity_l2.c
    trunk/libgfortran/generated/parity_l4.c
    trunk/libgfortran/generated/parity_l8.c
    trunk/libgfortran/m4/norm2.m4
    trunk/libgfortran/m4/parity.m4
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/check.c
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/intrinsic.c
    trunk/gcc/fortran/intrinsic.h
    trunk/gcc/fortran/intrinsic.texi
    trunk/gcc/fortran/iresolve.c
    trunk/gcc/fortran/simplify.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/testsuite/ChangeLog
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/Makefile.am
    trunk/libgfortran/Makefile.in
    trunk/libgfortran/generated/all_l1.c
    trunk/libgfortran/generated/all_l16.c
    trunk/libgfortran/generated/all_l2.c
    trunk/libgfortran/generated/all_l4.c
    trunk/libgfortran/generated/all_l8.c
    trunk/libgfortran/generated/any_l1.c
    trunk/libgfortran/generated/any_l16.c
    trunk/libgfortran/generated/any_l2.c
    trunk/libgfortran/generated/any_l4.c
    trunk/libgfortran/generated/any_l8.c
    trunk/libgfortran/generated/count_16_l.c
    trunk/libgfortran/generated/count_1_l.c
    trunk/libgfortran/generated/count_2_l.c
    trunk/libgfortran/generated/count_4_l.c
    trunk/libgfortran/generated/count_8_l.c
    trunk/libgfortran/generated/maxloc1_16_i1.c
    trunk/libgfortran/generated/maxloc1_16_i16.c
    trunk/libgfortran/generated/maxloc1_16_i2.c
    trunk/libgfortran/generated/maxloc1_16_i4.c
    trunk/libgfortran/generated/maxloc1_16_i8.c
    trunk/libgfortran/generated/maxloc1_16_r10.c
    trunk/libgfortran/generated/maxloc1_16_r16.c
    trunk/libgfortran/generated/maxloc1_16_r4.c
    trunk/libgfortran/generated/maxloc1_16_r8.c
    trunk/libgfortran/generated/maxloc1_4_i1.c
    trunk/libgfortran/generated/maxloc1_4_i16.c
    trunk/libgfortran/generated/maxloc1_4_i2.c
    trunk/libgfortran/generated/maxloc1_4_i4.c
    trunk/libgfortran/generated/maxloc1_4_i8.c
    trunk/libgfortran/generated/maxloc1_4_r10.c
    trunk/libgfortran/generated/maxloc1_4_r16.c
    trunk/libgfortran/generated/maxloc1_4_r4.c
    trunk/libgfortran/generated/maxloc1_4_r8.c
    trunk/libgfortran/generated/maxloc1_8_i1.c
    trunk/libgfortran/generated/maxloc1_8_i16.c
    trunk/libgfortran/generated/maxloc1_8_i2.c
    trunk/libgfortran/generated/maxloc1_8_i4.c
    trunk/libgfortran/generated/maxloc1_8_i8.c
    trunk/libgfortran/generated/maxloc1_8_r10.c
    trunk/libgfortran/generated/maxloc1_8_r16.c
    trunk/libgfortran/generated/maxloc1_8_r4.c
    trunk/libgfortran/generated/maxloc1_8_r8.c
    trunk/libgfortran/generated/maxval_i1.c
    trunk/libgfortran/generated/maxval_i16.c
    trunk/libgfortran/generated/maxval_i2.c
    trunk/libgfortran/generated/maxval_i4.c
    trunk/libgfortran/generated/maxval_i8.c
    trunk/libgfortran/generated/maxval_r10.c
    trunk/libgfortran/generated/maxval_r16.c
    trunk/libgfortran/generated/maxval_r4.c
    trunk/libgfortran/generated/maxval_r8.c
    trunk/libgfortran/generated/minloc1_16_i1.c
    trunk/libgfortran/generated/minloc1_16_i16.c
    trunk/libgfortran/generated/minloc1_16_i2.c
    trunk/libgfortran/generated/minloc1_16_i4.c
    trunk/libgfortran/generated/minloc1_16_i8.c
    trunk/libgfortran/generated/minloc1_16_r10.c
    trunk/libgfortran/generated/minloc1_16_r16.c
    trunk/libgfortran/generated/minloc1_16_r4.c
    trunk/libgfortran/generated/minloc1_16_r8.c
    trunk/libgfortran/generated/minloc1_4_i1.c
    trunk/libgfortran/generated/minloc1_4_i16.c
    trunk/libgfortran/generated/minloc1_4_i2.c
    trunk/libgfortran/generated/minloc1_4_i4.c
    trunk/libgfortran/generated/minloc1_4_i8.c
    trunk/libgfortran/generated/minloc1_4_r10.c
    trunk/libgfortran/generated/minloc1_4_r16.c
    trunk/libgfortran/generated/minloc1_4_r4.c
    trunk/libgfortran/generated/minloc1_4_r8.c
    trunk/libgfortran/generated/minloc1_8_i1.c
    trunk/libgfortran/generated/minloc1_8_i16.c
    trunk/libgfortran/generated/minloc1_8_i2.c
    trunk/libgfortran/generated/minloc1_8_i4.c
    trunk/libgfortran/generated/minloc1_8_i8.c
    trunk/libgfortran/generated/minloc1_8_r10.c
    trunk/libgfortran/generated/minloc1_8_r16.c
    trunk/libgfortran/generated/minloc1_8_r4.c
    trunk/libgfortran/generated/minloc1_8_r8.c
    trunk/libgfortran/generated/minval_i1.c
    trunk/libgfortran/generated/minval_i16.c
    trunk/libgfortran/generated/minval_i2.c
    trunk/libgfortran/generated/minval_i4.c
    trunk/libgfortran/generated/minval_i8.c
    trunk/libgfortran/generated/minval_r10.c
    trunk/libgfortran/generated/minval_r16.c
    trunk/libgfortran/generated/minval_r4.c
    trunk/libgfortran/generated/minval_r8.c
    trunk/libgfortran/generated/product_c10.c
    trunk/libgfortran/generated/product_c16.c
    trunk/libgfortran/generated/product_c4.c
    trunk/libgfortran/generated/product_c8.c
    trunk/libgfortran/generated/product_i1.c
    trunk/libgfortran/generated/product_i16.c
    trunk/libgfortran/generated/product_i2.c
    trunk/libgfortran/generated/product_i4.c
    trunk/libgfortran/generated/product_i8.c
    trunk/libgfortran/generated/product_r10.c
    trunk/libgfortran/generated/product_r16.c
    trunk/libgfortran/generated/product_r4.c
    trunk/libgfortran/generated/product_r8.c
    trunk/libgfortran/generated/sum_c10.c
    trunk/libgfortran/generated/sum_c16.c
    trunk/libgfortran/generated/sum_c4.c
    trunk/libgfortran/generated/sum_c8.c
    trunk/libgfortran/generated/sum_i1.c
    trunk/libgfortran/generated/sum_i16.c
    trunk/libgfortran/generated/sum_i2.c
    trunk/libgfortran/generated/sum_i4.c
    trunk/libgfortran/generated/sum_i8.c
    trunk/libgfortran/generated/sum_r10.c
    trunk/libgfortran/generated/sum_r16.c
    trunk/libgfortran/generated/sum_r4.c
    trunk/libgfortran/generated/sum_r8.c
    trunk/libgfortran/gfortran.map
    trunk/libgfortran/m4/all.m4
    trunk/libgfortran/m4/any.m4
    trunk/libgfortran/m4/count.m4
    trunk/libgfortran/m4/ifunction.m4
    trunk/libgfortran/m4/maxloc1.m4
    trunk/libgfortran/m4/maxval.m4
    trunk/libgfortran/m4/minloc1.m4
    trunk/libgfortran/m4/minval.m4
    trunk/libgfortran/m4/product.m4


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [Bug fortran/33197] Fortran 2008: math functions
  2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
                   ` (42 preceding siblings ...)
  2010-08-27 19:18 ` burnus at gcc dot gnu dot org
@ 2010-08-27 19:21 ` burnus at gcc dot gnu dot org
  43 siblings, 0 replies; 45+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-08-27 19:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #41 from burnus at gcc dot gnu dot org  2010-08-27 19:20 -------
FIXED on the 4.6 trunk.

Thanks to all involved in implementing the math intrinsics.


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33197


^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2010-08-27 19:21 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-26 18:25 [Bug fortran/33197] New: Fortran 2008: gamma() and other small changes burnus at gcc dot gnu dot org
2007-08-28 14:46 ` [Bug fortran/33197] " fxcoudert at gcc dot gnu dot org
2008-02-17 16:01 ` fxcoudert at gcc dot gnu dot org
2008-02-17 18:52 ` burnus at gcc dot gnu dot org
2008-02-17 18:57 ` fxcoudert at gcc dot gnu dot org
2008-02-17 19:09 ` burnus at gcc dot gnu dot org
2008-02-19 16:15 ` burnus at gcc dot gnu dot org
2008-02-27 18:38 ` fxcoudert at gcc dot gnu dot org
2008-02-27 21:03 ` fxcoudert at gcc dot gnu dot org
2008-02-28 17:58 ` fxcoudert at gcc dot gnu dot org
2008-03-03 23:47 ` fxcoudert at gcc dot gnu dot org
2008-03-03 23:52 ` [Bug fortran/33197] Fortran 2008: math functions " fxcoudert at gcc dot gnu dot org
2008-03-04 14:22 ` fxcoudert at gcc dot gnu dot org
2008-03-04 14:26 ` fxcoudert at gcc dot gnu dot org
2008-03-06 12:42 ` fxcoudert at gcc dot gnu dot org
2008-03-06 12:46 ` [Bug fortran/33197] Fortran 2008: math functions fxcoudert at gcc dot gnu dot org
2008-03-06 13:11 ` burnus at gcc dot gnu dot org
2008-03-06 13:16 ` fxcoudert at gcc dot gnu dot org
2008-03-06 13:50 ` burnus at gcc dot gnu dot org
2008-03-11 16:54 ` fxcoudert at gcc dot gnu dot org
2008-06-15 15:11 ` fxcoudert at gcc dot gnu dot org
2009-02-17 20:59 ` burnus at gcc dot gnu dot org
2009-05-02 13:47 ` fxcoudert at gcc dot gnu dot org
2009-05-16 17:33 ` fxcoudert at gcc dot gnu dot org
2009-05-16 18:10 ` fxcoudert at gcc dot gnu dot org
2009-07-10 11:46 ` burnus at gcc dot gnu dot org
2009-07-10 15:45 ` burnus at gcc dot gnu dot org
2009-07-10 16:17 ` burnus at gcc dot gnu dot org
2009-07-11  0:03 ` burnus at gcc dot gnu dot org
2009-07-14  7:44 ` burnus at gcc dot gnu dot org
2009-07-15  2:37 ` kargl at gcc dot gnu dot org
2009-07-15  6:08 ` burnus at gcc dot gnu dot org
2009-07-25 19:39 ` burnus at gcc dot gnu dot org
2009-07-25 19:45 ` burnus at gcc dot gnu dot org
2009-07-26 17:26 ` burnus at gcc dot gnu dot org
2009-10-02  3:52 ` ghazi at gcc dot gnu dot org
2010-05-02  8:48 ` dfranke at gcc dot gnu dot org
2010-08-19  7:28 ` burnus at gcc dot gnu dot org
2010-08-21 10:13 ` burnus at gcc dot gnu dot org
2010-08-21 10:35 ` burnus at gcc dot gnu dot org
2010-08-22 19:32 ` burnus at gcc dot gnu dot org
2010-08-22 19:34 ` burnus at gcc dot gnu dot org
2010-08-22 21:02 ` burnus at gcc dot gnu dot org
2010-08-27 19:18 ` burnus at gcc dot gnu dot org
2010-08-27 19:21 ` burnus at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).