Re: X^Y in Forms 4.5
Date: 1995/07/28
Message-ID: <DCFoGn.Dx8_at_eunet.ch>#1/1
Hy Tommy,
May be i don't always read all the little thing but my sample works with real
number as well as with integer :
1 declare
2 a number; 3 b number; 4 c number;
5 begin
6 a := 4.5; 7 b := 3.5; 8 c := power(a,b);
9 dbms_output.put_line('resultat = '||to_char(c)); 10* end;
resultat = 193.305316306872429483080827490413106086
But this is true in Oracle7, it does not work in version 6...
Please apologize but english is not my mother language Yves
p0070621_at_brookes.ac.uk (Tommy Wareing) wrote:
>In article <DCA73L.6Ir_at_eunet.ch>, Yves Raisin says...
>> 6 a := 4;
>> 7 b := 3;
>> 8 c := power(a,b);
>> 9 dbms_output.put_line('resultat = '||to_char(c));
>> 10* end;
>>resultat = 64
>>
>Which proves he can't read, since he also quotes:
>>pjn_at_novabase.pt (Paulo Jorge Cardiga Nunes) wrote:
>>
>>>Hi!
>>>I'm trying to built a simple(?) routine to calculate a number powered to
>>>other. (X^Y)
>>>Well, it looks simple, but... Y is not an integer. I's a real!! So as
>>>X, but the problem is not in X, but in Y!!!
>and the reason for the complication is that power ONLY works when Y is an
>integer.
>Paulo: have you tried identifying the fraction that Y represents?
>eg. 8^1.5 = (8^3)^0.5
>of course, this then leaves you trying to find roots as well...
>--
> _________________________ __________________________________________
>/ Tommy Wareing \ / I've been looking for an original sin, \
>| p0070621_at_brookes.ac.uk X One with a twist and a bit of a spin |
>\ 0865-483389 / \ -- Pandora's Box, Jim Steinman /
> ~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Yves Raisin tel : +41 21 341 81 11 Ofisa Informatique fax : +41 21 341 84 57 Chemin des Charmettes 7 e-mail: ra_at_ofisa.chCH 1003 Lausanne - Switzerland Received on Fri Jul 28 1995 - 00:00:00 CEST