This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [PATCH] PR fortran/62245 fix INT docs.
- From: "VandeVondele Joost" <joost dot vandevondele at mat dot ethz dot ch>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: Gerald Pfeifer <gerald at pfeifer dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>
- Date: Fri, 5 Sep 2014 11:16:02 +0000
- Subject: RE: [PATCH] PR fortran/62245 fix INT docs.
- Authentication-results: sourceware.org; auth=none
- References: <908103EDB4893A42920B21D3568BFD9312F37DC4 at MBX23 dot d dot ethz dot ch> <alpine dot LSU dot 2 dot 11 dot 1408241443070 dot 3274 at tuna dot site> <908103EDB4893A42920B21D3568BFD9312F3ADDE at MBX23 dot d dot ethz dot ch> <20140824154913 dot GA46132 at troutmask dot apl dot washington dot edu> <908103EDB4893A42920B21D3568BFD9312F3BE97 at MBX23 dot d dot ethz dot ch>,<20140824165643 dot GA46452 at troutmask dot apl dot washington dot edu>
> >The last sentence above is not needed.
So, revised patch without the last sentence.
2014-09-05 Joost VandeVondele <vondele@gcc.gnu.org>
PR fortran/62245
* intrinsic.texi (INT): clarify result.
Index: fortran/intrinsic.texi
===================================================================
--- fortran/intrinsic.texi (revision 214949)
+++ fortran/intrinsic.texi (working copy)
@@ -7370,9 +7370,10 @@ the following rules:
@item (A)
If @var{A} is of type @code{INTEGER}, @code{INT(A) = A}
@item (B)
-If @var{A} is of type @code{REAL} and @math{|A| < 1}, @code{INT(A)} equals @code{0}.
-If @math{|A| \geq 1}, then @code{INT(A)} equals the largest integer that does not exceed
-the range of @var{A} and whose sign is the same as the sign of @var{A}.
+If @var{A} is of type @code{REAL} and @math{|A| < 1}, @code{INT(A)}
+equals @code{0}. If @math{|A| \geq 1}, then @code{INT(A)} is the integer
+whose magnitude is the largest integer that does not exceed the magnitude
+of @var{A} and whose sign is the same as the sign of @var{A}.
@item (C)
If @var{A} is of type @code{COMPLEX}, rule B is applied to the real part of @var{A}.
@end table