comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: Way to use Ada Mod function on floats?
Date: Sun, 03 Dec 2006 00:50:49 GMT
Date: 2006-12-03T00:50:49+00:00	[thread overview]
Message-ID: <Jbpch.167646$aJ.91833@attbi_s21> (raw)
In-Reply-To: <m2ac269ojx.fsf@grendel.local>

Simon Wright wrote:
> Gautier <gautier@fakeaddress.nil> writes:
> 
>> Stephen Leake:
>>
>>>       N : constant Integer := Integer (Real_Type'Floor (A / B));
 >>
>> Out of curiosity, what is the need of converting Real_Type'Floor (A /
>> B) to an Integer and back to a Real_Type ?
> 
> Especially when it can overflow and give you a Constraint_Error.

And why 'Floor? Wouldn't 'Truncation be better?

-- 
Jeff Carter
"Run away! Run away!"
Monty Python and the Holy Grail
58



  parent reply	other threads:[~2006-12-03  0:50 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-01 15:32 Way to use Ada Mod function on floats? AAFellow
2006-12-01 16:37 ` Jeffrey Creem
2006-12-01 17:21 ` Adam Beneschan
2006-12-01 21:13 ` Chris Moore
2006-12-02 11:11 ` Stephen Leake
2006-12-02 16:40   ` Gautier
2006-12-02 17:48     ` Simon Wright
2006-12-02 18:21       ` Dmitry A. Kazakov
2006-12-02 18:24         ` Dmitry A. Kazakov
2006-12-03  0:50       ` Jeffrey R. Carter [this message]
2006-12-03  1:05     ` Randy Brukardt
2006-12-03 15:14     ` Stephen Leake
2006-12-03 22:27       ` Jeffrey R. Carter
2006-12-04 11:31         ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox