absdecimalrounding.pas
来自「Absolute Database 是来替代BDE[Borland数据库引擎]的」· PAS 代码 · 共 17 行
PAS
17 行
Unit ABSDecimalRounding;
(* *****************************************************************************
Author: John Herbster
DecimalRounding_JH1
ROUTINES FOR ROUNDING IEEE-754 FLOATS TO SPECIFIED NUMBER OF DECIMAL FRACTIONS
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
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?