Mathematical Functions and Operators - Mailing list pgsql-docs

From PG Doc comments form
Subject Mathematical Functions and Operators
Date
Msg-id 172577058189.711.5933453138059481244@wrigleys.postgresql.org
Whole thread Raw
Responses Re: Mathematical Functions and Operators
List pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/16/functions-math.html
Description:

Typically, exponentiation (which is represented here by ^) is a
right-associative operation. This means that the expression 2 ^ 3 ^ 3 should
be interpreted as 
2 ^ (3 ^ 3) rather than (2 ^ 3) ^ 3.

Correct Interpretation (right-associative):
2 ^ 3 ^ 3 is interpreted as 2 ^ (3 ^ 3), which equals 2 ^ 27 = 134217728.
However, the example provided assumes left-associative behavior:

Incorrect Interpretation (left-associative):
2 ^ 3 ^ 3 is incorrectly interpreted as (2 ^ 3) ^ 3 = 512.

pgsql-docs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: retrieving results of procedures with OUT params
Next
From: Oleg Sibiryakov
Date:
Subject: Re: Documentation improvement patch