<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Joe White wrote:
<blockquote
 cite="mid:34BDFBE99738224A95074CB8A2C54D6EAF2006@recsbs1.RecondoTech.com"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta name="Generator" content="Microsoft Word 12 (filtered medium)">
  <style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
  </style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
  <div class="Section1">
  <p class="MsoNormal">The drl test case below illustrates a problem
with math
inside of drools when using the mvel dialect. When using autoboxing the
order
of operations (and parens) &nbsp;are not respected. This is using drools
5.0M1
and mvel-2.0-dp4.jar. The correct answer is 80 and the answer provided
with
autoboxing in the mvel dialect is 100.<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">I&#8217;m uncertain of how to create a viable test
case in
pure mvel to add it to their jira. Any help is appreciated,</p>
  </div>
</blockquote>
Drop in the newer MVEL, I believe this is fixed - if it's not open a
JIRA over at MVEL.<br>
<a class="moz-txt-link-freetext" href="http://mvel.codehaus.org/">http://mvel.codehaus.org/</a><br>
<blockquote
 cite="mid:34BDFBE99738224A95074CB8A2C54D6EAF2006@recsbs1.RecondoTech.com"
 type="cite">
  <div class="Section1">
  <p class="MsoNormal"><o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">Thanks,<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal">Joe<o:p></o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
  <p class="MsoNormal" style=""><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">package</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">
test;</span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">dialect</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">"mvel"<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal" style=""><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">rule</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;"> </span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">"TestRule"<o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">when</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">then</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">double</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">
value=(2*</span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">new</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">
Double(</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: green;">"50"</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">))-10-10;</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.out.println(value);</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span><span style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  </span><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">double</span></b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">
valueTwo=(2*50)-10-10;</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p></o:p></span></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: black;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
System.out.println(valueTwo);</span><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;"><o:p></o:p></span></p>
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);">End<o:p></o:p></span></b></p>
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;; color: rgb(150, 0, 0);"><o:p>&nbsp;</o:p></span></b></p>
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">RESULTS<o:p></o:p></span></b></p>
  <p class="MsoNormal" style=""><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">Wrong = 100.0<o:p></o:p></span></p>
  <p class="MsoNormal"><span
 style="font-size: 10pt; font-family: &quot;Courier New&quot;;">Right
= 80.0</span><o:p></o:p></p>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a>
  </pre>
</blockquote>
<br>
</body>
</html>