This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Mon, Sep 14, 2009 at 08:50:50PM -0700, Jerry DeLisle wrote:
I have found that atan2_1.f90 fails on Cygwin on the following code:
do i = 1, 10 if(atan(1.0, i/10.0) -atan2(1.0, i/10.) /= 0.0) call abort() if(atan(1.0d0,i/10.0d0)-atan2(1.0d0,i/10.0d0) /= 0.0d0) call abort() end do
Notice that the test case is looking for an exact answer. This test can pass if we use epsilon() in the criteria.
Further, I noticed that if I use -ffloat-store (ye ole pr323) I do get the exact results. Should we change the test to accept some error or add a target specific dg-option -ffloat-store for the Cygwin target?
It's probably acceptable to accept some multiple of epsilon in this case. The Fortran standard is fairly clear that an intrinsic function returns a processor-dependent approximation to these functions. If cygwins are concerned about the quality of the cygwin/windows math library, let them run ucbtest and fix it.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |