Date: Tue, 25 Oct 2022 17:48:44 +0200
Cubic root have three solutions.
*What is the rule to uniquely pick the first one?*
Rest of them we can have by multiply with cbrt( {+1,0} );
My proposal for complex cbrt:
template< typename T/*number like*/>
std::complex<T> cbrt( std::complex<T> const& c, int index =0 /* which
root to use is defined by ( index % 3) 0,1 or 2 */ );
This might be too complex.
Any idea to make it simple?
On Tue, Oct 25, 2022 at 5:01 PM Jason C via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> <complex> is conspicuously missing cbrt().
>
> If I put together a proposal to add std::cbrt(std::complex) to <complex>,
> would there be any interest?
>
> Any thoughts?
>
> Jason
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
*What is the rule to uniquely pick the first one?*
Rest of them we can have by multiply with cbrt( {+1,0} );
My proposal for complex cbrt:
template< typename T/*number like*/>
std::complex<T> cbrt( std::complex<T> const& c, int index =0 /* which
root to use is defined by ( index % 3) 0,1 or 2 */ );
This might be too complex.
Any idea to make it simple?
On Tue, Oct 25, 2022 at 5:01 PM Jason C via Std-Proposals <
std-proposals_at_[hidden]> wrote:
> <complex> is conspicuously missing cbrt().
>
> If I put together a proposal to add std::cbrt(std::complex) to <complex>,
> would there be any interest?
>
> Any thoughts?
>
> Jason
> --
> Std-Proposals mailing list
> Std-Proposals_at_[hidden]
> https://lists.isocpp.org/mailman/listinfo.cgi/std-proposals
>
Received on 2022-10-25 15:48:55