<div dir="ltr"><div class="gmail_extra">All I can tell you is where -3 comes from. </div><div class="gmail_extra">From <a href="http://www.voip-info.org/wiki/view/Asterisk+Expressions">http://www.voip-info.org/wiki/view/Asterisk+Expressions</a> :</div><div class="gmail_extra">REMAINDER(x,y) computes the remainder of dividing x by y. The return value is x - n*y, where n is the value x/y, rounded to the nearest integer. If this quotient is 1/2, it is rounded to the nearest even number.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">-3 comes from:</div><div class="gmail_extra">n = x/y = 957/60 = 15.95 which rounds to 16</div><div class="gmail_extra">n*y = 16*60 = 960</div><div class="gmail_extra">x - 960 = 957-960 = -3</div><div class="gmail_extra"><br></div><div class="gmail_extra">I'm not mathematically gifted either but I think the n is the problem. it shouldn't be the rounded result it should be the integer part of x/y (n=15)</div><div class="gmail_extra"><br></div><div class="gmail_extra">Can you just use modulo instead: ${MATH(${myNum}%60,int)}</div></div>