How to change the precision of a floating point in C at runtime?
How to make a variable float complex or double complex depending on user input?
I’m trying to plot the Mandelbrot set and I have the same long code for float and double but in some cases float is not precise enough and double is too slow. I’d like to let the user choose precision over speed or speed over precision. I would like to get something like this: