thanks very much
Ing. Héctor F. Fiandor
[email protected]
----- Original Message -----
From: "Terry A. Haimann" <[email protected]>
To: "Lazarus mailing list" <[email protected]>
Sent: Friday, May 29, 2009 6:22 PM
Subject: Re: [Lazarus] help in maths
Héctor Fiandor Rosario wrote:
Dear Mr. Coppola:
really I solve using this:
var valor1,valor2,valor3:integer;
valor3:=round(power(valor1,valor2));
and declaring the unit "math" in uses.
Thanks very much
Ing. Héctor F. Fiandor
[email protected]
---------------------------------------
Red Telematica de Salud - Cuba
CNICM - Infomed
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
That is fine if raising to an integer power, but if not:
Result := exp((ln(x) * y);
Will give you the correct value for non integer powers. Ok, there is a
small error which is insignificant for all practical purposes.
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
__________ Información de ESET Smart Security, versión de la base de firmas
de virus 4113 (20090528) __________
ESET Smart Security ha comprobado este mensaje.
http://www.eset.com
---------------------------------------
Red Telematica de Salud - Cuba
CNICM - Infomed
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus