FTN95 fails to do argument reduction when sin(x) is called with values of x >= 1E19 and returns the argument as the value of sin(x)!
program sinerr
implicit none
real theta,s
integer i
theta=1e10
print *,' i theta sin(theta)'
do i=1,15
s = sin(theta)
print *,i,theta,s
theta=theta*10
end do
end program
The output:
i theta sin(theta)
1 1.000000E+10 -0.487506
2 1.000000E+11 0.998109
3 1.000000E+12 -2.080298E-02
4 1.000000E+13 0.968876
5 1.000000E+14 0.967149
6 1.000000E+15 0.994434
7 1.000000E+16 -0.496563
8 1.000000E+17 -0.570077
9 1.000000E+18 -0.215481
10 1.000000E+19 1.000000E+19
11 1.000000E+20 1.000000E+20
12 1.000000E+21 1.000000E+21
13 1.000000E+22 1.000000E+22
14 1.000000E+23 1.000000E+23
15 1.000000E+24 1.000000E+24