/rust-cas

A simple Computer Algebra System written in Rust (FLVS Coding Club Project)

Primary LanguageRustThe UnlicenseUnlicense

rust-cas

A simple Computer Algebra System written in Rust (FLVS Coding Club Project)

See the write up of this CAS here.

TODO

  • Create a tokenizer to convert an expression to abstract types.
    • Implement accurate tokenization for each type.
    • Add the ability to simplify subtraction as equal to either [ADD, NUM(-1.0), MUL] or [NUM(-1.0), MUL]
    • Add the ability to split (...( into [LGROUP...LGROUP] and )...) into [RGROUP...RGROUP]
    • Add the ability to seperate values such as 32x into `[NUM(32.0), MUL, VAR("x")].
  • Create a LGROUP/RGROUP fixer.
    • Add the ability to accurately find group beginning and end.
    • Add the ability to add MUL values between RGROUP and LGROUP values if there isn't any value between them.
    • Add the ability to simplify [ADD, LGROUP, ...VALUES..., RGROUP] as [ADD, ...VALUES...]
  • Create a binary tree creater.
    • Add the ability to recursively create nodes.
    • Add the ability to accurately split values into raw branches (left vs. right.)
    • Add the ability to weight raw branches, and then make them left or right depending on weighting.
  • Add the ability to simplify expressions.
    • Add the ability to traverse the tree.
    • Add the ability to locate patterns and simplify them accordingly.
  • Add the ability to solve expressions.