From: "Candida Ferreira" <cferreira@seehomepage.com>
Subject: Re: C fmod function
Date: Wed, 12 Apr 2006 15:49:36 GMT
Date: 2006-04-12T15:49:36+00:00 [thread overview]
Message-ID: <kk9%f.233449$zk4.160702@fe3.news.blueyonder.co.uk> (raw)
In-Reply-To: 1n90xfycs8ygs$.a2i8smdqp0t0$.dlg@40tude.net
Dmitry A. Kazakov wrote:
>> Is there in Ada a built-in function equivalent to the fmod function in
>> C++?
>
> Yes. See Annex A.5.3, Remainder attribute defined for floating-point
> types.
Thanks, Dmitry. I was aware of the Remainder attribute, but having read the
definition I wasn't sure if it corresponded exactly to the C++ fmod function
which can be represented by the generic expression fMod(x,y) = ((x / y) -
(Sign(x / y) * Floor(Abs(x / y)))) * y.
Best wishes,
Candida
---
Candida Ferreira, Ph.D.
Chief Scientist, Gepsoft
http://www.gene-expression-programming.com/author.asp
GEP: Mathematical Modeling by an Artificial Intelligence
(Springer Verlag edition 2006)
http://www.gene-expression-programming.com/Books/index.asp
Online Version:
http://www.gene-expression-programming.com/GepBook/Introduction.htm
Modeling Software:
http://www.gepsoft.com/
next prev parent reply other threads:[~2006-04-12 15:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-12 14:10 C fmod function Candida Ferreira
2006-04-12 15:39 ` Dmitry A. Kazakov
2006-04-12 15:49 ` Candida Ferreira [this message]
2006-04-12 19:23 ` Dmitry A. Kazakov
2006-04-12 19:38 ` Candida Ferreira
2006-04-13 9:36 ` Candida Ferreira
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox