Arithmetic/Integer: Difference between revisions
→{{header|ALGOL 68}}: corrected the description of the Algol 68R '/:=' operator.
m (→{{header|Perl 6}}: update) |
(→{{header|ALGOL 68}}: corrected the description of the Algol 68R '/:=' operator.) |
||
Line 263:
a UP b = a**b = a↑b = +1.499007808785573768814747570e+288
</pre>
[[ALGOL 68R]] has the curious (and consequently non-standard) '/:=' operator. This operator
is equivalent to the OVERAB operator of the revised report, except it delivers
So a '/:=' b sets a to the quotient of a%b and returns the remainder of a%b as a result.
Note that it must be "stropped" i.e. enclosed in single quotes. eg.
INT quotient:=355, remainder;
remainder := quotient '/:=' 113;
Giving a quotient of 3, and a remainder of 16.
|