Hallo Ivanko,

Du schriebst am Mon, 18 Nov 2013 16:46:30 +0500:

> Case of float does not make sens as with float any test on equal does
> not make sens.
> =======================
> ? These comparisions works well in IF.

No, they don't. Try this:

PROGRAM IFf;

VAR
  N1, N2, N3: double; //single;

BEGIN
  N1:= 2; N2:= sqrt (2); N3:= 2/sqrt (2);

  IF sqrt (N1) = N2
    THEN WriteLn ('sqrt (N1) = sqrt (2)!')
    ELSE WriteLn ('There must be a floating point evaluation error...');

  IF sqrt (N1) = N3
    THEN WriteLn ('sqrt (N1) = 2/sqrt (2)')
    ELSE WriteLn ('There must be a floating point evaluation error...');

  WriteLn ('sqrt (N1): ', sqrt (N1));
  WriteLn ('N2:        ', N2);
  WriteLn ('N3:        ', N3);
END.

-- 
-- 
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
-----------------------------------------------------------
Mit freundlichen Grüßen, S. Schicktanz
-----------------------------------------------------------



------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to