help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



[Overview][Constants][Types][Classes][Procedures and functions] Reference for unit 'math' (#rtl)

Frexp

Return mantissa and exponent.

Declaration

Source position: math.pp line 327

procedure Frexp(

  X: float;

  var Mantissa: float;

  var Exponent: Integer

);

Description

Frexp returns the mantissa and exponent of it's argument x in mantissa and exponent.

Errors

None

Example

Program Example14;

{ Program to demonstrate the frexp function. }

Uses math;

Procedure dofrexp(Const X : extended);

var man : extended;
    exp: longint;

begin
  man:=0;
  exp:=0;
  frexp(x,man,exp);
  write(x,' has ');
  Writeln('mantissa ',man,' and exponent ',exp);
end;


begin
//   dofrexp(1.00);
   dofrexp(1.02e-1);
   dofrexp(1.03e-2);
   dofrexp(1.02e1);
   dofrexp(1.03e2);
end.

Notes

 No notes exist for this page yet. 





lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505