GithubHelp home page GithubHelp logo

jesserussell411 / exoparse Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 595 KB

Command line calculator running in .net core. Uses the IntFloatFrac data type from my other repository: https://github.com/JesseRussell411/JesseRussell.Numerics.

C# 99.55% HTML 0.45%
math parser

exoparse's Introduction

ExoParse

Math expression parser written in C# for .netcore

ExoParse stands for ExpressionParser or math Expression Parser.

In ExoParseV1, version 1 can be found. This version is now deprecated. It's more like the prototype for version 2, a proof of concept.

In ExoParseV2, version 2 can be found. This is the latest version. The program class and main method/entry point is in ExoParseV2/app/Program.cs More information can be found in ExoparseV2/readme.txt

I've actually found myself using this tool for homework because I know it better than anything else.

Some examples of V2:

Find and count the primes between two numbers:

:def isPrime(num) = n = abs(num); if(n <= 2, true, if(n % 2 == 0, false, {sqr = int(ceil(n^0.5)); res = true; for(i = 3, i <= sqr, i += 2, if(n % i == 0, {res = false; i = sqr + 1})); res})) isPrime(num) has been created.

count = 0; for(i = 10000000000, i < 10000001000, ++i, if(isPrime(i), ++count; print(i))); count

10000000019 10000000033 10000000061 10000000069 10000000097 10000000103 10000000121 10000000141 10000000147 10000000207 10000000259 10000000277 10000000279 10000000319 10000000343 10000000391 10000000403 10000000469 10000000501 10000000537 10000000583 10000000589 10000000597 10000000601 10000000631 10000000643 10000000649 10000000667 10000000679 10000000711 10000000723 10000000741 10000000753 10000000793 10000000799 10000000807 10000000877 10000000883 10000000889 10000000949 10000000963 10000000991 10000000993 10000000999

    44

Factorial and recursion demonstation:

> :def factorial(n) = if(n > 1, n * factorial(n - 1), 1)

        factorial(n) has been created.
> factorial(5)
factorial(5)

        120


> factorial(170)
factorial(170)

        7257415615307998967396728211129263114716991681296451376543577798900561843401706157852350749242617459511490991237838520776666022565442753025328900773207510902400430280058295603966612599658257104398558294257568966313439612262571094946806711205568880457193340212661452800000000000000000000000000000000000000000


> factorial(170) == 170!
factorial(170) == 170!

        1


>

exoparse's People

Contributors

jesserussell411 avatar

Watchers

 avatar

exoparse's Issues

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.