|
ID: 21909, DecimalRounding (JH1)
Routines For Rounding IEEE-754 Floats (i.e. single, double, and extended) To Specified Number Of Decimal Fractions (code revised 2005-06-15)
|
Download
| Details
|
|
FTP
download also available
|
|
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
|
To download this, you must have registered:
|
For Delphi, Version 2.0
to 7.0
3028 downloads
Copyright: No significant restrictions
Size: 4,553 bytes
Updated on Mon, 24 Jul 2006 06:43:50 GMT
Originally uploaded on Tue, 29 Jun 2004 15:05:38 GMT
SHA1 Hash: 8B0C017D8F5CEF925BC447A91D8289285445C4F0
MD5 Hash: 94B276A6EE0F27879CA3922445DD8DF5
|
Explore the files in this upload
File Exploration is Disabled
We're sorry, but errors in the uploaded zip file prevent it from being explored.
The error generated by the Zip attachment is:
You may still be able to repair the zip file contents if you download the entire zip locally. You may also want to ask the author to repost the attachment.
|
Description
|
These routines round input values to fit as closely as possible to an output number with desired number of decimal fraction digits.
Because, in general, numbers with decimal fractions cannot be exactly represented in IEEE-754 floating binary point variables, error limits are used to determine if the input numbers are intended to represent an exact decimal fraction rather than a nearby value. Thus an error limit will be taken into account when deciding that a number input such as 1.295, which internally is represented 1.29499 99999 …, really should be considered exactly 1.295 and that 0.29999 99999 ... really should be interpreted as 0.3 when applying rounding rules.
Nine rounding rules are implemented.
This (JH1) version should be a drop-in fix for DecimalRounding_JH0, which would fail with certain types of rounding which produced more than 9 decimal digits.
|
|

Server Response from: ETNACDC04
|
Connect with Us