I assume the question you were trying to ask is why don't you get the result you expected. The answer is
operator precedence. Mathematical operators (eg. +, -, /, *) have different precedence (priority) which means that in an equation like the last one in your example each operation does not necessarily occur from left-to-right. Precedences for the operators $calc() supports are as follows (from highest to lowest):
Operator | Description
----------------------
^ | Exponentiation (power of)
*, /, % | Multiplication, Division, Modulus
+, - | Addition, Subtraction
So to use your example again --
1194 - 1 / 1679 * 100 -- because
/ and
* have higher precedence than
- they are performed first and then the result is subtracted from 1194 giving you 1193.940441.
You can force operations to be performed in a certain order by using parentheses. For example
(1194 - 1) / 1679 * 100 would give you the answer you expected