Arithmetic/Integer: Difference between revisions

(Added Frink.)
Line 661:
 
=={{header|Frink}}==
This demonstrates normal division (which produces rational numbers when possible), <CODE>div</CODE>, and <CODE>mod</CODE>. <CODE>div</CODE> is defined as <CODE>floor[x/y]</CODE>. <CODE>mod</CODE> uses the sign of the second number. (Defined as <CODE>x - y * floor[x/y]</CODE>). All operators automatically produce big integers or exact rational numbers when necessary.
<lang frink>
[a,b] = input["Enter numbers",["a","b"]]
Anonymous user