PS: The test for reference:

Code:

5 REM PITO'S TRIGONOMETRIC FUNCTIONS TEST 0..89 DEGREE

6 REM FOR C64 V2 BASIC ROMS

7 REM BASED ON WELLKNOWN "9 DEGREE" CALC FORENSIC TEST

8 REM ASIN(ACOS(ATAN(TAN(COS(SIN(9.0)))))) = 9.0 IN DEGREE

10 PH = 3.1415926536/2.0

15 REM DEFINE ARCSIN AND ARCCOS

20 DEF FN ASN(X) = ATN(X/SQR(1.0-X*X))

30 DEF FN ACS(X) = PH-ATN(X/SQR(1.0-X*X))

35 REM TR, TD - TO RAD, TO DEG

40 TR = 3.1415926536 / 180.0

50 TD = 180.0 / 3.1415926536

55 REM INPUT IN DEGREE (0..89)

60 FOR D = 0 TO 89

70 T = SIN(TR*D)

72 T = COS(TR*T)

74 T = TAN(TR*T)

76 T = TD*ATN(T)

80 T = TD*FN ACS(T)

90 T = TD*FN ASN(T)

100 PRINT D; "="; T; " DELTA="; T-D

110 NEXT D

120 END

6 REM FOR C64 V2 BASIC ROMS

7 REM BASED ON WELLKNOWN "9 DEGREE" CALC FORENSIC TEST

8 REM ASIN(ACOS(ATAN(TAN(COS(SIN(9.0)))))) = 9.0 IN DEGREE

10 PH = 3.1415926536/2.0

15 REM DEFINE ARCSIN AND ARCCOS

20 DEF FN ASN(X) = ATN(X/SQR(1.0-X*X))

30 DEF FN ACS(X) = PH-ATN(X/SQR(1.0-X*X))

35 REM TR, TD - TO RAD, TO DEG

40 TR = 3.1415926536 / 180.0

50 TD = 180.0 / 3.1415926536

55 REM INPUT IN DEGREE (0..89)

60 FOR D = 0 TO 89

70 T = SIN(TR*D)

72 T = COS(TR*T)

74 T = TAN(TR*T)

76 T = TD*ATN(T)

80 T = TD*FN ACS(T)

90 T = TD*FN ASN(T)

100 PRINT D; "="; T; " DELTA="; T-D

110 NEXT D

120 END

Code:

READY.

RUN

0 = .0708403071 DELTA= .0708403071

1 = 1.00188405 DELTA= 1.88405439E-03

2 = 2.00156704 DELTA= 1.56704057E-03

3 = 3.00102166 DELTA= 1.02166273E-03

4 = 4.00055188 DELTA= 5.51875681E-04

5 = 5.00046232 DELTA= 4.62317839E-04

6 = 5.99979405 DELTA=-2.05950812E-04

7 = 6.99975351 DELTA=-2.46489421E-04

8 = 8.00046608 DELTA= 4.6607852E-04

9 = 9.00044075 DELTA= 4.40750271E-04

10 = 10.0001669 DELTA= 1.66922808E-04

..

84 = 83.9999204 DELTA=-7.96020031E-05

85 = 85.0002601 DELTA= 2.60084868E-04

86 = 86.0004052 DELTA= 4.05162573E-04

87 = 87.0003106 DELTA= 3.10570002E-04

88 = 88.0004901 DELTA= 4.90099192E-04

89 = 89.0023091 DELTA= 2.30902433E-03

READY.

RUN

0 = .0708403071 DELTA= .0708403071

1 = 1.00188405 DELTA= 1.88405439E-03

2 = 2.00156704 DELTA= 1.56704057E-03

3 = 3.00102166 DELTA= 1.02166273E-03

4 = 4.00055188 DELTA= 5.51875681E-04

5 = 5.00046232 DELTA= 4.62317839E-04

6 = 5.99979405 DELTA=-2.05950812E-04

7 = 6.99975351 DELTA=-2.46489421E-04

8 = 8.00046608 DELTA= 4.6607852E-04

9 = 9.00044075 DELTA= 4.40750271E-04

10 = 10.0001669 DELTA= 1.66922808E-04

..

84 = 83.9999204 DELTA=-7.96020031E-05

85 = 85.0002601 DELTA= 2.60084868E-04

86 = 86.0004052 DELTA= 4.05162573E-04

87 = 87.0003106 DELTA= 3.10570002E-04

88 = 88.0004901 DELTA= 4.90099192E-04

89 = 89.0023091 DELTA= 2.30902433E-03

READY.