Giter Club home page Giter Club logo

Comments (8)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
Ok the problem seems to be the opening parenthesis. I guess prepending all 
expressions with 0+ in that case would work.

Original comment by [email protected] on 2 Dec 2014 at 4:12

from muparserx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
Here is the result of my investigation:

1.) abs(y) < 0.25 ? (-1) : (1) + 1
I wouldn't expect 0 or two in the first expression. The behavior is consistent 
with the behavior of C/C++ source code in the same situation. You need a way to 
terminate the ?: Operator this is either the end of an expression or a closing 
bracket.

2.) (abs(y) < 0.25 ? -1 : 1)
This would be a bug but I can't reproduce the issue. I checked gcc, llvm and 
Visual Studio. 

I added both cases to the unit test and it is running fine. If i remember 
correctly there are some issues in the LLVM version shipped with OSX. My best 
guess so far is that this may be the cause of the issue.

Original comment by [email protected] on 10 Dec 2014 at 8:38

  • Changed state: Started

from muparserx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
[deleted comment]

from muparserx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
Does your test also work with vector expressions? Starting an expression with ( 
seems to work for me with scalar variables but not with vector ones.

Original comment by [email protected] on 10 Dec 2014 at 9:39

from muparserx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
Seems to work for vectors. I'd be suprised if it didn't because this error is 
thrown in the parsing stage. At that stage the type is still unknown. 

My test sample was "((size(va)[0]==3 ? 1:2)" can you try to give me a simple 
expression showing the behavior? 

Original comment by [email protected] on 10 Dec 2014 at 10:29

from muparserx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
I meant an expression that produces a vector, e.g. this works: {1, 0, 0} but 
this fails: {(1), 0, 0}. Only the first component seems to be affected.

Original comment by [email protected] on 10 Dec 2014 at 10:43

from muparserx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
Thanks for the clarification. I fixed this issue in the SVN repository (V3.0.5).

Original comment by [email protected] on 14 Dec 2014 at 5:57

  • Changed state: Fixed

from muparserx.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 3, 2024
Thanks!

Original comment by [email protected] on 14 Dec 2014 at 6:33

from muparserx.

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.