easy_expression_eval 0.2.10

Math expression evaluator

Easy Expression Eval (eeeval)

GitHub release (latest SemVer) GitHub Workflow Status


Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      eeeval:
        github: eltony81/easy_expression_eval
    
  2. Run shards install

Usage

require "eeeval"

expression = "(14.2 + 14.2) * 4 / 2 * 10.5 ^ (2 / 0.5) + sin(2^1+cos(2+7.9-6))"
result = EEEval::CalcFuncParser.evaluate(expression)
puts result

Note: the current implementation does support log exp sin cos sqrt tan atan asin acos exp2 log10 log2 functions

Contributing

  1. Fork it (https://github.com/your-github-user/eeeval/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

Repository

easy_expression_eval

Owner
Statistic
  • 3
  • 0
  • 0
  • 0
  • 0
  • over 1 year ago
  • November 28, 2022
License

MIT License

Links
Synced at

Wed, 06 Nov 2024 02:39:07 GMT

Languages