Script Library: 1218 scripts
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 
View scriptLicenseDownload documentation as: HTML or editable
Download scriptHistoryOther scripts by: fvzv

Documentation for: parse-equation.r


Very quick doc
----------------
>> parse-equation "x**(1-x)"
== [power x subtract 1.0 x]

>> parse-equation "x**sqrt(1-x)"
== [power x square-root subtract 1.0 x]

>> parse-equation "4/5+3**2-(5*6+1)"

== [add divide 4.0 5.0 subtract power 3.0 2.0 add multiply 5.0 6.0 
1.0]

>> parse-equation "4/5+3**2-(5*6+1)"

== [add divide 4.0 5.0 subtract power 3.0 2.0 add multiply 5.0 6.0 
1.0]

>> do parse-equation "4/5+3**2-(5*6+1)"
== -21.2

>> do replace/all parse-equation "4/5+3**x-(5*6+1)" 'x 2
== -21.2

Notes