TwoToY Function
Returns 2^Y - handles all cases.

Unit
QESBPCSMath

Declaration
Function TwoToY(const Y: Extended): Extended;

Description
Thanks to Rory Daulton for improvements.

Parameters
Value to use as Power.

Category
Arithmetic Routines for Floats

Implementation

function TwoToY (const Y: Extended): Extended;
begin
     if FloatIsZero (Y) then
          Result := 1
     else
          Result := Pow2 (Y)
End;


HTML generated by Time2HELP
http://www.time2help.com