Re: PrivInf

From: [at]} <Gérard>
Date: Tue, 14 Sep 2004 17:30:41 +0200

----boundary-LibPST-iamunique-1740493836_-_-
Content-type: text/plain

> From the documentation (CP-Land.odc):

>
> "The operators +, -, *, and / apply to operands of numeric types. The type
of the result is REAL if the operation is a division (/) or one of the
operand types is a REAL. Otherwise the result type is SHORTREAL if one of
the operand types is SHORTREAL, LONGINT if one of the operand types is
LONGINT, or INTEGER in any other case. If the result of a real operation is
too large to be represented as a real number, it is changed to the
predeclared value INF with the same sign as the original result. Note that
this also applies to 1.0/0.0, ****but not to 0.0/0.0 which has no defined
result at all and leads to a run-time error.****"
>
> Since this is something that was changed with Rel 1.4, I can find no fault
with BB here.

René,

I think there is one. It seems that the compiler accepts INF as a SHORTREAL,
but not as a REAL. In:
    q := 3.402823466385288E38 / INF;
the constant is a SHORTREAL (<= MAX(SHORTREAL)), and the compiler handles
INF as a SHORTREAL too; there is no error and the result is 0., as expected.
But in:
    r := 3.402823466385289E38 / INF;
the constant is REAL, INF is considered as REAL and rejected as too big, at

compile time. I can't find any remark on this fact in the language
reference, so I think it's a compiler bug.

Regards.

Gérard

--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-1740493836_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNld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
Y3JlYXRpbmcgYW55IG92ZXJoZWFkLlxwYXINClxwYXINCmIpIElmLCBmb3Igc29tZSByZWFzb24s
IHlvdSBjYW5ub3QgcG9zdCBmcm9tIHRoZSBhZGRyZXNzLCBieSB3aGljaCB5b3UgYXJlIHN1YnNj
cmliZWQsIHlvdXIgbWVzc2FnZSB3aWxsIGJlIG1vZGVyYXRlZCB0byBhdm9pZCBzcGFtLiBQbGVh
c2UgdW5kZXJzdGFuZCB0aGF0IG1vZGVyYXRpb24gd2lsbCBvZnRlbiBjYXVzZSBzb21lIGRlbGF5
LCBpbiBwYXJ0aWN1bGFyIG92ZXIgd2Vla2VuZHMgb3IgaG9seWRheX19AGdlZCB0bw=


----boundary-LibPST-iamunique-1740493836_-_---
Received on Tue Sep 14 2004 - 17:30:41 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:28:36 UTC