ROOT

SmallBASIC syntax groups: 


Math command ROOT


10
20  ROOT low, high, segs, maxerr, BYREF result, BYREF errcode USE expr
30
Roots of F(x).


See examples


If there is insufficient information on this page and you wish learn more about ROOT, please send an email to smallbasic@gmail.com. You can help to improve information about ROOT by submitting an article using the comments link below. Note, an offline language reference text file is now avialable – see the Download section.

  • low the lower limit
  • high the upper limit
  • segs the number of segments (spaces)
  • maxerr tolerance (IF ABS) < maxerr THEN OK)
  • errcode 0 for success; otherwise calculation error
  • result the result
FUNC F(x)
 F = SIN(x)
END
...
ROOT 1, 5, 500, 0.00001, result, errcode USE F(x)