Arithmetic/Integer: Difference between revisions

add fermat
(add BQN)
(add fermat)
Line 1,891:
modulus = "/*-."
"</lang>
 
=={{header|Fermat}}==
Integer division rounds towards zero; remainders are always positive regardless of the signs of the numbers.
<lang fermat>
?a;
?b;
!!('Sum: a+b=',a+b);
!!('Difference: a-b=',a-b);
!!('Product: a*b=',a*b);
!!('Integer quotient: a\b=',a\b);
!!('Remainder: a|b=',a|b);
!!('Exponentiation: a^b=',a^b);
</lang>
{{out}}<pre>
>a := 64
>b := -5
Sum: a+b= 59
Difference: a-b= 69
Product: a*b= -320
Integer quotient: a\b= -12
Remainder: a|b= 4
Exponentiation: a^b= 1 / 1073741824
</pre>
 
=={{header|Forth}}==
781

edits