Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

rishadbaniya/OneDegreeEquationStandardizer

Repository files navigation

OneDegreeEquationStandardizer

Beware - Its all about math

Convert
2x + 3y + 10z - 20 + x = 10
into
3x + 3y + 10z = 30 (Ax + By + Cz = D) form

Equation Standardizer is made with sole purpose of making any user input equation of one degree, into standard form.

Eg.

Lets consider an equation :

let rawEquation : string = "2x + 3y + 20 + 10y + 20z + 30 = 10y";

In your deno program, download the oneDegreeEqStandardizer.ts file from this repo and import the function as

import {makeItStandard} from "./oneDegreeEqStandardizer.ts";

Pass the raw equation into the "makeItStandard" function

let standardEq = makeItStandard(rawEquation);

This will return output as :

{
latexArray: [
"2\text{x}+3\text{y}+20+10\text{y}+20\text{z}+30=10\text{y}",
"2\text{x}+3\text{y}+10\text{y}+20\text{z}-10\text{y}=-20-30",
"2\text{x}+3\text{y}+20\text{z}=-50"
],
leftVars: [ "2x", "+3y", "+20z" ],
rightConstant: [ "-50" ]
}

latexArray :

It contains the three steps of resolving into standard form

Step 1 : It gives the latex of the question

Step 2 : It gives the latex of taking constants, like variables to right and left respectively

Step 3: It gives the latex after computing the like variables and constants taken to left and right.

leftVars , rightConstant :

It gives us the array of standard form variables and constants that were resolved

About

Make your "JIBBERISH" equation into standard form

Topics

Resources

Readme

License

Apache-2.0 license

Stars

Watchers

Forks

Packages

Contributors