Re: Decimal Arithmetic
- From: "robin" <robin_v@xxxxxxxxxxx>
- Date: Tue, 30 Aug 2005 23:11:23 GMT
James J. Weinkam wrote in message ...
>glen herrmannsfeldt wrote:
>> James J. Weinkam wrote:
>>
>> (snip)
>>
>>> I know they work as documented, and I never said they didn't. This
>>> all started when John Kennedy said that PL/I did not have an INTEGER
>>> data type. Robin said that it did. I have been trying without any
>>> success to get Robin to understand that the fact that a knowledgeable
>>> programmer can get INTEGER behavior by any of several techniques does
>>> not mean that PL/I has a true INTEGER data type.
>>
>> If you want to look at it that way, no language has a true integer
>> data type. That is, one that can hold any of the infinite number
>> of possible integer values.
>>
>> -- glen
>>
>Not at all. Certainly, the infinite set of integers as defined in Mathematics
>cannot be perfectly reproduced in computer arithmetic, but in a language that
>has a true INTEGER data type, the following is true of any INTEGER expression:
>either the evaluation of the expression causes a fault or the result is the
same
>as the theoretical result and all intermediate results are integers. This is
>not true in PL/I for all expressions involving only integers
You wouldn't want it to be. PL/I generates as accurate results as it can
for any kind of fixed-point expression, including integers.
> but only for those
>in which the programmer has taken care to avoid the inadvertent generation of
>fractional places (i.e., non integers) in intermediate results.
By defining integer variables and constants as having max precision,
integer data type is available in PL/I.
.
- References:
- Decimal Arithmetic
- From: robin
- Re: Decimal Arithmetic
- From: James J. Weinkam
- Re: Decimal Arithmetic
- From: robin
- Re: Decimal Arithmetic
- From: James J. Weinkam
- Re: Decimal Arithmetic
- From: robin
- Re: Decimal Arithmetic
- From: James J. Weinkam
- Re: Decimal Arithmetic
- From: Tom Linden
- Re: Decimal Arithmetic
- From: James J. Weinkam
- Re: Decimal Arithmetic
- From: glen herrmannsfeldt
- Re: Decimal Arithmetic
- From: James J. Weinkam
- Decimal Arithmetic
- Prev by Date: Re: Decimal Arithmetic
- Next by Date: Re: Decimal Arithmetic
- Previous by thread: Re: Decimal Arithmetic
- Next by thread: Re: Decimal Arithmetic
- Index(es):
Relevant Pages
|