SCOUG-Programming Mailing List Archives
Return to [ 14 |
February |
2005 ]
<< Previous Message <<
>> Next Message >>
Content Type: text/plain
Lynn H. Maxson wrote:
>
> Fractional arithmetic that produces a real number? To how
> many places? If you come up with a result that is expressed
> as a fraction with a numerator and denominator, you don't
> have a real number. Period.
Lynn,
You are confusing real numbers with rational numbers. This might be why
you are perplexed with some of the arguments here.
The ratio of two integers is a rational number.
Your statement above is grotesquely wrong.
The ratio of two integers is always periodic (which includes the subset
which ends in a string of zeroes). A periodic value may _always_ be
converted to a fraction (i.e. two integers) but a fraction in some cases
cannot be converted to a decimal (or other base) value of finite length.
Shall we throw transcendentals into the mix? Or perhaps the square root
of 2? Irrational numbers cannot be written as fractions but do have
exact values, and those exact values should be expressible. You've
chosen a most limiting data type indeed, and I ask you to reconsider.
> You can take 2/3 of 6 (4), but you can't take 2/3 of 7 (4.??????...).
Why do you insist on using only a data type which PL/I supports? Of
course you can take 2/3 of 7. You're being silly. The answer is 14/3.
That's a value that is real, rational, and directly expressible in
today's hardware; why do you insist that it *must* be expressed only in
a manner which *you* choose?
> You can't do infinity. Maybe you're not clear on the concept.
Of course you can do infinity. It is defined, and has been defined for
years, in the IEEE specification. Even Borland's old Turbo Pascal
supported infinity. The 80287 math chip supported infinity.
(Lurkers: The IEEE 80-bit spec has one bit reserved for infinity. Math
operations on an infinite value are defined in the IEEE spec.)
> "We are talking about data types, something which your
> programming language doesn't explore."
>
> A programming language or a specification language doesn't
> explore, it represents.
Your not-yet-existent language doesn't represent anything yet. It's
still exploring data typing, for one thing.
> "Your counter-argument is typically "well heck, just put it in
> the specifications and then regenerate the compiler".
>
> Do you read what you write? Do you listen to what you say?
> How did it get into a compiler or an add-on library without
> being specified?
Apparently through no help from you since you refuse to demonstrate that
your compiler can accept these specifications. I'm *still* waiting for
the examples you said you would supply.
> You have this hang up on data types. I checked. PL/I
> supports ordinals.
Good. Now check the IEEE spec. Next check up on rational numbers, real
numbers, irrational numbers, transcendental functions (including
logarithms, pi and e) and the square root of my cat's birthday. Well,
okay, you don't have to support the datatype "catbirthday". I'll give
you a breather on that one.
> Now the version thing gets interesting. Currently a compiler
> has a single version associated with it. A version is a
> variation. Why can't it support multiple variations? Ambiguity.
No argument here. And I'm waiting for your examples to see how you will
accomplish this.
> "I accept your challenge. Here's some fractional math:
>
> If X=A/B and Y=C/D
> then X*Y = (A*C)/(B*D)"
>
> Wow.
You said you would show examples if I gave the code. Your answer is
"Wow"?
I like your new WOW language, Lynn. No matter what the programmer wants
to accomplish, the compiler always generates a program that displays
"Wow".
Haight-Ashbury. Cheech & Chong. SL/I. Wow!
> " Is there an open source PL/I spec which we can
> build upon?"
>
> There's probably more than one. There is one that IBM
> produces called SAA PL/I. Frankly I would just use the
> language reference manual that comes with OS/2 PL/I.
You've taken my statement out of context. I asked for an open source
PL/I specification that works with an existing specification language.
GC26-9178-01 and SC27-1460-00 are written in English.
- Peter
=====================================================
To unsubscribe from this list, send an email message
to "steward@scoug.com". In the body of the message,
put the command "unsubscribe scoug-programming".
For problems, contact the list owner at
"postmaster@scoug.com".
=====================================================
<< Previous Message <<
>> Next Message >>
Return to [ 14 |
February |
2005 ]
The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA
Copyright 2001 the Southern California OS/2 User Group. ALL RIGHTS
RESERVED.
SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group.
OS/2, Workplace Shell, and IBM are registered trademarks of International
Business Machines Corporation.
All other trademarks remain the property of their respective owners.
|