Hi,
If you execute the following code
lol=1.0-0.1-0.25; monitor=lol;
milkdrop will return the correct answer: 0.6500 (thus with (1.0-0.1)-0.25) projectm will return 1.1500 (thus with 1.0+(-0.1-0.25))
the same for other operators etc.
Can somebody confirm this or is project m dead?
I mean projectm does this 1.0- (0.1-0.25)
I think it is solved by changing in Parser.cpp line 1016 (so it also changes the root of the expressension if you have the same operator as before) from
1016 if (infix_op->precedence > (*root)->infix_op->precedence) 1017 { 1018 new_root = new TreeExpr(infix_op, NULL, *root, NULL); 1019 (*root) = new_root; 1020 return new_root; 1021 }
to
1016 if (infix_op->precedence >= (*root)->infix_op->precedence) 1017 { 1018 new_root = new TreeExpr(infix_op, NULL, *root, NULL); 1019 (*root) = new_root; 1020 return new_root; 1021 }
tests: 1.0-0.1-0.25 = 0.65 (correct) instead of 1.15 -0.25/-1.78/-0.76/5.0 = -0.0370 (correct) now instead of -0.5337
etc.
Fixed in trunk r1363. Thanks for finding this. Do you know of any presets this fixes?
Log in to post a comment.
Hi,
If you execute the following code
milkdrop will return the correct answer: 0.6500 (thus with (1.0-0.1)-0.25)
projectm will return 1.1500 (thus with 1.0+(-0.1-0.25))
the same for other operators etc.
Can somebody confirm this or is project m dead?
I mean projectm does this 1.0- (0.1-0.25)
I think it is solved by changing in Parser.cpp line 1016 (so it also changes the root of the expressension if you have the same operator as before)
from
to
tests:
1.0-0.1-0.25 = 0.65 (correct) instead of 1.15
-0.25/-1.78/-0.76/5.0 = -0.0370 (correct) now instead of -0.5337
etc.
Fixed in trunk r1363. Thanks for finding this. Do you know of any presets this fixes?