From: Jeff Carter <jrcarter010@earthlink.net>
Subject: Re: Misc problems
Date: 2000/01/30
Date: 2000-01-30T00:00:00+00:00 [thread overview]
Message-ID: <3894852E.8AF373BB@earthlink.net> (raw)
In-Reply-To: vhik8krpg3s.fsf@grotte.ifi.uio.no
Jan Kroken wrote:
> Second, there's something wrong with the math of the stars demo.
> Probably because I didn't know how to implement
> C.Int := Floor(C.Double), so I just used C.Int = C.Int(C.Double);.
> How do one implement Floor?
Check out the attributes of floating-point types (ARM A.5.3), where you
will find the attributes 'Floor and 'Ceiling. Assuming the declarations
I : C.Int;
D : C.Double;
what you want is
I := C.Int (C.Double'Floor (D) );
--
Jeff Carter
"I waggle my private parts at your aunties."
Monty Python & the Holy Grail
next parent reply other threads:[~2000-01-30 0:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <vhik8krpg3s.fsf@grotte.ifi.uio.no>
2000-01-30 0:00 ` Jeff Carter [this message]
2000-02-01 0:00 ` Misc problems David Botton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox