From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Integers and Mathematical Correctness Date: Sat, 27 Sep 2014 19:32:50 +0300 Organization: Tidorum Ltd Message-ID: References: <98f0066e-4b5c-4b00-b811-dcbb13ed0fcf@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net rFxg5idk+WiBXJVDIB5fYAu0UFennS39ZGwXJcVpF6oqyMg8xG Cancel-Lock: sha1:tP1T7aKF0KCWWhwv5AQ3bLN5Lm0= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Xref: number.nntp.dca.giganews.com comp.lang.ada:189187 Date: 2014-09-27T19:32:50+03:00 List-Id: On 14-09-27 12:01 , AdaMagica wrote: > Adam, > Na, you forget > A: Rational := 1/3+1/4; > This will be 0 for your function. That seems not to be the case. With the definition type Rational is record Numerator, Denominator : Integer; end record; and the obvious definitions of "+", "/", and Image for Rational, the program fragment R : Rational := 1/4 + 3/2; begin Put_Line (Image (R)); results in the output 7 / 2 -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .