comp.lang.ada
 help / color / mirror / Atom feed
From: Puckdropper <fake@fake.org>
Subject: Exponent floats?
Date: Mon, 28 Mar 2005 04:49:40 GMT
Date: 2005-03-28T04:49:40+00:00	[thread overview]
Message-ID: <E1M1e.19923$wL6.12523@trnddc03> (raw)

I have an algorithm that requires a floating point exponent.  How can I 
use such a thing?  I tried using **, but it gives me 3 errors:

test.adb:12:24: invalid operand types for operator "**"
test.adb:12:24: left operand has type "Standard.float"
test.adb:12:24: right operand has type "Standard.float"

To demonstrate my problem, I wrote a short program:

-----------------------------

with Ada.Text_IO, Ada.Float_Text_IO;

procedure test is

expon: float;
Answer: float;
Base: float;

begin -- Main Program
	expon := 2.0;
	Base := 2.0;
	Answer := base ** expon;
	Ada.Float_Text_IO.put(Answer);
	Ada.Text_IO.new_line;
end test;

------------------------------

Thanks,

Puckdropper
-- 
www.uncreativelabs.net

Old computers are getting to be a lost art. Here at Uncreative Labs, we 
still enjoy using the old computers. Sometimes we want to see how far a 
particular system can go, other times we use a stock system to remind 
ourselves of what we once had.

To email me directly, send a message to puckdropper (at) fastmail.fm



             reply	other threads:[~2005-03-28  4:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-28  4:49 Puckdropper [this message]
2005-03-28  6:39 ` Exponent floats? tmoran
2005-03-28  6:49 ` Dmitry A. Kazakov
2005-03-28  8:49   ` Pascal Obry
2005-03-28  9:57     ` Dmitry A. Kazakov
2005-03-28 17:47       ` Puckdropper
2005-03-28 18:34         ` Pascal Obry
2005-03-28 22:27           ` Puckdropper
2005-03-28 18:51         ` Dmitry A. Kazakov
2005-03-29  9:29           ` Martin Krischik
2005-03-29 18:55             ` Manuel G. R.
replies disabled

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