Arithmetic/Rational: Difference between revisions

m
added ;Task: and ;Related task: (bold) headers.
m (J: spell out the operations requested in the task description)
m (added ;Task: and ;Related task: (bold) headers.)
Line 1:
{{task|Arithmetic operations}}[[Category:Arithmetic]]
[[Category:Arithmetic]]
The objective of this task is to create a reasonably complete implementation of rational arithmetic in the particular language using the idioms of the language.
 
;Task:
For example:
The objective of this task is to createCreate a reasonably complete implementation of rational arithmetic in the particular language using the idioms of the language.
 
 
;Example:
Define a new type called '''frac''' with binary operator "//" of two integers that returns a '''structure''' made up of the numerator and the denominator (as per a rational number).
 
Line 14 ⟶ 18:
Use the new type '''frac''' to find all [[Perfect Numbers|perfect numbers]] less than 2<sup>19</sup> by summing the reciprocal of the factors.
 
 
'''See also'''
;Related task:
* &nbsp; [[Perfect Numbers]]
<br><br>
 
=={{header|Ada}}==