
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
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)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
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)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 (- INFINITY))
(/
1.0
(+ (/ b z) (/ (- (/ t (/ z (+ a 1.0))) (/ (* x (* t b)) (* z z))) y)))
(if (<= t_1 5e+284)
(/ (+ x (/ z (/ t y))) (+ (+ a 1.0) (* b (/ y t))))
(/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = 1.0 / ((b / z) + (((t / (z / (a + 1.0))) - ((x * (t * b)) / (z * z))) / y));
} else if (t_1 <= 5e+284) {
tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = 1.0 / ((b / z) + (((t / (z / (a + 1.0))) - ((x * (t * b)) / (z * z))) / y));
} else if (t_1 <= 5e+284) {
tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_1 <= -math.inf: tmp = 1.0 / ((b / z) + (((t / (z / (a + 1.0))) - ((x * (t * b)) / (z * z))) / y)) elif t_1 <= 5e+284: tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(1.0 / Float64(Float64(b / z) + Float64(Float64(Float64(t / Float64(z / Float64(a + 1.0))) - Float64(Float64(x * Float64(t * b)) / Float64(z * z))) / y))); elseif (t_1 <= 5e+284) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= -Inf) tmp = 1.0 / ((b / z) + (((t / (z / (a + 1.0))) - ((x * (t * b)) / (z * z))) / y)); elseif (t_1 <= 5e+284) tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(1.0 / N[(N[(b / z), $MachinePrecision] + N[(N[(N[(t / N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(x * N[(t * b), $MachinePrecision]), $MachinePrecision] / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+284], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{1}{\frac{b}{z} + \frac{\frac{t}{\frac{z}{a + 1}} - \frac{x \cdot \left(t \cdot b\right)}{z \cdot z}}{y}}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+284}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 44.3%
*-commutative44.3%
associate-/l*66.0%
associate-*l/46.1%
Simplified46.1%
clear-num46.0%
inv-pow46.0%
+-commutative46.0%
fma-def46.0%
+-commutative46.0%
div-inv46.1%
clear-num46.1%
fma-def46.1%
Applied egg-rr46.1%
unpow-146.1%
+-commutative46.1%
Simplified46.1%
Taylor expanded in y around -inf 81.9%
mul-1-neg81.9%
distribute-lft-out--77.4%
associate-/l*77.4%
associate-*r*77.4%
unpow277.4%
Simplified77.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999999e284Initial program 91.1%
*-commutative91.1%
associate-/l*90.5%
associate-*l/91.9%
Simplified91.9%
if 4.9999999999999999e284 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 27.2%
*-commutative27.2%
associate-/l*32.4%
associate-*l/29.6%
Simplified29.6%
Taylor expanded in t around 0 89.7%
Final simplification90.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t)) (t_2 (/ (+ x (/ (* y z) t)) (+ t_1 (+ a 1.0)))))
(if (<= t_2 (- INFINITY))
(/ 1.0 (/ (* t (+ (+ a t_1) 1.0)) (* y z)))
(if (<= t_2 5e+284)
(/ (+ x (/ z (/ t y))) (+ (+ a 1.0) (* b (/ y t))))
(/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = 1.0 / ((t * ((a + t_1) + 1.0)) / (y * z));
} else if (t_2 <= 5e+284) {
tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = 1.0 / ((t * ((a + t_1) + 1.0)) / (y * z));
} else if (t_2 <= 5e+284) {
tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)) tmp = 0 if t_2 <= -math.inf: tmp = 1.0 / ((t * ((a + t_1) + 1.0)) / (y * z)) elif t_2 <= 5e+284: tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(t_1 + Float64(a + 1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(1.0 / Float64(Float64(t * Float64(Float64(a + t_1) + 1.0)) / Float64(y * z))); elseif (t_2 <= 5e+284) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)); tmp = 0.0; if (t_2 <= -Inf) tmp = 1.0 / ((t * ((a + t_1) + 1.0)) / (y * z)); elseif (t_2 <= 5e+284) tmp = (x + (z / (t / y))) / ((a + 1.0) + (b * (y / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(1.0 / N[(N[(t * N[(N[(a + t$95$1), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+284], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t_1 + \left(a + 1\right)}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\frac{1}{\frac{t \cdot \left(\left(a + t_1\right) + 1\right)}{y \cdot z}}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+284}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 44.3%
*-commutative44.3%
associate-/l*66.0%
associate-*l/46.1%
Simplified46.1%
clear-num46.0%
inv-pow46.0%
+-commutative46.0%
fma-def46.0%
+-commutative46.0%
div-inv46.1%
clear-num46.1%
fma-def46.1%
Applied egg-rr46.1%
unpow-146.1%
+-commutative46.1%
Simplified46.1%
Taylor expanded in z around inf 65.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999999e284Initial program 91.1%
*-commutative91.1%
associate-/l*90.5%
associate-*l/91.9%
Simplified91.9%
if 4.9999999999999999e284 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 27.2%
*-commutative27.2%
associate-/l*32.4%
associate-*l/29.6%
Simplified29.6%
Taylor expanded in t around 0 89.7%
Final simplification89.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* b (/ y t))))))
(if (<= t -3.3e-159)
t_1
(if (<= t -4.3e-218)
(/ z b)
(if (<= t -1.35e-273)
(/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) 1.0))
(if (<= t 4.8e-154) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((a + 1.0) + (b * (y / t)));
double tmp;
if (t <= -3.3e-159) {
tmp = t_1;
} else if (t <= -4.3e-218) {
tmp = z / b;
} else if (t <= -1.35e-273) {
tmp = (x + ((y * z) / t)) / (((y * b) / t) + 1.0);
} else if (t <= 4.8e-154) {
tmp = z / b;
} else {
tmp = 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) :: tmp
t_1 = (x + (y * (z / t))) / ((a + 1.0d0) + (b * (y / t)))
if (t <= (-3.3d-159)) then
tmp = t_1
else if (t <= (-4.3d-218)) then
tmp = z / b
else if (t <= (-1.35d-273)) then
tmp = (x + ((y * z) / t)) / (((y * b) / t) + 1.0d0)
else if (t <= 4.8d-154) then
tmp = z / b
else
tmp = 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 + (y * (z / t))) / ((a + 1.0) + (b * (y / t)));
double tmp;
if (t <= -3.3e-159) {
tmp = t_1;
} else if (t <= -4.3e-218) {
tmp = z / b;
} else if (t <= -1.35e-273) {
tmp = (x + ((y * z) / t)) / (((y * b) / t) + 1.0);
} else if (t <= 4.8e-154) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / ((a + 1.0) + (b * (y / t))) tmp = 0 if t <= -3.3e-159: tmp = t_1 elif t <= -4.3e-218: tmp = z / b elif t <= -1.35e-273: tmp = (x + ((y * z) / t)) / (((y * b) / t) + 1.0) elif t <= 4.8e-154: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))) tmp = 0.0 if (t <= -3.3e-159) tmp = t_1; elseif (t <= -4.3e-218) tmp = Float64(z / b); elseif (t <= -1.35e-273) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + 1.0)); elseif (t <= 4.8e-154) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y * (z / t))) / ((a + 1.0) + (b * (y / t))); tmp = 0.0; if (t <= -3.3e-159) tmp = t_1; elseif (t <= -4.3e-218) tmp = z / b; elseif (t <= -1.35e-273) tmp = (x + ((y * z) / t)) / (((y * b) / t) + 1.0); elseif (t <= 4.8e-154) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e-159], t$95$1, If[LessEqual[t, -4.3e-218], N[(z / b), $MachinePrecision], If[LessEqual[t, -1.35e-273], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e-154], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{-159}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.3 \cdot 10^{-218}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-273}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + 1}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-154}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -3.3000000000000002e-159 or 4.79999999999999974e-154 < t Initial program 83.5%
*-commutative83.5%
associate-/l*86.5%
associate-*l/88.0%
Simplified88.0%
associate-/r/85.3%
Applied egg-rr85.3%
if -3.3000000000000002e-159 < t < -4.3e-218 or -1.34999999999999992e-273 < t < 4.79999999999999974e-154Initial program 57.1%
*-commutative57.1%
associate-/l*55.5%
associate-*l/46.4%
Simplified46.4%
Taylor expanded in t around 0 75.5%
if -4.3e-218 < t < -1.34999999999999992e-273Initial program 89.6%
+-commutative89.6%
associate-*l/96.8%
fma-def96.8%
associate-+l+96.8%
+-commutative96.8%
associate-*l/96.5%
fma-def96.5%
Simplified96.5%
Taylor expanded in a around 0 75.8%
Final simplification82.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -4.9e+266)
(/ (* y z) (* t (+ a 1.0)))
(if (<= z -1.7e+212)
(/ z b)
(if (<= z -3.1e+159)
(/ (+ x (/ (* y z) t)) a)
(if (<= z 4e+42) (/ x (+ (+ a (/ (* y b) t)) 1.0)) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.9e+266) {
tmp = (y * z) / (t * (a + 1.0));
} else if (z <= -1.7e+212) {
tmp = z / b;
} else if (z <= -3.1e+159) {
tmp = (x + ((y * z) / t)) / a;
} else if (z <= 4e+42) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} 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 (z <= (-4.9d+266)) then
tmp = (y * z) / (t * (a + 1.0d0))
else if (z <= (-1.7d+212)) then
tmp = z / b
else if (z <= (-3.1d+159)) then
tmp = (x + ((y * z) / t)) / a
else if (z <= 4d+42) then
tmp = x / ((a + ((y * b) / t)) + 1.0d0)
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 (z <= -4.9e+266) {
tmp = (y * z) / (t * (a + 1.0));
} else if (z <= -1.7e+212) {
tmp = z / b;
} else if (z <= -3.1e+159) {
tmp = (x + ((y * z) / t)) / a;
} else if (z <= 4e+42) {
tmp = x / ((a + ((y * b) / t)) + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4.9e+266: tmp = (y * z) / (t * (a + 1.0)) elif z <= -1.7e+212: tmp = z / b elif z <= -3.1e+159: tmp = (x + ((y * z) / t)) / a elif z <= 4e+42: tmp = x / ((a + ((y * b) / t)) + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.9e+266) tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0))); elseif (z <= -1.7e+212) tmp = Float64(z / b); elseif (z <= -3.1e+159) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); elseif (z <= 4e+42) tmp = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4.9e+266) tmp = (y * z) / (t * (a + 1.0)); elseif (z <= -1.7e+212) tmp = z / b; elseif (z <= -3.1e+159) tmp = (x + ((y * z) / t)) / a; elseif (z <= 4e+42) tmp = x / ((a + ((y * b) / t)) + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.9e+266], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.7e+212], N[(z / b), $MachinePrecision], If[LessEqual[z, -3.1e+159], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 4e+42], N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.9 \cdot 10^{+266}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+212}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+159}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{+42}:\\
\;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if z < -4.9000000000000002e266Initial program 76.3%
*-commutative76.3%
associate-/l*76.3%
associate-*l/59.6%
Simplified59.6%
Taylor expanded in b around 0 76.3%
Taylor expanded in y around inf 75.8%
if -4.9000000000000002e266 < z < -1.70000000000000018e212 or 4.00000000000000018e42 < z Initial program 59.2%
*-commutative59.2%
associate-/l*64.2%
associate-*l/61.2%
Simplified61.2%
Taylor expanded in t around 0 56.5%
if -1.70000000000000018e212 < z < -3.0999999999999998e159Initial program 99.9%
*-commutative99.9%
associate-/l*100.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in a around inf 67.4%
if -3.0999999999999998e159 < z < 4.00000000000000018e42Initial program 85.2%
*-commutative85.2%
associate-/l*86.2%
associate-*l/87.2%
Simplified87.2%
Taylor expanded in x around inf 70.3%
Final simplification66.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))))
(if (<= a -6.2e-15)
(* (+ x (/ z (/ t y))) (/ 1.0 (+ a 1.0)))
(if (<= a 1750.0) (/ t_1 (+ (/ (* y b) t) 1.0)) (/ t_1 (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double tmp;
if (a <= -6.2e-15) {
tmp = (x + (z / (t / y))) * (1.0 / (a + 1.0));
} else if (a <= 1750.0) {
tmp = t_1 / (((y * b) / t) + 1.0);
} else {
tmp = t_1 / (a + 1.0);
}
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) :: tmp
t_1 = x + ((y * z) / t)
if (a <= (-6.2d-15)) then
tmp = (x + (z / (t / y))) * (1.0d0 / (a + 1.0d0))
else if (a <= 1750.0d0) then
tmp = t_1 / (((y * b) / t) + 1.0d0)
else
tmp = t_1 / (a + 1.0d0)
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 + ((y * z) / t);
double tmp;
if (a <= -6.2e-15) {
tmp = (x + (z / (t / y))) * (1.0 / (a + 1.0));
} else if (a <= 1750.0) {
tmp = t_1 / (((y * b) / t) + 1.0);
} else {
tmp = t_1 / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) tmp = 0 if a <= -6.2e-15: tmp = (x + (z / (t / y))) * (1.0 / (a + 1.0)) elif a <= 1750.0: tmp = t_1 / (((y * b) / t) + 1.0) else: tmp = t_1 / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) tmp = 0.0 if (a <= -6.2e-15) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) * Float64(1.0 / Float64(a + 1.0))); elseif (a <= 1750.0) tmp = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + 1.0)); else tmp = Float64(t_1 / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); tmp = 0.0; if (a <= -6.2e-15) tmp = (x + (z / (t / y))) * (1.0 / (a + 1.0)); elseif (a <= 1750.0) tmp = t_1 / (((y * b) / t) + 1.0); else tmp = t_1 / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.2e-15], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1750.0], N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;a \leq -6.2 \cdot 10^{-15}:\\
\;\;\;\;\left(x + \frac{z}{\frac{t}{y}}\right) \cdot \frac{1}{a + 1}\\
\mathbf{elif}\;a \leq 1750:\\
\;\;\;\;\frac{t_1}{\frac{y \cdot b}{t} + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_1}{a + 1}\\
\end{array}
\end{array}
if a < -6.1999999999999998e-15Initial program 71.1%
associate-/l*68.6%
Simplified68.6%
div-inv68.5%
associate-/l*71.4%
associate-/r/70.9%
+-commutative70.9%
fma-def70.9%
Applied egg-rr70.9%
Taylor expanded in y around 0 65.5%
associate-/r/67.2%
Applied egg-rr67.2%
*-commutative67.2%
clear-num67.2%
un-div-inv67.2%
Applied egg-rr67.2%
if -6.1999999999999998e-15 < a < 1750Initial program 81.5%
+-commutative81.5%
associate-*l/83.1%
fma-def83.1%
associate-+l+83.1%
+-commutative83.1%
associate-*l/83.0%
fma-def83.0%
Simplified83.0%
Taylor expanded in a around 0 81.0%
if 1750 < a Initial program 78.4%
*-commutative78.4%
associate-/l*76.8%
associate-*l/75.0%
Simplified75.0%
Taylor expanded in b around 0 69.2%
Final simplification73.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -3.8e+23)
t_1
(if (<= t -3.8e-53)
(* (/ y t) (/ z a))
(if (or (<= t -1.62e-62)
(not
(or (<= t 1.5e-107) (and (not (<= t 2.8e-76)) (<= t 13.5)))))
t_1
(/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -3.8e+23) {
tmp = t_1;
} else if (t <= -3.8e-53) {
tmp = (y / t) * (z / a);
} else if ((t <= -1.62e-62) || !((t <= 1.5e-107) || (!(t <= 2.8e-76) && (t <= 13.5)))) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-3.8d+23)) then
tmp = t_1
else if (t <= (-3.8d-53)) then
tmp = (y / t) * (z / a)
else if ((t <= (-1.62d-62)) .or. (.not. (t <= 1.5d-107) .or. (.not. (t <= 2.8d-76)) .and. (t <= 13.5d0))) then
tmp = t_1
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 t_1 = x / (a + 1.0);
double tmp;
if (t <= -3.8e+23) {
tmp = t_1;
} else if (t <= -3.8e-53) {
tmp = (y / t) * (z / a);
} else if ((t <= -1.62e-62) || !((t <= 1.5e-107) || (!(t <= 2.8e-76) && (t <= 13.5)))) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -3.8e+23: tmp = t_1 elif t <= -3.8e-53: tmp = (y / t) * (z / a) elif (t <= -1.62e-62) or not ((t <= 1.5e-107) or (not (t <= 2.8e-76) and (t <= 13.5))): tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -3.8e+23) tmp = t_1; elseif (t <= -3.8e-53) tmp = Float64(Float64(y / t) * Float64(z / a)); elseif ((t <= -1.62e-62) || !((t <= 1.5e-107) || (!(t <= 2.8e-76) && (t <= 13.5)))) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -3.8e+23) tmp = t_1; elseif (t <= -3.8e-53) tmp = (y / t) * (z / a); elseif ((t <= -1.62e-62) || ~(((t <= 1.5e-107) || (~((t <= 2.8e-76)) && (t <= 13.5))))) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.8e+23], t$95$1, If[LessEqual[t, -3.8e-53], N[(N[(y / t), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.62e-62], N[Not[Or[LessEqual[t, 1.5e-107], And[N[Not[LessEqual[t, 2.8e-76]], $MachinePrecision], LessEqual[t, 13.5]]]], $MachinePrecision]], t$95$1, N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -3.8 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-53}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq -1.62 \cdot 10^{-62} \lor \neg \left(t \leq 1.5 \cdot 10^{-107} \lor \neg \left(t \leq 2.8 \cdot 10^{-76}\right) \land t \leq 13.5\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -3.79999999999999975e23 or -3.7999999999999998e-53 < t < -1.6199999999999999e-62 or 1.4999999999999999e-107 < t < 2.8000000000000001e-76 or 13.5 < t Initial program 85.7%
*-commutative85.7%
associate-/l*90.1%
associate-*l/92.3%
Simplified92.3%
Taylor expanded in t around inf 68.6%
if -3.79999999999999975e23 < t < -3.7999999999999998e-53Initial program 85.4%
*-commutative85.4%
associate-/l*85.3%
associate-*l/85.3%
Simplified85.3%
Taylor expanded in a around inf 47.1%
Taylor expanded in y around inf 42.2%
*-commutative42.2%
times-frac41.8%
Simplified41.8%
if -1.6199999999999999e-62 < t < 1.4999999999999999e-107 or 2.8000000000000001e-76 < t < 13.5Initial program 66.4%
*-commutative66.4%
associate-/l*66.1%
associate-*l/61.1%
Simplified61.1%
Taylor expanded in t around 0 63.9%
Final simplification64.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -4.4e+23)
t_1
(if (<= t -4.6e-55)
(* (/ y t) (/ z a))
(if (<= t -7.8e-63)
(+ x (/ (* y z) t))
(if (or (<= t 1.6e-107) (and (not (<= t 1.05e-75)) (<= t 25.5)))
(/ z b)
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -4.4e+23) {
tmp = t_1;
} else if (t <= -4.6e-55) {
tmp = (y / t) * (z / a);
} else if (t <= -7.8e-63) {
tmp = x + ((y * z) / t);
} else if ((t <= 1.6e-107) || (!(t <= 1.05e-75) && (t <= 25.5))) {
tmp = z / b;
} else {
tmp = 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) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-4.4d+23)) then
tmp = t_1
else if (t <= (-4.6d-55)) then
tmp = (y / t) * (z / a)
else if (t <= (-7.8d-63)) then
tmp = x + ((y * z) / t)
else if ((t <= 1.6d-107) .or. (.not. (t <= 1.05d-75)) .and. (t <= 25.5d0)) then
tmp = z / b
else
tmp = 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 / (a + 1.0);
double tmp;
if (t <= -4.4e+23) {
tmp = t_1;
} else if (t <= -4.6e-55) {
tmp = (y / t) * (z / a);
} else if (t <= -7.8e-63) {
tmp = x + ((y * z) / t);
} else if ((t <= 1.6e-107) || (!(t <= 1.05e-75) && (t <= 25.5))) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -4.4e+23: tmp = t_1 elif t <= -4.6e-55: tmp = (y / t) * (z / a) elif t <= -7.8e-63: tmp = x + ((y * z) / t) elif (t <= 1.6e-107) or (not (t <= 1.05e-75) and (t <= 25.5)): tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -4.4e+23) tmp = t_1; elseif (t <= -4.6e-55) tmp = Float64(Float64(y / t) * Float64(z / a)); elseif (t <= -7.8e-63) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif ((t <= 1.6e-107) || (!(t <= 1.05e-75) && (t <= 25.5))) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -4.4e+23) tmp = t_1; elseif (t <= -4.6e-55) tmp = (y / t) * (z / a); elseif (t <= -7.8e-63) tmp = x + ((y * z) / t); elseif ((t <= 1.6e-107) || (~((t <= 1.05e-75)) && (t <= 25.5))) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e+23], t$95$1, If[LessEqual[t, -4.6e-55], N[(N[(y / t), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.8e-63], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.6e-107], And[N[Not[LessEqual[t, 1.05e-75]], $MachinePrecision], LessEqual[t, 25.5]]], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -4.4 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.6 \cdot 10^{-55}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{-63}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-107} \lor \neg \left(t \leq 1.05 \cdot 10^{-75}\right) \land t \leq 25.5:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -4.40000000000000017e23 or 1.60000000000000006e-107 < t < 1.0500000000000001e-75 or 25.5 < t Initial program 86.0%
*-commutative86.0%
associate-/l*90.6%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in t around inf 69.2%
if -4.40000000000000017e23 < t < -4.60000000000000023e-55Initial program 85.4%
*-commutative85.4%
associate-/l*85.3%
associate-*l/85.3%
Simplified85.3%
Taylor expanded in a around inf 47.1%
Taylor expanded in y around inf 42.2%
*-commutative42.2%
times-frac41.8%
Simplified41.8%
if -4.60000000000000023e-55 < t < -7.80000000000000044e-63Initial program 76.5%
associate-/l*76.5%
Simplified76.5%
div-inv76.5%
associate-/l*76.5%
associate-/r/76.5%
+-commutative76.5%
fma-def76.5%
Applied egg-rr76.5%
Taylor expanded in y around 0 75.5%
Taylor expanded in a around 0 51.3%
if -7.80000000000000044e-63 < t < 1.60000000000000006e-107 or 1.0500000000000001e-75 < t < 25.5Initial program 66.4%
*-commutative66.4%
associate-/l*66.1%
associate-*l/61.1%
Simplified61.1%
Taylor expanded in t around 0 63.9%
Final simplification64.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.05e+23)
t_1
(if (<= t -2.9e-53)
(/ (* y z) (* t a))
(if (<= t -1.52e-61)
(+ x (/ (* y z) t))
(if (or (<= t 8.6e-108) (and (not (<= t 1.1e-72)) (<= t 14.5)))
(/ z b)
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.05e+23) {
tmp = t_1;
} else if (t <= -2.9e-53) {
tmp = (y * z) / (t * a);
} else if (t <= -1.52e-61) {
tmp = x + ((y * z) / t);
} else if ((t <= 8.6e-108) || (!(t <= 1.1e-72) && (t <= 14.5))) {
tmp = z / b;
} else {
tmp = 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) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-1.05d+23)) then
tmp = t_1
else if (t <= (-2.9d-53)) then
tmp = (y * z) / (t * a)
else if (t <= (-1.52d-61)) then
tmp = x + ((y * z) / t)
else if ((t <= 8.6d-108) .or. (.not. (t <= 1.1d-72)) .and. (t <= 14.5d0)) then
tmp = z / b
else
tmp = 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 / (a + 1.0);
double tmp;
if (t <= -1.05e+23) {
tmp = t_1;
} else if (t <= -2.9e-53) {
tmp = (y * z) / (t * a);
} else if (t <= -1.52e-61) {
tmp = x + ((y * z) / t);
} else if ((t <= 8.6e-108) || (!(t <= 1.1e-72) && (t <= 14.5))) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -1.05e+23: tmp = t_1 elif t <= -2.9e-53: tmp = (y * z) / (t * a) elif t <= -1.52e-61: tmp = x + ((y * z) / t) elif (t <= 8.6e-108) or (not (t <= 1.1e-72) and (t <= 14.5)): tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.05e+23) tmp = t_1; elseif (t <= -2.9e-53) tmp = Float64(Float64(y * z) / Float64(t * a)); elseif (t <= -1.52e-61) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif ((t <= 8.6e-108) || (!(t <= 1.1e-72) && (t <= 14.5))) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -1.05e+23) tmp = t_1; elseif (t <= -2.9e-53) tmp = (y * z) / (t * a); elseif (t <= -1.52e-61) tmp = x + ((y * z) / t); elseif ((t <= 8.6e-108) || (~((t <= 1.1e-72)) && (t <= 14.5))) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+23], t$95$1, If[LessEqual[t, -2.9e-53], N[(N[(y * z), $MachinePrecision] / N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.52e-61], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 8.6e-108], And[N[Not[LessEqual[t, 1.1e-72]], $MachinePrecision], LessEqual[t, 14.5]]], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{+23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{-53}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot a}\\
\mathbf{elif}\;t \leq -1.52 \cdot 10^{-61}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{-108} \lor \neg \left(t \leq 1.1 \cdot 10^{-72}\right) \land t \leq 14.5:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.0500000000000001e23 or 8.6000000000000001e-108 < t < 1.10000000000000001e-72 or 14.5 < t Initial program 86.0%
*-commutative86.0%
associate-/l*90.6%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in t around inf 69.2%
if -1.0500000000000001e23 < t < -2.8999999999999998e-53Initial program 85.4%
*-commutative85.4%
associate-/l*85.3%
associate-*l/85.3%
Simplified85.3%
Taylor expanded in a around inf 47.1%
Taylor expanded in y around inf 42.2%
*-commutative42.2%
Simplified42.2%
if -2.8999999999999998e-53 < t < -1.52000000000000003e-61Initial program 76.5%
associate-/l*76.5%
Simplified76.5%
div-inv76.5%
associate-/l*76.5%
associate-/r/76.5%
+-commutative76.5%
fma-def76.5%
Applied egg-rr76.5%
Taylor expanded in y around 0 75.5%
Taylor expanded in a around 0 51.3%
if -1.52000000000000003e-61 < t < 8.6000000000000001e-108 or 1.10000000000000001e-72 < t < 14.5Initial program 66.4%
*-commutative66.4%
associate-/l*66.1%
associate-*l/61.1%
Simplified61.1%
Taylor expanded in t around 0 63.9%
Final simplification64.6%
(FPCore (x y z t a b) :precision binary64 (if (<= y -2.25e+119) (/ z b) (if (<= y 3.1e+106) (* (/ 1.0 (+ a 1.0)) (+ x (* z (/ y t)))) (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.25e+119) {
tmp = z / b;
} else if (y <= 3.1e+106) {
tmp = (1.0 / (a + 1.0)) * (x + (z * (y / t)));
} 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 (y <= (-2.25d+119)) then
tmp = z / b
else if (y <= 3.1d+106) then
tmp = (1.0d0 / (a + 1.0d0)) * (x + (z * (y / t)))
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 (y <= -2.25e+119) {
tmp = z / b;
} else if (y <= 3.1e+106) {
tmp = (1.0 / (a + 1.0)) * (x + (z * (y / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.25e+119: tmp = z / b elif y <= 3.1e+106: tmp = (1.0 / (a + 1.0)) * (x + (z * (y / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.25e+119) tmp = Float64(z / b); elseif (y <= 3.1e+106) tmp = Float64(Float64(1.0 / Float64(a + 1.0)) * Float64(x + Float64(z * Float64(y / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2.25e+119) tmp = z / b; elseif (y <= 3.1e+106) tmp = (1.0 / (a + 1.0)) * (x + (z * (y / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.25e+119], N[(z / b), $MachinePrecision], If[LessEqual[y, 3.1e+106], N[(N[(1.0 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] * N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+119}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+106}:\\
\;\;\;\;\frac{1}{a + 1} \cdot \left(x + z \cdot \frac{y}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -2.2500000000000001e119 or 3.0999999999999999e106 < y Initial program 45.2%
*-commutative45.2%
associate-/l*50.6%
associate-*l/49.9%
Simplified49.9%
Taylor expanded in t around 0 64.9%
if -2.2500000000000001e119 < y < 3.0999999999999999e106Initial program 90.1%
associate-/l*83.5%
Simplified83.5%
div-inv83.4%
associate-/l*79.9%
associate-/r/83.6%
+-commutative83.6%
fma-def83.6%
Applied egg-rr83.6%
Taylor expanded in y around 0 70.8%
associate-/r/73.7%
Applied egg-rr73.7%
Final simplification71.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.95e+24)
t_1
(if (<= t -7e-157)
(* (/ z (+ a 1.0)) (/ y t))
(if (or (<= t 1.75e-107) (and (not (<= t 2.9e-74)) (<= t 210.0)))
(/ z b)
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.95e+24) {
tmp = t_1;
} else if (t <= -7e-157) {
tmp = (z / (a + 1.0)) * (y / t);
} else if ((t <= 1.75e-107) || (!(t <= 2.9e-74) && (t <= 210.0))) {
tmp = z / b;
} else {
tmp = 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) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-1.95d+24)) then
tmp = t_1
else if (t <= (-7d-157)) then
tmp = (z / (a + 1.0d0)) * (y / t)
else if ((t <= 1.75d-107) .or. (.not. (t <= 2.9d-74)) .and. (t <= 210.0d0)) then
tmp = z / b
else
tmp = 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 / (a + 1.0);
double tmp;
if (t <= -1.95e+24) {
tmp = t_1;
} else if (t <= -7e-157) {
tmp = (z / (a + 1.0)) * (y / t);
} else if ((t <= 1.75e-107) || (!(t <= 2.9e-74) && (t <= 210.0))) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -1.95e+24: tmp = t_1 elif t <= -7e-157: tmp = (z / (a + 1.0)) * (y / t) elif (t <= 1.75e-107) or (not (t <= 2.9e-74) and (t <= 210.0)): tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.95e+24) tmp = t_1; elseif (t <= -7e-157) tmp = Float64(Float64(z / Float64(a + 1.0)) * Float64(y / t)); elseif ((t <= 1.75e-107) || (!(t <= 2.9e-74) && (t <= 210.0))) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -1.95e+24) tmp = t_1; elseif (t <= -7e-157) tmp = (z / (a + 1.0)) * (y / t); elseif ((t <= 1.75e-107) || (~((t <= 2.9e-74)) && (t <= 210.0))) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.95e+24], t$95$1, If[LessEqual[t, -7e-157], N[(N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.75e-107], And[N[Not[LessEqual[t, 2.9e-74]], $MachinePrecision], LessEqual[t, 210.0]]], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{+24}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7 \cdot 10^{-157}:\\
\;\;\;\;\frac{z}{a + 1} \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 1.75 \cdot 10^{-107} \lor \neg \left(t \leq 2.9 \cdot 10^{-74}\right) \land t \leq 210:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.9499999999999999e24 or 1.74999999999999993e-107 < t < 2.9e-74 or 210 < t Initial program 86.0%
*-commutative86.0%
associate-/l*90.6%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in t around inf 69.2%
if -1.9499999999999999e24 < t < -7.0000000000000004e-157Initial program 79.8%
*-commutative79.8%
associate-/l*79.6%
associate-*l/79.7%
Simplified79.7%
Taylor expanded in b around 0 61.3%
Taylor expanded in y around inf 49.0%
times-frac49.0%
Simplified49.0%
if -7.0000000000000004e-157 < t < 1.74999999999999993e-107 or 2.9e-74 < t < 210Initial program 65.5%
*-commutative65.5%
associate-/l*65.2%
associate-*l/59.3%
Simplified59.3%
Taylor expanded in t around 0 66.8%
Final simplification65.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.1e+25)
t_1
(if (<= t -5.2e-155)
(/ (* y z) (* t (+ a 1.0)))
(if (or (<= t 2.6e-108) (and (not (<= t 5e-76)) (<= t 88.0)))
(/ z b)
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.1e+25) {
tmp = t_1;
} else if (t <= -5.2e-155) {
tmp = (y * z) / (t * (a + 1.0));
} else if ((t <= 2.6e-108) || (!(t <= 5e-76) && (t <= 88.0))) {
tmp = z / b;
} else {
tmp = 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) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-1.1d+25)) then
tmp = t_1
else if (t <= (-5.2d-155)) then
tmp = (y * z) / (t * (a + 1.0d0))
else if ((t <= 2.6d-108) .or. (.not. (t <= 5d-76)) .and. (t <= 88.0d0)) then
tmp = z / b
else
tmp = 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 / (a + 1.0);
double tmp;
if (t <= -1.1e+25) {
tmp = t_1;
} else if (t <= -5.2e-155) {
tmp = (y * z) / (t * (a + 1.0));
} else if ((t <= 2.6e-108) || (!(t <= 5e-76) && (t <= 88.0))) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -1.1e+25: tmp = t_1 elif t <= -5.2e-155: tmp = (y * z) / (t * (a + 1.0)) elif (t <= 2.6e-108) or (not (t <= 5e-76) and (t <= 88.0)): tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.1e+25) tmp = t_1; elseif (t <= -5.2e-155) tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0))); elseif ((t <= 2.6e-108) || (!(t <= 5e-76) && (t <= 88.0))) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -1.1e+25) tmp = t_1; elseif (t <= -5.2e-155) tmp = (y * z) / (t * (a + 1.0)); elseif ((t <= 2.6e-108) || (~((t <= 5e-76)) && (t <= 88.0))) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+25], t$95$1, If[LessEqual[t, -5.2e-155], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 2.6e-108], And[N[Not[LessEqual[t, 5e-76]], $MachinePrecision], LessEqual[t, 88.0]]], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+25}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-155}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-108} \lor \neg \left(t \leq 5 \cdot 10^{-76}\right) \land t \leq 88:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.1e25 or 2.59999999999999984e-108 < t < 4.9999999999999998e-76 or 88 < t Initial program 86.0%
*-commutative86.0%
associate-/l*90.6%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in t around inf 69.2%
if -1.1e25 < t < -5.20000000000000016e-155Initial program 79.8%
*-commutative79.8%
associate-/l*79.6%
associate-*l/79.7%
Simplified79.7%
Taylor expanded in b around 0 61.3%
Taylor expanded in y around inf 49.0%
if -5.20000000000000016e-155 < t < 2.59999999999999984e-108 or 4.9999999999999998e-76 < t < 88Initial program 65.5%
*-commutative65.5%
associate-/l*65.2%
associate-*l/59.3%
Simplified59.3%
Taylor expanded in t around 0 66.8%
Final simplification65.3%
(FPCore (x y z t a b) :precision binary64 (if (<= b -5.2e+109) (/ z b) (if (<= b 2.95e+56) (/ (+ x (/ (* y z) t)) (+ a 1.0)) (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.2e+109) {
tmp = z / b;
} else if (b <= 2.95e+56) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} 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 (b <= (-5.2d+109)) then
tmp = z / b
else if (b <= 2.95d+56) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
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 (b <= -5.2e+109) {
tmp = z / b;
} else if (b <= 2.95e+56) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -5.2e+109: tmp = z / b elif b <= 2.95e+56: tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.2e+109) tmp = Float64(z / b); elseif (b <= 2.95e+56) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -5.2e+109) tmp = z / b; elseif (b <= 2.95e+56) tmp = (x + ((y * z) / t)) / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.2e+109], N[(z / b), $MachinePrecision], If[LessEqual[b, 2.95e+56], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{+109}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;b \leq 2.95 \cdot 10^{+56}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if b < -5.1999999999999997e109 or 2.9500000000000001e56 < b Initial program 61.6%
*-commutative61.6%
associate-/l*61.5%
associate-*l/64.6%
Simplified64.6%
Taylor expanded in t around 0 58.8%
if -5.1999999999999997e109 < b < 2.9500000000000001e56Initial program 86.6%
*-commutative86.6%
associate-/l*90.0%
associate-*l/86.6%
Simplified86.6%
Taylor expanded in b around 0 78.3%
Final simplification71.3%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -4.55e+27)
(and (not (<= t 1.75e-107)) (or (<= t 9.6e-74) (not (<= t 15.2)))))
(/ x (+ a 1.0))
(/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.55e+27) || (!(t <= 1.75e-107) && ((t <= 9.6e-74) || !(t <= 15.2)))) {
tmp = x / (a + 1.0);
} 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 ((t <= (-4.55d+27)) .or. (.not. (t <= 1.75d-107)) .and. (t <= 9.6d-74) .or. (.not. (t <= 15.2d0))) then
tmp = x / (a + 1.0d0)
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 ((t <= -4.55e+27) || (!(t <= 1.75e-107) && ((t <= 9.6e-74) || !(t <= 15.2)))) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.55e+27) or (not (t <= 1.75e-107) and ((t <= 9.6e-74) or not (t <= 15.2))): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.55e+27) || (!(t <= 1.75e-107) && ((t <= 9.6e-74) || !(t <= 15.2)))) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.55e+27) || (~((t <= 1.75e-107)) && ((t <= 9.6e-74) || ~((t <= 15.2))))) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.55e+27], And[N[Not[LessEqual[t, 1.75e-107]], $MachinePrecision], Or[LessEqual[t, 9.6e-74], N[Not[LessEqual[t, 15.2]], $MachinePrecision]]]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.55 \cdot 10^{+27} \lor \neg \left(t \leq 1.75 \cdot 10^{-107}\right) \land \left(t \leq 9.6 \cdot 10^{-74} \lor \neg \left(t \leq 15.2\right)\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -4.55000000000000002e27 or 1.74999999999999993e-107 < t < 9.5999999999999996e-74 or 15.199999999999999 < t Initial program 86.7%
*-commutative86.7%
associate-/l*91.3%
associate-*l/93.6%
Simplified93.6%
Taylor expanded in t around inf 69.7%
if -4.55000000000000002e27 < t < 1.74999999999999993e-107 or 9.5999999999999996e-74 < t < 15.199999999999999Initial program 69.1%
*-commutative69.1%
associate-/l*68.8%
associate-*l/64.7%
Simplified64.7%
Taylor expanded in t around 0 56.4%
Final simplification62.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.6e+27) (not (<= t 15.0))) (/ x a) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.6e+27) || !(t <= 15.0)) {
tmp = x / a;
} 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 ((t <= (-4.6d+27)) .or. (.not. (t <= 15.0d0))) then
tmp = x / a
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 ((t <= -4.6e+27) || !(t <= 15.0)) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.6e+27) or not (t <= 15.0): tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.6e+27) || !(t <= 15.0)) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.6e+27) || ~((t <= 15.0))) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.6e+27], N[Not[LessEqual[t, 15.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+27} \lor \neg \left(t \leq 15\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -4.6000000000000001e27 or 15 < t Initial program 85.4%
*-commutative85.4%
associate-/l*90.5%
associate-*l/93.0%
Simplified93.0%
Taylor expanded in a around inf 43.6%
Taylor expanded in y around 0 38.9%
if -4.6000000000000001e27 < t < 15Initial program 71.5%
*-commutative71.5%
associate-/l*71.2%
associate-*l/67.4%
Simplified67.4%
Taylor expanded in t around 0 52.9%
Final simplification46.7%
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
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 / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
def code(x, y, z, t, a, b): return x / a
function code(x, y, z, t, a, b) return Float64(x / a) end
function tmp = code(x, y, z, t, a, b) tmp = x / a; end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a}
\end{array}
Initial program 77.6%
*-commutative77.6%
associate-/l*79.7%
associate-*l/78.7%
Simplified78.7%
Taylor expanded in a around inf 37.2%
Taylor expanded in y around 0 26.0%
Final simplification26.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = 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) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
else
tmp = 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 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023171
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))