
(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 15 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 -2e+167) (not (<= t_1 1e+156)))
(+ x (/ y (/ a (- t z))))
(+ 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 <= -2e+167) || !(t_1 <= 1e+156)) {
tmp = x + (y / (a / (t - z)));
} 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 <= (-2d+167)) .or. (.not. (t_1 <= 1d+156))) then
tmp = x + (y / (a / (t - z)))
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 <= -2e+167) || !(t_1 <= 1e+156)) {
tmp = x + (y / (a / (t - z)));
} 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 <= -2e+167) or not (t_1 <= 1e+156): tmp = x + (y / (a / (t - z))) 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 <= -2e+167) || !(t_1 <= 1e+156)) tmp = Float64(x + Float64(y / Float64(a / Float64(t - z)))); 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 <= -2e+167) || ~((t_1 <= 1e+156))) tmp = x + (y / (a / (t - z))); 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, -2e+167], N[Not[LessEqual[t$95$1, 1e+156]], $MachinePrecision]], N[(x + N[(y / N[(a / N[(t - z), $MachinePrecision]), $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 -2 \cdot 10^{+167} \lor \neg \left(t\_1 \leq 10^{+156}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{t - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -2.0000000000000001e167 or 9.9999999999999998e155 < (*.f64 y (-.f64 z t)) Initial program 85.8%
associate-/l*99.9%
Simplified99.9%
clear-num99.8%
un-div-inv100.0%
Applied egg-rr100.0%
if -2.0000000000000001e167 < (*.f64 y (-.f64 z t)) < 9.9999999999999998e155Initial program 99.4%
Final simplification99.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- a)))) (t_2 (* t (/ y a))))
(if (<= y -1700.0)
t_2
(if (<= y -1e-24)
t_1
(if (<= y -6.2e-52)
t_2
(if (<= y -5.2e-87)
x
(if (<= y -2.85e-117)
(/ (* y t) a)
(if (<= y 2.75e-14)
x
(if (<= y 6.9e+198) (* y (/ t a)) t_1)))))))))
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 (y <= -1700.0) {
tmp = t_2;
} else if (y <= -1e-24) {
tmp = t_1;
} else if (y <= -6.2e-52) {
tmp = t_2;
} else if (y <= -5.2e-87) {
tmp = x;
} else if (y <= -2.85e-117) {
tmp = (y * t) / a;
} else if (y <= 2.75e-14) {
tmp = x;
} else if (y <= 6.9e+198) {
tmp = y * (t / 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) :: t_2
real(8) :: tmp
t_1 = y * (z / -a)
t_2 = t * (y / a)
if (y <= (-1700.0d0)) then
tmp = t_2
else if (y <= (-1d-24)) then
tmp = t_1
else if (y <= (-6.2d-52)) then
tmp = t_2
else if (y <= (-5.2d-87)) then
tmp = x
else if (y <= (-2.85d-117)) then
tmp = (y * t) / a
else if (y <= 2.75d-14) then
tmp = x
else if (y <= 6.9d+198) then
tmp = y * (t / 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 = y * (z / -a);
double t_2 = t * (y / a);
double tmp;
if (y <= -1700.0) {
tmp = t_2;
} else if (y <= -1e-24) {
tmp = t_1;
} else if (y <= -6.2e-52) {
tmp = t_2;
} else if (y <= -5.2e-87) {
tmp = x;
} else if (y <= -2.85e-117) {
tmp = (y * t) / a;
} else if (y <= 2.75e-14) {
tmp = x;
} else if (y <= 6.9e+198) {
tmp = y * (t / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / -a) t_2 = t * (y / a) tmp = 0 if y <= -1700.0: tmp = t_2 elif y <= -1e-24: tmp = t_1 elif y <= -6.2e-52: tmp = t_2 elif y <= -5.2e-87: tmp = x elif y <= -2.85e-117: tmp = (y * t) / a elif y <= 2.75e-14: tmp = x elif y <= 6.9e+198: tmp = y * (t / a) else: tmp = t_1 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 (y <= -1700.0) tmp = t_2; elseif (y <= -1e-24) tmp = t_1; elseif (y <= -6.2e-52) tmp = t_2; elseif (y <= -5.2e-87) tmp = x; elseif (y <= -2.85e-117) tmp = Float64(Float64(y * t) / a); elseif (y <= 2.75e-14) tmp = x; elseif (y <= 6.9e+198) tmp = Float64(y * Float64(t / a)); else tmp = t_1; 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 (y <= -1700.0) tmp = t_2; elseif (y <= -1e-24) tmp = t_1; elseif (y <= -6.2e-52) tmp = t_2; elseif (y <= -5.2e-87) tmp = x; elseif (y <= -2.85e-117) tmp = (y * t) / a; elseif (y <= 2.75e-14) tmp = x; elseif (y <= 6.9e+198) tmp = y * (t / a); else tmp = t_1; 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[y, -1700.0], t$95$2, If[LessEqual[y, -1e-24], t$95$1, If[LessEqual[y, -6.2e-52], t$95$2, If[LessEqual[y, -5.2e-87], x, If[LessEqual[y, -2.85e-117], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 2.75e-14], x, If[LessEqual[y, 6.9e+198], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{-a}\\
t_2 := t \cdot \frac{y}{a}\\
\mathbf{if}\;y \leq -1700:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-52}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-87}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.85 \cdot 10^{-117}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.9 \cdot 10^{+198}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1700 or -9.99999999999999924e-25 < y < -6.1999999999999998e-52Initial program 88.8%
associate-/l*99.9%
Simplified99.9%
associate-*r/88.8%
clear-num88.8%
Applied egg-rr88.8%
Taylor expanded in t around inf 49.2%
associate-*r/60.5%
Simplified60.5%
if -1700 < y < -9.99999999999999924e-25 or 6.89999999999999963e198 < y Initial program 89.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 64.6%
mul-1-neg64.6%
associate-/l*71.2%
distribute-rgt-neg-in71.2%
distribute-frac-neg271.2%
Simplified71.2%
if -6.1999999999999998e-52 < y < -5.20000000000000005e-87 or -2.85e-117 < y < 2.74999999999999996e-14Initial program 99.2%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in x around inf 69.2%
if -5.20000000000000005e-87 < y < -2.85e-117Initial program 99.5%
associate-/l*79.3%
Simplified79.3%
Taylor expanded in t around inf 67.4%
*-commutative67.4%
Simplified67.4%
if 2.74999999999999996e-14 < y < 6.89999999999999963e198Initial program 91.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 50.1%
*-commutative50.1%
associate-/l*58.1%
Simplified58.1%
Final simplification65.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= y -1920.0)
t_1
(if (<= y -1.3e-38)
(/ (* y (- z)) a)
(if (<= y -3.9e-53)
t_1
(if (<= y -4.2e-85)
x
(if (<= y -2.15e-117)
(/ (* y t) a)
(if (<= y 2.35e-14)
x
(if (<= y 1.26e+199) (* y (/ t a)) (* y (/ z (- a))))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (y <= -1920.0) {
tmp = t_1;
} else if (y <= -1.3e-38) {
tmp = (y * -z) / a;
} else if (y <= -3.9e-53) {
tmp = t_1;
} else if (y <= -4.2e-85) {
tmp = x;
} else if (y <= -2.15e-117) {
tmp = (y * t) / a;
} else if (y <= 2.35e-14) {
tmp = x;
} else if (y <= 1.26e+199) {
tmp = y * (t / a);
} else {
tmp = y * (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 = t * (y / a)
if (y <= (-1920.0d0)) then
tmp = t_1
else if (y <= (-1.3d-38)) then
tmp = (y * -z) / a
else if (y <= (-3.9d-53)) then
tmp = t_1
else if (y <= (-4.2d-85)) then
tmp = x
else if (y <= (-2.15d-117)) then
tmp = (y * t) / a
else if (y <= 2.35d-14) then
tmp = x
else if (y <= 1.26d+199) then
tmp = y * (t / a)
else
tmp = y * (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 = t * (y / a);
double tmp;
if (y <= -1920.0) {
tmp = t_1;
} else if (y <= -1.3e-38) {
tmp = (y * -z) / a;
} else if (y <= -3.9e-53) {
tmp = t_1;
} else if (y <= -4.2e-85) {
tmp = x;
} else if (y <= -2.15e-117) {
tmp = (y * t) / a;
} else if (y <= 2.35e-14) {
tmp = x;
} else if (y <= 1.26e+199) {
tmp = y * (t / a);
} else {
tmp = y * (z / -a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if y <= -1920.0: tmp = t_1 elif y <= -1.3e-38: tmp = (y * -z) / a elif y <= -3.9e-53: tmp = t_1 elif y <= -4.2e-85: tmp = x elif y <= -2.15e-117: tmp = (y * t) / a elif y <= 2.35e-14: tmp = x elif y <= 1.26e+199: tmp = y * (t / a) else: tmp = y * (z / -a) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (y <= -1920.0) tmp = t_1; elseif (y <= -1.3e-38) tmp = Float64(Float64(y * Float64(-z)) / a); elseif (y <= -3.9e-53) tmp = t_1; elseif (y <= -4.2e-85) tmp = x; elseif (y <= -2.15e-117) tmp = Float64(Float64(y * t) / a); elseif (y <= 2.35e-14) tmp = x; elseif (y <= 1.26e+199) tmp = Float64(y * Float64(t / a)); else tmp = Float64(y * Float64(z / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (y <= -1920.0) tmp = t_1; elseif (y <= -1.3e-38) tmp = (y * -z) / a; elseif (y <= -3.9e-53) tmp = t_1; elseif (y <= -4.2e-85) tmp = x; elseif (y <= -2.15e-117) tmp = (y * t) / a; elseif (y <= 2.35e-14) tmp = x; elseif (y <= 1.26e+199) tmp = y * (t / a); else tmp = y * (z / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1920.0], t$95$1, If[LessEqual[y, -1.3e-38], N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -3.9e-53], t$95$1, If[LessEqual[y, -4.2e-85], x, If[LessEqual[y, -2.15e-117], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 2.35e-14], x, If[LessEqual[y, 1.26e+199], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;y \leq -1920:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-38}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{-53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-85}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.15 \cdot 10^{-117}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.26 \cdot 10^{+199}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{-a}\\
\end{array}
\end{array}
if y < -1920 or -1.30000000000000005e-38 < y < -3.9000000000000002e-53Initial program 88.8%
associate-/l*99.9%
Simplified99.9%
associate-*r/88.8%
clear-num88.8%
Applied egg-rr88.8%
Taylor expanded in t around inf 49.2%
associate-*r/60.5%
Simplified60.5%
if -1920 < y < -1.30000000000000005e-38Initial program 100.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 83.8%
mul-1-neg83.8%
associate-/l*83.5%
distribute-rgt-neg-in83.5%
distribute-frac-neg283.5%
Simplified83.5%
*-commutative83.5%
distribute-frac-neg283.5%
distribute-frac-neg83.5%
associate-*l/83.8%
Applied egg-rr83.8%
if -3.9000000000000002e-53 < y < -4.2e-85 or -2.15e-117 < y < 2.3500000000000001e-14Initial program 99.2%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in x around inf 69.2%
if -4.2e-85 < y < -2.15e-117Initial program 99.5%
associate-/l*79.3%
Simplified79.3%
Taylor expanded in t around inf 67.4%
*-commutative67.4%
Simplified67.4%
if 2.3500000000000001e-14 < y < 1.26000000000000002e199Initial program 91.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 50.1%
*-commutative50.1%
associate-/l*58.1%
Simplified58.1%
if 1.26000000000000002e199 < y Initial program 86.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 59.1%
mul-1-neg59.1%
associate-/l*67.6%
distribute-rgt-neg-in67.6%
distribute-frac-neg267.6%
Simplified67.6%
Final simplification65.0%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -1.4e-56)
(not (or (<= y -6e-80) (and (not (<= y -3.8e-118)) (<= y 2.15e-14)))))
(* y (/ (- t z) a))
x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.4e-56) || !((y <= -6e-80) || (!(y <= -3.8e-118) && (y <= 2.15e-14)))) {
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.4d-56)) .or. (.not. (y <= (-6d-80)) .or. (.not. (y <= (-3.8d-118))) .and. (y <= 2.15d-14))) 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.4e-56) || !((y <= -6e-80) || (!(y <= -3.8e-118) && (y <= 2.15e-14)))) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.4e-56) or not ((y <= -6e-80) or (not (y <= -3.8e-118) and (y <= 2.15e-14))): tmp = y * ((t - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.4e-56) || !((y <= -6e-80) || (!(y <= -3.8e-118) && (y <= 2.15e-14)))) 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.4e-56) || ~(((y <= -6e-80) || (~((y <= -3.8e-118)) && (y <= 2.15e-14))))) tmp = y * ((t - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.4e-56], N[Not[Or[LessEqual[y, -6e-80], And[N[Not[LessEqual[y, -3.8e-118]], $MachinePrecision], LessEqual[y, 2.15e-14]]]], $MachinePrecision]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{-56} \lor \neg \left(y \leq -6 \cdot 10^{-80} \lor \neg \left(y \leq -3.8 \cdot 10^{-118}\right) \land y \leq 2.15 \cdot 10^{-14}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.39999999999999997e-56 or -6.00000000000000014e-80 < y < -3.8000000000000001e-118 or 2.14999999999999999e-14 < y Initial program 90.5%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in x around 0 77.5%
mul-1-neg77.5%
distribute-frac-neg277.5%
associate-*r/84.3%
Simplified84.3%
frac-2neg84.3%
div-inv84.3%
sub-neg84.3%
distribute-neg-in84.3%
add-sqr-sqrt44.7%
sqrt-unprod56.2%
sqr-neg56.2%
sqrt-unprod18.9%
add-sqr-sqrt38.0%
add-sqr-sqrt19.0%
sqrt-unprod52.2%
sqr-neg52.2%
sqrt-unprod39.5%
add-sqr-sqrt84.3%
remove-double-neg84.3%
Applied egg-rr84.3%
associate-*r/84.3%
*-rgt-identity84.3%
+-commutative84.3%
unsub-neg84.3%
Simplified84.3%
if -1.39999999999999997e-56 < y < -6.00000000000000014e-80 or -3.8000000000000001e-118 < y < 2.14999999999999999e-14Initial program 99.2%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in x around inf 69.2%
Final simplification78.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) (- t z))))
(if (<= y -1.05e-55)
t_1
(if (<= y -1.5e-81)
x
(if (<= y -4e-132) t_1 (if (<= y 1.95e-14) x (* y (/ (- t z) a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * (t - z);
double tmp;
if (y <= -1.05e-55) {
tmp = t_1;
} else if (y <= -1.5e-81) {
tmp = x;
} else if (y <= -4e-132) {
tmp = t_1;
} else if (y <= 1.95e-14) {
tmp = x;
} else {
tmp = 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 / a) * (t - z)
if (y <= (-1.05d-55)) then
tmp = t_1
else if (y <= (-1.5d-81)) then
tmp = x
else if (y <= (-4d-132)) then
tmp = t_1
else if (y <= 1.95d-14) then
tmp = x
else
tmp = 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 / a) * (t - z);
double tmp;
if (y <= -1.05e-55) {
tmp = t_1;
} else if (y <= -1.5e-81) {
tmp = x;
} else if (y <= -4e-132) {
tmp = t_1;
} else if (y <= 1.95e-14) {
tmp = x;
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) * (t - z) tmp = 0 if y <= -1.05e-55: tmp = t_1 elif y <= -1.5e-81: tmp = x elif y <= -4e-132: tmp = t_1 elif y <= 1.95e-14: tmp = x else: tmp = y * ((t - z) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) * Float64(t - z)) tmp = 0.0 if (y <= -1.05e-55) tmp = t_1; elseif (y <= -1.5e-81) tmp = x; elseif (y <= -4e-132) tmp = t_1; elseif (y <= 1.95e-14) tmp = x; else tmp = Float64(y * Float64(Float64(t - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) * (t - z); tmp = 0.0; if (y <= -1.05e-55) tmp = t_1; elseif (y <= -1.5e-81) tmp = x; elseif (y <= -4e-132) tmp = t_1; elseif (y <= 1.95e-14) tmp = x; else tmp = y * ((t - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.05e-55], t$95$1, If[LessEqual[y, -1.5e-81], x, If[LessEqual[y, -4e-132], t$95$1, If[LessEqual[y, 1.95e-14], x, N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{if}\;y \leq -1.05 \cdot 10^{-55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-81}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-132}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if y < -1.0500000000000001e-55 or -1.4999999999999999e-81 < y < -3.9999999999999999e-132Initial program 91.0%
associate-/l*96.6%
Simplified96.6%
associate-*r/91.0%
clear-num91.0%
Applied egg-rr91.0%
Taylor expanded in x around 0 77.2%
associate-/l*81.6%
associate-*r*81.6%
neg-mul-181.6%
div-sub79.2%
distribute-lft-out--78.0%
distribute-lft-neg-in78.0%
associate-*r/73.6%
mul-1-neg73.6%
cancel-sign-sub73.6%
*-commutative73.6%
associate-*l/72.3%
+-commutative72.3%
associate-*r/74.3%
mul-1-neg74.3%
distribute-frac-neg74.3%
distribute-rgt-neg-in74.3%
*-commutative74.3%
associate-/l*76.3%
distribute-rgt-out84.6%
unsub-neg84.6%
Simplified84.6%
if -1.0500000000000001e-55 < y < -1.4999999999999999e-81 or -3.9999999999999999e-132 < y < 1.9499999999999999e-14Initial program 99.2%
associate-/l*82.6%
Simplified82.6%
Taylor expanded in x around inf 69.6%
if 1.9499999999999999e-14 < y Initial program 90.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 77.2%
mul-1-neg77.2%
distribute-frac-neg277.2%
associate-*r/85.4%
Simplified85.4%
frac-2neg85.4%
div-inv85.4%
sub-neg85.4%
distribute-neg-in85.4%
add-sqr-sqrt44.1%
sqrt-unprod52.5%
sqr-neg52.5%
sqrt-unprod16.6%
add-sqr-sqrt36.1%
add-sqr-sqrt19.5%
sqrt-unprod53.8%
sqr-neg53.8%
sqrt-unprod41.2%
add-sqr-sqrt85.4%
remove-double-neg85.4%
Applied egg-rr85.4%
associate-*r/85.4%
*-rgt-identity85.4%
+-commutative85.4%
unsub-neg85.4%
Simplified85.4%
Final simplification78.7%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -2.15e-55)
(and (not (<= y -1.95e-86)) (or (<= y -3e-117) (not (<= y 4.2e-14)))))
(* t (/ y a))
x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.15e-55) || (!(y <= -1.95e-86) && ((y <= -3e-117) || !(y <= 4.2e-14)))) {
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 ((y <= (-2.15d-55)) .or. (.not. (y <= (-1.95d-86))) .and. (y <= (-3d-117)) .or. (.not. (y <= 4.2d-14))) 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 ((y <= -2.15e-55) || (!(y <= -1.95e-86) && ((y <= -3e-117) || !(y <= 4.2e-14)))) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.15e-55) or (not (y <= -1.95e-86) and ((y <= -3e-117) or not (y <= 4.2e-14))): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.15e-55) || (!(y <= -1.95e-86) && ((y <= -3e-117) || !(y <= 4.2e-14)))) 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 ((y <= -2.15e-55) || (~((y <= -1.95e-86)) && ((y <= -3e-117) || ~((y <= 4.2e-14))))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.15e-55], And[N[Not[LessEqual[y, -1.95e-86]], $MachinePrecision], Or[LessEqual[y, -3e-117], N[Not[LessEqual[y, 4.2e-14]], $MachinePrecision]]]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{-55} \lor \neg \left(y \leq -1.95 \cdot 10^{-86}\right) \land \left(y \leq -3 \cdot 10^{-117} \lor \neg \left(y \leq 4.2 \cdot 10^{-14}\right)\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.15000000000000005e-55 or -1.9500000000000001e-86 < y < -2.99999999999999991e-117 or 4.1999999999999998e-14 < y Initial program 90.5%
associate-/l*98.6%
Simplified98.6%
associate-*r/90.5%
clear-num90.5%
Applied egg-rr90.5%
Taylor expanded in t around inf 46.4%
associate-*r/51.9%
Simplified51.9%
if -2.15000000000000005e-55 < y < -1.9500000000000001e-86 or -2.99999999999999991e-117 < y < 4.1999999999999998e-14Initial program 99.2%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in x around inf 69.2%
Final simplification59.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= y -2.55e-54)
t_1
(if (<= y -5e-87)
x
(if (<= y -2.95e-117) t_1 (if (<= y 2e-14) x (* y (/ t a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (y <= -2.55e-54) {
tmp = t_1;
} else if (y <= -5e-87) {
tmp = x;
} else if (y <= -2.95e-117) {
tmp = t_1;
} else if (y <= 2e-14) {
tmp = x;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = t * (y / a)
if (y <= (-2.55d-54)) then
tmp = t_1
else if (y <= (-5d-87)) then
tmp = x
else if (y <= (-2.95d-117)) then
tmp = t_1
else if (y <= 2d-14) then
tmp = x
else
tmp = y * (t / a)
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 (y <= -2.55e-54) {
tmp = t_1;
} else if (y <= -5e-87) {
tmp = x;
} else if (y <= -2.95e-117) {
tmp = t_1;
} else if (y <= 2e-14) {
tmp = x;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if y <= -2.55e-54: tmp = t_1 elif y <= -5e-87: tmp = x elif y <= -2.95e-117: tmp = t_1 elif y <= 2e-14: tmp = x else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (y <= -2.55e-54) tmp = t_1; elseif (y <= -5e-87) tmp = x; elseif (y <= -2.95e-117) tmp = t_1; elseif (y <= 2e-14) tmp = x; else tmp = Float64(y * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (y <= -2.55e-54) tmp = t_1; elseif (y <= -5e-87) tmp = x; elseif (y <= -2.95e-117) tmp = t_1; elseif (y <= 2e-14) tmp = x; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.55e-54], t$95$1, If[LessEqual[y, -5e-87], x, If[LessEqual[y, -2.95e-117], t$95$1, If[LessEqual[y, 2e-14], x, N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;y \leq -2.55 \cdot 10^{-54}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-87}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.95 \cdot 10^{-117}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < -2.55000000000000005e-54 or -5.00000000000000042e-87 < y < -2.9500000000000002e-117Initial program 90.8%
associate-/l*97.6%
Simplified97.6%
associate-*r/90.8%
clear-num90.8%
Applied egg-rr90.8%
Taylor expanded in t around inf 47.9%
associate-*r/56.9%
Simplified56.9%
if -2.55000000000000005e-54 < y < -5.00000000000000042e-87 or -2.9500000000000002e-117 < y < 2e-14Initial program 99.2%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in x around inf 69.2%
if 2e-14 < y Initial program 90.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 44.5%
*-commutative44.5%
associate-/l*50.1%
Simplified50.1%
Final simplification60.2%
(FPCore (x y z t a)
:precision binary64
(if (<= y -2.3e-51)
(* t (/ y a))
(if (<= y -1.2e-86)
x
(if (<= y -2.9e-117) (/ (* y t) a) (if (<= y 3.1e-14) x (* y (/ t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.3e-51) {
tmp = t * (y / a);
} else if (y <= -1.2e-86) {
tmp = x;
} else if (y <= -2.9e-117) {
tmp = (y * t) / a;
} else if (y <= 3.1e-14) {
tmp = x;
} else {
tmp = 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 (y <= (-2.3d-51)) then
tmp = t * (y / a)
else if (y <= (-1.2d-86)) then
tmp = x
else if (y <= (-2.9d-117)) then
tmp = (y * t) / a
else if (y <= 3.1d-14) then
tmp = x
else
tmp = 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 (y <= -2.3e-51) {
tmp = t * (y / a);
} else if (y <= -1.2e-86) {
tmp = x;
} else if (y <= -2.9e-117) {
tmp = (y * t) / a;
} else if (y <= 3.1e-14) {
tmp = x;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.3e-51: tmp = t * (y / a) elif y <= -1.2e-86: tmp = x elif y <= -2.9e-117: tmp = (y * t) / a elif y <= 3.1e-14: tmp = x else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.3e-51) tmp = Float64(t * Float64(y / a)); elseif (y <= -1.2e-86) tmp = x; elseif (y <= -2.9e-117) tmp = Float64(Float64(y * t) / a); elseif (y <= 3.1e-14) tmp = x; else tmp = Float64(y * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.3e-51) tmp = t * (y / a); elseif (y <= -1.2e-86) tmp = x; elseif (y <= -2.9e-117) tmp = (y * t) / a; elseif (y <= 3.1e-14) tmp = x; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.3e-51], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.2e-86], x, If[LessEqual[y, -2.9e-117], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 3.1e-14], x, N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{-51}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-86}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-117}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < -2.30000000000000002e-51Initial program 89.8%
associate-/l*99.9%
Simplified99.9%
associate-*r/89.8%
clear-num89.7%
Applied egg-rr89.7%
Taylor expanded in t around inf 45.5%
associate-*r/55.9%
Simplified55.9%
if -2.30000000000000002e-51 < y < -1.20000000000000007e-86 or -2.9000000000000001e-117 < y < 3.10000000000000004e-14Initial program 99.2%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in x around inf 69.2%
if -1.20000000000000007e-86 < y < -2.9000000000000001e-117Initial program 99.5%
associate-/l*79.3%
Simplified79.3%
Taylor expanded in t around inf 67.4%
*-commutative67.4%
Simplified67.4%
if 3.10000000000000004e-14 < y Initial program 90.1%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 44.5%
*-commutative44.5%
associate-/l*50.1%
Simplified50.1%
Final simplification60.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.2e-6) (not (<= z 5.8e+54))) (- x (* y (/ z a))) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.2e-6) || !(z <= 5.8e+54)) {
tmp = x - (y * (z / 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 <= (-6.2d-6)) .or. (.not. (z <= 5.8d+54))) then
tmp = x - (y * (z / 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 <= -6.2e-6) || !(z <= 5.8e+54)) {
tmp = x - (y * (z / a));
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.2e-6) or not (z <= 5.8e+54): tmp = x - (y * (z / a)) else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.2e-6) || !(z <= 5.8e+54)) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.2e-6) || ~((z <= 5.8e+54))) tmp = x - (y * (z / a)); else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.2e-6], N[Not[LessEqual[z, 5.8e+54]], $MachinePrecision]], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{-6} \lor \neg \left(z \leq 5.8 \cdot 10^{+54}\right):\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -6.1999999999999999e-6 or 5.7999999999999997e54 < z Initial program 92.5%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in z around inf 86.2%
associate-/l*80.2%
Simplified80.2%
if -6.1999999999999999e-6 < z < 5.7999999999999997e54Initial program 95.7%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in z around 0 90.3%
associate-*r/90.3%
mul-1-neg90.3%
distribute-lft-neg-out90.3%
*-commutative90.3%
Simplified90.3%
sub-neg90.3%
+-commutative90.3%
distribute-neg-frac290.3%
add-sqr-sqrt50.0%
sqrt-unprod57.1%
sqr-neg57.1%
sqrt-unprod19.3%
add-sqr-sqrt41.6%
associate-/l*41.6%
add-sqr-sqrt25.4%
sqrt-unprod58.0%
sqr-neg58.0%
sqrt-unprod38.1%
add-sqr-sqrt90.9%
Applied egg-rr90.9%
clear-num90.9%
un-div-inv91.8%
Applied egg-rr91.8%
Final simplification86.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.4e-17) (not (<= z 7.6e+80))) (- x (/ (* y z) a)) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.4e-17) || !(z <= 7.6e+80)) {
tmp = x - ((y * z) / 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 <= (-9.4d-17)) .or. (.not. (z <= 7.6d+80))) then
tmp = x - ((y * z) / 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 <= -9.4e-17) || !(z <= 7.6e+80)) {
tmp = x - ((y * z) / a);
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.4e-17) or not (z <= 7.6e+80): tmp = x - ((y * z) / a) else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.4e-17) || !(z <= 7.6e+80)) tmp = Float64(x - Float64(Float64(y * z) / a)); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.4e-17) || ~((z <= 7.6e+80))) tmp = x - ((y * z) / a); else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.4e-17], N[Not[LessEqual[z, 7.6e+80]], $MachinePrecision]], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.4 \cdot 10^{-17} \lor \neg \left(z \leq 7.6 \cdot 10^{+80}\right):\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -9.3999999999999999e-17 or 7.59999999999999995e80 < z Initial program 93.1%
associate-/l*86.8%
Simplified86.8%
Taylor expanded in z around inf 87.5%
if -9.3999999999999999e-17 < z < 7.59999999999999995e80Initial program 95.0%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in z around 0 89.7%
associate-*r/89.7%
mul-1-neg89.7%
distribute-lft-neg-out89.7%
*-commutative89.7%
Simplified89.7%
sub-neg89.7%
+-commutative89.7%
distribute-neg-frac289.7%
add-sqr-sqrt48.8%
sqrt-unprod56.4%
sqr-neg56.4%
sqrt-unprod19.5%
add-sqr-sqrt41.3%
associate-/l*41.3%
add-sqr-sqrt24.9%
sqrt-unprod58.1%
sqr-neg58.1%
sqrt-unprod38.6%
add-sqr-sqrt90.3%
Applied egg-rr90.3%
clear-num90.2%
un-div-inv91.1%
Applied egg-rr91.1%
Final simplification89.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.25e+68) (not (<= z 1.14e+83))) (- x (/ (* y z) a)) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.25e+68) || !(z <= 1.14e+83)) {
tmp = x - ((y * z) / a);
} else {
tmp = x + (t * (y / 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.25d+68)) .or. (.not. (z <= 1.14d+83))) then
tmp = x - ((y * z) / a)
else
tmp = x + (t * (y / 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.25e+68) || !(z <= 1.14e+83)) {
tmp = x - ((y * z) / a);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.25e+68) or not (z <= 1.14e+83): tmp = x - ((y * z) / a) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.25e+68) || !(z <= 1.14e+83)) tmp = Float64(x - Float64(Float64(y * z) / a)); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.25e+68) || ~((z <= 1.14e+83))) tmp = x - ((y * z) / a); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.25e+68], N[Not[LessEqual[z, 1.14e+83]], $MachinePrecision]], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+68} \lor \neg \left(z \leq 1.14 \cdot 10^{+83}\right):\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.2500000000000001e68 or 1.14000000000000003e83 < z Initial program 92.9%
associate-/l*86.5%
Simplified86.5%
Taylor expanded in z around inf 90.0%
if -1.2500000000000001e68 < z < 1.14000000000000003e83Initial program 94.9%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in z around 0 87.3%
mul-1-neg87.3%
associate-/l*90.3%
distribute-rgt-neg-in90.3%
distribute-neg-frac290.3%
Simplified90.3%
Final simplification90.1%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.85e-42) (* (/ y a) (- t z)) (if (<= y 4.3e+26) (+ x (/ (* y t) a)) (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.85e-42) {
tmp = (y / a) * (t - z);
} else if (y <= 4.3e+26) {
tmp = x + ((y * t) / a);
} else {
tmp = 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) :: tmp
if (y <= (-2.85d-42)) then
tmp = (y / a) * (t - z)
else if (y <= 4.3d+26) then
tmp = x + ((y * t) / a)
else
tmp = 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 tmp;
if (y <= -2.85e-42) {
tmp = (y / a) * (t - z);
} else if (y <= 4.3e+26) {
tmp = x + ((y * t) / a);
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.85e-42: tmp = (y / a) * (t - z) elif y <= 4.3e+26: tmp = x + ((y * t) / a) else: tmp = y * ((t - z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.85e-42) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif (y <= 4.3e+26) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = Float64(y * Float64(Float64(t - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.85e-42) tmp = (y / a) * (t - z); elseif (y <= 4.3e+26) tmp = x + ((y * t) / a); else tmp = y * ((t - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.85e-42], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.3e+26], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.85 \cdot 10^{-42}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if y < -2.85e-42Initial program 89.5%
associate-/l*99.9%
Simplified99.9%
associate-*r/89.5%
clear-num89.4%
Applied egg-rr89.4%
Taylor expanded in x around 0 75.9%
associate-/l*84.9%
associate-*r*84.9%
neg-mul-184.9%
div-sub82.1%
distribute-lft-out--80.6%
distribute-lft-neg-in80.6%
associate-*r/74.1%
mul-1-neg74.1%
cancel-sign-sub74.1%
*-commutative74.1%
associate-*l/70.0%
+-commutative70.0%
associate-*r/72.8%
mul-1-neg72.8%
distribute-frac-neg72.8%
distribute-rgt-neg-in72.8%
*-commutative72.8%
associate-/l*75.0%
distribute-rgt-out84.9%
unsub-neg84.9%
Simplified84.9%
if -2.85e-42 < y < 4.2999999999999998e26Initial program 99.3%
associate-/l*83.3%
Simplified83.3%
Taylor expanded in z around 0 84.3%
associate-*r/84.3%
mul-1-neg84.3%
distribute-lft-neg-out84.3%
*-commutative84.3%
Simplified84.3%
Taylor expanded in y around 0 84.3%
if 4.2999999999999998e26 < y Initial program 88.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in x around 0 80.7%
mul-1-neg80.7%
distribute-frac-neg280.7%
associate-*r/90.0%
Simplified90.0%
frac-2neg90.0%
div-inv90.0%
sub-neg90.0%
distribute-neg-in90.0%
add-sqr-sqrt49.9%
sqrt-unprod59.1%
sqr-neg59.1%
sqrt-unprod18.5%
add-sqr-sqrt40.5%
add-sqr-sqrt22.0%
sqrt-unprod54.2%
sqr-neg54.2%
sqrt-unprod40.0%
add-sqr-sqrt90.0%
remove-double-neg90.0%
Applied egg-rr90.0%
associate-*r/90.0%
*-rgt-identity90.0%
+-commutative90.0%
unsub-neg90.0%
Simplified90.0%
Final simplification85.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.3e+196) (- x (/ (* y z) a)) (+ x (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.3e+196) {
tmp = x - ((y * 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) :: tmp
if (z <= (-1.3d+196)) then
tmp = x - ((y * 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 tmp;
if (z <= -1.3e+196) {
tmp = x - ((y * z) / a);
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.3e+196: tmp = x - ((y * z) / a) else: tmp = x + (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.3e+196) tmp = Float64(x - Float64(Float64(y * z) / a)); else tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.3e+196) tmp = x - ((y * z) / a); else tmp = x + (y * ((t - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.3e+196], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+196}:\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if z < -1.30000000000000006e196Initial program 99.9%
associate-/l*75.9%
Simplified75.9%
Taylor expanded in z around inf 96.4%
if -1.30000000000000006e196 < z Initial program 93.4%
associate-/l*93.7%
Simplified93.7%
Final simplification94.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -9.4e+197) (- x (/ (* y z) a)) (+ x (/ y (/ a (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.4e+197) {
tmp = x - ((y * z) / a);
} else {
tmp = x + (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 (z <= (-9.4d+197)) then
tmp = x - ((y * z) / a)
else
tmp = x + (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 (z <= -9.4e+197) {
tmp = x - ((y * z) / a);
} else {
tmp = x + (y / (a / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.4e+197: tmp = x - ((y * z) / a) else: tmp = x + (y / (a / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.4e+197) tmp = Float64(x - Float64(Float64(y * z) / a)); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.4e+197) tmp = x - ((y * z) / a); else tmp = x + (y / (a / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.4e+197], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.4 \cdot 10^{+197}:\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - z}}\\
\end{array}
\end{array}
if z < -9.3999999999999999e197Initial program 99.9%
associate-/l*75.1%
Simplified75.1%
Taylor expanded in z around inf 96.2%
if -9.3999999999999999e197 < z Initial program 93.4%
associate-/l*93.7%
Simplified93.7%
clear-num93.7%
un-div-inv94.7%
Applied egg-rr94.7%
Final simplification94.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 94.1%
associate-/l*91.8%
Simplified91.8%
Taylor expanded in x around inf 38.0%
Final simplification38.0%
(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 2024077
(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)))