0.0.6 • Published 5 years ago

simplealgebra v0.0.6

Weekly downloads
4
License
GPL-3.0-or-later
Repository
github
Last release
5 years ago

SimpleAlgebra

Input:

const SimpleAlgebra = require('simplealgebra');

let expString = '(-2 + (- 0.9 - 0.1 + 3 * 3)) * (3 - 1)';
let test = new SimpleAlgebra(expString);

console.log(JSON.stringify(test, null, 4));

Output:

{
    "steps": [
        "(-2+(-0.9-0.1+3*3))*(3-1)",
        "(-2+(-0.9-0.1+9))*(3-1)",
        "(-2+(-1+9))*(3-1)",
        "(-2+8)*(3-1)",
        "6*(3-1)",
        "6*2"
    ],
    "operations": [
        [
            3,
            "*",
            3
        ],
        [
            -0.9,
            "-",
            0.1
        ],
        [
            -1,
            "+",
            9
        ],
        [
            -2,
            "+",
            8
        ],
        [
            3,
            "-",
            1
        ],
        [
            6,
            "*",
            2
        ]
    ]
}
0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago