Deutsch   English   Français   Italiano  
<20240525152709.521@kylheku.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Kaz Kylheku <643-408-1753@kylheku.com>
Newsgroups: comp.lang.awk
Subject: Re: Operator precedence
Date: Sun, 26 May 2024 01:29:11 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <20240525152709.521@kylheku.com>
References: <v2nium$1pl8f$1@dont-email.me> <20240523092856.646@kylheku.com>
 <87sey8movv.fsf@axel-reichert.de> <v2okuh$1vrvh$1@dont-email.me>
 <v2ouo9$2547f$1@dont-email.me> <20240523210755.307@kylheku.com>
 <v2tlcc$320fr$1@dont-email.me>
Injection-Date: Sun, 26 May 2024 03:29:12 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="058c0fa05b6b3793bcde5f0cd05a6280";
	logging-data="3280795"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/VQhM5c7qCREcIg3jaIxL6pvAL+6FxpYQ="
User-Agent: slrn/pre1.0.4-9 (Linux)
Cancel-Lock: sha1:Je9sfCYFRrp+Piepi7b8Gie1Ls4=
Bytes: 1887

On 2024-05-25, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
>> This creates a problem if we naively wedge exponentiation into
>> the grammar, by sticking it into a precedence level above
>> multiplication, but below unary.
>> 
>> The identity does not hold in exponentiation: (-A)**B
>> is not -(A**B).
>
> Looks like a non-sequitur to me.

Yes; the only point here is to explain why we don't notice this
issue, which is mirrored in multiplication: Given -A*B,
we can cheerfully stick a 0 on it to make 0-A*B. The value
does not surprisingly change. Yet, the underlying precedence
relationships are parallel to those in -A**B vs 0-A**B, where
there isn't an identity which masks the issue.

-- 
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca