<html>
<head></head>
<body>
<div style="background-color:white; width=100%;">
<div>
<a href="https://www.facebook.com/notes/new-stanford-pascal-compiler/floating-point-output-differences-between-platforms/365845753799072" target="_top">https://www.facebook.com/notes/new-stanford-pascal-compiler/floating-point-output-differences-between-platforms/365845753799072</a>/
<br />
<br />other Pascal Implementations have to provide solutions to this issue, too
<br />
<br />Kind regards
<br />
<br />Bernd
</div>
<div>
<br />
<br />
<br />
<hr />Gesendet mit der
<a href="http://www.t-online.de/service/redir/email_app_android_sendmail_footer.htm">Telekom Mail App</a>
</div>
<div>
<br />
<br />--- Original-Nachricht ---
<br />
<b>Von: </b>Sven Barth via fpc-pascal
<br />
<b>Betreff: </b>Re: [fpc-pascal] Freepascal Floating Point Issue
<br />
<b>Datum: </b>22.08.2017, 7:54 Uhr
<br />
<b>An: </b>FPC-Pascal users discussions
<br />
<b>Cc: </b>Sven Barth
<br />
<br />
<br />
</div>
</div>
<div>
<div>
<p>Am 22.08.2017 00:02 schrieb "James Richters" <<a href="mailto:james@productionautomation.net" target="_top">james@productionautomation.net</a>>:</p>
<p>The others already wrote about floating point precision, so I won't repeat that.</p>
<p>> The reason I noticed this is because I have some conditional statements like<br /> > If Draw_GX_Min<>99.999 then<br /> > Something....</p>
<p>*DON'T* compare floating point numbers like that. Instead use SameValue() from the Math unit which has an additional epsilon value (with a default value) that defines a lower and upper bound from your desired value to compare to.</p>
<p>Regards,<br /> Sven</p>
</div>
</div>
</body>
</html>