[Lazarus] Python4Delphi/Lazarus: VarPyth: VarDataClear.. not yet supported?
Robert
kxroberto at googlemail.com
Sat May 30 12:37:00 CEST 2009
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
> hfiandor at infomed.sld.cu
>
>
> ---------------------------------------
> Red Telematica de Salud - Cuba
> CNICM - Infomed
>
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> 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.
More information about the Lazarus
mailing list