Jake0303 / symja

Automatically exported from code.google.com/p/symja
0 stars 0 forks source link

Using a BooleanVariable as the first argument to If[.,.,.] #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
-----------------------------------------
1. What steps will reproduce the problem?
-----------------------------------------
1.1. Create a DoubleEvaluator.
1.2. Define a BooleanVariable, and add it to the DoubleEvaluator.
1.3. Run evaluate for the following expression:

If[booleanVariable,1,0]

-------------------------------
2. What is the expected output?
-------------------------------
1.0 if booleanVariable is True, else .0

---------------------------
3. What do you see instead?
---------------------------
An Exception is generated:
EvalDouble#evaluateNodeLogical(ASTNode) not possible for: booleanVariable

-----------------------------------------------------------------------
4. What version of the product are you using? On what operating system?
-----------------------------------------------------------------------
I used the jar file meparser-0.0.6.jar and GWT 2.0.3.

Issue 7 still seems to exist, therefore I couldn't try symja-0.0.7a.jar

---------------------------------------------------
5. Please provide any additional information below.
---------------------------------------------------
Very great library!
It would be great if the source code could be available for symja-0.0.7a,
so that it would work on GWT!

Original issue reported on code.google.com by osorbor on 8 Jun 2010 at 2:56

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 8 Jun 2010 at 7:38

GoogleCodeExporter commented 8 years ago
The problem doesn't seem to exist in current SVN code.
See JUnit test method testEval009():
http://code.google.com/p/symja/source/detail?r=481

Original comment by axelclk@gmail.com on 8 Jun 2010 at 7:42

GoogleCodeExporter commented 8 years ago
I created a new download which includes the sources
Please try:
http://code.google.com/p/symja/downloads/detail?name=matheclipse-parser-0.0.10.j
ar&can=2&q=

Original comment by axelclk@gmail.com on 8 Jun 2010 at 7:55

GoogleCodeExporter commented 8 years ago
Aah, in 0.0.6 I saw it was in general for DoubleVariables.

I see it's fixed!
And #7 as well!!

Thank you very much!

Original comment by osorbor on 9 Jun 2010 at 12:36

GoogleCodeExporter commented 8 years ago

Original comment by axelclk@gmail.com on 9 Jun 2010 at 3:56