Popularity
5.0
Declining
Activity
0.0
Stable
40
2
10
Monthly Downloads: 2,245
Programming language: Elixir
License: MIT License
Tags:
Text And Numbers
abacus alternatives and similar packages
Based on the "Text and Numbers" category.
Alternatively, view abacus alternatives based on common mentions on social networks and blogs.
-
Ex_Money
Money arithmetic, conversion, serialisation with Ecto and exchange rate service integration. -
number
Number is a pretentiously-named Elixir library which provides functions to convert numbers into a variety of different formats. -
secure_random
Convenience library for random base64 strings modeled after my love for Ruby's SecureRandom. -
chinese_translation
Translate between traditional chinese and simplified chinese based on wikipedia data, and translate chinese words/characters to pinyin (or slug with or without tone). -
inet_cidr
Classless Inter-Domain Routing (CIDR) for Elixir that is compatible with :inet and supports both IPv4 and IPv6. -
unit_fun
Attempt to add units to numbers in elixir to give some added type saftey when dealing with numeric quantities. -
bencode
A Bencode encoder and decoder for Elixir. The decoder will return the checksum value of the info dictionary, if an info dictionary was found in the input.
Scout APM: A developer's best friend. Try free for 14-days
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
Do you think we are missing an alternative of abacus or a related project?
Popular Comparisons
README
Abacus 
A parser for mathematical expressions.
https://hex.pm/packages/abacus
Usage
Abacus.eval(expression, scope)
Parses and evaluates the given expression. Variables can be supplied as a map of
binaries in the scope
.
Examples
iex> Abacus.eval("1 + 1")
{:ok, 2}
iex> Abacus.eval("sin(floor(3 + 2.5)) / 3")
{:ok, -0.3196414248877128}
iex> Abacus.eval("a * b", %{"a" => 10, "b" => 10})
{:ok, 100}
Abacus.parse(expression)
Parses the expression and returns the syntax tree.
Features
An incomplete list of supported and planned features
- [x] basic operators (
+
,-
,*
,/
,^
) - [x] factorial (
!
) - [x] bitwise operators (
|
,&
,>>
,<<
,~
,|^
(xor)) - [x] support for functions
- [x] trigonometric functions(
sin
,cos
,tan
) - [x] floating point manipulation(
ceil
,floor
,round
)
- [x] trigonometric functions(
- [x] support for variables
- [ ] support for parsing units
- [ ] support for converting units
Installation
Add
abacus
to your list of dependencies inmix.exs
:def deps do [{:abacus, "~> 0.4.2"}] end
Ensure
abacus
is started before your application:def application do [applications: [:abacus]] end