10 REM ******************************** 20 REM Newton Raphson Curve Root Finder 30 REM By Mark Ray 40 REM ******************************** 50 REM NC100/200 Version 60 REM Downloaded from Tim's Amstrad NC Users' Site 70 REM http://www.ncus.org.uk 80 REM Originally from the Amstrad Notepad Users' Web 90 CLS:PRINT 'TAB(20);"Newton Raphson Curve Root Finder"' 100 INPUT LINE "Function Y="F$:INPUT "First Approximation :"U 110 N=0:REPEAT:PRINT "Approximation ";N;" = ";U:X=U 120 U=U-(EVAL(F$)/FNdiff(F$,X)):N=N+1:UNTIL U=X:A=GET:CHAIN"BAG" 130 DEF FNdiff(F$,VX):LOCAL Y1,Y2,X 140 X=VX:Y1=EVAL(F$):X=X*1.000001:Y2=EVAL(F$) 150 =(Y2-Y1)/(X-VX)