
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ y x) t)) (t_2 (+ t (+ x y))))
(if (or (<= z -1.52e-78) (not (<= z 1.75e-51)))
(-
(* z (fma (/ a z) (/ (+ t y) t_2) (/ (+ x y) t_2)))
(* b (* (pow (+ (+ x y) t) -1.0) y)))
(fma (+ (/ t t_1) (/ y t_1)) a (/ (fma z x (* y (- z b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y + x) + t;
double t_2 = t + (x + y);
double tmp;
if ((z <= -1.52e-78) || !(z <= 1.75e-51)) {
tmp = (z * fma((a / z), ((t + y) / t_2), ((x + y) / t_2))) - (b * (pow(((x + y) + t), -1.0) * y));
} else {
tmp = fma(((t / t_1) + (y / t_1)), a, (fma(z, x, (y * (z - b))) / t_1));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y + x) + t) t_2 = Float64(t + Float64(x + y)) tmp = 0.0 if ((z <= -1.52e-78) || !(z <= 1.75e-51)) tmp = Float64(Float64(z * fma(Float64(a / z), Float64(Float64(t + y) / t_2), Float64(Float64(x + y) / t_2))) - Float64(b * Float64((Float64(Float64(x + y) + t) ^ -1.0) * y))); else tmp = fma(Float64(Float64(t / t_1) + Float64(y / t_1)), a, Float64(fma(z, x, Float64(y * Float64(z - b))) / t_1)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1.52e-78], N[Not[LessEqual[z, 1.75e-51]], $MachinePrecision]], N[(N[(z * N[(N[(a / z), $MachinePrecision] * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[Power[N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision], -1.0], $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision] * a + N[(N[(z * x + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) + t\\
t_2 := t + \left(x + y\right)\\
\mathbf{if}\;z \leq -1.52 \cdot 10^{-78} \lor \neg \left(z \leq 1.75 \cdot 10^{-51}\right):\\
\;\;\;\;z \cdot \mathsf{fma}\left(\frac{a}{z}, \frac{t + y}{t\_2}, \frac{x + y}{t\_2}\right) - b \cdot \left({\left(\left(x + y\right) + t\right)}^{-1} \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t}{t\_1} + \frac{y}{t\_1}, a, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{t\_1}\right)\\
\end{array}
\end{array}
if z < -1.52e-78 or 1.7499999999999999e-51 < z Initial program 58.2%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
lift-*.f64N/A
associate-/l*N/A
cancel-sign-sub-invN/A
lower-+.f64N/A
Applied rewrites57.9%
Taylor expanded in z around -inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-outN/A
lower-*.f64N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f6495.4
Applied rewrites95.4%
lift-*.f64N/A
*-commutativeN/A
lift-+.f64N/A
lift-+.f64N/A
associate-+r+N/A
lift-+.f64N/A
lift-+.f64N/A
lower-/.f64N/A
div-invN/A
associate-*l*N/A
lower-*.f64N/A
lower-*.f64N/A
inv-powN/A
lower-pow.f6498.7
lift-+.f64N/A
+-commutativeN/A
lift-+.f6498.7
Applied rewrites98.7%
if -1.52e-78 < z < 1.7499999999999999e-51Initial program 68.9%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites90.6%
Final simplification95.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ y x) t))
(t_2 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y))))
(if (<= t_2 (- INFINITY))
(- (+ a z) (* y (/ b (+ (+ t x) y))))
(if (<= t_2 1e+226)
(fma (+ (/ t t_1) (/ y t_1)) a (/ (fma z x (* y (- z b))) t_1))
(fma (/ (- y) (+ (+ x y) t)) b (+ a z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y + x) + t;
double t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (a + z) - (y * (b / ((t + x) + y)));
} else if (t_2 <= 1e+226) {
tmp = fma(((t / t_1) + (y / t_1)), a, (fma(z, x, (y * (z - b))) / t_1));
} else {
tmp = fma((-y / ((x + y) + t)), b, (a + z));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y + x) + t) t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(a + z) - Float64(y * Float64(b / Float64(Float64(t + x) + y)))); elseif (t_2 <= 1e+226) tmp = fma(Float64(Float64(t / t_1) + Float64(y / t_1)), a, Float64(fma(z, x, Float64(y * Float64(z - b))) / t_1)); else tmp = fma(Float64(Float64(-y) / Float64(Float64(x + y) + t)), b, Float64(a + z)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+226], N[(N[(N[(t / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision] * a + N[(N[(z * x + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[((-y) / N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * b + N[(a + z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) + t\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\
\mathbf{elif}\;t\_2 \leq 10^{+226}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t}{t\_1} + \frac{y}{t\_1}, a, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-y}{\left(x + y\right) + t}, b, a + z\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 6.1%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
lift-*.f64N/A
associate-/l*N/A
cancel-sign-sub-invN/A
lower-+.f64N/A
Applied rewrites16.1%
Taylor expanded in y around inf
lower-+.f6484.8
Applied rewrites84.8%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999961e225Initial program 99.1%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites99.2%
if 9.99999999999999961e225 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 12.2%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
lift-*.f64N/A
associate-/l*N/A
cancel-sign-sub-invN/A
lower-+.f64N/A
Applied rewrites18.7%
Taylor expanded in y around inf
lower-+.f6480.4
Applied rewrites80.4%
lift-+.f64N/A
+-commutativeN/A
Applied rewrites81.9%
Final simplification92.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y))))
(if (<= t_1 (- INFINITY))
(- (+ a z) (* y (/ b (+ (+ t x) y))))
(if (<= t_1 1e+226) t_1 (fma (/ (- y) (+ (+ x y) t)) b (+ a z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (a + z) - (y * (b / ((t + x) + y)));
} else if (t_1 <= 1e+226) {
tmp = t_1;
} else {
tmp = fma((-y / ((x + y) + t)), b, (a + z));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(a + z) - Float64(y * Float64(b / Float64(Float64(t + x) + y)))); elseif (t_1 <= 1e+226) tmp = t_1; else tmp = fma(Float64(Float64(-y) / Float64(Float64(x + y) + t)), b, Float64(a + z)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+226], t$95$1, N[(N[((-y) / N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * b + N[(a + z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\
\mathbf{elif}\;t\_1 \leq 10^{+226}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{-y}{\left(x + y\right) + t}, b, a + z\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 6.1%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
lift-*.f64N/A
associate-/l*N/A
cancel-sign-sub-invN/A
lower-+.f64N/A
Applied rewrites16.1%
Taylor expanded in y around inf
lower-+.f6484.8
Applied rewrites84.8%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999961e225Initial program 99.1%
if 9.99999999999999961e225 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 12.2%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
lift-*.f64N/A
associate-/l*N/A
cancel-sign-sub-invN/A
lower-+.f64N/A
Applied rewrites18.7%
Taylor expanded in y around inf
lower-+.f6480.4
Applied rewrites80.4%
lift-+.f64N/A
+-commutativeN/A
Applied rewrites81.9%
Final simplification92.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (+ t y) a))
(t_2 (/ (- (+ (* (+ x y) z) t_1) (* y b)) (+ (+ x t) y))))
(if (or (<= t_2 -2e-20) (not (<= t_2 5e+125)))
(fma (/ (- y) (+ (+ x y) t)) b (+ a z))
(/ (fma (+ y x) z t_1) (+ (+ y x) t)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t + y) * a;
double t_2 = ((((x + y) * z) + t_1) - (y * b)) / ((x + t) + y);
double tmp;
if ((t_2 <= -2e-20) || !(t_2 <= 5e+125)) {
tmp = fma((-y / ((x + y) + t)), b, (a + z));
} else {
tmp = fma((y + x), z, t_1) / ((y + x) + t);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t + y) * a) t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + t_1) - Float64(y * b)) / Float64(Float64(x + t) + y)) tmp = 0.0 if ((t_2 <= -2e-20) || !(t_2 <= 5e+125)) tmp = fma(Float64(Float64(-y) / Float64(Float64(x + y) + t)), b, Float64(a + z)); else tmp = Float64(fma(Float64(y + x), z, t_1) / Float64(Float64(y + x) + t)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -2e-20], N[Not[LessEqual[t$95$2, 5e+125]], $MachinePrecision]], N[(N[((-y) / N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * b + N[(a + z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y + x), $MachinePrecision] * z + t$95$1), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(t + y\right) \cdot a\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + t\_1\right) - y \cdot b}{\left(x + t\right) + y}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{-20} \lor \neg \left(t\_2 \leq 5 \cdot 10^{+125}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{-y}{\left(x + y\right) + t}, b, a + z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y + x, z, t\_1\right)}{\left(y + x\right) + t}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.99999999999999989e-20 or 4.99999999999999962e125 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 41.0%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
lift-*.f64N/A
associate-/l*N/A
cancel-sign-sub-invN/A
lower-+.f64N/A
Applied rewrites43.2%
Taylor expanded in y around inf
lower-+.f6479.1
Applied rewrites79.1%
lift-+.f64N/A
+-commutativeN/A
Applied rewrites82.0%
if -1.99999999999999989e-20 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.99999999999999962e125Initial program 98.8%
Taylor expanded in b around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
+-commutativeN/A
lower-+.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f6477.8
Applied rewrites77.8%
Final simplification80.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y))))
(if (or (<= t_1 -2e-44) (not (<= t_1 1e+25)))
(fma (/ (- y) (+ (+ x y) t)) b (+ a z))
(/ (fma a t (* z x)) (+ t x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
double tmp;
if ((t_1 <= -2e-44) || !(t_1 <= 1e+25)) {
tmp = fma((-y / ((x + y) + t)), b, (a + z));
} else {
tmp = fma(a, t, (z * x)) / (t + x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) tmp = 0.0 if ((t_1 <= -2e-44) || !(t_1 <= 1e+25)) tmp = fma(Float64(Float64(-y) / Float64(Float64(x + y) + t)), b, Float64(a + z)); else tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-44], N[Not[LessEqual[t$95$1, 1e+25]], $MachinePrecision]], N[(N[((-y) / N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * b + N[(a + z), $MachinePrecision]), $MachinePrecision], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-44} \lor \neg \left(t\_1 \leq 10^{+25}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{-y}{\left(x + y\right) + t}, b, a + z\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.99999999999999991e-44 or 1.00000000000000009e25 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 51.3%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
lift-*.f64N/A
associate-/l*N/A
cancel-sign-sub-invN/A
lower-+.f64N/A
Applied rewrites53.1%
Taylor expanded in y around inf
lower-+.f6476.8
Applied rewrites76.8%
lift-+.f64N/A
+-commutativeN/A
Applied rewrites79.3%
if -1.99999999999999991e-44 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000009e25Initial program 98.3%
Taylor expanded in y around 0
lower-/.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-+.f6465.6
Applied rewrites65.6%
Final simplification75.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y))))
(if (or (<= t_1 -5e-41) (not (<= t_1 1e+135)))
(- (+ a z) (* y (/ b (+ x y))))
(/ (fma a t (* z x)) (+ t x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
double tmp;
if ((t_1 <= -5e-41) || !(t_1 <= 1e+135)) {
tmp = (a + z) - (y * (b / (x + y)));
} else {
tmp = fma(a, t, (z * x)) / (t + x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) tmp = 0.0 if ((t_1 <= -5e-41) || !(t_1 <= 1e+135)) tmp = Float64(Float64(a + z) - Float64(y * Float64(b / Float64(x + y)))); else tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-41], N[Not[LessEqual[t$95$1, 1e+135]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-41} \lor \neg \left(t\_1 \leq 10^{+135}\right):\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -4.9999999999999996e-41 or 9.99999999999999962e134 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 42.1%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
lift-*.f64N/A
associate-/l*N/A
cancel-sign-sub-invN/A
lower-+.f64N/A
Applied rewrites44.8%
Taylor expanded in y around inf
lower-+.f6478.9
Applied rewrites78.9%
Taylor expanded in t around 0
lower-/.f64N/A
lower-+.f6470.9
Applied rewrites70.9%
if -4.9999999999999996e-41 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.99999999999999962e134Initial program 98.7%
Taylor expanded in y around 0
lower-/.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-+.f6464.0
Applied rewrites64.0%
Final simplification68.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y))))
(if (or (<= t_1 -5e+49) (not (<= t_1 5e+125)))
(- (+ a z) b)
(/ (fma a t (* z x)) (+ t x)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
double tmp;
if ((t_1 <= -5e+49) || !(t_1 <= 5e+125)) {
tmp = (a + z) - b;
} else {
tmp = fma(a, t, (z * x)) / (t + x);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) tmp = 0.0 if ((t_1 <= -5e+49) || !(t_1 <= 5e+125)) tmp = Float64(Float64(a + z) - b); else tmp = Float64(fma(a, t, Float64(z * x)) / Float64(t + x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+49], N[Not[LessEqual[t$95$1, 5e+125]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(N[(a * t + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(t + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+49} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+125}\right):\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a, t, z \cdot x\right)}{t + x}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -5.0000000000000004e49 or 4.99999999999999962e125 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 35.8%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6470.4
Applied rewrites70.4%
if -5.0000000000000004e49 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.99999999999999962e125Initial program 98.9%
Taylor expanded in y around 0
lower-/.f64N/A
lower-fma.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower-+.f6462.3
Applied rewrites62.3%
Final simplification66.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) t_1)))
(if (or (<= t_2 -5e-41) (not (<= t_2 4e+26)))
(- (+ a z) b)
(/ (* a t) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -5e-41) || !(t_2 <= 4e+26)) {
tmp = (a + z) - b;
} else {
tmp = (a * t) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (x + t) + y
t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1
if ((t_2 <= (-5d-41)) .or. (.not. (t_2 <= 4d+26))) then
tmp = (a + z) - b
else
tmp = (a * t) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -5e-41) || !(t_2 <= 4e+26)) {
tmp = (a + z) - b;
} else {
tmp = (a * t) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1 tmp = 0 if (t_2 <= -5e-41) or not (t_2 <= 4e+26): tmp = (a + z) - b else: tmp = (a * t) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / t_1) tmp = 0.0 if ((t_2 <= -5e-41) || !(t_2 <= 4e+26)) tmp = Float64(Float64(a + z) - b); else tmp = Float64(Float64(a * t) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / t_1; tmp = 0.0; if ((t_2 <= -5e-41) || ~((t_2 <= 4e+26))) tmp = (a + z) - b; else tmp = (a * t) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -5e-41], N[Not[LessEqual[t$95$2, 4e+26]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(N[(a * t), $MachinePrecision] / t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{t\_1}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-41} \lor \neg \left(t\_2 \leq 4 \cdot 10^{+26}\right):\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;\frac{a \cdot t}{t\_1}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -4.9999999999999996e-41 or 4.00000000000000019e26 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 50.6%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6464.2
Applied rewrites64.2%
if -4.9999999999999996e-41 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.00000000000000019e26Initial program 98.3%
Taylor expanded in t around inf
lower-*.f6444.4
Applied rewrites44.4%
Final simplification59.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ y x) t)) (t_2 (+ t (+ x y))))
(if (or (<= z -1.52e-78) (not (<= z 6.5e-43)))
(-
(* z (fma (/ a z) (/ (+ t y) t_2) (/ (+ x y) t_2)))
(* y (/ b (+ (+ t x) y))))
(fma (+ (/ t t_1) (/ y t_1)) a (/ (fma z x (* y (- z b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y + x) + t;
double t_2 = t + (x + y);
double tmp;
if ((z <= -1.52e-78) || !(z <= 6.5e-43)) {
tmp = (z * fma((a / z), ((t + y) / t_2), ((x + y) / t_2))) - (y * (b / ((t + x) + y)));
} else {
tmp = fma(((t / t_1) + (y / t_1)), a, (fma(z, x, (y * (z - b))) / t_1));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y + x) + t) t_2 = Float64(t + Float64(x + y)) tmp = 0.0 if ((z <= -1.52e-78) || !(z <= 6.5e-43)) tmp = Float64(Float64(z * fma(Float64(a / z), Float64(Float64(t + y) / t_2), Float64(Float64(x + y) / t_2))) - Float64(y * Float64(b / Float64(Float64(t + x) + y)))); else tmp = fma(Float64(Float64(t / t_1) + Float64(y / t_1)), a, Float64(fma(z, x, Float64(y * Float64(z - b))) / t_1)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1.52e-78], N[Not[LessEqual[z, 6.5e-43]], $MachinePrecision]], N[(N[(z * N[(N[(a / z), $MachinePrecision] * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(b / N[(N[(t + x), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t / t$95$1), $MachinePrecision] + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision] * a + N[(N[(z * x + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) + t\\
t_2 := t + \left(x + y\right)\\
\mathbf{if}\;z \leq -1.52 \cdot 10^{-78} \lor \neg \left(z \leq 6.5 \cdot 10^{-43}\right):\\
\;\;\;\;z \cdot \mathsf{fma}\left(\frac{a}{z}, \frac{t + y}{t\_2}, \frac{x + y}{t\_2}\right) - y \cdot \frac{b}{\left(t + x\right) + y}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{t}{t\_1} + \frac{y}{t\_1}, a, \frac{\mathsf{fma}\left(z, x, y \cdot \left(z - b\right)\right)}{t\_1}\right)\\
\end{array}
\end{array}
if z < -1.52e-78 or 6.50000000000000001e-43 < z Initial program 57.3%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
lift-*.f64N/A
associate-/l*N/A
cancel-sign-sub-invN/A
lower-+.f64N/A
Applied rewrites57.7%
Taylor expanded in z around -inf
associate-*r*N/A
lower-*.f64N/A
mul-1-negN/A
lower-neg.f64N/A
distribute-lft-outN/A
lower-*.f64N/A
times-fracN/A
lower-fma.f64N/A
lower-/.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-/.f64N/A
lower-+.f64N/A
lower-+.f64N/A
lower-+.f6496.0
Applied rewrites96.0%
if -1.52e-78 < z < 6.50000000000000001e-43Initial program 69.7%
Taylor expanded in a around 0
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
Applied rewrites90.8%
Final simplification93.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.3e+55) (* (+ t y) (/ a (+ (+ y x) t))) (if (<= t 8e+58) (- (+ a z) b) (- (+ a z) (* y (/ b t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.3e+55) {
tmp = (t + y) * (a / ((y + x) + t));
} else if (t <= 8e+58) {
tmp = (a + z) - b;
} else {
tmp = (a + z) - (y * (b / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.3d+55)) then
tmp = (t + y) * (a / ((y + x) + t))
else if (t <= 8d+58) then
tmp = (a + z) - b
else
tmp = (a + z) - (y * (b / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.3e+55) {
tmp = (t + y) * (a / ((y + x) + t));
} else if (t <= 8e+58) {
tmp = (a + z) - b;
} else {
tmp = (a + z) - (y * (b / t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.3e+55: tmp = (t + y) * (a / ((y + x) + t)) elif t <= 8e+58: tmp = (a + z) - b else: tmp = (a + z) - (y * (b / t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.3e+55) tmp = Float64(Float64(t + y) * Float64(a / Float64(Float64(y + x) + t))); elseif (t <= 8e+58) tmp = Float64(Float64(a + z) - b); else tmp = Float64(Float64(a + z) - Float64(y * Float64(b / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.3e+55) tmp = (t + y) * (a / ((y + x) + t)); elseif (t <= 8e+58) tmp = (a + z) - b; else tmp = (a + z) - (y * (b / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.3e+55], N[(N[(t + y), $MachinePrecision] * N[(a / N[(N[(y + x), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+58], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+55}:\\
\;\;\;\;\left(t + y\right) \cdot \frac{a}{\left(y + x\right) + t}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+58}:\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{t}\\
\end{array}
\end{array}
if t < -1.3e55Initial program 53.1%
Taylor expanded in a around inf
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-+.f64N/A
lower-/.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f6468.4
Applied rewrites68.4%
if -1.3e55 < t < 7.99999999999999955e58Initial program 68.5%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6460.5
Applied rewrites60.5%
if 7.99999999999999955e58 < t Initial program 56.3%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
lift-*.f64N/A
associate-/l*N/A
cancel-sign-sub-invN/A
lower-+.f64N/A
Applied rewrites60.8%
Taylor expanded in y around inf
lower-+.f6465.6
Applied rewrites65.6%
Taylor expanded in t around inf
lower-/.f6463.4
Applied rewrites63.4%
Final simplification62.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t -5.7e+50) (+ a z) (if (<= t 8e+58) (- (+ a z) b) (- (+ a z) (* y (/ b t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.7e+50) {
tmp = a + z;
} else if (t <= 8e+58) {
tmp = (a + z) - b;
} else {
tmp = (a + z) - (y * (b / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-5.7d+50)) then
tmp = a + z
else if (t <= 8d+58) then
tmp = (a + z) - b
else
tmp = (a + z) - (y * (b / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.7e+50) {
tmp = a + z;
} else if (t <= 8e+58) {
tmp = (a + z) - b;
} else {
tmp = (a + z) - (y * (b / t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5.7e+50: tmp = a + z elif t <= 8e+58: tmp = (a + z) - b else: tmp = (a + z) - (y * (b / t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5.7e+50) tmp = Float64(a + z); elseif (t <= 8e+58) tmp = Float64(Float64(a + z) - b); else tmp = Float64(Float64(a + z) - Float64(y * Float64(b / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -5.7e+50) tmp = a + z; elseif (t <= 8e+58) tmp = (a + z) - b; else tmp = (a + z) - (y * (b / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5.7e+50], N[(a + z), $MachinePrecision], If[LessEqual[t, 8e+58], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(N[(a + z), $MachinePrecision] - N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.7 \cdot 10^{+50}:\\
\;\;\;\;a + z\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+58}:\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;\left(a + z\right) - y \cdot \frac{b}{t}\\
\end{array}
\end{array}
if t < -5.7000000000000002e50Initial program 53.1%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6444.5
Applied rewrites44.5%
Taylor expanded in z around 0
Applied rewrites49.1%
Taylor expanded in b around 0
Applied rewrites54.0%
if -5.7000000000000002e50 < t < 7.99999999999999955e58Initial program 68.5%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6460.5
Applied rewrites60.5%
if 7.99999999999999955e58 < t Initial program 56.3%
lift-/.f64N/A
lift--.f64N/A
div-subN/A
lift-*.f64N/A
associate-/l*N/A
cancel-sign-sub-invN/A
lower-+.f64N/A
Applied rewrites60.8%
Taylor expanded in y around inf
lower-+.f6465.6
Applied rewrites65.6%
Taylor expanded in t around inf
lower-/.f6463.4
Applied rewrites63.4%
Final simplification59.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.7e+82) (- z (/ (* y (- b a)) x)) (if (<= x 1.02e+17) (- (+ a z) b) (- z (/ (* b y) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.7e+82) {
tmp = z - ((y * (b - a)) / x);
} else if (x <= 1.02e+17) {
tmp = (a + z) - b;
} else {
tmp = z - ((b * y) / x);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-1.7d+82)) then
tmp = z - ((y * (b - a)) / x)
else if (x <= 1.02d+17) then
tmp = (a + z) - b
else
tmp = z - ((b * y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.7e+82) {
tmp = z - ((y * (b - a)) / x);
} else if (x <= 1.02e+17) {
tmp = (a + z) - b;
} else {
tmp = z - ((b * y) / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.7e+82: tmp = z - ((y * (b - a)) / x) elif x <= 1.02e+17: tmp = (a + z) - b else: tmp = z - ((b * y) / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.7e+82) tmp = Float64(z - Float64(Float64(y * Float64(b - a)) / x)); elseif (x <= 1.02e+17) tmp = Float64(Float64(a + z) - b); else tmp = Float64(z - Float64(Float64(b * y) / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.7e+82) tmp = z - ((y * (b - a)) / x); elseif (x <= 1.02e+17) tmp = (a + z) - b; else tmp = z - ((b * y) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.7e+82], N[(z - N[(N[(y * N[(b - a), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.02e+17], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(z - N[(N[(b * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{+82}:\\
\;\;\;\;z - \frac{y \cdot \left(b - a\right)}{x}\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{+17}:\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;z - \frac{b \cdot y}{x}\\
\end{array}
\end{array}
if x < -1.69999999999999997e82Initial program 49.0%
Taylor expanded in x around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites51.9%
Taylor expanded in y around inf
Applied rewrites55.4%
if -1.69999999999999997e82 < x < 1.02e17Initial program 66.0%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6461.4
Applied rewrites61.4%
if 1.02e17 < x Initial program 68.3%
Taylor expanded in x around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites50.8%
Taylor expanded in b around inf
Applied rewrites52.6%
(FPCore (x y z t a b) :precision binary64 (if (<= x -8.2e+58) (- z (/ (* t (- z a)) x)) (if (<= x 1.02e+17) (- (+ a z) b) (- z (/ (* b y) x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8.2e+58) {
tmp = z - ((t * (z - a)) / x);
} else if (x <= 1.02e+17) {
tmp = (a + z) - b;
} else {
tmp = z - ((b * y) / x);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-8.2d+58)) then
tmp = z - ((t * (z - a)) / x)
else if (x <= 1.02d+17) then
tmp = (a + z) - b
else
tmp = z - ((b * y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8.2e+58) {
tmp = z - ((t * (z - a)) / x);
} else if (x <= 1.02e+17) {
tmp = (a + z) - b;
} else {
tmp = z - ((b * y) / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -8.2e+58: tmp = z - ((t * (z - a)) / x) elif x <= 1.02e+17: tmp = (a + z) - b else: tmp = z - ((b * y) / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -8.2e+58) tmp = Float64(z - Float64(Float64(t * Float64(z - a)) / x)); elseif (x <= 1.02e+17) tmp = Float64(Float64(a + z) - b); else tmp = Float64(z - Float64(Float64(b * y) / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -8.2e+58) tmp = z - ((t * (z - a)) / x); elseif (x <= 1.02e+17) tmp = (a + z) - b; else tmp = z - ((b * y) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.2e+58], N[(z - N[(N[(t * N[(z - a), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.02e+17], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(z - N[(N[(b * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.2 \cdot 10^{+58}:\\
\;\;\;\;z - \frac{t \cdot \left(z - a\right)}{x}\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{+17}:\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;z - \frac{b \cdot y}{x}\\
\end{array}
\end{array}
if x < -8.2e58Initial program 48.3%
Taylor expanded in x around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites50.9%
Taylor expanded in t around inf
Applied rewrites52.7%
if -8.2e58 < x < 1.02e17Initial program 66.6%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6461.9
Applied rewrites61.9%
if 1.02e17 < x Initial program 68.3%
Taylor expanded in x around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites50.8%
Taylor expanded in b around inf
Applied rewrites52.6%
(FPCore (x y z t a b) :precision binary64 (if (<= x 1.02e+17) (- (+ a z) b) (- z (/ (* b y) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1.02e+17) {
tmp = (a + z) - b;
} else {
tmp = z - ((b * y) / x);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= 1.02d+17) then
tmp = (a + z) - b
else
tmp = z - ((b * y) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1.02e+17) {
tmp = (a + z) - b;
} else {
tmp = z - ((b * y) / x);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 1.02e+17: tmp = (a + z) - b else: tmp = z - ((b * y) / x) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 1.02e+17) tmp = Float64(Float64(a + z) - b); else tmp = Float64(z - Float64(Float64(b * y) / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 1.02e+17) tmp = (a + z) - b; else tmp = z - ((b * y) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 1.02e+17], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(z - N[(N[(b * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.02 \cdot 10^{+17}:\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;z - \frac{b \cdot y}{x}\\
\end{array}
\end{array}
if x < 1.02e17Initial program 61.5%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6457.4
Applied rewrites57.4%
if 1.02e17 < x Initial program 68.3%
Taylor expanded in x around -inf
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
Applied rewrites50.8%
Taylor expanded in b around inf
Applied rewrites52.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.7e-128) (not (<= y 1.65e-9))) (- (+ a z) b) (+ a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.7e-128) || !(y <= 1.65e-9)) {
tmp = (a + z) - b;
} else {
tmp = a + z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.7d-128)) .or. (.not. (y <= 1.65d-9))) then
tmp = (a + z) - b
else
tmp = a + z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.7e-128) || !(y <= 1.65e-9)) {
tmp = (a + z) - b;
} else {
tmp = a + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.7e-128) or not (y <= 1.65e-9): tmp = (a + z) - b else: tmp = a + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.7e-128) || !(y <= 1.65e-9)) tmp = Float64(Float64(a + z) - b); else tmp = Float64(a + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.7e-128) || ~((y <= 1.65e-9))) tmp = (a + z) - b; else tmp = a + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.7e-128], N[Not[LessEqual[y, 1.65e-9]], $MachinePrecision]], N[(N[(a + z), $MachinePrecision] - b), $MachinePrecision], N[(a + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{-128} \lor \neg \left(y \leq 1.65 \cdot 10^{-9}\right):\\
\;\;\;\;\left(a + z\right) - b\\
\mathbf{else}:\\
\;\;\;\;a + z\\
\end{array}
\end{array}
if y < -3.7e-128 or 1.65000000000000009e-9 < y Initial program 53.4%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6465.7
Applied rewrites65.7%
if -3.7e-128 < y < 1.65000000000000009e-9Initial program 78.4%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6432.7
Applied rewrites32.7%
Taylor expanded in z around 0
Applied rewrites21.1%
Taylor expanded in b around 0
Applied rewrites45.1%
Final simplification57.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.1e+27) (not (<= a 6.4e-116))) (+ a z) (- z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.1e+27) || !(a <= 6.4e-116)) {
tmp = a + z;
} else {
tmp = z - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-4.1d+27)) .or. (.not. (a <= 6.4d-116))) then
tmp = a + z
else
tmp = z - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.1e+27) || !(a <= 6.4e-116)) {
tmp = a + z;
} else {
tmp = z - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.1e+27) or not (a <= 6.4e-116): tmp = a + z else: tmp = z - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.1e+27) || !(a <= 6.4e-116)) tmp = Float64(a + z); else tmp = Float64(z - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4.1e+27) || ~((a <= 6.4e-116))) tmp = a + z; else tmp = z - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.1e+27], N[Not[LessEqual[a, 6.4e-116]], $MachinePrecision]], N[(a + z), $MachinePrecision], N[(z - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.1 \cdot 10^{+27} \lor \neg \left(a \leq 6.4 \cdot 10^{-116}\right):\\
\;\;\;\;a + z\\
\mathbf{else}:\\
\;\;\;\;z - b\\
\end{array}
\end{array}
if a < -4.1000000000000002e27 or 6.40000000000000019e-116 < a Initial program 55.0%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6451.5
Applied rewrites51.5%
Taylor expanded in z around 0
Applied rewrites42.4%
Taylor expanded in b around 0
Applied rewrites56.9%
if -4.1000000000000002e27 < a < 6.40000000000000019e-116Initial program 73.6%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6455.5
Applied rewrites55.5%
Taylor expanded in z around 0
Applied rewrites26.7%
Taylor expanded in a around 0
Applied rewrites51.9%
Final simplification54.8%
(FPCore (x y z t a b) :precision binary64 (+ a z))
double code(double x, double y, double z, double t, double a, double b) {
return a + z;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a + z
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a + z;
}
def code(x, y, z, t, a, b): return a + z
function code(x, y, z, t, a, b) return Float64(a + z) end
function tmp = code(x, y, z, t, a, b) tmp = a + z; end
code[x_, y_, z_, t_, a_, b_] := N[(a + z), $MachinePrecision]
\begin{array}{l}
\\
a + z
\end{array}
Initial program 62.9%
Taylor expanded in y around inf
lower--.f64N/A
lower-+.f6453.2
Applied rewrites53.2%
Taylor expanded in z around 0
Applied rewrites35.7%
Taylor expanded in b around 0
Applied rewrites50.2%
(FPCore (x y z t a b) :precision binary64 (- b))
double code(double x, double y, double z, double t, double a, double b) {
return -b;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = -b
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return -b;
}
def code(x, y, z, t, a, b): return -b
function code(x, y, z, t, a, b) return Float64(-b) end
function tmp = code(x, y, z, t, a, b) tmp = -b; end
code[x_, y_, z_, t_, a_, b_] := (-b)
\begin{array}{l}
\\
-b
\end{array}
Initial program 62.9%
Taylor expanded in b around inf
*-commutativeN/A
associate-*l/N/A
associate-*l*N/A
lower-*.f64N/A
associate-*r/N/A
lower-/.f64N/A
mul-1-negN/A
lower-neg.f64N/A
+-commutativeN/A
lower-+.f64N/A
+-commutativeN/A
lower-+.f6421.6
Applied rewrites21.6%
Taylor expanded in y around inf
Applied rewrites12.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
(t_3 (/ t_2 t_1))
(t_4 (- (+ z a) b)))
(if (< t_3 -3.5813117084150564e+153)
t_4
(if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (x + t) + y
t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
t_3 = t_2 / t_1
t_4 = (z + a) - b
if (t_3 < (-3.5813117084150564d+153)) then
tmp = t_4
else if (t_3 < 1.2285964308315609d+82) then
tmp = 1.0d0 / (t_1 / t_2)
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b) t_3 = t_2 / t_1 t_4 = (z + a) - b tmp = 0 if t_3 < -3.5813117084150564e+153: tmp = t_4 elif t_3 < 1.2285964308315609e+82: tmp = 1.0 / (t_1 / t_2) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(z + a) - b) tmp = 0.0 if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = Float64(1.0 / Float64(t_1 / t_2)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b); t_3 = t_2 / t_1; t_4 = (z + a) - b; tmp = 0.0; if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = 1.0 / (t_1 / t_2); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
t_3 := \frac{t\_2}{t\_1}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
herbie shell --seed 2024318
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:alt
(! :herbie-platform default (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3581311708415056400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 12285964308315609000000000000000000000000000000000000000000000000000000000000000000) (/ 1 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b))))
(/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))