PATCH -- Fix degree trignometric functions
Fritz Reese
fritzoreese@gmail.com
Thu Mar 26 15:38:45 GMT 2020
On Wed, Mar 25, 2020 at 9:21 PM Steve Kargl
<sgk@troutmask.apl.washington.edu> wrote:
>
> On Wed, Mar 25, 2020 at 07:58:50PM -0400, Fritz Reese wrote:
> > I've discovered my DEC compiler (Intel's ifort, albeit an old version)
> > has the following behaviors:
[...]
> sin(-0) should return -0, so I think sind(-0) should also
> return -0. For x near n*pi, sin(x) will never return 0 as
> n*pi is not exactly representable. For sind(x) and x = n * 180,
> we should follow what DEC does (if we can determin the behavior).
DEC always returns positive zero -- even for SIN(-0) and SIND(-0). But
I prefer to follow SIND(-0) = -0 and SIND(n*180) based on the parity
of n as we've previously established.
> For cotand(), I in-lined it with gfc_conv_intrinsic_cotand(). We
> can change the in-lining to generate 1/tand(x). Are you up for
> changing trans-intrinsic.c or would you like me to do the change?
I'll take care of it. Thanks for the offer. Will post an updated patch soon.
---
Fritz
More information about the Fortran
mailing list