Coder Social home page Coder Social logo

Negative Numbers don't work? about mathexecutor HOT 6 CLOSED

neonxp avatar neonxp commented on September 27, 2024
Negative Numbers don't work?

from mathexecutor.

Comments (6)

neonxp avatar neonxp commented on September 27, 2024

Hello, thank you for your issue. I'll fix it in 1-2 days.

from mathexecutor.

AntonStoeckl avatar AntonStoeckl commented on September 27, 2024

Hi Alexander, thank you, sounds great!
Until then we'll just add an operator "neg" that does return $param * -1 ;-)
As a hint, in my pull request, I did this change in the TokenParser:
self::DIGIT => '[0-9.]',

After that, this worked: (5 + 3) * -1
but every normal - operation failed (no surprise).

I did not dive deeply into you tokenizing, but I see how the parsing might get tricky with the prefixed numbers.

Please let me know when you have a new version out, so we can test it!
Should also be a good real live test for your lib, we're executing quite long and complicated formulas.

Cheers, Anton

from mathexecutor.

MVSAdmin avatar MVSAdmin commented on September 27, 2024

Hi Alexander,

any progress on that?

Cheers, Anton

from mathexecutor.

AntonStoeckl avatar AntonStoeckl commented on September 27, 2024

Ping

from mathexecutor.

neonxp avatar neonxp commented on September 27, 2024

Resolved

from mathexecutor.

AntonStoeckl avatar AntonStoeckl commented on September 27, 2024

Hi Alexander, great to hear! I'll verify as soon as possible and let you know!

Cheers, Anton

from mathexecutor.

Related Issues (20)

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.