
(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 12 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 (/ (- y z) (- -1.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 - (t - z))));
}
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 * ((y - z) / ((-1.0d0) - (t - z))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 - (t - z))));
}
def code(x, y, z, t, a): return x + (a * ((y - z) / (-1.0 - (t - z))))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(y - z) / Float64(-1.0 - Float64(t - z))))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((y - z) / (-1.0 - (t - z)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(-1.0 - N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{y - z}{-1 - \left(t - z\right)}
\end{array}
Initial program 97.6%
associate-/r/99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.1e+51)
(- x a)
(if (<= z 0.00016)
(- x (/ (* y a) t))
(if (or (<= z 2.7e+59) (not (<= z 2.65e+97)))
(- x a)
(* a (/ y (+ z (- -1.0 t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.1e+51) {
tmp = x - a;
} else if (z <= 0.00016) {
tmp = x - ((y * a) / t);
} else if ((z <= 2.7e+59) || !(z <= 2.65e+97)) {
tmp = x - a;
} else {
tmp = a * (y / (z + (-1.0 - t)));
}
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 <= (-3.1d+51)) then
tmp = x - a
else if (z <= 0.00016d0) then
tmp = x - ((y * a) / t)
else if ((z <= 2.7d+59) .or. (.not. (z <= 2.65d+97))) then
tmp = x - a
else
tmp = a * (y / (z + ((-1.0d0) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.1e+51) {
tmp = x - a;
} else if (z <= 0.00016) {
tmp = x - ((y * a) / t);
} else if ((z <= 2.7e+59) || !(z <= 2.65e+97)) {
tmp = x - a;
} else {
tmp = a * (y / (z + (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.1e+51: tmp = x - a elif z <= 0.00016: tmp = x - ((y * a) / t) elif (z <= 2.7e+59) or not (z <= 2.65e+97): tmp = x - a else: tmp = a * (y / (z + (-1.0 - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.1e+51) tmp = Float64(x - a); elseif (z <= 0.00016) tmp = Float64(x - Float64(Float64(y * a) / t)); elseif ((z <= 2.7e+59) || !(z <= 2.65e+97)) tmp = Float64(x - a); else tmp = Float64(a * Float64(y / Float64(z + Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.1e+51) tmp = x - a; elseif (z <= 0.00016) tmp = x - ((y * a) / t); elseif ((z <= 2.7e+59) || ~((z <= 2.65e+97))) tmp = x - a; else tmp = a * (y / (z + (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.1e+51], N[(x - a), $MachinePrecision], If[LessEqual[z, 0.00016], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2.7e+59], N[Not[LessEqual[z, 2.65e+97]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(a * N[(y / N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.1 \cdot 10^{+51}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 0.00016:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+59} \lor \neg \left(z \leq 2.65 \cdot 10^{+97}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{y}{z + \left(-1 - t\right)}\\
\end{array}
\end{array}
if z < -3.10000000000000011e51 or 1.60000000000000013e-4 < z < 2.7000000000000001e59 or 2.6500000000000001e97 < z Initial program 94.5%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around inf 75.7%
if -3.10000000000000011e51 < z < 1.60000000000000013e-4Initial program 99.8%
Taylor expanded in t around inf 69.7%
Taylor expanded in y around inf 65.7%
if 2.7000000000000001e59 < z < 2.6500000000000001e97Initial program 99.7%
sub-neg99.7%
+-commutative99.7%
associate-/r/100.0%
distribute-rgt-neg-in100.0%
associate-*l/99.7%
associate-/l*99.5%
fma-define99.5%
distribute-frac-neg99.5%
distribute-neg-frac299.5%
distribute-neg-in99.5%
sub-neg99.5%
distribute-neg-in99.5%
remove-double-neg99.5%
+-commutative99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 89.3%
associate-/l*89.3%
Simplified89.3%
Final simplification70.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.6e+52)
(- x a)
(if (<= z 1.4e+21)
(+ x (* z (/ a (+ t 1.0))))
(if (or (<= z 2e+59) (not (<= z 2.65e+97)))
(- x a)
(* a (/ y (- z (+ t 1.0))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.6e+52) {
tmp = x - a;
} else if (z <= 1.4e+21) {
tmp = x + (z * (a / (t + 1.0)));
} else if ((z <= 2e+59) || !(z <= 2.65e+97)) {
tmp = x - a;
} else {
tmp = a * (y / (z - (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 <= (-4.6d+52)) then
tmp = x - a
else if (z <= 1.4d+21) then
tmp = x + (z * (a / (t + 1.0d0)))
else if ((z <= 2d+59) .or. (.not. (z <= 2.65d+97))) then
tmp = x - a
else
tmp = a * (y / (z - (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 <= -4.6e+52) {
tmp = x - a;
} else if (z <= 1.4e+21) {
tmp = x + (z * (a / (t + 1.0)));
} else if ((z <= 2e+59) || !(z <= 2.65e+97)) {
tmp = x - a;
} else {
tmp = a * (y / (z - (t + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.6e+52: tmp = x - a elif z <= 1.4e+21: tmp = x + (z * (a / (t + 1.0))) elif (z <= 2e+59) or not (z <= 2.65e+97): tmp = x - a else: tmp = a * (y / (z - (t + 1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.6e+52) tmp = Float64(x - a); elseif (z <= 1.4e+21) tmp = Float64(x + Float64(z * Float64(a / Float64(t + 1.0)))); elseif ((z <= 2e+59) || !(z <= 2.65e+97)) tmp = Float64(x - a); else tmp = Float64(a * Float64(y / Float64(z - Float64(t + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.6e+52) tmp = x - a; elseif (z <= 1.4e+21) tmp = x + (z * (a / (t + 1.0))); elseif ((z <= 2e+59) || ~((z <= 2.65e+97))) tmp = x - a; else tmp = a * (y / (z - (t + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.6e+52], N[(x - a), $MachinePrecision], If[LessEqual[z, 1.4e+21], N[(x + N[(z * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 2e+59], N[Not[LessEqual[z, 2.65e+97]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(a * N[(y / N[(z - N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+52}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+21}:\\
\;\;\;\;x + z \cdot \frac{a}{t + 1}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+59} \lor \neg \left(z \leq 2.65 \cdot 10^{+97}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{y}{z - \left(t + 1\right)}\\
\end{array}
\end{array}
if z < -4.6e52 or 1.4e21 < z < 1.99999999999999994e59 or 2.6500000000000001e97 < z Initial program 94.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.1%
if -4.6e52 < z < 1.4e21Initial program 99.8%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 68.1%
associate-*r/68.1%
mul-1-neg68.1%
associate--l+68.1%
distribute-neg-in68.1%
metadata-eval68.1%
unsub-neg68.1%
Simplified68.1%
Taylor expanded in z around 0 65.7%
mul-1-neg65.7%
*-commutative65.7%
associate-/l*67.6%
distribute-rgt-neg-out67.6%
distribute-neg-frac267.6%
distribute-neg-in67.6%
metadata-eval67.6%
sub-neg67.6%
Simplified67.6%
if 1.99999999999999994e59 < z < 2.6500000000000001e97Initial program 99.7%
sub-neg99.7%
+-commutative99.7%
associate-/r/100.0%
distribute-rgt-neg-in100.0%
associate-*l/99.7%
associate-/l*99.5%
fma-define99.5%
distribute-frac-neg99.5%
distribute-neg-frac299.5%
distribute-neg-in99.5%
sub-neg99.5%
distribute-neg-in99.5%
remove-double-neg99.5%
+-commutative99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around inf 89.3%
associate-/l*89.3%
Simplified89.3%
Final simplification72.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* a (/ (- y z) t)))))
(if (<= t -68000000000000.0)
t_1
(if (<= t 1.66e-209)
(- x a)
(if (<= t 5.3e-160)
(* a (/ y (- -1.0 t)))
(if (<= t 3e+14) (- x a) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a * ((y - z) / t));
double tmp;
if (t <= -68000000000000.0) {
tmp = t_1;
} else if (t <= 1.66e-209) {
tmp = x - a;
} else if (t <= 5.3e-160) {
tmp = a * (y / (-1.0 - t));
} else if (t <= 3e+14) {
tmp = x - a;
} 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) :: tmp
t_1 = x - (a * ((y - z) / t))
if (t <= (-68000000000000.0d0)) then
tmp = t_1
else if (t <= 1.66d-209) then
tmp = x - a
else if (t <= 5.3d-160) then
tmp = a * (y / ((-1.0d0) - t))
else if (t <= 3d+14) then
tmp = x - a
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 - (a * ((y - z) / t));
double tmp;
if (t <= -68000000000000.0) {
tmp = t_1;
} else if (t <= 1.66e-209) {
tmp = x - a;
} else if (t <= 5.3e-160) {
tmp = a * (y / (-1.0 - t));
} else if (t <= 3e+14) {
tmp = x - a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a * ((y - z) / t)) tmp = 0 if t <= -68000000000000.0: tmp = t_1 elif t <= 1.66e-209: tmp = x - a elif t <= 5.3e-160: tmp = a * (y / (-1.0 - t)) elif t <= 3e+14: tmp = x - a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a * Float64(Float64(y - z) / t))) tmp = 0.0 if (t <= -68000000000000.0) tmp = t_1; elseif (t <= 1.66e-209) tmp = Float64(x - a); elseif (t <= 5.3e-160) tmp = Float64(a * Float64(y / Float64(-1.0 - t))); elseif (t <= 3e+14) tmp = Float64(x - a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a * ((y - z) / t)); tmp = 0.0; if (t <= -68000000000000.0) tmp = t_1; elseif (t <= 1.66e-209) tmp = x - a; elseif (t <= 5.3e-160) tmp = a * (y / (-1.0 - t)); elseif (t <= 3e+14) tmp = x - a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -68000000000000.0], t$95$1, If[LessEqual[t, 1.66e-209], N[(x - a), $MachinePrecision], If[LessEqual[t, 5.3e-160], N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e+14], N[(x - a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - a \cdot \frac{y - z}{t}\\
\mathbf{if}\;t \leq -68000000000000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.66 \cdot 10^{-209}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 5.3 \cdot 10^{-160}:\\
\;\;\;\;a \cdot \frac{y}{-1 - t}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+14}:\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.8e13 or 3e14 < t Initial program 96.6%
associate-/r/99.7%
Simplified99.7%
Taylor expanded in t around inf 86.5%
if -6.8e13 < t < 1.66e-209 or 5.3000000000000001e-160 < t < 3e14Initial program 98.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 63.7%
if 1.66e-209 < t < 5.3000000000000001e-160Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
associate-/r/100.0%
distribute-rgt-neg-in100.0%
associate-*l/100.0%
associate-/l*100.0%
fma-define100.0%
distribute-frac-neg100.0%
distribute-neg-frac2100.0%
distribute-neg-in100.0%
sub-neg100.0%
distribute-neg-in100.0%
remove-double-neg100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 75.8%
associate-/l*75.8%
Simplified75.8%
Taylor expanded in z around 0 75.8%
mul-1-neg75.8%
associate-/l*75.8%
distribute-rgt-neg-in75.8%
distribute-neg-frac275.8%
distribute-neg-in75.8%
metadata-eval75.8%
unsub-neg75.8%
Simplified75.8%
Final simplification74.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- z y) (/ t a)))) (t_2 (- x (- a (* a (/ y z))))))
(if (<= z -1.8e+51)
t_2
(if (<= z -9.6e-293)
t_1
(if (<= z 3.2e-114)
(+ x (* z (/ a (+ t 1.0))))
(if (<= z 1e+21) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - y) / (t / a));
double t_2 = x - (a - (a * (y / z)));
double tmp;
if (z <= -1.8e+51) {
tmp = t_2;
} else if (z <= -9.6e-293) {
tmp = t_1;
} else if (z <= 3.2e-114) {
tmp = x + (z * (a / (t + 1.0)));
} else if (z <= 1e+21) {
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 + ((z - y) / (t / a))
t_2 = x - (a - (a * (y / z)))
if (z <= (-1.8d+51)) then
tmp = t_2
else if (z <= (-9.6d-293)) then
tmp = t_1
else if (z <= 3.2d-114) then
tmp = x + (z * (a / (t + 1.0d0)))
else if (z <= 1d+21) 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 + ((z - y) / (t / a));
double t_2 = x - (a - (a * (y / z)));
double tmp;
if (z <= -1.8e+51) {
tmp = t_2;
} else if (z <= -9.6e-293) {
tmp = t_1;
} else if (z <= 3.2e-114) {
tmp = x + (z * (a / (t + 1.0)));
} else if (z <= 1e+21) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - y) / (t / a)) t_2 = x - (a - (a * (y / z))) tmp = 0 if z <= -1.8e+51: tmp = t_2 elif z <= -9.6e-293: tmp = t_1 elif z <= 3.2e-114: tmp = x + (z * (a / (t + 1.0))) elif z <= 1e+21: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - y) / Float64(t / a))) t_2 = Float64(x - Float64(a - Float64(a * Float64(y / z)))) tmp = 0.0 if (z <= -1.8e+51) tmp = t_2; elseif (z <= -9.6e-293) tmp = t_1; elseif (z <= 3.2e-114) tmp = Float64(x + Float64(z * Float64(a / Float64(t + 1.0)))); elseif (z <= 1e+21) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - y) / (t / a)); t_2 = x - (a - (a * (y / z))); tmp = 0.0; if (z <= -1.8e+51) tmp = t_2; elseif (z <= -9.6e-293) tmp = t_1; elseif (z <= 3.2e-114) tmp = x + (z * (a / (t + 1.0))); elseif (z <= 1e+21) 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[(N[(z - y), $MachinePrecision] / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(a - N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+51], t$95$2, If[LessEqual[z, -9.6e-293], t$95$1, If[LessEqual[z, 3.2e-114], N[(x + N[(z * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+21], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z - y}{\frac{t}{a}}\\
t_2 := x - \left(a - a \cdot \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+51}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -9.6 \cdot 10^{-293}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-114}:\\
\;\;\;\;x + z \cdot \frac{a}{t + 1}\\
\mathbf{elif}\;z \leq 10^{+21}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.80000000000000005e51 or 1e21 < z Initial program 94.5%
Taylor expanded in z around inf 80.6%
mul-1-neg80.6%
Simplified80.6%
Taylor expanded in y around 0 80.8%
mul-1-neg80.8%
unsub-neg80.8%
associate-/l*84.3%
Simplified84.3%
if -1.80000000000000005e51 < z < -9.5999999999999996e-293 or 3.2000000000000002e-114 < z < 1e21Initial program 99.8%
Taylor expanded in t around inf 74.8%
if -9.5999999999999996e-293 < z < 3.2000000000000002e-114Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
*-commutative100.0%
clear-num99.8%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 69.6%
associate-*r/69.6%
mul-1-neg69.6%
associate--l+69.6%
distribute-neg-in69.6%
metadata-eval69.6%
unsub-neg69.6%
Simplified69.6%
Taylor expanded in z around 0 69.6%
mul-1-neg69.6%
*-commutative69.6%
associate-/l*69.6%
distribute-rgt-neg-out69.6%
distribute-neg-frac269.6%
distribute-neg-in69.6%
metadata-eval69.6%
sub-neg69.6%
Simplified69.6%
Final simplification77.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* a (/ (- y z) (- -1.0 (- t z))))))
(if (<= a -8.8e+38)
t_1
(if (<= a 2.2e+24)
(- x (/ (* z a) (+ z -1.0)))
(if (<= a 1.35e+135) (+ x (* z (/ a (+ t 1.0)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a * ((y - z) / (-1.0 - (t - z)));
double tmp;
if (a <= -8.8e+38) {
tmp = t_1;
} else if (a <= 2.2e+24) {
tmp = x - ((z * a) / (z + -1.0));
} else if (a <= 1.35e+135) {
tmp = x + (z * (a / (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) :: tmp
t_1 = a * ((y - z) / ((-1.0d0) - (t - z)))
if (a <= (-8.8d+38)) then
tmp = t_1
else if (a <= 2.2d+24) then
tmp = x - ((z * a) / (z + (-1.0d0)))
else if (a <= 1.35d+135) then
tmp = x + (z * (a / (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 = a * ((y - z) / (-1.0 - (t - z)));
double tmp;
if (a <= -8.8e+38) {
tmp = t_1;
} else if (a <= 2.2e+24) {
tmp = x - ((z * a) / (z + -1.0));
} else if (a <= 1.35e+135) {
tmp = x + (z * (a / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a * ((y - z) / (-1.0 - (t - z))) tmp = 0 if a <= -8.8e+38: tmp = t_1 elif a <= 2.2e+24: tmp = x - ((z * a) / (z + -1.0)) elif a <= 1.35e+135: tmp = x + (z * (a / (t + 1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(a * Float64(Float64(y - z) / Float64(-1.0 - Float64(t - z)))) tmp = 0.0 if (a <= -8.8e+38) tmp = t_1; elseif (a <= 2.2e+24) tmp = Float64(x - Float64(Float64(z * a) / Float64(z + -1.0))); elseif (a <= 1.35e+135) tmp = Float64(x + Float64(z * Float64(a / Float64(t + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a * ((y - z) / (-1.0 - (t - z))); tmp = 0.0; if (a <= -8.8e+38) tmp = t_1; elseif (a <= 2.2e+24) tmp = x - ((z * a) / (z + -1.0)); elseif (a <= 1.35e+135) tmp = x + (z * (a / (t + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(N[(y - z), $MachinePrecision] / N[(-1.0 - N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.8e+38], t$95$1, If[LessEqual[a, 2.2e+24], N[(x - N[(N[(z * a), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e+135], N[(x + N[(z * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \frac{y - z}{-1 - \left(t - z\right)}\\
\mathbf{if}\;a \leq -8.8 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+24}:\\
\;\;\;\;x - \frac{z \cdot a}{z + -1}\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+135}:\\
\;\;\;\;x + z \cdot \frac{a}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.80000000000000026e38 or 1.34999999999999992e135 < a Initial program 99.7%
sub-neg99.7%
+-commutative99.7%
associate-/r/99.6%
distribute-rgt-neg-in99.6%
associate-*l/63.7%
associate-/l*99.8%
fma-define99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
distribute-neg-in99.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 82.3%
div-sub82.3%
+-commutative82.3%
metadata-eval82.3%
sub-neg82.3%
associate-+l-82.3%
+-commutative82.3%
Simplified82.3%
if -8.80000000000000026e38 < a < 2.20000000000000002e24Initial program 96.0%
associate-/r/99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 85.0%
associate-*r/85.0%
mul-1-neg85.0%
associate--l+85.0%
distribute-neg-in85.0%
metadata-eval85.0%
unsub-neg85.0%
Simplified85.0%
Taylor expanded in t around 0 81.1%
if 2.20000000000000002e24 < a < 1.34999999999999992e135Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 85.5%
associate-*r/85.5%
mul-1-neg85.5%
associate--l+85.5%
distribute-neg-in85.5%
metadata-eval85.5%
unsub-neg85.5%
Simplified85.5%
Taylor expanded in z around 0 66.6%
mul-1-neg66.6%
*-commutative66.6%
associate-/l*70.1%
distribute-rgt-neg-out70.1%
distribute-neg-frac270.1%
distribute-neg-in70.1%
metadata-eval70.1%
sub-neg70.1%
Simplified70.1%
Final simplification80.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- -1.0 (- t z))))
(if (or (<= a -1.05e+55) (not (<= a 4.5e+166)))
(* a (/ (- y z) t_1))
(- x (/ a (/ t_1 z))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 - (t - z);
double tmp;
if ((a <= -1.05e+55) || !(a <= 4.5e+166)) {
tmp = a * ((y - z) / t_1);
} else {
tmp = x - (a / (t_1 / 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 = (-1.0d0) - (t - z)
if ((a <= (-1.05d+55)) .or. (.not. (a <= 4.5d+166))) then
tmp = a * ((y - z) / t_1)
else
tmp = x - (a / (t_1 / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -1.0 - (t - z);
double tmp;
if ((a <= -1.05e+55) || !(a <= 4.5e+166)) {
tmp = a * ((y - z) / t_1);
} else {
tmp = x - (a / (t_1 / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -1.0 - (t - z) tmp = 0 if (a <= -1.05e+55) or not (a <= 4.5e+166): tmp = a * ((y - z) / t_1) else: tmp = x - (a / (t_1 / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(-1.0 - Float64(t - z)) tmp = 0.0 if ((a <= -1.05e+55) || !(a <= 4.5e+166)) tmp = Float64(a * Float64(Float64(y - z) / t_1)); else tmp = Float64(x - Float64(a / Float64(t_1 / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -1.0 - (t - z); tmp = 0.0; if ((a <= -1.05e+55) || ~((a <= 4.5e+166))) tmp = a * ((y - z) / t_1); else tmp = x - (a / (t_1 / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(-1.0 - N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -1.05e+55], N[Not[LessEqual[a, 4.5e+166]], $MachinePrecision]], N[(a * N[(N[(y - z), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(x - N[(a / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -1 - \left(t - z\right)\\
\mathbf{if}\;a \leq -1.05 \cdot 10^{+55} \lor \neg \left(a \leq 4.5 \cdot 10^{+166}\right):\\
\;\;\;\;a \cdot \frac{y - z}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{t\_1}{z}}\\
\end{array}
\end{array}
if a < -1.05e55 or 4.5000000000000003e166 < a Initial program 99.7%
sub-neg99.7%
+-commutative99.7%
associate-/r/99.6%
distribute-rgt-neg-in99.6%
associate-*l/63.7%
associate-/l*99.9%
fma-define99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
distribute-neg-in99.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 84.2%
div-sub84.2%
+-commutative84.2%
metadata-eval84.2%
sub-neg84.2%
associate-+l-84.2%
+-commutative84.2%
Simplified84.2%
if -1.05e55 < a < 4.5000000000000003e166Initial program 96.8%
associate-/r/99.9%
Simplified99.9%
*-commutative99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 84.6%
associate-*r/84.6%
mul-1-neg84.6%
associate--l+84.6%
distribute-neg-in84.6%
metadata-eval84.6%
unsub-neg84.6%
Simplified84.6%
Final simplification84.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3e+51) (not (<= z 1.35e+21))) (+ x (- (* a (/ y z)) a)) (- x (* a (/ (- y z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3e+51) || !(z <= 1.35e+21)) {
tmp = x + ((a * (y / z)) - a);
} else {
tmp = x - (a * ((y - z) / t));
}
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 <= (-3d+51)) .or. (.not. (z <= 1.35d+21))) then
tmp = x + ((a * (y / z)) - a)
else
tmp = x - (a * ((y - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3e+51) || !(z <= 1.35e+21)) {
tmp = x + ((a * (y / z)) - a);
} else {
tmp = x - (a * ((y - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3e+51) or not (z <= 1.35e+21): tmp = x + ((a * (y / z)) - a) else: tmp = x - (a * ((y - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3e+51) || !(z <= 1.35e+21)) tmp = Float64(x + Float64(Float64(a * Float64(y / z)) - a)); else tmp = Float64(x - Float64(a * Float64(Float64(y - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3e+51) || ~((z <= 1.35e+21))) tmp = x + ((a * (y / z)) - a); else tmp = x - (a * ((y - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3e+51], N[Not[LessEqual[z, 1.35e+21]], $MachinePrecision]], N[(x + N[(N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+51} \lor \neg \left(z \leq 1.35 \cdot 10^{+21}\right):\\
\;\;\;\;x + \left(a \cdot \frac{y}{z} - a\right)\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{y - z}{t}\\
\end{array}
\end{array}
if z < -3e51 or 1.35e21 < z Initial program 94.5%
Taylor expanded in z around inf 80.6%
mul-1-neg80.6%
Simplified80.6%
Taylor expanded in y around 0 80.8%
mul-1-neg80.8%
unsub-neg80.8%
associate-/l*84.3%
Simplified84.3%
if -3e51 < z < 1.35e21Initial program 99.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 68.7%
Final simplification75.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.8e+51) (not (<= z 1.35e+21))) (- x (- a (* a (/ y z)))) (+ x (/ a (/ t (- z y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.8e+51) || !(z <= 1.35e+21)) {
tmp = x - (a - (a * (y / z)));
} else {
tmp = x + (a / (t / (z - y)));
}
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 <= (-1.8d+51)) .or. (.not. (z <= 1.35d+21))) then
tmp = x - (a - (a * (y / z)))
else
tmp = x + (a / (t / (z - y)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.8e+51) || !(z <= 1.35e+21)) {
tmp = x - (a - (a * (y / z)));
} else {
tmp = x + (a / (t / (z - y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.8e+51) or not (z <= 1.35e+21): tmp = x - (a - (a * (y / z))) else: tmp = x + (a / (t / (z - y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.8e+51) || !(z <= 1.35e+21)) tmp = Float64(x - Float64(a - Float64(a * Float64(y / z)))); else tmp = Float64(x + Float64(a / Float64(t / Float64(z - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.8e+51) || ~((z <= 1.35e+21))) tmp = x - (a - (a * (y / z))); else tmp = x + (a / (t / (z - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.8e+51], N[Not[LessEqual[z, 1.35e+21]], $MachinePrecision]], N[(x - N[(a - N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a / N[(t / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+51} \lor \neg \left(z \leq 1.35 \cdot 10^{+21}\right):\\
\;\;\;\;x - \left(a - a \cdot \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z - y}}\\
\end{array}
\end{array}
if z < -1.80000000000000005e51 or 1.35e21 < z Initial program 94.5%
Taylor expanded in z around inf 80.6%
mul-1-neg80.6%
Simplified80.6%
Taylor expanded in y around 0 80.8%
mul-1-neg80.8%
unsub-neg80.8%
associate-/l*84.3%
Simplified84.3%
if -1.80000000000000005e51 < z < 1.35e21Initial program 99.8%
associate-/r/99.8%
Simplified99.8%
*-commutative99.8%
clear-num99.7%
un-div-inv99.7%
Applied egg-rr99.7%
Taylor expanded in t around inf 69.3%
Final simplification75.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.6e+51) (not (<= z 0.00018))) (- x a) (- x (/ (* y a) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.6e+51) || !(z <= 0.00018)) {
tmp = x - a;
} else {
tmp = x - ((y * a) / t);
}
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 <= (-2.6d+51)) .or. (.not. (z <= 0.00018d0))) then
tmp = x - a
else
tmp = x - ((y * a) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.6e+51) || !(z <= 0.00018)) {
tmp = x - a;
} else {
tmp = x - ((y * a) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.6e+51) or not (z <= 0.00018): tmp = x - a else: tmp = x - ((y * a) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.6e+51) || !(z <= 0.00018)) tmp = Float64(x - a); else tmp = Float64(x - Float64(Float64(y * a) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.6e+51) || ~((z <= 0.00018))) tmp = x - a; else tmp = x - ((y * a) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.6e+51], N[Not[LessEqual[z, 0.00018]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+51} \lor \neg \left(z \leq 0.00018\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\end{array}
\end{array}
if z < -2.6000000000000001e51 or 1.80000000000000011e-4 < z Initial program 94.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around inf 72.1%
if -2.6000000000000001e51 < z < 1.80000000000000011e-4Initial program 99.8%
Taylor expanded in t around inf 69.7%
Taylor expanded in y around inf 65.7%
Final simplification68.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.8e+51) (not (<= z 0.00018))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.8e+51) || !(z <= 0.00018)) {
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 <= (-1.8d+51)) .or. (.not. (z <= 0.00018d0))) 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 <= -1.8e+51) || !(z <= 0.00018)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.8e+51) or not (z <= 0.00018): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.8e+51) || !(z <= 0.00018)) 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 <= -1.8e+51) || ~((z <= 0.00018))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.8e+51], N[Not[LessEqual[z, 0.00018]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+51} \lor \neg \left(z \leq 0.00018\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.80000000000000005e51 or 1.80000000000000011e-4 < z Initial program 94.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around inf 72.1%
if -1.80000000000000005e51 < z < 1.80000000000000011e-4Initial program 99.8%
sub-neg99.8%
+-commutative99.8%
associate-/r/99.8%
distribute-rgt-neg-in99.8%
associate-*l/95.5%
associate-/l*99.9%
fma-define99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
distribute-neg-in99.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 62.7%
Final simplification66.8%
(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 97.6%
sub-neg97.6%
+-commutative97.6%
associate-/r/99.8%
distribute-rgt-neg-in99.8%
associate-*l/86.3%
associate-/l*98.5%
fma-define98.5%
distribute-frac-neg98.5%
distribute-neg-frac298.5%
distribute-neg-in98.5%
sub-neg98.5%
distribute-neg-in98.5%
remove-double-neg98.5%
+-commutative98.5%
sub-neg98.5%
metadata-eval98.5%
Simplified98.5%
Taylor expanded in a around 0 55.9%
Final simplification55.9%
(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 2024095
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))