In case you may not know it, that divisor literal can be typed using scientific notation.
-6.8755856 e-6
However, for the rest, it's better to store each part in separate variables. And go slow!
Also, I advise you to use the original
Java's
Math methods since they are
double precision!
Processing has some wrappers for it, but use
float instead.
Here's an attempt. Dunno whether it's correct though. But check it out:
double dividend1, dividend2;
float divisor1, divisor2;
float PF = 12, PS = 35;
double Alt;
divisor1 = 5.2558797;
divisor2 = -6.8755856e-6;
dividend1 = Math.log10(PF/PS);
dividend2 = dividend1 / divisor1;
dividend2 = Math.pow(10, dividend2) - 1;
Alt = dividend2 / divisor2;
println(Alt);
exit();