
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / 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)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / 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)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))))
(if (or (<= t_1 -5e+115) (not (<= t_1 1e+258)))
(+ x (* y (/ (- t z) a)))
(+ x (/ (* y (- t z)) a)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 <= -5e+115) || !(t_1 <= 1e+258)) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + ((y * (t - z)) / 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 = y * (z - t)
if ((t_1 <= (-5d+115)) .or. (.not. (t_1 <= 1d+258))) then
tmp = x + (y * ((t - z) / a))
else
tmp = x + ((y * (t - z)) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 <= -5e+115) || !(t_1 <= 1e+258)) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x + ((y * (t - z)) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if (t_1 <= -5e+115) or not (t_1 <= 1e+258): tmp = x + (y * ((t - z) / a)) else: tmp = x + ((y * (t - z)) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if ((t_1 <= -5e+115) || !(t_1 <= 1e+258)) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x + Float64(Float64(y * Float64(t - z)) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if ((t_1 <= -5e+115) || ~((t_1 <= 1e+258))) tmp = x + (y * ((t - z) / a)); else tmp = x + ((y * (t - z)) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+115], N[Not[LessEqual[t$95$1, 1e+258]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+115} \lor \neg \left(t\_1 \leq 10^{+258}\right):\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -5.00000000000000008e115 or 1.00000000000000006e258 < (*.f64 y (-.f64 z t)) Initial program 77.9%
associate-/l*99.9%
Simplified99.9%
if -5.00000000000000008e115 < (*.f64 y (-.f64 z t)) < 1.00000000000000006e258Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= t -6.5e+137)
t_1
(if (<= t -8.5e-49)
x
(if (<= t -7.2e-193)
(/ (* y z) (- a))
(if (<= t 3.6e-271)
x
(if (<= t 11.0) (* z (/ y (- a))) (if (<= t 1.02e+117) x t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (t <= -6.5e+137) {
tmp = t_1;
} else if (t <= -8.5e-49) {
tmp = x;
} else if (t <= -7.2e-193) {
tmp = (y * z) / -a;
} else if (t <= 3.6e-271) {
tmp = x;
} else if (t <= 11.0) {
tmp = z * (y / -a);
} else if (t <= 1.02e+117) {
tmp = x;
} 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 = t * (y / a)
if (t <= (-6.5d+137)) then
tmp = t_1
else if (t <= (-8.5d-49)) then
tmp = x
else if (t <= (-7.2d-193)) then
tmp = (y * z) / -a
else if (t <= 3.6d-271) then
tmp = x
else if (t <= 11.0d0) then
tmp = z * (y / -a)
else if (t <= 1.02d+117) then
tmp = x
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 = t * (y / a);
double tmp;
if (t <= -6.5e+137) {
tmp = t_1;
} else if (t <= -8.5e-49) {
tmp = x;
} else if (t <= -7.2e-193) {
tmp = (y * z) / -a;
} else if (t <= 3.6e-271) {
tmp = x;
} else if (t <= 11.0) {
tmp = z * (y / -a);
} else if (t <= 1.02e+117) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if t <= -6.5e+137: tmp = t_1 elif t <= -8.5e-49: tmp = x elif t <= -7.2e-193: tmp = (y * z) / -a elif t <= 3.6e-271: tmp = x elif t <= 11.0: tmp = z * (y / -a) elif t <= 1.02e+117: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (t <= -6.5e+137) tmp = t_1; elseif (t <= -8.5e-49) tmp = x; elseif (t <= -7.2e-193) tmp = Float64(Float64(y * z) / Float64(-a)); elseif (t <= 3.6e-271) tmp = x; elseif (t <= 11.0) tmp = Float64(z * Float64(y / Float64(-a))); elseif (t <= 1.02e+117) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (t <= -6.5e+137) tmp = t_1; elseif (t <= -8.5e-49) tmp = x; elseif (t <= -7.2e-193) tmp = (y * z) / -a; elseif (t <= 3.6e-271) tmp = x; elseif (t <= 11.0) tmp = z * (y / -a); elseif (t <= 1.02e+117) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.5e+137], t$95$1, If[LessEqual[t, -8.5e-49], x, If[LessEqual[t, -7.2e-193], N[(N[(y * z), $MachinePrecision] / (-a)), $MachinePrecision], If[LessEqual[t, 3.6e-271], x, If[LessEqual[t, 11.0], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.02e+117], x, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -6.5 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-49}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-193}:\\
\;\;\;\;\frac{y \cdot z}{-a}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-271}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 11:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+117}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.5000000000000002e137 or 1.02e117 < t Initial program 84.0%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in t around inf 63.5%
*-commutative63.5%
Simplified63.5%
*-commutative63.5%
associate-/l*74.3%
Applied egg-rr74.3%
if -6.5000000000000002e137 < t < -8.50000000000000069e-49 or -7.1999999999999998e-193 < t < 3.5999999999999998e-271 or 11 < t < 1.02e117Initial program 91.9%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in x around inf 60.4%
if -8.50000000000000069e-49 < t < -7.1999999999999998e-193Initial program 99.8%
associate-/l*87.6%
Simplified87.6%
clear-num87.4%
un-div-inv88.4%
Applied egg-rr88.4%
Taylor expanded in z around inf 62.6%
associate-*r/50.4%
neg-mul-150.4%
distribute-lft-neg-in50.4%
Simplified50.4%
distribute-lft-neg-out50.4%
associate-/l*62.6%
distribute-neg-frac262.6%
*-commutative62.6%
Applied egg-rr62.6%
if 3.5999999999999998e-271 < t < 11Initial program 96.4%
Taylor expanded in z around inf 94.8%
mul-1-neg94.8%
unsub-neg94.8%
*-commutative94.8%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in z around inf 59.0%
mul-1-neg59.0%
associate-*l/62.6%
distribute-rgt-neg-in62.6%
Simplified62.6%
Final simplification65.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- a)))) (t_2 (* t (/ y a))))
(if (<= t -5.2e+141)
t_2
(if (<= t -9e-49)
x
(if (<= t -6e-195)
t_1
(if (<= t 2.5e-271)
x
(if (<= t 42.0) t_1 (if (<= t 1.2e+117) x t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / -a);
double t_2 = t * (y / a);
double tmp;
if (t <= -5.2e+141) {
tmp = t_2;
} else if (t <= -9e-49) {
tmp = x;
} else if (t <= -6e-195) {
tmp = t_1;
} else if (t <= 2.5e-271) {
tmp = x;
} else if (t <= 42.0) {
tmp = t_1;
} else if (t <= 1.2e+117) {
tmp = x;
} 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 = z * (y / -a)
t_2 = t * (y / a)
if (t <= (-5.2d+141)) then
tmp = t_2
else if (t <= (-9d-49)) then
tmp = x
else if (t <= (-6d-195)) then
tmp = t_1
else if (t <= 2.5d-271) then
tmp = x
else if (t <= 42.0d0) then
tmp = t_1
else if (t <= 1.2d+117) then
tmp = x
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 = z * (y / -a);
double t_2 = t * (y / a);
double tmp;
if (t <= -5.2e+141) {
tmp = t_2;
} else if (t <= -9e-49) {
tmp = x;
} else if (t <= -6e-195) {
tmp = t_1;
} else if (t <= 2.5e-271) {
tmp = x;
} else if (t <= 42.0) {
tmp = t_1;
} else if (t <= 1.2e+117) {
tmp = x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / -a) t_2 = t * (y / a) tmp = 0 if t <= -5.2e+141: tmp = t_2 elif t <= -9e-49: tmp = x elif t <= -6e-195: tmp = t_1 elif t <= 2.5e-271: tmp = x elif t <= 42.0: tmp = t_1 elif t <= 1.2e+117: tmp = x else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(-a))) t_2 = Float64(t * Float64(y / a)) tmp = 0.0 if (t <= -5.2e+141) tmp = t_2; elseif (t <= -9e-49) tmp = x; elseif (t <= -6e-195) tmp = t_1; elseif (t <= 2.5e-271) tmp = x; elseif (t <= 42.0) tmp = t_1; elseif (t <= 1.2e+117) tmp = x; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / -a); t_2 = t * (y / a); tmp = 0.0; if (t <= -5.2e+141) tmp = t_2; elseif (t <= -9e-49) tmp = x; elseif (t <= -6e-195) tmp = t_1; elseif (t <= 2.5e-271) tmp = x; elseif (t <= 42.0) tmp = t_1; elseif (t <= 1.2e+117) tmp = x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+141], t$95$2, If[LessEqual[t, -9e-49], x, If[LessEqual[t, -6e-195], t$95$1, If[LessEqual[t, 2.5e-271], x, If[LessEqual[t, 42.0], t$95$1, If[LessEqual[t, 1.2e+117], x, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{-a}\\
t_2 := t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+141}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-49}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-271}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 42:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+117}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.1999999999999999e141 or 1.1999999999999999e117 < t Initial program 84.0%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in t around inf 63.5%
*-commutative63.5%
Simplified63.5%
*-commutative63.5%
associate-/l*74.3%
Applied egg-rr74.3%
if -5.1999999999999999e141 < t < -9.0000000000000004e-49 or -6e-195 < t < 2.5000000000000001e-271 or 42 < t < 1.1999999999999999e117Initial program 91.9%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in x around inf 60.4%
if -9.0000000000000004e-49 < t < -6e-195 or 2.5000000000000001e-271 < t < 42Initial program 97.6%
Taylor expanded in z around inf 96.6%
mul-1-neg96.6%
unsub-neg96.6%
*-commutative96.6%
associate-/l*96.6%
Simplified96.6%
Taylor expanded in z around inf 60.3%
mul-1-neg60.3%
associate-*l/61.6%
distribute-rgt-neg-in61.6%
Simplified61.6%
Final simplification65.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- a)))) (t_2 (* t (/ y a))))
(if (<= t -8.8e+139)
t_2
(if (<= t -1e-48)
x
(if (<= t -2.3e-192)
t_1
(if (<= t 3.7e-179)
x
(if (<= t 30.0) t_1 (if (<= t 1.02e+117) x t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / -a);
double t_2 = t * (y / a);
double tmp;
if (t <= -8.8e+139) {
tmp = t_2;
} else if (t <= -1e-48) {
tmp = x;
} else if (t <= -2.3e-192) {
tmp = t_1;
} else if (t <= 3.7e-179) {
tmp = x;
} else if (t <= 30.0) {
tmp = t_1;
} else if (t <= 1.02e+117) {
tmp = x;
} 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 = y * (z / -a)
t_2 = t * (y / a)
if (t <= (-8.8d+139)) then
tmp = t_2
else if (t <= (-1d-48)) then
tmp = x
else if (t <= (-2.3d-192)) then
tmp = t_1
else if (t <= 3.7d-179) then
tmp = x
else if (t <= 30.0d0) then
tmp = t_1
else if (t <= 1.02d+117) then
tmp = x
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 = y * (z / -a);
double t_2 = t * (y / a);
double tmp;
if (t <= -8.8e+139) {
tmp = t_2;
} else if (t <= -1e-48) {
tmp = x;
} else if (t <= -2.3e-192) {
tmp = t_1;
} else if (t <= 3.7e-179) {
tmp = x;
} else if (t <= 30.0) {
tmp = t_1;
} else if (t <= 1.02e+117) {
tmp = x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / -a) t_2 = t * (y / a) tmp = 0 if t <= -8.8e+139: tmp = t_2 elif t <= -1e-48: tmp = x elif t <= -2.3e-192: tmp = t_1 elif t <= 3.7e-179: tmp = x elif t <= 30.0: tmp = t_1 elif t <= 1.02e+117: tmp = x else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(-a))) t_2 = Float64(t * Float64(y / a)) tmp = 0.0 if (t <= -8.8e+139) tmp = t_2; elseif (t <= -1e-48) tmp = x; elseif (t <= -2.3e-192) tmp = t_1; elseif (t <= 3.7e-179) tmp = x; elseif (t <= 30.0) tmp = t_1; elseif (t <= 1.02e+117) tmp = x; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / -a); t_2 = t * (y / a); tmp = 0.0; if (t <= -8.8e+139) tmp = t_2; elseif (t <= -1e-48) tmp = x; elseif (t <= -2.3e-192) tmp = t_1; elseif (t <= 3.7e-179) tmp = x; elseif (t <= 30.0) tmp = t_1; elseif (t <= 1.02e+117) tmp = x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.8e+139], t$95$2, If[LessEqual[t, -1e-48], x, If[LessEqual[t, -2.3e-192], t$95$1, If[LessEqual[t, 3.7e-179], x, If[LessEqual[t, 30.0], t$95$1, If[LessEqual[t, 1.02e+117], x, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{-a}\\
t_2 := t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -8.8 \cdot 10^{+139}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-48}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-179}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 30:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{+117}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -8.7999999999999998e139 or 1.02e117 < t Initial program 84.0%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in t around inf 63.5%
*-commutative63.5%
Simplified63.5%
*-commutative63.5%
associate-/l*74.3%
Applied egg-rr74.3%
if -8.7999999999999998e139 < t < -9.9999999999999997e-49 or -2.30000000000000018e-192 < t < 3.6999999999999999e-179 or 30 < t < 1.02e117Initial program 93.0%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in x around inf 57.9%
if -9.9999999999999997e-49 < t < -2.30000000000000018e-192 or 3.6999999999999999e-179 < t < 30Initial program 97.2%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in z around inf 62.8%
mul-1-neg62.8%
associate-/l*58.8%
distribute-rgt-neg-in58.8%
distribute-frac-neg258.8%
Simplified58.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.8e+199)
(* (/ y a) (- t z))
(if (or (<= z -0.019) (not (<= z 2.6e-10)))
(- x (/ y (/ a z)))
(+ x (* y (/ t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+199) {
tmp = (y / a) * (t - z);
} else if ((z <= -0.019) || !(z <= 2.6e-10)) {
tmp = x - (y / (a / z));
} else {
tmp = x + (y * (t / 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 <= (-3.8d+199)) then
tmp = (y / a) * (t - z)
else if ((z <= (-0.019d0)) .or. (.not. (z <= 2.6d-10))) then
tmp = x - (y / (a / z))
else
tmp = x + (y * (t / 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 <= -3.8e+199) {
tmp = (y / a) * (t - z);
} else if ((z <= -0.019) || !(z <= 2.6e-10)) {
tmp = x - (y / (a / z));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+199: tmp = (y / a) * (t - z) elif (z <= -0.019) or not (z <= 2.6e-10): tmp = x - (y / (a / z)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+199) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif ((z <= -0.019) || !(z <= 2.6e-10)) tmp = Float64(x - Float64(y / Float64(a / z))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.8e+199) tmp = (y / a) * (t - z); elseif ((z <= -0.019) || ~((z <= 2.6e-10))) tmp = x - (y / (a / z)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+199], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -0.019], N[Not[LessEqual[z, 2.6e-10]], $MachinePrecision]], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+199}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;z \leq -0.019 \lor \neg \left(z \leq 2.6 \cdot 10^{-10}\right):\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -3.8e199Initial program 89.8%
associate-/l*80.2%
Simplified80.2%
clear-num80.1%
un-div-inv80.0%
Applied egg-rr80.0%
Taylor expanded in x around 0 79.5%
mul-1-neg79.5%
associate-*r/69.9%
distribute-rgt-neg-in69.9%
neg-sub069.9%
div-sub66.3%
associate--r-66.3%
neg-sub066.3%
mul-1-neg66.3%
+-commutative66.3%
mul-1-neg66.3%
sub-neg66.3%
distribute-rgt-out--59.2%
associate-*l/55.9%
*-commutative55.9%
associate-*r/68.5%
associate-*r/68.5%
associate-*l/78.4%
*-commutative78.4%
distribute-rgt-out--89.1%
Simplified89.1%
if -3.8e199 < z < -0.0189999999999999995 or 2.59999999999999981e-10 < z Initial program 91.5%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around inf 81.8%
associate-/l*83.5%
Simplified83.5%
clear-num83.5%
un-div-inv83.8%
Applied egg-rr83.8%
if -0.0189999999999999995 < z < 2.59999999999999981e-10Initial program 91.8%
associate-/l*94.3%
Simplified94.3%
clear-num94.3%
un-div-inv94.3%
Applied egg-rr94.3%
Taylor expanded in z around 0 84.9%
cancel-sign-sub-inv84.9%
metadata-eval84.9%
associate-*l/88.3%
*-commutative88.3%
*-lft-identity88.3%
Simplified88.3%
Final simplification86.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.2e+199)
(* (/ y a) (- t z))
(if (or (<= z -5e-8) (not (<= z 1.85e-10)))
(- x (* y (/ z a)))
(+ x (* y (/ t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+199) {
tmp = (y / a) * (t - z);
} else if ((z <= -5e-8) || !(z <= 1.85e-10)) {
tmp = x - (y * (z / a));
} else {
tmp = x + (y * (t / 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 <= (-1.2d+199)) then
tmp = (y / a) * (t - z)
else if ((z <= (-5d-8)) .or. (.not. (z <= 1.85d-10))) then
tmp = x - (y * (z / a))
else
tmp = x + (y * (t / 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 <= -1.2e+199) {
tmp = (y / a) * (t - z);
} else if ((z <= -5e-8) || !(z <= 1.85e-10)) {
tmp = x - (y * (z / a));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2e+199: tmp = (y / a) * (t - z) elif (z <= -5e-8) or not (z <= 1.85e-10): tmp = x - (y * (z / a)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e+199) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif ((z <= -5e-8) || !(z <= 1.85e-10)) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2e+199) tmp = (y / a) * (t - z); elseif ((z <= -5e-8) || ~((z <= 1.85e-10))) tmp = x - (y * (z / a)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e+199], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -5e-8], N[Not[LessEqual[z, 1.85e-10]], $MachinePrecision]], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+199}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-8} \lor \neg \left(z \leq 1.85 \cdot 10^{-10}\right):\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.20000000000000007e199Initial program 89.8%
associate-/l*80.2%
Simplified80.2%
clear-num80.1%
un-div-inv80.0%
Applied egg-rr80.0%
Taylor expanded in x around 0 79.5%
mul-1-neg79.5%
associate-*r/69.9%
distribute-rgt-neg-in69.9%
neg-sub069.9%
div-sub66.3%
associate--r-66.3%
neg-sub066.3%
mul-1-neg66.3%
+-commutative66.3%
mul-1-neg66.3%
sub-neg66.3%
distribute-rgt-out--59.2%
associate-*l/55.9%
*-commutative55.9%
associate-*r/68.5%
associate-*r/68.5%
associate-*l/78.4%
*-commutative78.4%
distribute-rgt-out--89.1%
Simplified89.1%
if -1.20000000000000007e199 < z < -4.9999999999999998e-8 or 1.85000000000000007e-10 < z Initial program 91.5%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around inf 81.8%
associate-/l*83.5%
Simplified83.5%
if -4.9999999999999998e-8 < z < 1.85000000000000007e-10Initial program 91.8%
associate-/l*94.3%
Simplified94.3%
clear-num94.3%
un-div-inv94.3%
Applied egg-rr94.3%
Taylor expanded in z around 0 84.9%
cancel-sign-sub-inv84.9%
metadata-eval84.9%
associate-*l/88.3%
*-commutative88.3%
*-lft-identity88.3%
Simplified88.3%
Final simplification86.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.8e+42) (not (<= x 4.1e-85))) (+ x (* y (/ t a))) (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.8e+42) || !(x <= 4.1e-85)) {
tmp = x + (y * (t / a));
} else {
tmp = (y / 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) :: tmp
if ((x <= (-2.8d+42)) .or. (.not. (x <= 4.1d-85))) then
tmp = x + (y * (t / a))
else
tmp = (y / a) * (t - z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.8e+42) || !(x <= 4.1e-85)) {
tmp = x + (y * (t / a));
} else {
tmp = (y / a) * (t - z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.8e+42) or not (x <= 4.1e-85): tmp = x + (y * (t / a)) else: tmp = (y / a) * (t - z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.8e+42) || !(x <= 4.1e-85)) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(Float64(y / a) * Float64(t - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.8e+42) || ~((x <= 4.1e-85))) tmp = x + (y * (t / a)); else tmp = (y / a) * (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.8e+42], N[Not[LessEqual[x, 4.1e-85]], $MachinePrecision]], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{+42} \lor \neg \left(x \leq 4.1 \cdot 10^{-85}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if x < -2.7999999999999999e42 or 4.09999999999999994e-85 < x Initial program 93.0%
associate-/l*96.4%
Simplified96.4%
clear-num96.4%
un-div-inv96.4%
Applied egg-rr96.4%
Taylor expanded in z around 0 78.5%
cancel-sign-sub-inv78.5%
metadata-eval78.5%
associate-*l/82.0%
*-commutative82.0%
*-lft-identity82.0%
Simplified82.0%
if -2.7999999999999999e42 < x < 4.09999999999999994e-85Initial program 89.8%
associate-/l*90.7%
Simplified90.7%
clear-num90.6%
un-div-inv90.9%
Applied egg-rr90.9%
Taylor expanded in x around 0 77.9%
mul-1-neg77.9%
associate-*r/78.8%
distribute-rgt-neg-in78.8%
neg-sub078.8%
div-sub77.9%
associate--r-77.9%
neg-sub077.9%
mul-1-neg77.9%
+-commutative77.9%
mul-1-neg77.9%
sub-neg77.9%
distribute-rgt-out--77.1%
associate-*l/73.9%
*-commutative73.9%
associate-*r/76.2%
associate-*r/76.2%
associate-*l/77.5%
*-commutative77.5%
distribute-rgt-out--84.1%
Simplified84.1%
Final simplification83.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.5e-39) (not (<= y 5e-199))) (* y (/ (- t z) a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.5e-39) || !(y <= 5e-199)) {
tmp = y * ((t - z) / 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 ((y <= (-1.5d-39)) .or. (.not. (y <= 5d-199))) then
tmp = y * ((t - z) / 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 ((y <= -1.5e-39) || !(y <= 5e-199)) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.5e-39) or not (y <= 5e-199): tmp = y * ((t - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.5e-39) || !(y <= 5e-199)) tmp = Float64(y * Float64(Float64(t - z) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.5e-39) || ~((y <= 5e-199))) tmp = y * ((t - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.5e-39], N[Not[LessEqual[y, 5e-199]], $MachinePrecision]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{-39} \lor \neg \left(y \leq 5 \cdot 10^{-199}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.50000000000000014e-39 or 4.9999999999999996e-199 < y Initial program 87.7%
associate-/l*96.7%
Simplified96.7%
clear-num96.7%
un-div-inv96.7%
Applied egg-rr96.7%
Taylor expanded in x around 0 67.7%
mul-1-neg67.7%
associate-*r/75.1%
distribute-rgt-neg-in75.1%
neg-sub075.1%
div-sub73.9%
associate--r-73.9%
neg-sub073.9%
mul-1-neg73.9%
+-commutative73.9%
mul-1-neg73.9%
sub-neg73.9%
distribute-rgt-out--70.0%
associate-*l/63.6%
*-commutative63.6%
associate-*r/62.5%
associate-*r/63.5%
associate-*l/65.8%
*-commutative65.8%
distribute-rgt-out--75.0%
Simplified75.0%
Taylor expanded in y around 0 67.7%
associate-/l*75.1%
Simplified75.1%
if -1.50000000000000014e-39 < y < 4.9999999999999996e-199Initial program 99.9%
associate-/l*86.9%
Simplified86.9%
Taylor expanded in x around inf 63.6%
Final simplification71.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -0.0064) (- x (/ z (/ a y))) (if (<= z 1.35e-10) (+ x (* y (/ t a))) (- x (/ y (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.0064) {
tmp = x - (z / (a / y));
} else if (z <= 1.35e-10) {
tmp = x + (y * (t / a));
} else {
tmp = x - (y / (a / 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 (z <= (-0.0064d0)) then
tmp = x - (z / (a / y))
else if (z <= 1.35d-10) then
tmp = x + (y * (t / a))
else
tmp = x - (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -0.0064) {
tmp = x - (z / (a / y));
} else if (z <= 1.35e-10) {
tmp = x + (y * (t / a));
} else {
tmp = x - (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -0.0064: tmp = x - (z / (a / y)) elif z <= 1.35e-10: tmp = x + (y * (t / a)) else: tmp = x - (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -0.0064) tmp = Float64(x - Float64(z / Float64(a / y))); elseif (z <= 1.35e-10) tmp = Float64(x + Float64(y * Float64(t / a))); else tmp = Float64(x - Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -0.0064) tmp = x - (z / (a / y)); elseif (z <= 1.35e-10) tmp = x + (y * (t / a)); else tmp = x - (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -0.0064], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-10], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -0.0064:\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-10}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if z < -0.00640000000000000031Initial program 93.3%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in z around inf 85.4%
div-inv85.4%
*-commutative85.4%
Applied egg-rr85.4%
associate-*l*89.1%
div-inv89.1%
clear-num87.9%
un-div-inv87.9%
Applied egg-rr87.9%
if -0.00640000000000000031 < z < 1.35e-10Initial program 91.8%
associate-/l*94.3%
Simplified94.3%
clear-num94.3%
un-div-inv94.3%
Applied egg-rr94.3%
Taylor expanded in z around 0 84.9%
cancel-sign-sub-inv84.9%
metadata-eval84.9%
associate-*l/88.3%
*-commutative88.3%
*-lft-identity88.3%
Simplified88.3%
if 1.35e-10 < z Initial program 88.7%
associate-/l*97.0%
Simplified97.0%
Taylor expanded in z around inf 78.3%
associate-/l*82.5%
Simplified82.5%
clear-num82.5%
un-div-inv82.9%
Applied egg-rr82.9%
(FPCore (x y z t a) :precision binary64 (if (<= x -3.6e+143) x (if (<= x 2.4e-14) (* (/ y a) (- t z)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.6e+143) {
tmp = x;
} else if (x <= 2.4e-14) {
tmp = (y / a) * (t - z);
} 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 (x <= (-3.6d+143)) then
tmp = x
else if (x <= 2.4d-14) then
tmp = (y / a) * (t - z)
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 (x <= -3.6e+143) {
tmp = x;
} else if (x <= 2.4e-14) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -3.6e+143: tmp = x elif x <= 2.4e-14: tmp = (y / a) * (t - z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -3.6e+143) tmp = x; elseif (x <= 2.4e-14) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -3.6e+143) tmp = x; elseif (x <= 2.4e-14) tmp = (y / a) * (t - z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.6e+143], x, If[LessEqual[x, 2.4e-14], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+143}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-14}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.5999999999999999e143 or 2.4e-14 < x Initial program 92.7%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in x around inf 63.7%
if -3.5999999999999999e143 < x < 2.4e-14Initial program 90.6%
associate-/l*91.3%
Simplified91.3%
clear-num91.2%
un-div-inv91.4%
Applied egg-rr91.4%
Taylor expanded in x around 0 75.1%
mul-1-neg75.1%
associate-*r/76.0%
distribute-rgt-neg-in76.0%
neg-sub076.0%
div-sub74.7%
associate--r-74.7%
neg-sub074.7%
mul-1-neg74.7%
+-commutative74.7%
mul-1-neg74.7%
sub-neg74.7%
distribute-rgt-out--73.4%
associate-*l/70.2%
*-commutative70.2%
associate-*r/72.5%
associate-*r/73.7%
associate-*l/74.1%
*-commutative74.1%
distribute-rgt-out--81.4%
Simplified81.4%
(FPCore (x y z t a) :precision binary64 (if (<= x -6.4e+143) x (if (<= x 1.25e-24) (* t (/ y a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.4e+143) {
tmp = x;
} else if (x <= 1.25e-24) {
tmp = t * (y / 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 (x <= (-6.4d+143)) then
tmp = x
else if (x <= 1.25d-24) then
tmp = t * (y / 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 (x <= -6.4e+143) {
tmp = x;
} else if (x <= 1.25e-24) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.4e+143: tmp = x elif x <= 1.25e-24: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6.4e+143) tmp = x; elseif (x <= 1.25e-24) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -6.4e+143) tmp = x; elseif (x <= 1.25e-24) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.4e+143], x, If[LessEqual[x, 1.25e-24], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+143}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-24}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -6.40000000000000033e143 or 1.24999999999999995e-24 < x Initial program 92.7%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in x around inf 63.7%
if -6.40000000000000033e143 < x < 1.24999999999999995e-24Initial program 90.6%
associate-/l*91.3%
Simplified91.3%
Taylor expanded in t around inf 40.1%
*-commutative40.1%
Simplified40.1%
*-commutative40.1%
associate-/l*46.0%
Applied egg-rr46.0%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ a (- t z)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / (a / (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 + (y / (a / (t - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / (a / (t - z)));
}
def code(x, y, z, t, a): return x + (y / (a / (t - z)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(a / Float64(t - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / (a / (t - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a}{t - z}}
\end{array}
Initial program 91.5%
associate-/l*93.7%
Simplified93.7%
clear-num93.6%
un-div-inv93.7%
Applied egg-rr93.7%
Final simplification93.7%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- t z) a))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((t - z) / 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 * ((t - z) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((t - z) / a));
}
def code(x, y, z, t, a): return x + (y * ((t - z) / a))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(t - z) / a))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((t - z) / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{t - z}{a}
\end{array}
Initial program 91.5%
associate-/l*93.7%
Simplified93.7%
Final simplification93.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 91.5%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in x around inf 36.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(- x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(- x (/ (* y (- z t)) a))
(- x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / 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 / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x - (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x - ((y * (z - t)) / a)
else
tmp = x - (y / 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 / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x - (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x - ((y * (z - t)) / a) else: tmp = x - (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x - Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x - Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x - Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x - (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x - ((y * (z - t)) / a); else tmp = x - (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x - N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{1}{\frac{t\_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x - \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024085
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:alt
(if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))
(- x (/ (* y (- z t)) a)))