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

conversion from BigUint to Complex and vice versa #422

Open
muhammad-davatgar opened this issue Jan 12, 2023 · 1 comment
Open

conversion from BigUint to Complex and vice versa #422

muhammad-davatgar opened this issue Jan 12, 2023 · 1 comment

Comments

@muhammad-davatgar
Copy link

what is the optimal way to convert from types like BigInt , BigUint , Complex64 to each other ? i tried doing it by using str as a interface (converting to string then converting to the target type) but i'm wondering if there is a better way to do this ?

@cuviper
Copy link
Member

cuviper commented Feb 11, 2023

The question you'll have to answer for yourself is what to do with a Complex imaginary part. But if that's zero, you can use other conversions like ToPrimitive and FromPrimitive to convert to/from the real part of Complex.

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

No branches or pull requests

2 participants