A couple days ago, I was reminded of e [1] by Inconsolation [2], then I forked it and made it a Bash loadable, the e.bash [3].
It runs fast, you can read the benchmark results (0:00) comparing the original v0.02718 and loadable, also the bc using sine plotting (0:50)
You can use it with Command Substitution or variable binding like `printf -v VARNAME` (0:15), which is the fastest way to run e.bash.
Quick examples:
$ e sin[pi/4]
$ echo "ln(3456) = $(e ln[3456])"
$ e -v FOO 2*pi # only loadable
$ e -v BAR -- -1*3
There is also a very interesting graphing example code (1:05).
Although, it runs fast since it's basically C, I'd say it's not worth but "Because I Can," read the first section of the README [3], "Who should use e.bash?"
And you shouldn't use `bc`, either. If you have need of calculating with float number for scripting, then use the right tool, Bash and bc are not the right ones.
The original e was last released on 2001-07-11 as v0.02718, 13 years ago. It has enough mathematical functions for basic uses, sin, cos, !, floor, etc.
----
hg-15:b2bf6f55e53f (2014-08-21, post v0.1.0 (2014-08-21))
In C with Bash
By Yu-Jie Lin (me) and Dimitromanolakis Apostolos (original author)
GPLv2
[1]: http://web.archive.org/web/2009092408...
[2]: https://inconsolation.wordpress.com/2...
[3]: https://bitbucket.org/livibetter/e.bash
Смотрите видео e.bash, Bash loadable, tiny expression evaluator for float calculation онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Archived Yu-Jie Lin 21 Август 2014, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 302 раз и оно понравилось 4 людям.