C++ Logo

std-proposals

Advanced search

Re: [std-proposals] std::cbrt(std::complex)

From: Thiago Macieira <thiago_at_[hidden]>
Date: Tue, 25 Oct 2022 13:15:15 -0700
On Tuesday, 25 October 2022 12:57:49 PDT Brian Bi via Std-Proposals wrote:
> If we had std::cbrt(z) for complex arguments alone, it would make sense to
> define it as std::pow(z, 1.0/3.0). But the simultaneous presence of that
> overload *and* the one for reals, such that the two do not agree when
> restricted to the real line, that would likely cause great confusion to
> programmers.

In other words, do we guarantee that

  cbrt(-1) == cbrt(-1 + 0i);

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DCAI Cloud Engineering

Received on 2022-10-25 20:15:17