Post Reply 
Problems with signs law and other arithmetic operators
04-07-2015, 04:36 PM (This post was last modified: 04-07-2015 09:49 PM by compsystems.)
Post: #1
Problems with signs law and other arithmetic operators
HPPRIME
+2/+2 => 1 ok
+2*+2 => 4 ok
+2*-2 => -4 ok
-2*-2 => 4 ok
5-+6 => -1 ok
5+-6 => -1 ok
5++6 // error => 11
5--6 // error => 11

In MATLAB ok
>>
+2/+2
+2*+2
-2*-2
5-+6
5+-6
5++6
5--6

ans1 = 1
ans2 = 4
ans3 = -4
ans4 = -1
ans5 = -1
ans6 = 11
ans7 = 11
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Problems with signs law and other arithmetic operators - compsystems - 04-07-2015 04:36 PM



User(s) browsing this thread: 1 Guest(s)