'******************************************************** '* Program to demonstrate arcsine recursion * '* ---------------------------------------------------- * '* Reference: BASIC Scientific Subroutines, Vol. II * '* by F.R. Ruckdeschel, BYTE/McGRAWW-HILL, 1981 [1]. * '* * '* ---------------------------------------------------- * '* SAMPLE RUN: * '* * '* X ARCSIN(X) STEPS ERROR * '* ----------------------------------------------- * '* 0.00 0.0000000 0 0.0000000000 * '* 0.05 0.0500209 7 -0.0000000013 * '* 0.10 0.1001674 8 -0.0000000025 * '* 0.15 0.1505683 9 -0.0000000021 * '* 0.20 0.2013579 10 -0.0000000013 * '* 0.25 0.2526803 10 -0.0000000025 * '* 0.30 0.3046927 11 -0.0000000011 * '* 0.35 0.3575711 11 -0.0000000017 * '* 0.40 0.4115168 11 -0.0000000025 * '* 0.45 0.4667653 12 -0.0000000009 * '* 0.50 0.5235988 12 -0.0000000012 * '* 0.55 0.5823642 12 -0.0000000016 * '* 0.60 0.6435011 12 -0.0000000021 * '* 0.65 0.7075844 13 -0.0000000007 * '* 0.70 0.7753975 13 -0.0000000008 * '* 0.75 0.8480621 13 -0.0000000010 * '* 0.80 0.9272952 13 -0.0000000012 * '* 0.85 1.0159853 13 -0.0000000014 * '* 0.90 1.1197695 14 -0.0000000004 * '* 0.95 1.2532359 14 -0.0000000004 * '* 1.00 1.5707963 0 0.0000000000 * '* * '******************************************************** '********* defint i-n defdbl a-h,o-z cls print e=1e-8 print " X ARCSIN(X) STEPS ERROR " print "-----------------------------------------------" x=0 for i=1 to 21 gosub 1000 print using "#.## #.####### ## ##.##########"; x; y; m; sin(y)-x x=x+0.05 next i print end '************************************************ '* Arcsin(x) recursion subroutine * '* Input is x (-10 then goto 1100 y=0 return 'Check range 1100 if abs(x)>1 then goto 1300 u0=x*sqr(1#-x*x) u1=x 1200 u2=u1*sqr(2#*u1/(u1+u0)) y=u2 m=m+1 if abs(u2-u1)