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



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

SameValue

Check whether 2 float values are the same

Declaration

Source position: line 0

function SameValue(

  const A: Extended;

  const B: Extended

):Boolean;

function SameValue(

  const A: Single;

  const B: Single

):Boolean;

function SameValue(

  const A: Extended;

  const B: Extended;

  Epsilon: Extended

):Boolean;

function SameValue(

  const A: Single;

  const B: Single;

  Epsilon: Single

):Boolean;

Description

SameValue returns True if the floating-point values A and B are the same, i.e. whether the absolute value of their their difference is smaller than Epsilon. If their difference is larger, then False is returned.

The default value for Epsilon is dependent on the type of the arguments, but is MinFloat for the float type.

See also

MinFloat

  

Minimum value (closest to zero) of float type

IsZero

  

Check whether value is zero

Notes

 No notes exist for this page yet. 





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