You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way to determine how close two BigFloats are to each other in terms of number of representable values, given a certain precision? I need it for an application in which I want to gradually increase precision and discover automatically whether or not it's time to increase precision as the algorithm zooms in further.
Some background: As a practice project to take some first steps in the Rust language, I'm building a small application that allows you to explore the Mandelbrot fractal. It allows the user to zoom in further and further into an area in the complex plane and I'm enlarging smaller and smaller parts of the fractal to render them on screen. Currently I'm using f64 to represent the complex coordinates, but that allows you to zoom in only so far. I would like to switch to BigFloat and to increase the precision automatically when necessary. I'm looking for a way to judge whether the current precision still suffices.
Is there a way to do something like this: n = representable_values_between(x, y, p) with n being an integer representing the number of floating point values that can be represented at precision p, that are larger or equal than x and smaller than y?
Let me know if the issue is clear. If not, I can explain further.
The text was updated successfully, but these errors were encountered:
Hi @stencillogic,
Is there a way to determine how close two BigFloats are to each other in terms of number of representable values, given a certain precision? I need it for an application in which I want to gradually increase precision and discover automatically whether or not it's time to increase precision as the algorithm zooms in further.
Some background: As a practice project to take some first steps in the Rust language, I'm building a small application that allows you to explore the Mandelbrot fractal. It allows the user to zoom in further and further into an area in the complex plane and I'm enlarging smaller and smaller parts of the fractal to render them on screen. Currently I'm using
f64
to represent the complex coordinates, but that allows you to zoom in only so far. I would like to switch to BigFloat and to increase the precision automatically when necessary. I'm looking for a way to judge whether the current precision still suffices.Is there a way to do something like this:
n = representable_values_between(x, y, p)
withn
being an integer representing the number of floating point values that can be represented at precisionp
, that are larger or equal thanx
and smaller thany
?Let me know if the issue is clear. If not, I can explain further.
The text was updated successfully, but these errors were encountered: