\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\begin{array}{l}
\mathbf{if}\;c \le -9.755980397410743649742684071993362525627 \cdot 10^{238}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{t}{\frac{c}{a}}, \mathsf{fma}\left(9, \frac{x}{\frac{z \cdot c}{y}}, \frac{b}{z \cdot c}\right)\right)\\
\mathbf{elif}\;c \le -896835397887796577325650839578653753344:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{t}{\frac{c}{a}}, \frac{1}{z} \cdot \frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}\right)\\
\mathbf{elif}\;c \le 30632114.7795526646077632904052734375:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{t \cdot a}{c}, \frac{\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{z}}{c}\right)\\
\mathbf{elif}\;c \le 1.085731230018495074559249086460757998066 \cdot 10^{214}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{t}{\frac{c}{a}}, \mathsf{fma}\left(9, \frac{x}{\frac{z \cdot c}{y}}, \frac{b}{z \cdot c}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4, \frac{t}{\frac{c}{a}}, \frac{1}{z} \cdot \frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{c}\right)\\
\end{array}double f(double x, double y, double z, double t, double a, double b, double c) {
double r1018256 = x;
double r1018257 = 9.0;
double r1018258 = r1018256 * r1018257;
double r1018259 = y;
double r1018260 = r1018258 * r1018259;
double r1018261 = z;
double r1018262 = 4.0;
double r1018263 = r1018261 * r1018262;
double r1018264 = t;
double r1018265 = r1018263 * r1018264;
double r1018266 = a;
double r1018267 = r1018265 * r1018266;
double r1018268 = r1018260 - r1018267;
double r1018269 = b;
double r1018270 = r1018268 + r1018269;
double r1018271 = c;
double r1018272 = r1018261 * r1018271;
double r1018273 = r1018270 / r1018272;
return r1018273;
}
double f(double x, double y, double z, double t, double a, double b, double c) {
double r1018274 = c;
double r1018275 = -9.755980397410744e+238;
bool r1018276 = r1018274 <= r1018275;
double r1018277 = 4.0;
double r1018278 = -r1018277;
double r1018279 = t;
double r1018280 = a;
double r1018281 = r1018274 / r1018280;
double r1018282 = r1018279 / r1018281;
double r1018283 = 9.0;
double r1018284 = x;
double r1018285 = z;
double r1018286 = r1018285 * r1018274;
double r1018287 = y;
double r1018288 = r1018286 / r1018287;
double r1018289 = r1018284 / r1018288;
double r1018290 = b;
double r1018291 = r1018290 / r1018286;
double r1018292 = fma(r1018283, r1018289, r1018291);
double r1018293 = fma(r1018278, r1018282, r1018292);
double r1018294 = -8.968353978877966e+38;
bool r1018295 = r1018274 <= r1018294;
double r1018296 = 1.0;
double r1018297 = r1018296 / r1018285;
double r1018298 = r1018283 * r1018284;
double r1018299 = fma(r1018298, r1018287, r1018290);
double r1018300 = r1018299 / r1018274;
double r1018301 = r1018297 * r1018300;
double r1018302 = fma(r1018278, r1018282, r1018301);
double r1018303 = 30632114.779552665;
bool r1018304 = r1018274 <= r1018303;
double r1018305 = r1018279 * r1018280;
double r1018306 = r1018305 / r1018274;
double r1018307 = r1018299 / r1018285;
double r1018308 = r1018307 / r1018274;
double r1018309 = fma(r1018278, r1018306, r1018308);
double r1018310 = 1.085731230018495e+214;
bool r1018311 = r1018274 <= r1018310;
double r1018312 = r1018311 ? r1018293 : r1018302;
double r1018313 = r1018304 ? r1018309 : r1018312;
double r1018314 = r1018295 ? r1018302 : r1018313;
double r1018315 = r1018276 ? r1018293 : r1018314;
return r1018315;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b




Bits error versus c
| Original | 19.9 |
|---|---|
| Target | 15.0 |
| Herbie | 7.1 |
if c < -9.755980397410744e+238 or 30632114.779552665 < c < 1.085731230018495e+214Initial program 22.7
Simplified15.1
rmApplied associate-/l*12.1
Taylor expanded around 0 12.0
Simplified12.0
rmApplied associate-/l*9.5
if -9.755980397410744e+238 < c < -8.968353978877966e+38 or 1.085731230018495e+214 < c Initial program 23.3
Simplified15.7
rmApplied associate-/l*12.3
rmApplied *-un-lft-identity12.3
Applied times-frac9.2
Simplified9.2
if -8.968353978877966e+38 < c < 30632114.779552665Initial program 14.3
Simplified5.4
rmApplied associate-/r*3.0
Simplified3.0
Final simplification7.1
herbie shell --seed 2019362 +o rules:numerics
(FPCore (x y z t a b c)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J"
:precision binary64
:herbie-target
(if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -1.1001567408041051e-171) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -0.0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 1.1708877911747488e-53) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 2.876823679546137e+130) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 1.3838515042456319e+158) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c))))))))
(/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)))