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

Implement arbitrary precision complex numbers #1

Open
TheTeaCat opened this issue Jan 14, 2021 · 3 comments
Open

Implement arbitrary precision complex numbers #1

TheTeaCat opened this issue Jan 14, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@TheTeaCat
Copy link
Owner

TheTeaCat commented Jan 14, 2021

Will likely impact performance so should be able to toggle this on/off.

Suggest using math/big: https://golang.org/pkg/math/big/

Test fractal params:

-ff=mandelbrot -z=100000000000000 -x=-0.7498211570686255 -y=0.1006594938121625

image

@TheTeaCat TheTeaCat added the enhancement New feature or request label Jan 14, 2021
@TheTeaCat TheTeaCat self-assigned this Jan 14, 2021
@TheTeaCat
Copy link
Owner Author

TheTeaCat commented Jan 14, 2021

Replaced the use of float64s with big.Floats. Performance is significantly impacted but that could easily be due to my poor initial implementation.

Currently, without even increasing precision, the rendering time of the test fractal on my machine jumps from ~235ms to ~1m35s. This is obviously hilariously unacceptable & won't be merged into the main branch unless performance can be maintained.

Preliminary result, test fractal rendered using a precision of 237 (octuple precision as per IEEE 754):

image

@karlkeefer
Copy link
Contributor

That's a lot of zoom 😆

@TheTeaCat
Copy link
Owner Author

I'm stumped on how to make it more performant without just writing my own implementation of arbitrary precision floats from scratch. I'll leave the arbitrary-prec branch behind as an example of how not to approach the problem.

@TheTeaCat TheTeaCat removed their assignment Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants