Coder Social home page Coder Social logo

simplify's Introduction

Notice

Simplify was a project I worked on while taking algebra 2 to teach myself the concepts and improve my C skills. I don't plan on working on it anymore, even though it's buggy and incomplete.

I'm leaving the repo up and archiving it because I think it will be fun to look back on. :)

Simplify

Build Status Coverage Status

Simplify evaluates a mathematical expression, putting it in its simplest terms.

For example:

simplify --isolate x '2(x + 2) = 5'
x = 0.5

Simplify also works with multiple variables:

simplify --isolate y '2 + x * y^4 = 10
y = (8 / x) \ 4.

Variables can also be assigned in an expression:

simplify 'x : 2' 'x - 5'
2
-3

For a more detailed explanation check out the wiki.

Building

Simplify depends on GMP and MPFR You can use the get-deps.sh script to download them, but most package managers will have up-to-date prebuilt versions.

  1. ./get-deps.sh [optional]
  2. mkdir build; cd build
  3. cmake ..
  4. cmake --build .

Testing

To run the tests ctest must be in your PATH
Follow build steps 1 and 2, then run make test

Regenerate Documentation

To generate documentation cldoc and ronn must be in your PATH
Similar to making the tests do build steps 1 and 2, but run make docs instead of make test.

simplify's People

Contributors

ishehadeh avatar

Stargazers

Josef Pospíšil avatar Nanang arsyad alfatich avatar Andi Andreas avatar Attila Szöllősi avatar Jonas Bülow avatar  avatar Artur Czepiel avatar Pierre Joye avatar  avatar Zhiya Luo avatar Aymeric Dujardin avatar Daniel Heinrich avatar Johan Söderlind Åström avatar Chris Hart avatar Steve Miller avatar  avatar Cole avatar Robin Freyler avatar Set Kyar Wa Lar (Universe) avatar inoahdev avatar Sebastian Patiño avatar Jonathan Simpson avatar Jacob G avatar Umar Rajguru avatar Anthony Cicchetti avatar Steven Hanna avatar KC Lee avatar Aleksi Hankalahti avatar +merlan #flirora avatar Neui avatar  avatar Chris Davis avatar Miroslav Hájek avatar evandrix avatar  avatar Mustapha Hamade avatar grable avatar oxyo avatar Michał Krzywkowski avatar Karim Shehadeh avatar

Watchers

evandrix avatar James Cloos avatar  avatar

Forkers

fjibj

simplify's Issues

Not sure how -d is supposed to work

Could you give an example in the readme or --help on how to use the -d argument? I tried this but got an error:

./simplify -d ADD2S="(2+2)" "ADD2S + 4"

and got this error:

simplify: expected an expression in the form of VARIABLE=EXPRESSION

Probably because there's a number in the variable name. So I removed that and got this:

/simplify -d ADD="(2+2)" "ADD + 4"

And got this:

2 + 2 = 4
2 + 2 + 4

So I guess the first one evaluates the variable expression and the second is just a replacement/simplification of the last expression.

Is that right?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.