[Info-vax] Decimal Floating Point (was: Re: Which programming language would you like to see officially supported on VMS ?)
Stephen Hoffman
seaohveh at hoffmanlabs.invalid
Wed Mar 4 14:03:12 EST 2020
Changed subject, as the rest of the thread is discussing financial
transfers and payments info...
On 2020-02-29 23:28:19 +0000, already5chosen at yahoo.com said:
> On Sunday, March 1, 2020 at 12:41:55 AM UTC+2, Arne Vajhøj wrote:
>>
>> That is the scientific calculation.
>>
>> But that is not the exact financial calculation.
>>
>> You got 1 dollar that you need to split in 3 equal portions.
>>
>> A 20 or 30 digit approximation to 1/3 is never the correct answer.
>>
>> You need 3 x 0.33 + a bucket for 0.01 or 2 x 0.33 + 0.34.
>
> And I don't see how any language/libray-class/numeric-format could help
> to do it automatically.
> On the other hand, any sufficiently precise format is good to do it
> non-automatically at application level, using div/mod or similar
> facility.
> And "decimality" of numeric format certainly does not matter.
The IEEE 754 floating point standard includes decimal floating point
support in its most recent two revisions.
https://en.wikipedia.org/wiki/Decimal_floating_point
Of course, the details of IEEE 754 compliance can and do vary by
implementation.
--
Pure Personal Opinion | HoffmanLabs LLC
More information about the Info-vax
mailing list