Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complex number functions #911

Closed
evanmiller opened this issue Jan 2, 2023 · 9 comments · Fixed by #917
Closed

Complex number functions #911

evanmiller opened this issue Jan 2, 2023 · 9 comments · Fixed by #917

Comments

@evanmiller
Copy link
Contributor

Are these still needed?

https://www.boost.org/doc/libs/1_81_0/libs/math/doc/html/inverse_complex.html

I see that all six of these functions are in std::complex as of C++11.

@mborland
Copy link
Member

mborland commented Jan 9, 2023

Since we are moving to C++14 in the next release we could add the [[deprecated("Replaced by C++11")]] attribute to these.

@jzmaddock
Copy link
Collaborator

I'm cool with that.

@NAThompson
Copy link
Collaborator

Are we sure that 1) these don't work with multiprecision, and 2) they aren't used by some standard library implementation?

@mborland
Copy link
Member

mborland commented Jan 9, 2023

Are we sure that 1) these don't work with multiprecision, and 2) they aren't used by some standard library implementation?

  1. They return std::complex which is limited to float, double, and long double

  2. That would be a question for @CaseyCarter or @StephanTLavavej. Does MSVC use Boost.Math for complex special functions? I know you use some of the others.

@ckormanyos
Copy link
Member

ckormanyos commented Jan 9, 2023

work with multiprecision

When I was recently writing my new cpp_double_fp_backend for Multiprecision, I got the impression that these functions were used in some of the tests. I'm not sure if they are actually needed for the Multiprecision-backend implementations themselves.

I'll try to take a look before the trail runs cold, since I was recently just snoping around these areas.

@StephanTLavavej
Copy link
Contributor

We don't use Boost.Math for <complex>'s inverse trig functions; our use is restricted to [sf.cmath].

@ckormanyos
Copy link
Member

We don't use Boost.Math for <complex>'s inverse trig functions; our use is restricted to [sf.cmath].

Cool

@ckormanyos
Copy link
Member

ckormanyos commented Jan 10, 2023

Are we sure that 1) these don't work with multiprecision

No, personally I'm really unsure of that.

Just about every floating-point backend includes the headers when Boost.Math is available. If this is absolutely necessary, I'm not sure.

Wouldn't we need to modify these backends in Multiprecision if deprecation ensues? or did i miss the obvious, as I may have and sometimes do?

@jzmaddock
Copy link
Collaborator

No std::complex can not be used for multiprecision types. But... the scalar versions for float/double/long double could well be deprecated I guess. Does that make things worse/less generic though?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants