
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
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
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
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
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- z y) (+ (- t z) 1.0)))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
real(8) function code(x, y, z, t, a)
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
code = x + (a * ((z - y) / ((t - z) + 1.0d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
def code(x, y, z, t, a): return x + (a * ((z - y) / ((t - z) + 1.0)))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(z - y) / Float64(Float64(t - z) + 1.0)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((z - y) / ((t - z) + 1.0))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{z - y}{\left(t - z\right) + 1}
\end{array}
Initial program 98.3%
associate-/r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (+ (/ 1.0 z) -1.0)))))
(if (<= t -3.5e-5)
(- x (/ a (/ t y)))
(if (<= t -2.55e-296)
t_1
(if (<= t 5.5e-262)
(- x (* y a))
(if (<= t 3.9e-212)
t_1
(if (<= t 1.15e-185)
(/ (* y (- a)) (- 1.0 z))
(if (<= t 0.00013)
t_1
(if (<= t 1.6e+103)
(- x (/ (* y a) t))
(if (<= t 3.7e+158) t_1 (+ x (/ a (/ t z)))))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / ((1.0 / z) + -1.0));
double tmp;
if (t <= -3.5e-5) {
tmp = x - (a / (t / y));
} else if (t <= -2.55e-296) {
tmp = t_1;
} else if (t <= 5.5e-262) {
tmp = x - (y * a);
} else if (t <= 3.9e-212) {
tmp = t_1;
} else if (t <= 1.15e-185) {
tmp = (y * -a) / (1.0 - z);
} else if (t <= 0.00013) {
tmp = t_1;
} else if (t <= 1.6e+103) {
tmp = x - ((y * a) / t);
} else if (t <= 3.7e+158) {
tmp = t_1;
} else {
tmp = x + (a / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x + (a / ((1.0d0 / z) + (-1.0d0)))
if (t <= (-3.5d-5)) then
tmp = x - (a / (t / y))
else if (t <= (-2.55d-296)) then
tmp = t_1
else if (t <= 5.5d-262) then
tmp = x - (y * a)
else if (t <= 3.9d-212) then
tmp = t_1
else if (t <= 1.15d-185) then
tmp = (y * -a) / (1.0d0 - z)
else if (t <= 0.00013d0) then
tmp = t_1
else if (t <= 1.6d+103) then
tmp = x - ((y * a) / t)
else if (t <= 3.7d+158) then
tmp = t_1
else
tmp = x + (a / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / ((1.0 / z) + -1.0));
double tmp;
if (t <= -3.5e-5) {
tmp = x - (a / (t / y));
} else if (t <= -2.55e-296) {
tmp = t_1;
} else if (t <= 5.5e-262) {
tmp = x - (y * a);
} else if (t <= 3.9e-212) {
tmp = t_1;
} else if (t <= 1.15e-185) {
tmp = (y * -a) / (1.0 - z);
} else if (t <= 0.00013) {
tmp = t_1;
} else if (t <= 1.6e+103) {
tmp = x - ((y * a) / t);
} else if (t <= 3.7e+158) {
tmp = t_1;
} else {
tmp = x + (a / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / ((1.0 / z) + -1.0)) tmp = 0 if t <= -3.5e-5: tmp = x - (a / (t / y)) elif t <= -2.55e-296: tmp = t_1 elif t <= 5.5e-262: tmp = x - (y * a) elif t <= 3.9e-212: tmp = t_1 elif t <= 1.15e-185: tmp = (y * -a) / (1.0 - z) elif t <= 0.00013: tmp = t_1 elif t <= 1.6e+103: tmp = x - ((y * a) / t) elif t <= 3.7e+158: tmp = t_1 else: tmp = x + (a / (t / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(Float64(1.0 / z) + -1.0))) tmp = 0.0 if (t <= -3.5e-5) tmp = Float64(x - Float64(a / Float64(t / y))); elseif (t <= -2.55e-296) tmp = t_1; elseif (t <= 5.5e-262) tmp = Float64(x - Float64(y * a)); elseif (t <= 3.9e-212) tmp = t_1; elseif (t <= 1.15e-185) tmp = Float64(Float64(y * Float64(-a)) / Float64(1.0 - z)); elseif (t <= 0.00013) tmp = t_1; elseif (t <= 1.6e+103) tmp = Float64(x - Float64(Float64(y * a) / t)); elseif (t <= 3.7e+158) tmp = t_1; else tmp = Float64(x + Float64(a / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / ((1.0 / z) + -1.0)); tmp = 0.0; if (t <= -3.5e-5) tmp = x - (a / (t / y)); elseif (t <= -2.55e-296) tmp = t_1; elseif (t <= 5.5e-262) tmp = x - (y * a); elseif (t <= 3.9e-212) tmp = t_1; elseif (t <= 1.15e-185) tmp = (y * -a) / (1.0 - z); elseif (t <= 0.00013) tmp = t_1; elseif (t <= 1.6e+103) tmp = x - ((y * a) / t); elseif (t <= 3.7e+158) tmp = t_1; else tmp = x + (a / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(N[(1.0 / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e-5], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.55e-296], t$95$1, If[LessEqual[t, 5.5e-262], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e-212], t$95$1, If[LessEqual[t, 1.15e-185], N[(N[(y * (-a)), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.00013], t$95$1, If[LessEqual[t, 1.6e+103], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.7e+158], t$95$1, N[(x + N[(a / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{\frac{1}{z} + -1}\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{-5}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\mathbf{elif}\;t \leq -2.55 \cdot 10^{-296}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-262}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-212}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-185}:\\
\;\;\;\;\frac{y \cdot \left(-a\right)}{1 - z}\\
\mathbf{elif}\;t \leq 0.00013:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+103}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{+158}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z}}\\
\end{array}
\end{array}
if t < -3.4999999999999997e-5Initial program 98.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 70.6%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in t around inf 70.1%
associate-/l*83.3%
Simplified83.3%
if -3.4999999999999997e-5 < t < -2.54999999999999984e-296 or 5.5000000000000004e-262 < t < 3.9e-212 or 1.15e-185 < t < 1.29999999999999989e-4 or 1.59999999999999996e103 < t < 3.70000000000000011e158Initial program 98.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 97.2%
Taylor expanded in y around 0 68.5%
sub-neg68.5%
mul-1-neg68.5%
remove-double-neg68.5%
associate-/l*81.4%
div-sub81.4%
*-inverses81.4%
Simplified81.4%
if -2.54999999999999984e-296 < t < 5.5000000000000004e-262Initial program 99.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around 0 92.8%
if 3.9e-212 < t < 1.15e-185Initial program 99.4%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in y around inf 100.0%
associate-*r/100.0%
associate-*r*100.0%
neg-mul-1100.0%
Simplified100.0%
if 1.29999999999999989e-4 < t < 1.59999999999999996e103Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 89.1%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in t around inf 88.1%
if 3.70000000000000011e158 < t Initial program 96.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 92.9%
Taylor expanded in y around 0 79.1%
sub-neg79.1%
mul-1-neg79.1%
remove-double-neg79.1%
+-commutative79.1%
associate-/l*89.5%
Simplified89.5%
Final simplification84.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))) (t_2 (- x (/ a (/ t y)))))
(if (<= t -2.6e-14)
t_2
(if (<= t -2.85e-277)
(- x a)
(if (<= t 2e-129)
t_1
(if (<= t 9e-74)
(- x a)
(if (<= t 1.05e-58)
t_1
(if (<= t 1.8e-5)
(- x (+ a (/ a z)))
(if (<= t 5.2e+162) t_2 (+ x (/ a (/ t z))))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double t_2 = x - (a / (t / y));
double tmp;
if (t <= -2.6e-14) {
tmp = t_2;
} else if (t <= -2.85e-277) {
tmp = x - a;
} else if (t <= 2e-129) {
tmp = t_1;
} else if (t <= 9e-74) {
tmp = x - a;
} else if (t <= 1.05e-58) {
tmp = t_1;
} else if (t <= 1.8e-5) {
tmp = x - (a + (a / z));
} else if (t <= 5.2e+162) {
tmp = t_2;
} else {
tmp = x + (a / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - (y * a)
t_2 = x - (a / (t / y))
if (t <= (-2.6d-14)) then
tmp = t_2
else if (t <= (-2.85d-277)) then
tmp = x - a
else if (t <= 2d-129) then
tmp = t_1
else if (t <= 9d-74) then
tmp = x - a
else if (t <= 1.05d-58) then
tmp = t_1
else if (t <= 1.8d-5) then
tmp = x - (a + (a / z))
else if (t <= 5.2d+162) then
tmp = t_2
else
tmp = x + (a / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double t_2 = x - (a / (t / y));
double tmp;
if (t <= -2.6e-14) {
tmp = t_2;
} else if (t <= -2.85e-277) {
tmp = x - a;
} else if (t <= 2e-129) {
tmp = t_1;
} else if (t <= 9e-74) {
tmp = x - a;
} else if (t <= 1.05e-58) {
tmp = t_1;
} else if (t <= 1.8e-5) {
tmp = x - (a + (a / z));
} else if (t <= 5.2e+162) {
tmp = t_2;
} else {
tmp = x + (a / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) t_2 = x - (a / (t / y)) tmp = 0 if t <= -2.6e-14: tmp = t_2 elif t <= -2.85e-277: tmp = x - a elif t <= 2e-129: tmp = t_1 elif t <= 9e-74: tmp = x - a elif t <= 1.05e-58: tmp = t_1 elif t <= 1.8e-5: tmp = x - (a + (a / z)) elif t <= 5.2e+162: tmp = t_2 else: tmp = x + (a / (t / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) t_2 = Float64(x - Float64(a / Float64(t / y))) tmp = 0.0 if (t <= -2.6e-14) tmp = t_2; elseif (t <= -2.85e-277) tmp = Float64(x - a); elseif (t <= 2e-129) tmp = t_1; elseif (t <= 9e-74) tmp = Float64(x - a); elseif (t <= 1.05e-58) tmp = t_1; elseif (t <= 1.8e-5) tmp = Float64(x - Float64(a + Float64(a / z))); elseif (t <= 5.2e+162) tmp = t_2; else tmp = Float64(x + Float64(a / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); t_2 = x - (a / (t / y)); tmp = 0.0; if (t <= -2.6e-14) tmp = t_2; elseif (t <= -2.85e-277) tmp = x - a; elseif (t <= 2e-129) tmp = t_1; elseif (t <= 9e-74) tmp = x - a; elseif (t <= 1.05e-58) tmp = t_1; elseif (t <= 1.8e-5) tmp = x - (a + (a / z)); elseif (t <= 5.2e+162) tmp = t_2; else tmp = x + (a / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.6e-14], t$95$2, If[LessEqual[t, -2.85e-277], N[(x - a), $MachinePrecision], If[LessEqual[t, 2e-129], t$95$1, If[LessEqual[t, 9e-74], N[(x - a), $MachinePrecision], If[LessEqual[t, 1.05e-58], t$95$1, If[LessEqual[t, 1.8e-5], N[(x - N[(a + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e+162], t$95$2, N[(x + N[(a / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
t_2 := x - \frac{a}{\frac{t}{y}}\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{-14}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.85 \cdot 10^{-277}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-129}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-74}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-58}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-5}:\\
\;\;\;\;x - \left(a + \frac{a}{z}\right)\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+162}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z}}\\
\end{array}
\end{array}
if t < -2.59999999999999997e-14 or 1.80000000000000005e-5 < t < 5.2e162Initial program 98.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 75.8%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in t around inf 74.9%
associate-/l*82.8%
Simplified82.8%
if -2.59999999999999997e-14 < t < -2.84999999999999977e-277 or 1.9999999999999999e-129 < t < 8.9999999999999998e-74Initial program 97.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 73.3%
if -2.84999999999999977e-277 < t < 1.9999999999999999e-129 or 8.9999999999999998e-74 < t < 1.04999999999999994e-58Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around 0 78.8%
if 1.04999999999999994e-58 < t < 1.80000000000000005e-5Initial program 99.8%
associate-/r/99.8%
Simplified99.8%
frac-2neg99.8%
div-inv100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 78.7%
associate-/l*100.0%
associate--r+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around inf 87.2%
if 5.2e162 < t Initial program 96.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 92.4%
Taylor expanded in y around 0 81.2%
sub-neg81.2%
mul-1-neg81.2%
remove-double-neg81.2%
+-commutative81.2%
associate-/l*92.4%
Simplified92.4%
Final simplification80.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))))
(if (<= t -2.6e-14)
(- x (/ a (/ t y)))
(if (<= t -8.6e-278)
(- x a)
(if (<= t 8.8e-136)
t_1
(if (<= t 7.4e-75)
(- x a)
(if (<= t 8.2e-57)
t_1
(if (<= t 1.2e-5)
(- x (+ a (/ a z)))
(if (<= t 3.5e+162)
(- x (/ (* y a) t))
(+ x (/ a (/ t z))))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (t <= -2.6e-14) {
tmp = x - (a / (t / y));
} else if (t <= -8.6e-278) {
tmp = x - a;
} else if (t <= 8.8e-136) {
tmp = t_1;
} else if (t <= 7.4e-75) {
tmp = x - a;
} else if (t <= 8.2e-57) {
tmp = t_1;
} else if (t <= 1.2e-5) {
tmp = x - (a + (a / z));
} else if (t <= 3.5e+162) {
tmp = x - ((y * a) / t);
} else {
tmp = x + (a / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x - (y * a)
if (t <= (-2.6d-14)) then
tmp = x - (a / (t / y))
else if (t <= (-8.6d-278)) then
tmp = x - a
else if (t <= 8.8d-136) then
tmp = t_1
else if (t <= 7.4d-75) then
tmp = x - a
else if (t <= 8.2d-57) then
tmp = t_1
else if (t <= 1.2d-5) then
tmp = x - (a + (a / z))
else if (t <= 3.5d+162) then
tmp = x - ((y * a) / t)
else
tmp = x + (a / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (t <= -2.6e-14) {
tmp = x - (a / (t / y));
} else if (t <= -8.6e-278) {
tmp = x - a;
} else if (t <= 8.8e-136) {
tmp = t_1;
} else if (t <= 7.4e-75) {
tmp = x - a;
} else if (t <= 8.2e-57) {
tmp = t_1;
} else if (t <= 1.2e-5) {
tmp = x - (a + (a / z));
} else if (t <= 3.5e+162) {
tmp = x - ((y * a) / t);
} else {
tmp = x + (a / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) tmp = 0 if t <= -2.6e-14: tmp = x - (a / (t / y)) elif t <= -8.6e-278: tmp = x - a elif t <= 8.8e-136: tmp = t_1 elif t <= 7.4e-75: tmp = x - a elif t <= 8.2e-57: tmp = t_1 elif t <= 1.2e-5: tmp = x - (a + (a / z)) elif t <= 3.5e+162: tmp = x - ((y * a) / t) else: tmp = x + (a / (t / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) tmp = 0.0 if (t <= -2.6e-14) tmp = Float64(x - Float64(a / Float64(t / y))); elseif (t <= -8.6e-278) tmp = Float64(x - a); elseif (t <= 8.8e-136) tmp = t_1; elseif (t <= 7.4e-75) tmp = Float64(x - a); elseif (t <= 8.2e-57) tmp = t_1; elseif (t <= 1.2e-5) tmp = Float64(x - Float64(a + Float64(a / z))); elseif (t <= 3.5e+162) tmp = Float64(x - Float64(Float64(y * a) / t)); else tmp = Float64(x + Float64(a / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); tmp = 0.0; if (t <= -2.6e-14) tmp = x - (a / (t / y)); elseif (t <= -8.6e-278) tmp = x - a; elseif (t <= 8.8e-136) tmp = t_1; elseif (t <= 7.4e-75) tmp = x - a; elseif (t <= 8.2e-57) tmp = t_1; elseif (t <= 1.2e-5) tmp = x - (a + (a / z)); elseif (t <= 3.5e+162) tmp = x - ((y * a) / t); else tmp = x + (a / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.6e-14], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8.6e-278], N[(x - a), $MachinePrecision], If[LessEqual[t, 8.8e-136], t$95$1, If[LessEqual[t, 7.4e-75], N[(x - a), $MachinePrecision], If[LessEqual[t, 8.2e-57], t$95$1, If[LessEqual[t, 1.2e-5], N[(x - N[(a + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e+162], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + N[(a / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{-14}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\mathbf{elif}\;t \leq -8.6 \cdot 10^{-278}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{-136}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{-75}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 8.2 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-5}:\\
\;\;\;\;x - \left(a + \frac{a}{z}\right)\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+162}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z}}\\
\end{array}
\end{array}
if t < -2.59999999999999997e-14Initial program 98.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 71.6%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in t around inf 70.4%
associate-/l*83.2%
Simplified83.2%
if -2.59999999999999997e-14 < t < -8.5999999999999998e-278 or 8.8000000000000005e-136 < t < 7.40000000000000047e-75Initial program 97.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 73.3%
if -8.5999999999999998e-278 < t < 8.8000000000000005e-136 or 7.40000000000000047e-75 < t < 8.2000000000000003e-57Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around 0 78.8%
if 8.2000000000000003e-57 < t < 1.2e-5Initial program 99.8%
associate-/r/99.8%
Simplified99.8%
frac-2neg99.8%
div-inv100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 78.7%
associate-/l*100.0%
associate--r+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around inf 87.2%
if 1.2e-5 < t < 3.50000000000000018e162Initial program 99.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 82.9%
associate-/l*82.8%
Simplified82.8%
Taylor expanded in t around inf 82.3%
if 3.50000000000000018e162 < t Initial program 96.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 92.4%
Taylor expanded in y around 0 81.2%
sub-neg81.2%
mul-1-neg81.2%
remove-double-neg81.2%
+-commutative81.2%
associate-/l*92.4%
Simplified92.4%
Final simplification80.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (+ (/ 1.0 z) -1.0)))) (t_2 (+ x (* (/ a t) (- z y)))))
(if (<= t -3.5e-5)
t_2
(if (<= t -1.9e-301)
t_1
(if (<= t 6.2e-263)
(- x (* y a))
(if (<= t 3.9e-212)
t_1
(if (<= t 3e-185)
(/ (* y (- a)) (- 1.0 z))
(if (<= t 6600000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / ((1.0 / z) + -1.0));
double t_2 = x + ((a / t) * (z - y));
double tmp;
if (t <= -3.5e-5) {
tmp = t_2;
} else if (t <= -1.9e-301) {
tmp = t_1;
} else if (t <= 6.2e-263) {
tmp = x - (y * a);
} else if (t <= 3.9e-212) {
tmp = t_1;
} else if (t <= 3e-185) {
tmp = (y * -a) / (1.0 - z);
} else if (t <= 6600000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (a / ((1.0d0 / z) + (-1.0d0)))
t_2 = x + ((a / t) * (z - y))
if (t <= (-3.5d-5)) then
tmp = t_2
else if (t <= (-1.9d-301)) then
tmp = t_1
else if (t <= 6.2d-263) then
tmp = x - (y * a)
else if (t <= 3.9d-212) then
tmp = t_1
else if (t <= 3d-185) then
tmp = (y * -a) / (1.0d0 - z)
else if (t <= 6600000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / ((1.0 / z) + -1.0));
double t_2 = x + ((a / t) * (z - y));
double tmp;
if (t <= -3.5e-5) {
tmp = t_2;
} else if (t <= -1.9e-301) {
tmp = t_1;
} else if (t <= 6.2e-263) {
tmp = x - (y * a);
} else if (t <= 3.9e-212) {
tmp = t_1;
} else if (t <= 3e-185) {
tmp = (y * -a) / (1.0 - z);
} else if (t <= 6600000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / ((1.0 / z) + -1.0)) t_2 = x + ((a / t) * (z - y)) tmp = 0 if t <= -3.5e-5: tmp = t_2 elif t <= -1.9e-301: tmp = t_1 elif t <= 6.2e-263: tmp = x - (y * a) elif t <= 3.9e-212: tmp = t_1 elif t <= 3e-185: tmp = (y * -a) / (1.0 - z) elif t <= 6600000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(Float64(1.0 / z) + -1.0))) t_2 = Float64(x + Float64(Float64(a / t) * Float64(z - y))) tmp = 0.0 if (t <= -3.5e-5) tmp = t_2; elseif (t <= -1.9e-301) tmp = t_1; elseif (t <= 6.2e-263) tmp = Float64(x - Float64(y * a)); elseif (t <= 3.9e-212) tmp = t_1; elseif (t <= 3e-185) tmp = Float64(Float64(y * Float64(-a)) / Float64(1.0 - z)); elseif (t <= 6600000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / ((1.0 / z) + -1.0)); t_2 = x + ((a / t) * (z - y)); tmp = 0.0; if (t <= -3.5e-5) tmp = t_2; elseif (t <= -1.9e-301) tmp = t_1; elseif (t <= 6.2e-263) tmp = x - (y * a); elseif (t <= 3.9e-212) tmp = t_1; elseif (t <= 3e-185) tmp = (y * -a) / (1.0 - z); elseif (t <= 6600000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(N[(1.0 / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(a / t), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e-5], t$95$2, If[LessEqual[t, -1.9e-301], t$95$1, If[LessEqual[t, 6.2e-263], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e-212], t$95$1, If[LessEqual[t, 3e-185], N[(N[(y * (-a)), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6600000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{\frac{1}{z} + -1}\\
t_2 := x + \frac{a}{t} \cdot \left(z - y\right)\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{-5}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-301}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-263}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-212}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-185}:\\
\;\;\;\;\frac{y \cdot \left(-a\right)}{1 - z}\\
\mathbf{elif}\;t \leq 6600000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -3.4999999999999997e-5 or 6.6e6 < t Initial program 98.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 86.9%
Taylor expanded in t around 0 75.7%
associate-*l/87.1%
Simplified87.1%
if -3.4999999999999997e-5 < t < -1.89999999999999998e-301 or 6.20000000000000008e-263 < t < 3.9e-212 or 3.0000000000000003e-185 < t < 6.6e6Initial program 98.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 99.9%
Taylor expanded in y around 0 67.9%
sub-neg67.9%
mul-1-neg67.9%
remove-double-neg67.9%
associate-/l*81.2%
div-sub81.2%
*-inverses81.2%
Simplified81.2%
if -1.89999999999999998e-301 < t < 6.20000000000000008e-263Initial program 99.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in z around 0 92.8%
if 3.9e-212 < t < 3.0000000000000003e-185Initial program 99.4%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in y around inf 100.0%
associate-*r/100.0%
associate-*r*100.0%
neg-mul-1100.0%
Simplified100.0%
Final simplification84.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- z y) (/ (- z) a))))
(t_2 (+ x (/ a (/ (+ (- t z) 1.0) z)))))
(if (<= z -1.5e+194)
t_2
(if (<= z -3.8e+64)
t_1
(if (<= z -43.0)
t_2
(if (<= z 12.5) (- x (* a (/ y (+ t 1.0)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - y) / (-z / a));
double t_2 = x + (a / (((t - z) + 1.0) / z));
double tmp;
if (z <= -1.5e+194) {
tmp = t_2;
} else if (z <= -3.8e+64) {
tmp = t_1;
} else if (z <= -43.0) {
tmp = t_2;
} else if (z <= 12.5) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((z - y) / (-z / a))
t_2 = x + (a / (((t - z) + 1.0d0) / z))
if (z <= (-1.5d+194)) then
tmp = t_2
else if (z <= (-3.8d+64)) then
tmp = t_1
else if (z <= (-43.0d0)) then
tmp = t_2
else if (z <= 12.5d0) then
tmp = x - (a * (y / (t + 1.0d0)))
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 t_1 = x + ((z - y) / (-z / a));
double t_2 = x + (a / (((t - z) + 1.0) / z));
double tmp;
if (z <= -1.5e+194) {
tmp = t_2;
} else if (z <= -3.8e+64) {
tmp = t_1;
} else if (z <= -43.0) {
tmp = t_2;
} else if (z <= 12.5) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - y) / (-z / a)) t_2 = x + (a / (((t - z) + 1.0) / z)) tmp = 0 if z <= -1.5e+194: tmp = t_2 elif z <= -3.8e+64: tmp = t_1 elif z <= -43.0: tmp = t_2 elif z <= 12.5: tmp = x - (a * (y / (t + 1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - y) / Float64(Float64(-z) / a))) t_2 = Float64(x + Float64(a / Float64(Float64(Float64(t - z) + 1.0) / z))) tmp = 0.0 if (z <= -1.5e+194) tmp = t_2; elseif (z <= -3.8e+64) tmp = t_1; elseif (z <= -43.0) tmp = t_2; elseif (z <= 12.5) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - y) / (-z / a)); t_2 = x + (a / (((t - z) + 1.0) / z)); tmp = 0.0; if (z <= -1.5e+194) tmp = t_2; elseif (z <= -3.8e+64) tmp = t_1; elseif (z <= -43.0) tmp = t_2; elseif (z <= 12.5) tmp = x - (a * (y / (t + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - y), $MachinePrecision] / N[((-z) / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.5e+194], t$95$2, If[LessEqual[z, -3.8e+64], t$95$1, If[LessEqual[z, -43.0], t$95$2, If[LessEqual[z, 12.5], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - y}{\frac{-z}{a}}\\
t_2 := x + \frac{a}{\frac{\left(t - z\right) + 1}{z}}\\
\mathbf{if}\;z \leq -1.5 \cdot 10^{+194}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -43:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 12.5:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.5000000000000002e194 or -3.8000000000000001e64 < z < -43Initial program 97.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around 0 63.0%
sub-neg63.0%
mul-1-neg63.0%
*-commutative63.0%
associate--l+63.0%
+-commutative63.0%
associate-*r/97.3%
remove-double-neg97.3%
associate-*r/63.0%
*-commutative63.0%
+-commutative63.0%
associate--l+63.0%
associate-/l*99.9%
associate--l+99.9%
Simplified99.9%
if -1.5000000000000002e194 < z < -3.8000000000000001e64 or 12.5 < z Initial program 96.9%
Taylor expanded in z around inf 84.3%
mul-1-neg84.3%
distribute-neg-frac84.3%
Simplified84.3%
if -43 < z < 12.5Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 93.4%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -500000.0)
(+ x (/ a (+ (/ 1.0 z) -1.0)))
(if (<= z 5.7e-12)
(- x (* a (/ y (+ t 1.0))))
(if (<= z 6.2e+216) (- x (* a (/ y (- 1.0 z)))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -500000.0) {
tmp = x + (a / ((1.0 / z) + -1.0));
} else if (z <= 5.7e-12) {
tmp = x - (a * (y / (t + 1.0)));
} else if (z <= 6.2e+216) {
tmp = x - (a * (y / (1.0 - z)));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (z <= (-500000.0d0)) then
tmp = x + (a / ((1.0d0 / z) + (-1.0d0)))
else if (z <= 5.7d-12) then
tmp = x - (a * (y / (t + 1.0d0)))
else if (z <= 6.2d+216) then
tmp = x - (a * (y / (1.0d0 - z)))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -500000.0) {
tmp = x + (a / ((1.0 / z) + -1.0));
} else if (z <= 5.7e-12) {
tmp = x - (a * (y / (t + 1.0)));
} else if (z <= 6.2e+216) {
tmp = x - (a * (y / (1.0 - z)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -500000.0: tmp = x + (a / ((1.0 / z) + -1.0)) elif z <= 5.7e-12: tmp = x - (a * (y / (t + 1.0))) elif z <= 6.2e+216: tmp = x - (a * (y / (1.0 - z))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -500000.0) tmp = Float64(x + Float64(a / Float64(Float64(1.0 / z) + -1.0))); elseif (z <= 5.7e-12) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); elseif (z <= 6.2e+216) tmp = Float64(x - Float64(a * Float64(y / Float64(1.0 - z)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -500000.0) tmp = x + (a / ((1.0 / z) + -1.0)); elseif (z <= 5.7e-12) tmp = x - (a * (y / (t + 1.0))); elseif (z <= 6.2e+216) tmp = x - (a * (y / (1.0 - z))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -500000.0], N[(x + N[(a / N[(N[(1.0 / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.7e-12], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e+216], N[(x - N[(a * N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -500000:\\
\;\;\;\;x + \frac{a}{\frac{1}{z} + -1}\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{-12}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{+216}:\\
\;\;\;\;x - a \cdot \frac{y}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -5e5Initial program 96.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 89.4%
Taylor expanded in y around 0 60.0%
sub-neg60.0%
mul-1-neg60.0%
remove-double-neg60.0%
associate-/l*80.8%
div-sub80.8%
*-inverses80.8%
Simplified80.8%
if -5e5 < z < 5.7000000000000003e-12Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 93.9%
if 5.7000000000000003e-12 < z < 6.20000000000000007e216Initial program 98.2%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around 0 81.5%
Taylor expanded in y around inf 70.4%
if 6.20000000000000007e216 < z Initial program 93.2%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
Final simplification85.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -75000000.0)
(+ x (/ (- z y) (/ t a)))
(if (<= t 5e+46)
(- x (* a (/ (- y z) (- 1.0 z))))
(+ x (/ a (/ (+ (- t z) 1.0) z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -75000000.0) {
tmp = x + ((z - y) / (t / a));
} else if (t <= 5e+46) {
tmp = x - (a * ((y - z) / (1.0 - z)));
} else {
tmp = x + (a / (((t - z) + 1.0) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (t <= (-75000000.0d0)) then
tmp = x + ((z - y) / (t / a))
else if (t <= 5d+46) then
tmp = x - (a * ((y - z) / (1.0d0 - z)))
else
tmp = x + (a / (((t - z) + 1.0d0) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -75000000.0) {
tmp = x + ((z - y) / (t / a));
} else if (t <= 5e+46) {
tmp = x - (a * ((y - z) / (1.0 - z)));
} else {
tmp = x + (a / (((t - z) + 1.0) / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -75000000.0: tmp = x + ((z - y) / (t / a)) elif t <= 5e+46: tmp = x - (a * ((y - z) / (1.0 - z))) else: tmp = x + (a / (((t - z) + 1.0) / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -75000000.0) tmp = Float64(x + Float64(Float64(z - y) / Float64(t / a))); elseif (t <= 5e+46) tmp = Float64(x - Float64(a * Float64(Float64(y - z) / Float64(1.0 - z)))); else tmp = Float64(x + Float64(a / Float64(Float64(Float64(t - z) + 1.0) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -75000000.0) tmp = x + ((z - y) / (t / a)); elseif (t <= 5e+46) tmp = x - (a * ((y - z) / (1.0 - z))); else tmp = x + (a / (((t - z) + 1.0) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -75000000.0], N[(x + N[(N[(z - y), $MachinePrecision] / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+46], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -75000000:\\
\;\;\;\;x + \frac{z - y}{\frac{t}{a}}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+46}:\\
\;\;\;\;x - a \cdot \frac{y - z}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{\left(t - z\right) + 1}{z}}\\
\end{array}
\end{array}
if t < -7.5e7Initial program 98.2%
Taylor expanded in t around inf 92.4%
if -7.5e7 < t < 5.0000000000000002e46Initial program 98.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 98.4%
if 5.0000000000000002e46 < t Initial program 97.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around 0 74.2%
sub-neg74.2%
mul-1-neg74.2%
*-commutative74.2%
associate--l+74.2%
+-commutative74.2%
associate-*r/85.0%
remove-double-neg85.0%
associate-*r/74.2%
*-commutative74.2%
+-commutative74.2%
associate--l+74.2%
associate-/l*86.8%
associate--l+86.8%
Simplified86.8%
Final simplification94.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -15.0) (not (<= z 1200.0))) (+ x (/ (- z y) (/ (- z) a))) (- x (* a (/ y (+ t 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -15.0) || !(z <= 1200.0)) {
tmp = x + ((z - y) / (-z / a));
} else {
tmp = x - (a * (y / (t + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if ((z <= (-15.0d0)) .or. (.not. (z <= 1200.0d0))) then
tmp = x + ((z - y) / (-z / a))
else
tmp = x - (a * (y / (t + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -15.0) || !(z <= 1200.0)) {
tmp = x + ((z - y) / (-z / a));
} else {
tmp = x - (a * (y / (t + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -15.0) or not (z <= 1200.0): tmp = x + ((z - y) / (-z / a)) else: tmp = x - (a * (y / (t + 1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -15.0) || !(z <= 1200.0)) tmp = Float64(x + Float64(Float64(z - y) / Float64(Float64(-z) / a))); else tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -15.0) || ~((z <= 1200.0))) tmp = x + ((z - y) / (-z / a)); else tmp = x - (a * (y / (t + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -15.0], N[Not[LessEqual[z, 1200.0]], $MachinePrecision]], N[(x + N[(N[(z - y), $MachinePrecision] / N[((-z) / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -15 \lor \neg \left(z \leq 1200\right):\\
\;\;\;\;x + \frac{z - y}{\frac{-z}{a}}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\end{array}
\end{array}
if z < -15 or 1200 < z Initial program 97.0%
Taylor expanded in z around inf 83.3%
mul-1-neg83.3%
distribute-neg-frac83.3%
Simplified83.3%
if -15 < z < 1200Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 94.1%
Final simplification88.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))))
(if (<= z -3.05e-33)
(- x a)
(if (<= z 5.4e-169)
t_1
(if (<= z 8.2e-53) x (if (<= z 0.14) t_1 (- x a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -3.05e-33) {
tmp = x - a;
} else if (z <= 5.4e-169) {
tmp = t_1;
} else if (z <= 8.2e-53) {
tmp = x;
} else if (z <= 0.14) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x - (y * a)
if (z <= (-3.05d-33)) then
tmp = x - a
else if (z <= 5.4d-169) then
tmp = t_1
else if (z <= 8.2d-53) then
tmp = x
else if (z <= 0.14d0) then
tmp = t_1
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -3.05e-33) {
tmp = x - a;
} else if (z <= 5.4e-169) {
tmp = t_1;
} else if (z <= 8.2e-53) {
tmp = x;
} else if (z <= 0.14) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) tmp = 0 if z <= -3.05e-33: tmp = x - a elif z <= 5.4e-169: tmp = t_1 elif z <= 8.2e-53: tmp = x elif z <= 0.14: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) tmp = 0.0 if (z <= -3.05e-33) tmp = Float64(x - a); elseif (z <= 5.4e-169) tmp = t_1; elseif (z <= 8.2e-53) tmp = x; elseif (z <= 0.14) tmp = t_1; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); tmp = 0.0; if (z <= -3.05e-33) tmp = x - a; elseif (z <= 5.4e-169) tmp = t_1; elseif (z <= 8.2e-53) tmp = x; elseif (z <= 0.14) tmp = t_1; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.05e-33], N[(x - a), $MachinePrecision], If[LessEqual[z, 5.4e-169], t$95$1, If[LessEqual[z, 8.2e-53], x, If[LessEqual[z, 0.14], t$95$1, N[(x - a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
\mathbf{if}\;z \leq -3.05 \cdot 10^{-33}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-169}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-53}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 0.14:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -3.0500000000000001e-33 or 0.14000000000000001 < z Initial program 97.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 72.8%
if -3.0500000000000001e-33 < z < 5.4000000000000003e-169 or 8.2000000000000001e-53 < z < 0.14000000000000001Initial program 99.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 75.9%
Taylor expanded in z around 0 73.4%
if 5.4000000000000003e-169 < z < 8.2000000000000001e-53Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 77.9%
Final simplification73.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))))
(if (<= z -4e-33)
(- x a)
(if (<= z 8e-169)
t_1
(if (<= z 2.5e-63) (+ x (* z a)) (if (<= z 44.0) t_1 (- x a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -4e-33) {
tmp = x - a;
} else if (z <= 8e-169) {
tmp = t_1;
} else if (z <= 2.5e-63) {
tmp = x + (z * a);
} else if (z <= 44.0) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x - (y * a)
if (z <= (-4d-33)) then
tmp = x - a
else if (z <= 8d-169) then
tmp = t_1
else if (z <= 2.5d-63) then
tmp = x + (z * a)
else if (z <= 44.0d0) then
tmp = t_1
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -4e-33) {
tmp = x - a;
} else if (z <= 8e-169) {
tmp = t_1;
} else if (z <= 2.5e-63) {
tmp = x + (z * a);
} else if (z <= 44.0) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) tmp = 0 if z <= -4e-33: tmp = x - a elif z <= 8e-169: tmp = t_1 elif z <= 2.5e-63: tmp = x + (z * a) elif z <= 44.0: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) tmp = 0.0 if (z <= -4e-33) tmp = Float64(x - a); elseif (z <= 8e-169) tmp = t_1; elseif (z <= 2.5e-63) tmp = Float64(x + Float64(z * a)); elseif (z <= 44.0) tmp = t_1; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); tmp = 0.0; if (z <= -4e-33) tmp = x - a; elseif (z <= 8e-169) tmp = t_1; elseif (z <= 2.5e-63) tmp = x + (z * a); elseif (z <= 44.0) tmp = t_1; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e-33], N[(x - a), $MachinePrecision], If[LessEqual[z, 8e-169], t$95$1, If[LessEqual[z, 2.5e-63], N[(x + N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 44.0], t$95$1, N[(x - a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
\mathbf{if}\;z \leq -4 \cdot 10^{-33}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 8 \cdot 10^{-169}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-63}:\\
\;\;\;\;x + z \cdot a\\
\mathbf{elif}\;z \leq 44:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -4.0000000000000002e-33 or 44 < z Initial program 97.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 72.8%
if -4.0000000000000002e-33 < z < 8.00000000000000016e-169 or 2.5000000000000001e-63 < z < 44Initial program 99.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 75.0%
Taylor expanded in z around 0 73.5%
if 8.00000000000000016e-169 < z < 2.5000000000000001e-63Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
frac-2neg100.0%
div-inv99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 89.2%
associate-/l*89.2%
associate--r+89.2%
sub-neg89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in t around 0 89.1%
Taylor expanded in z around 0 89.2%
mul-1-neg89.2%
distribute-rgt-neg-out89.2%
Simplified89.2%
Final simplification74.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))))
(if (<= z -2.5e-33)
(- x (+ a (/ a z)))
(if (<= z 2e-169)
t_1
(if (<= z 3.7e-65) (+ x (* z a)) (if (<= z 1.0) t_1 (- x a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -2.5e-33) {
tmp = x - (a + (a / z));
} else if (z <= 2e-169) {
tmp = t_1;
} else if (z <= 3.7e-65) {
tmp = x + (z * a);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: t_1
real(8) :: tmp
t_1 = x - (y * a)
if (z <= (-2.5d-33)) then
tmp = x - (a + (a / z))
else if (z <= 2d-169) then
tmp = t_1
else if (z <= 3.7d-65) then
tmp = x + (z * a)
else if (z <= 1.0d0) then
tmp = t_1
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -2.5e-33) {
tmp = x - (a + (a / z));
} else if (z <= 2e-169) {
tmp = t_1;
} else if (z <= 3.7e-65) {
tmp = x + (z * a);
} else if (z <= 1.0) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) tmp = 0 if z <= -2.5e-33: tmp = x - (a + (a / z)) elif z <= 2e-169: tmp = t_1 elif z <= 3.7e-65: tmp = x + (z * a) elif z <= 1.0: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) tmp = 0.0 if (z <= -2.5e-33) tmp = Float64(x - Float64(a + Float64(a / z))); elseif (z <= 2e-169) tmp = t_1; elseif (z <= 3.7e-65) tmp = Float64(x + Float64(z * a)); elseif (z <= 1.0) tmp = t_1; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); tmp = 0.0; if (z <= -2.5e-33) tmp = x - (a + (a / z)); elseif (z <= 2e-169) tmp = t_1; elseif (z <= 3.7e-65) tmp = x + (z * a); elseif (z <= 1.0) tmp = t_1; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e-33], N[(x - N[(a + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e-169], t$95$1, If[LessEqual[z, 3.7e-65], N[(x + N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.0], t$95$1, N[(x - a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{-33}:\\
\;\;\;\;x - \left(a + \frac{a}{z}\right)\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-169}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-65}:\\
\;\;\;\;x + z \cdot a\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.50000000000000014e-33Initial program 97.0%
associate-/r/99.9%
Simplified99.9%
frac-2neg99.9%
div-inv99.7%
+-commutative99.7%
distribute-neg-in99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 61.5%
associate-/l*86.9%
associate--r+86.9%
sub-neg86.9%
metadata-eval86.9%
Simplified86.9%
Taylor expanded in t around 0 78.4%
Taylor expanded in z around inf 78.4%
if -2.50000000000000014e-33 < z < 2.00000000000000004e-169 or 3.7e-65 < z < 1Initial program 99.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 75.0%
Taylor expanded in z around 0 73.5%
if 2.00000000000000004e-169 < z < 3.7e-65Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
frac-2neg100.0%
div-inv99.9%
+-commutative99.9%
distribute-neg-in99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 89.2%
associate-/l*89.2%
associate--r+89.2%
sub-neg89.2%
metadata-eval89.2%
Simplified89.2%
Taylor expanded in t around 0 89.1%
Taylor expanded in z around 0 89.2%
mul-1-neg89.2%
distribute-rgt-neg-out89.2%
Simplified89.2%
if 1 < z Initial program 97.2%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around inf 68.6%
Final simplification74.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -165.0) (not (<= z 150.0))) (+ x (/ a (+ (/ 1.0 z) -1.0))) (- x (* a (/ y (+ t 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -165.0) || !(z <= 150.0)) {
tmp = x + (a / ((1.0 / z) + -1.0));
} else {
tmp = x - (a * (y / (t + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if ((z <= (-165.0d0)) .or. (.not. (z <= 150.0d0))) then
tmp = x + (a / ((1.0d0 / z) + (-1.0d0)))
else
tmp = x - (a * (y / (t + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -165.0) || !(z <= 150.0)) {
tmp = x + (a / ((1.0 / z) + -1.0));
} else {
tmp = x - (a * (y / (t + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -165.0) or not (z <= 150.0): tmp = x + (a / ((1.0 / z) + -1.0)) else: tmp = x - (a * (y / (t + 1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -165.0) || !(z <= 150.0)) tmp = Float64(x + Float64(a / Float64(Float64(1.0 / z) + -1.0))); else tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -165.0) || ~((z <= 150.0))) tmp = x + (a / ((1.0 / z) + -1.0)); else tmp = x - (a * (y / (t + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -165.0], N[Not[LessEqual[z, 150.0]], $MachinePrecision]], N[(x + N[(a / N[(N[(1.0 / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -165 \lor \neg \left(z \leq 150\right):\\
\;\;\;\;x + \frac{a}{\frac{1}{z} + -1}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\end{array}
\end{array}
if z < -165 or 150 < z Initial program 96.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 86.7%
Taylor expanded in y around 0 59.7%
sub-neg59.7%
mul-1-neg59.7%
remove-double-neg59.7%
associate-/l*74.2%
div-sub74.2%
*-inverses74.2%
Simplified74.2%
if -165 < z < 150Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 93.4%
Final simplification83.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -10600.0) (not (<= z 9.2e-34))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -10600.0) || !(z <= 9.2e-34)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if ((z <= (-10600.0d0)) .or. (.not. (z <= 9.2d-34))) then
tmp = x - a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -10600.0) || !(z <= 9.2e-34)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -10600.0) or not (z <= 9.2e-34): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -10600.0) || !(z <= 9.2e-34)) tmp = Float64(x - a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -10600.0) || ~((z <= 9.2e-34))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -10600.0], N[Not[LessEqual[z, 9.2e-34]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -10600 \lor \neg \left(z \leq 9.2 \cdot 10^{-34}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -10600 or 9.20000000000000045e-34 < z Initial program 97.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 72.0%
if -10600 < z < 9.20000000000000045e-34Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in x around inf 63.8%
Final simplification68.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.2e+244) (- a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.2e+244) {
tmp = -a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
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) :: tmp
if (a <= (-6.2d+244)) then
tmp = -a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.2e+244) {
tmp = -a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.2e+244: tmp = -a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.2e+244) tmp = Float64(-a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.2e+244) tmp = -a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.2e+244], (-a), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{+244}:\\
\;\;\;\;-a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.20000000000000001e244Initial program 99.8%
Taylor expanded in z around inf 57.3%
mul-1-neg57.3%
distribute-neg-frac57.3%
Simplified57.3%
Taylor expanded in x around 0 11.8%
Taylor expanded in y around 0 58.3%
neg-mul-158.3%
Simplified58.3%
if -6.20000000000000001e244 < a Initial program 98.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 59.8%
Final simplification59.7%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
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
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 98.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 56.7%
Final simplification56.7%
(FPCore (x y z t a) :precision binary64 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
real(8) function code(x, y, z, t, a)
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
code = x - (((y - z) / ((t - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2024019
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:herbie-target
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))