From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: Ada83 Exponentiation HELP !!!
Date: 1999/12/13
Date: 1999-12-13T00:00:00+00:00 [thread overview]
Message-ID: <83290d$p91$1@fir.prod.itd.earthlink.net> (raw)
In-Reply-To: 831tka$rue$1@tobruk.sydney.gecm.com
jxredi <jxredi@gecms.com.au> wrote in message
news:831tka$rue$1@tobruk.sydney.gecm.com...
> Can anyone help me with the following :
>
> I understand that in Ada83, 6^3 is represented as 6**3, where 6 can
be
> int or real,
> and 3 can only be an INTEGER.
>
> So how do I represent in ada83 this ..... --> 6^(1.3) where 1.3 is
type
> REAL.
You either need a third-party math library, or possibly your compiler
includes
a math library, or possibly you could interface to the C library.
Since you gave no clue as to the compiler you're using, nor the platform
(Hardware and OS), it's difficult to be more specific with recommendations.
In any case, a function with the signature
function "**"(Left, Right : Real) return Real;
can be implemented, or is implemented in a math library to do this.
With such a function implemented and visible in the current scope, then
you can say 6.0 ** 1.3, or whatever.
Incidentally the Ada language does _not_ define a type Real, so I assume
that Real has been declared somewhere in your code, or in a library you
have mentioned in a context clause.
next prev parent reply other threads:[~1999-12-13 0:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-12-13 0:00 Ada83 Exponentiation HELP !!! jxredi
1999-12-13 0:00 ` Gautier
1999-12-13 0:00 ` David C. Hoos, Sr. [this message]
1999-12-13 0:00 ` DuckE
1999-12-14 0:00 ` Preben Randhol
1999-12-19 0:00 ` Robert Dewar
1999-12-19 0:00 ` Preben Randhol
1999-12-19 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox