Sign in Join
FPDoc Onlineexperiment

Ldexp function

In unit Math

Return (2 to the power p) times x.

Declaration

pascal
function Ldexp(X: single; p: Integer): single

Description

Ldexp returns (2 to the power p) times x.

Errors

None.

See also

Example: ex19

pascal
Program Example19;

{ Program to demonstrate the ldexp function. }

Uses math;

begin
  writeln(ldexp(2,4):8:4);
  writeln(ldexp(0.5,3):8:4);
end.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.