User manual

The usual math operators are supported
Symbol Meaning
+ Addion
- Subtracon
* Mulplicaon
/ Division
% Modulo (remainder funcon)
y = m*x + b
z = 5 % 4 # z is now 1
result = 14 / 8 # result is now 1 -- integer math only
SNAPpy does not support floang point, only integers.
SNAPpy integers are 16-bit signed values ranging from -32768 to 32767. If you add 1 to 32767, you will get -
32768.
SNAPpy does not generate an error if you divide by zero. The result of that division will be zero.
The usual Boolean funcons are supported
Symbol Meaning
and Both must be True
or Either can be True
not Boolean inversion (not True == False)
Result = True and True # Result is True
Result = True and False # Result is False
Result = True and not False # Result is True
Result = True and not True # Result is False
Result = False and True # Result is False
Result = False and False # Result is False
Result = True or True # Result is True
Result = True or False # Result is True
Result = not True or not False # Result is True
Result = False or True # Result is True
Result = False or False # Result is False
SNAP® Network Operang System 11