STRE Prototype SGLB Misc/Class Reference CLAS 354232 ESBR SORD 8 LVAL 0 input LVAL 0 output ESBR SGLB Output/#1 LCON /*+;Output ESBR ESTR STRE SGLB Misc/Superclass Reference CLAS 354115 ESBR SGLB SignalP/Input /3v7,-100,100,-100,100;Input (%) CMNT Expects: É ¥ inst/arg/É CALL 354113 É ¥ inst/arg/É PRIM Stack/Swap É ¥ arg/inst/É PRIM Value/Test negative É ¥ rslt/arg/inst/É PRIM Stack/Over É ¥ arg/rslt/arg/inst/É PRIM Ordinal/Test zero É ¥ rslt2/rslt/arg/inst/É PRIM Ordinal/Ior É ¥ rslt'/arg/inst/É BRFL branch if positive and non-zero PRIM Stack/Duplicate É ¥ arg/arg/inst/É LCAL Iterate É ¥ rslt/inst/É CALL 354114 É ¥ É BRTR PRIM Stack/Drop É ¥ inst/É LVAL 0 É ¥ 0/inst/É CALL 354114 É ¥ É ESBR ESTR LDEF Iterate CMNT Uses Newton-Raphson iteration to find the square root CMNT If c is current estimate, then a new estimate c' is found by: CMNT c' = c - Ä(c)/Ä'(c) CMNT In this case: Ä(x)=x^2-k Ä'(x)=2x CMNT Input: É ¥ c/k/É CMNT Output: É ¥ rslt/... PRIM Stack/Duplicate É ¥ c/c/k/É PRIM Stack/Duplicate É ¥ c/c/c/k/É PRIM Value/Multiply É ¥ c*c/c/k/É PRIM Stack/Xover É ¥ k/c*c/c/k/É PRIM Value/Subtract É ¥ (c*c-k)/c/k/É LVAL 0.500015 É ¥ 0.5/(c*c-k)/c/k/É PRIM Stack/Xover É ¥ c/0.5/(c*c-k)/c/k/É PRIM Value/Scale É ¥ ((c*c-k)Ö(2*c))/c/k/É PRIM Value/Subtract É ¥ c'/k/É PRIM Value/Absolute É ¥ c'/k/É CMNT Check c' for accuracy PRIM Stack/Duplicate É ¥ c'/c'/k/É PRIM Stack/Duplicate É ¥ c'/c'/c'/k/É PRIM Value/Multiply É ¥ c'*c'/c'/k/É PRIM Stack/Xover É ¥ k/c'*c'/c'/k/É PRIM Value/Subtract É ¥ Ê(c'*c'-k)/c'/k/É PRIM Value/Absolute É ¥ ÊÆ/c'/k/É LVAL 3.05185e-05 É ¥ Êlimit/Æ/c'/k/É PRIM Value/Compare É ¥ rslt/Æ/c'/k/É BRFL branch if done (Æ