Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Delphi-News aus aller Welt (https://www.delphipraxis.net/58-delphi-news-aus-aller-welt/)
-   -   Why is the result of RoundTo(87.285, -2) => 87.28 – Stack Overflow (https://www.delphipraxis.net/158934-why-result-roundto-87-285-2-%3D-87-28-%96-stack-overflow.html)

DP News-Robot 8. Mär 2011 13:20

Why is the result of RoundTo(87.285, -2) => 87.28 – Stack Overflow
 
Programmers on all sorts of platforms get this wrong all the time (I admit having done this in bad ways myself too). In short: Don’t expect floating point values in a computer to be represented as decimals. Rob Kennedy wrote a very nice answer on this: The exact value 87.285 is not ...http://feeds.feedburner.com/~r/delph...~4/pCwEKWqh0O8

More...


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:23 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz