Giter Site home page Giter Site logo

morpheu5 / mathparser Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 4.11 MB

A parser for text-entry maths that will eventually go into https://isaacphysics.org/equality

License: Apache License 2.0

HTML 2.68% Vue 16.56% Nearley 74.63% JavaScript 6.13%
math-expressions formula-parser symbolic-math vue vuejs vuejs2

mathparser's Introduction

MathParser

A parser of math formulas to allow text entry on Isaac Physics' symbolic editor

This is no more than a demo application. This code will eventually make its way into Isaac Physics.

npm install
npm run serve

Some of the expressions that this can parse right now are

  • x + y
  • x/y
  • x/yz -> (x/y)*z
  • x/-yz -> (x/(-y))*z
  • t_0
  • alpha_t0
  • sin(x)
  • sin(x)^2
  • log(x, 10)
  • ln(x)
  • log(x, e)
  • e^(i*omega + phi)
  • e^ish -> (e^i)*s*h
  • e^-ish -> (e^(-i))*s*h
  • Delta x -> ∆*x
  • Deltax -> ∆x, not ∆*x
  • delta x -> δ*x
  • deltax -> δx, not δ*x
  • d t -> d*t
  • dt -> dt (differential)
  • dabc -> d*a*b*c
  • diff(x^2, x)
  • diff(x^3 * y^2, x, x, y)
  • diff(x^3 * y^2, x, 2, y) (equivalent to the one above)

Differentials only differentiate one letter -- no brackets supported (yet?)

Other features:

  • Greek letters to be converted to their Unicode counterparts
  • radicals
  • (in)equalities
  • derivatives
  • absolute values
  • differentials, maybe?

For now, enjoy 🙂

mathparser's People

Contributors

morpheu5 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.