Date: Sat, 24 Aug 2024 19:51:49 -0700
On Saturday 24 August 2024 11:28:06 GMT-7 Aaron Franke via Std-Proposals
wrote:
> Note that, specifically, `std::numbers::tau` is not a replacement for `2 *
> std::numbers::pi`, it is a replacement for `(2 * std::numbers::pi)` in
> parenthesis. Strictly speaking, due to the order of operations, `radius * 2
> * std::numbers::pi` results in the same behavior as `(radius * 2) *
> std::numbers::pi`.
But they are mathematically and computationally the same because, as I said.
multiplications by 2 and other powers of 2 (including negative powers) are
exact. The order of these operations does not change the precision of the
result.
wrote:
> Note that, specifically, `std::numbers::tau` is not a replacement for `2 *
> std::numbers::pi`, it is a replacement for `(2 * std::numbers::pi)` in
> parenthesis. Strictly speaking, due to the order of operations, `radius * 2
> * std::numbers::pi` results in the same behavior as `(radius * 2) *
> std::numbers::pi`.
But they are mathematically and computationally the same because, as I said.
multiplications by 2 and other powers of 2 (including negative powers) are
exact. The order of these operations does not change the precision of the
result.
-- Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org Principal Engineer - Intel DCAI Platform & System Engineering
Received on 2024-08-25 02:51:59