Giter Site home page Giter Site logo

Problem with brackets about evalex HOT 3 CLOSED

ezylang avatar ezylang commented on June 16, 2024
Problem with brackets

from evalex.

Comments (3)

uklimaschewski avatar uklimaschewski commented on June 16, 2024

2_3(5_3) should throw an error, because it is not a valid expression.
This is a bug, I will have a look into it.

2_3_(5*3) is correctly 9E+1 (which is a different notation for 90).
The result in scientific notation comes from the Java BigDecimal class.
To be exact, from the toString() method of BigDecimal.
If you want to have 90 as a result, you should use the toPlainString() method of BigDecimal.

from evalex.

samvid1992 avatar samvid1992 commented on June 16, 2024

thanks. i will try using toPlainString() method of BigDecimal.

your program is really cool. I wanted to learn math expression parsing for my college project and your program is really easy to understand and works perfectly. Thanks once again for creating it.

from evalex.

uklimaschewski avatar uklimaschewski commented on June 16, 2024

I checked in a bugfix. The expression 2*3(5*3) now will throw an ExpressionExeption Missing operator at character position 4.

from evalex.

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.