This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Test suite failure on Cygwin: atan2_1.f90
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: Jerry DeLisle <jvdelisle at verizon dot net>
- Cc: gfortran list <fortran at gcc dot gnu dot org>
- Date: Mon, 14 Sep 2009 21:06:26 -0700
- Subject: Re: Test suite failure on Cygwin: atan2_1.f90
- References: <4AAF0F1A.7070300@verizon.net>
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.
--
Steve