
(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 (if (<= a -3.5e-25) (- x (/ y (/ a (- z t)))) (+ x (/ (- t z) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.5e-25) {
tmp = x - (y / (a / (z - t)));
} else {
tmp = x + ((t - z) / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.5d-25)) then
tmp = x - (y / (a / (z - t)))
else
tmp = x + ((t - z) / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.5e-25) {
tmp = x - (y / (a / (z - t)));
} else {
tmp = x + ((t - z) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.5e-25: tmp = x - (y / (a / (z - t))) else: tmp = x + ((t - z) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.5e-25) tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); else tmp = Float64(x + Float64(Float64(t - z) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.5e-25) tmp = x - (y / (a / (z - t))); else tmp = x + ((t - z) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.5e-25], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.5 \cdot 10^{-25}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - z}{\frac{a}{y}}\\
\end{array}
\end{array}
if a < -3.5000000000000002e-25Initial program 87.2%
associate-/l*99.8%
Simplified99.8%
if -3.5000000000000002e-25 < a Initial program 94.3%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in y around 0 94.3%
*-commutative94.3%
associate-/l*96.5%
Simplified96.5%
Final simplification97.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))) (t_2 (* z (/ y (- a)))))
(if (<= a -2.45e-24)
x
(if (<= a -1.45e-208)
t_2
(if (<= a -3e-256)
t_1
(if (<= a 4.5e-7) t_2 (if (<= a 2.4e+40) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double t_2 = z * (y / -a);
double tmp;
if (a <= -2.45e-24) {
tmp = x;
} else if (a <= -1.45e-208) {
tmp = t_2;
} else if (a <= -3e-256) {
tmp = t_1;
} else if (a <= 4.5e-7) {
tmp = t_2;
} else if (a <= 2.4e+40) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (y / a)
t_2 = z * (y / -a)
if (a <= (-2.45d-24)) then
tmp = x
else if (a <= (-1.45d-208)) then
tmp = t_2
else if (a <= (-3d-256)) then
tmp = t_1
else if (a <= 4.5d-7) then
tmp = t_2
else if (a <= 2.4d+40) then
tmp = t_1
else
tmp = x
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 t_2 = z * (y / -a);
double tmp;
if (a <= -2.45e-24) {
tmp = x;
} else if (a <= -1.45e-208) {
tmp = t_2;
} else if (a <= -3e-256) {
tmp = t_1;
} else if (a <= 4.5e-7) {
tmp = t_2;
} else if (a <= 2.4e+40) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) t_2 = z * (y / -a) tmp = 0 if a <= -2.45e-24: tmp = x elif a <= -1.45e-208: tmp = t_2 elif a <= -3e-256: tmp = t_1 elif a <= 4.5e-7: tmp = t_2 elif a <= 2.4e+40: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) t_2 = Float64(z * Float64(y / Float64(-a))) tmp = 0.0 if (a <= -2.45e-24) tmp = x; elseif (a <= -1.45e-208) tmp = t_2; elseif (a <= -3e-256) tmp = t_1; elseif (a <= 4.5e-7) tmp = t_2; elseif (a <= 2.4e+40) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); t_2 = z * (y / -a); tmp = 0.0; if (a <= -2.45e-24) tmp = x; elseif (a <= -1.45e-208) tmp = t_2; elseif (a <= -3e-256) tmp = t_1; elseif (a <= 4.5e-7) tmp = t_2; elseif (a <= 2.4e+40) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.45e-24], x, If[LessEqual[a, -1.45e-208], t$95$2, If[LessEqual[a, -3e-256], t$95$1, If[LessEqual[a, 4.5e-7], t$95$2, If[LessEqual[a, 2.4e+40], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
t_2 := z \cdot \frac{y}{-a}\\
\mathbf{if}\;a \leq -2.45 \cdot 10^{-24}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.45 \cdot 10^{-208}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3 \cdot 10^{-256}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-7}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{+40}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.45e-24 or 2.4e40 < a Initial program 86.2%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in x around inf 62.4%
if -2.45e-24 < a < -1.45e-208 or -2.9999999999999998e-256 < a < 4.4999999999999998e-7Initial program 97.2%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in z around inf 55.4%
mul-1-neg55.4%
associate-*l/55.7%
*-commutative55.7%
distribute-rgt-neg-in55.7%
*-lft-identity55.7%
associate-*l/55.7%
remove-double-neg55.7%
neg-mul-155.7%
associate-*r*55.7%
*-commutative55.7%
neg-mul-155.7%
*-commutative55.7%
distribute-neg-frac55.7%
metadata-eval55.7%
metadata-eval55.7%
associate-/r*55.7%
neg-mul-155.7%
associate-*r/55.7%
*-rgt-identity55.7%
distribute-frac-neg55.7%
remove-double-neg55.7%
Simplified55.7%
if -1.45e-208 < a < -2.9999999999999998e-256 or 4.4999999999999998e-7 < a < 2.4e40Initial program 99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
*-commutative99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t around inf 78.3%
associate-*r/78.3%
Simplified78.3%
Final simplification60.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= a -8.8e-15)
x
(if (<= a -9.2e-207)
(/ (- z) (/ a y))
(if (<= a -1.55e-253)
t_1
(if (<= a 1e-5) (* z (/ y (- a))) (if (<= a 6e+32) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (a <= -8.8e-15) {
tmp = x;
} else if (a <= -9.2e-207) {
tmp = -z / (a / y);
} else if (a <= -1.55e-253) {
tmp = t_1;
} else if (a <= 1e-5) {
tmp = z * (y / -a);
} else if (a <= 6e+32) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * (y / a)
if (a <= (-8.8d-15)) then
tmp = x
else if (a <= (-9.2d-207)) then
tmp = -z / (a / y)
else if (a <= (-1.55d-253)) then
tmp = t_1
else if (a <= 1d-5) then
tmp = z * (y / -a)
else if (a <= 6d+32) then
tmp = t_1
else
tmp = x
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 (a <= -8.8e-15) {
tmp = x;
} else if (a <= -9.2e-207) {
tmp = -z / (a / y);
} else if (a <= -1.55e-253) {
tmp = t_1;
} else if (a <= 1e-5) {
tmp = z * (y / -a);
} else if (a <= 6e+32) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if a <= -8.8e-15: tmp = x elif a <= -9.2e-207: tmp = -z / (a / y) elif a <= -1.55e-253: tmp = t_1 elif a <= 1e-5: tmp = z * (y / -a) elif a <= 6e+32: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (a <= -8.8e-15) tmp = x; elseif (a <= -9.2e-207) tmp = Float64(Float64(-z) / Float64(a / y)); elseif (a <= -1.55e-253) tmp = t_1; elseif (a <= 1e-5) tmp = Float64(z * Float64(y / Float64(-a))); elseif (a <= 6e+32) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (a <= -8.8e-15) tmp = x; elseif (a <= -9.2e-207) tmp = -z / (a / y); elseif (a <= -1.55e-253) tmp = t_1; elseif (a <= 1e-5) tmp = z * (y / -a); elseif (a <= 6e+32) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.8e-15], x, If[LessEqual[a, -9.2e-207], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.55e-253], t$95$1, If[LessEqual[a, 1e-5], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e+32], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -8.8 \cdot 10^{-15}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -9.2 \cdot 10^{-207}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq -1.55 \cdot 10^{-253}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 10^{-5}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;a \leq 6 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.79999999999999942e-15 or 6e32 < a Initial program 86.2%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in x around inf 62.4%
if -8.79999999999999942e-15 < a < -9.2000000000000002e-207Initial program 99.7%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in z around inf 55.7%
mul-1-neg55.7%
associate-*l/53.4%
*-commutative53.4%
distribute-rgt-neg-in53.4%
*-lft-identity53.4%
associate-*l/53.4%
remove-double-neg53.4%
neg-mul-153.4%
associate-*r*53.4%
*-commutative53.4%
neg-mul-153.4%
*-commutative53.4%
distribute-neg-frac53.4%
metadata-eval53.4%
metadata-eval53.4%
associate-/r*53.4%
neg-mul-153.4%
associate-*r/53.4%
*-rgt-identity53.4%
distribute-frac-neg53.4%
remove-double-neg53.4%
Simplified53.4%
associate-*r/55.7%
add-sqr-sqrt55.5%
sqrt-unprod47.0%
sqr-neg47.0%
sqrt-unprod0.0%
add-sqr-sqrt1.3%
associate-/l*1.3%
frac-2neg1.3%
distribute-frac-neg1.3%
add-sqr-sqrt1.3%
sqrt-unprod1.2%
sqr-neg1.2%
sqrt-unprod0.0%
add-sqr-sqrt54.4%
Applied egg-rr54.4%
if -9.2000000000000002e-207 < a < -1.54999999999999998e-253 or 1.00000000000000008e-5 < a < 6e32Initial program 99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
*-commutative99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t around inf 78.3%
associate-*r/78.3%
Simplified78.3%
if -1.54999999999999998e-253 < a < 1.00000000000000008e-5Initial program 95.9%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in z around inf 55.2%
mul-1-neg55.2%
associate-*l/56.9%
*-commutative56.9%
distribute-rgt-neg-in56.9%
*-lft-identity56.9%
associate-*l/56.8%
remove-double-neg56.8%
neg-mul-156.8%
associate-*r*56.8%
*-commutative56.8%
neg-mul-156.8%
*-commutative56.8%
distribute-neg-frac56.8%
metadata-eval56.8%
metadata-eval56.8%
associate-/r*56.8%
neg-mul-156.8%
associate-*r/56.9%
*-rgt-identity56.9%
distribute-frac-neg56.9%
remove-double-neg56.9%
Simplified56.9%
Final simplification60.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= a -1.1e-14)
x
(if (<= a -9.8e-209)
(/ (* y (- z)) a)
(if (<= a -1.8e-258)
t_1
(if (<= a 1.35e-6) (* z (/ y (- a))) (if (<= a 7e+31) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (a <= -1.1e-14) {
tmp = x;
} else if (a <= -9.8e-209) {
tmp = (y * -z) / a;
} else if (a <= -1.8e-258) {
tmp = t_1;
} else if (a <= 1.35e-6) {
tmp = z * (y / -a);
} else if (a <= 7e+31) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * (y / a)
if (a <= (-1.1d-14)) then
tmp = x
else if (a <= (-9.8d-209)) then
tmp = (y * -z) / a
else if (a <= (-1.8d-258)) then
tmp = t_1
else if (a <= 1.35d-6) then
tmp = z * (y / -a)
else if (a <= 7d+31) then
tmp = t_1
else
tmp = x
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 (a <= -1.1e-14) {
tmp = x;
} else if (a <= -9.8e-209) {
tmp = (y * -z) / a;
} else if (a <= -1.8e-258) {
tmp = t_1;
} else if (a <= 1.35e-6) {
tmp = z * (y / -a);
} else if (a <= 7e+31) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if a <= -1.1e-14: tmp = x elif a <= -9.8e-209: tmp = (y * -z) / a elif a <= -1.8e-258: tmp = t_1 elif a <= 1.35e-6: tmp = z * (y / -a) elif a <= 7e+31: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (a <= -1.1e-14) tmp = x; elseif (a <= -9.8e-209) tmp = Float64(Float64(y * Float64(-z)) / a); elseif (a <= -1.8e-258) tmp = t_1; elseif (a <= 1.35e-6) tmp = Float64(z * Float64(y / Float64(-a))); elseif (a <= 7e+31) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (a <= -1.1e-14) tmp = x; elseif (a <= -9.8e-209) tmp = (y * -z) / a; elseif (a <= -1.8e-258) tmp = t_1; elseif (a <= 1.35e-6) tmp = z * (y / -a); elseif (a <= 7e+31) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.1e-14], x, If[LessEqual[a, -9.8e-209], N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -1.8e-258], t$95$1, If[LessEqual[a, 1.35e-6], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7e+31], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -9.8 \cdot 10^{-209}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-258}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{-6}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;a \leq 7 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.1e-14 or 7e31 < a Initial program 86.2%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in x around inf 62.4%
if -1.1e-14 < a < -9.8000000000000007e-209Initial program 99.7%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in z around inf 55.7%
mul-1-neg55.7%
associate-*l/53.4%
*-commutative53.4%
distribute-rgt-neg-in53.4%
*-lft-identity53.4%
associate-*l/53.4%
remove-double-neg53.4%
neg-mul-153.4%
associate-*r*53.4%
*-commutative53.4%
neg-mul-153.4%
*-commutative53.4%
distribute-neg-frac53.4%
metadata-eval53.4%
metadata-eval53.4%
associate-/r*53.4%
neg-mul-153.4%
associate-*r/53.4%
*-rgt-identity53.4%
distribute-frac-neg53.4%
remove-double-neg53.4%
Simplified53.4%
associate-*r/55.7%
add-sqr-sqrt55.5%
sqrt-unprod47.0%
sqr-neg47.0%
sqrt-unprod0.0%
add-sqr-sqrt1.3%
associate-*l/1.3%
frac-2neg1.3%
associate-*l/1.3%
add-sqr-sqrt1.3%
sqrt-unprod1.2%
sqr-neg1.2%
sqrt-unprod0.0%
add-sqr-sqrt55.7%
Applied egg-rr55.7%
if -9.8000000000000007e-209 < a < -1.79999999999999989e-258 or 1.34999999999999999e-6 < a < 7e31Initial program 99.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
*-commutative99.9%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t around inf 78.3%
associate-*r/78.3%
Simplified78.3%
if -1.79999999999999989e-258 < a < 1.34999999999999999e-6Initial program 95.9%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in z around inf 55.2%
mul-1-neg55.2%
associate-*l/56.9%
*-commutative56.9%
distribute-rgt-neg-in56.9%
*-lft-identity56.9%
associate-*l/56.8%
remove-double-neg56.8%
neg-mul-156.8%
associate-*r*56.8%
*-commutative56.8%
neg-mul-156.8%
*-commutative56.8%
distribute-neg-frac56.8%
metadata-eval56.8%
metadata-eval56.8%
associate-/r*56.8%
neg-mul-156.8%
associate-*r/56.9%
*-rgt-identity56.9%
distribute-frac-neg56.9%
remove-double-neg56.9%
Simplified56.9%
Final simplification61.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.45e+184)
x
(if (or (<= a -5.8e+150) (and (not (<= a -1.95e-7)) (<= a 1.95e+40)))
(* (/ y a) (- t z))
x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.45e+184) {
tmp = x;
} else if ((a <= -5.8e+150) || (!(a <= -1.95e-7) && (a <= 1.95e+40))) {
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 (a <= (-1.45d+184)) then
tmp = x
else if ((a <= (-5.8d+150)) .or. (.not. (a <= (-1.95d-7))) .and. (a <= 1.95d+40)) 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 (a <= -1.45e+184) {
tmp = x;
} else if ((a <= -5.8e+150) || (!(a <= -1.95e-7) && (a <= 1.95e+40))) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.45e+184: tmp = x elif (a <= -5.8e+150) or (not (a <= -1.95e-7) and (a <= 1.95e+40)): tmp = (y / a) * (t - z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.45e+184) tmp = x; elseif ((a <= -5.8e+150) || (!(a <= -1.95e-7) && (a <= 1.95e+40))) 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 (a <= -1.45e+184) tmp = x; elseif ((a <= -5.8e+150) || (~((a <= -1.95e-7)) && (a <= 1.95e+40))) tmp = (y / a) * (t - z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.45e+184], x, If[Or[LessEqual[a, -5.8e+150], And[N[Not[LessEqual[a, -1.95e-7]], $MachinePrecision], LessEqual[a, 1.95e+40]]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{+184}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{+150} \lor \neg \left(a \leq -1.95 \cdot 10^{-7}\right) \land a \leq 1.95 \cdot 10^{+40}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.4499999999999999e184 or -5.80000000000000022e150 < a < -1.95000000000000012e-7 or 1.95e40 < a Initial program 87.8%
associate-*l/92.1%
Simplified92.1%
Taylor expanded in x around inf 67.0%
if -1.4499999999999999e184 < a < -5.80000000000000022e150 or -1.95000000000000012e-7 < a < 1.95e40Initial program 95.4%
associate-*l/98.0%
Simplified98.0%
Taylor expanded in y around 0 95.4%
*-commutative95.4%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in x around 0 78.9%
mul-1-neg78.9%
associate-*r/73.2%
distribute-rgt-neg-in73.2%
neg-sub073.2%
div-sub70.6%
associate--r-70.6%
neg-sub070.6%
distribute-frac-neg70.6%
+-commutative70.6%
distribute-frac-neg70.6%
sub-neg70.6%
distribute-rgt-out--63.5%
associate-/r/66.7%
associate-*l/68.4%
associate-*r/69.7%
*-commutative69.7%
associate-/l*68.3%
*-commutative68.3%
associate-*l/69.7%
distribute-lft-out--82.0%
Simplified82.0%
Final simplification76.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ z a)))) (t_2 (+ x (* t (/ y a)))))
(if (<= t -1.1e+95)
t_2
(if (<= t 1.9e-108)
t_1
(if (<= t 1.6e+26) (* (/ y a) (- t z)) (if (<= t 4.4e+70) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / a));
double t_2 = x + (t * (y / a));
double tmp;
if (t <= -1.1e+95) {
tmp = t_2;
} else if (t <= 1.9e-108) {
tmp = t_1;
} else if (t <= 1.6e+26) {
tmp = (y / a) * (t - z);
} else if (t <= 4.4e+70) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - (y * (z / a))
t_2 = x + (t * (y / a))
if (t <= (-1.1d+95)) then
tmp = t_2
else if (t <= 1.9d-108) then
tmp = t_1
else if (t <= 1.6d+26) then
tmp = (y / a) * (t - z)
else if (t <= 4.4d+70) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / a));
double t_2 = x + (t * (y / a));
double tmp;
if (t <= -1.1e+95) {
tmp = t_2;
} else if (t <= 1.9e-108) {
tmp = t_1;
} else if (t <= 1.6e+26) {
tmp = (y / a) * (t - z);
} else if (t <= 4.4e+70) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (z / a)) t_2 = x + (t * (y / a)) tmp = 0 if t <= -1.1e+95: tmp = t_2 elif t <= 1.9e-108: tmp = t_1 elif t <= 1.6e+26: tmp = (y / a) * (t - z) elif t <= 4.4e+70: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(z / a))) t_2 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (t <= -1.1e+95) tmp = t_2; elseif (t <= 1.9e-108) tmp = t_1; elseif (t <= 1.6e+26) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif (t <= 4.4e+70) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (z / a)); t_2 = x + (t * (y / a)); tmp = 0.0; if (t <= -1.1e+95) tmp = t_2; elseif (t <= 1.9e-108) tmp = t_1; elseif (t <= 1.6e+26) tmp = (y / a) * (t - z); elseif (t <= 4.4e+70) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+95], t$95$2, If[LessEqual[t, 1.9e-108], t$95$1, If[LessEqual[t, 1.6e+26], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e+70], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{z}{a}\\
t_2 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{+95}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-108}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+26}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+70}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.0999999999999999e95 or 4.40000000000000001e70 < t Initial program 89.8%
associate-*l/95.6%
Simplified95.6%
Taylor expanded in y around 0 89.8%
*-commutative89.8%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in z around 0 84.7%
cancel-sign-sub-inv84.7%
metadata-eval84.7%
associate-*l/85.2%
*-commutative85.2%
*-lft-identity85.2%
*-commutative85.2%
associate-*l/84.7%
associate-*r/87.8%
Simplified87.8%
if -1.0999999999999999e95 < t < 1.89999999999999987e-108 or 1.60000000000000014e26 < t < 4.40000000000000001e70Initial program 94.6%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in z around inf 88.5%
*-commutative88.5%
associate-/l*89.3%
associate-/r/88.1%
Simplified88.1%
if 1.89999999999999987e-108 < t < 1.60000000000000014e26Initial program 91.7%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around 0 91.7%
*-commutative91.7%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in x around 0 70.4%
mul-1-neg70.4%
associate-*r/69.7%
distribute-rgt-neg-in69.7%
neg-sub069.7%
div-sub69.7%
associate--r-69.7%
neg-sub069.7%
distribute-frac-neg69.7%
+-commutative69.7%
distribute-frac-neg69.7%
sub-neg69.7%
distribute-rgt-out--61.0%
associate-/r/69.3%
associate-*l/65.6%
associate-*r/69.3%
*-commutative69.3%
associate-/l*65.3%
*-commutative65.3%
associate-*l/69.4%
distribute-lft-out--78.0%
Simplified78.0%
Final simplification87.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.5e-46)
x
(if (or (<= a 1.4e-203) (and (not (<= a 1.75e-144)) (<= a 8.6e+34)))
(* t (/ y a))
x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.5e-46) {
tmp = x;
} else if ((a <= 1.4e-203) || (!(a <= 1.75e-144) && (a <= 8.6e+34))) {
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 (a <= (-2.5d-46)) then
tmp = x
else if ((a <= 1.4d-203) .or. (.not. (a <= 1.75d-144)) .and. (a <= 8.6d+34)) 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 (a <= -2.5e-46) {
tmp = x;
} else if ((a <= 1.4e-203) || (!(a <= 1.75e-144) && (a <= 8.6e+34))) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.5e-46: tmp = x elif (a <= 1.4e-203) or (not (a <= 1.75e-144) and (a <= 8.6e+34)): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.5e-46) tmp = x; elseif ((a <= 1.4e-203) || (!(a <= 1.75e-144) && (a <= 8.6e+34))) 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 (a <= -2.5e-46) tmp = x; elseif ((a <= 1.4e-203) || (~((a <= 1.75e-144)) && (a <= 8.6e+34))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.5e-46], x, If[Or[LessEqual[a, 1.4e-203], And[N[Not[LessEqual[a, 1.75e-144]], $MachinePrecision], LessEqual[a, 8.6e+34]]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{-46}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-203} \lor \neg \left(a \leq 1.75 \cdot 10^{-144}\right) \land a \leq 8.6 \cdot 10^{+34}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.49999999999999996e-46 or 1.40000000000000011e-203 < a < 1.7499999999999999e-144 or 8.59999999999999988e34 < a Initial program 87.9%
associate-*l/93.2%
Simplified93.2%
Taylor expanded in x around inf 61.0%
if -2.49999999999999996e-46 < a < 1.40000000000000011e-203 or 1.7499999999999999e-144 < a < 8.59999999999999988e34Initial program 97.3%
associate-*l/98.4%
Simplified98.4%
Taylor expanded in y around 0 97.3%
*-commutative97.3%
associate-/l*98.6%
Simplified98.6%
Taylor expanded in t around inf 47.5%
associate-*r/49.6%
Simplified49.6%
Final simplification55.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= a -2.5e-37)
x
(if (<= a -9.2e-260)
t_1
(if (<= a 0.000112) (/ (- y) (/ a z)) (if (<= a 1.7e+32) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (a <= -2.5e-37) {
tmp = x;
} else if (a <= -9.2e-260) {
tmp = t_1;
} else if (a <= 0.000112) {
tmp = -y / (a / z);
} else if (a <= 1.7e+32) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * (y / a)
if (a <= (-2.5d-37)) then
tmp = x
else if (a <= (-9.2d-260)) then
tmp = t_1
else if (a <= 0.000112d0) then
tmp = -y / (a / z)
else if (a <= 1.7d+32) then
tmp = t_1
else
tmp = x
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 (a <= -2.5e-37) {
tmp = x;
} else if (a <= -9.2e-260) {
tmp = t_1;
} else if (a <= 0.000112) {
tmp = -y / (a / z);
} else if (a <= 1.7e+32) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if a <= -2.5e-37: tmp = x elif a <= -9.2e-260: tmp = t_1 elif a <= 0.000112: tmp = -y / (a / z) elif a <= 1.7e+32: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (a <= -2.5e-37) tmp = x; elseif (a <= -9.2e-260) tmp = t_1; elseif (a <= 0.000112) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (a <= 1.7e+32) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (a <= -2.5e-37) tmp = x; elseif (a <= -9.2e-260) tmp = t_1; elseif (a <= 0.000112) tmp = -y / (a / z); elseif (a <= 1.7e+32) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.5e-37], x, If[LessEqual[a, -9.2e-260], t$95$1, If[LessEqual[a, 0.000112], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e+32], t$95$1, x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{-37}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -9.2 \cdot 10^{-260}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 0.000112:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.4999999999999999e-37 or 1.69999999999999989e32 < a Initial program 86.9%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in x around inf 61.8%
if -2.4999999999999999e-37 < a < -9.2e-260 or 1.11999999999999998e-4 < a < 1.69999999999999989e32Initial program 99.7%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in y around 0 99.7%
*-commutative99.7%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in t around inf 54.6%
associate-*r/54.6%
Simplified54.6%
if -9.2e-260 < a < 1.11999999999999998e-4Initial program 95.9%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in z around inf 55.2%
mul-1-neg55.2%
associate-/l*53.7%
Simplified53.7%
Final simplification57.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.15e-8) (not (<= a 3.6e+29))) (+ x (* t (/ y a))) (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.15e-8) || !(a <= 3.6e+29)) {
tmp = x + (t * (y / 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 ((a <= (-2.15d-8)) .or. (.not. (a <= 3.6d+29))) then
tmp = x + (t * (y / 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 ((a <= -2.15e-8) || !(a <= 3.6e+29)) {
tmp = x + (t * (y / a));
} else {
tmp = (y / a) * (t - z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.15e-8) or not (a <= 3.6e+29): tmp = x + (t * (y / a)) else: tmp = (y / a) * (t - z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.15e-8) || !(a <= 3.6e+29)) tmp = Float64(x + Float64(t * Float64(y / 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 ((a <= -2.15e-8) || ~((a <= 3.6e+29))) tmp = x + (t * (y / a)); else tmp = (y / a) * (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.15e-8], N[Not[LessEqual[a, 3.6e+29]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.15 \cdot 10^{-8} \lor \neg \left(a \leq 3.6 \cdot 10^{+29}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if a < -2.1500000000000001e-8 or 3.59999999999999976e29 < a Initial program 86.1%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in y around 0 86.1%
*-commutative86.1%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in z around 0 76.0%
cancel-sign-sub-inv76.0%
metadata-eval76.0%
associate-*l/81.8%
*-commutative81.8%
*-lft-identity81.8%
*-commutative81.8%
associate-*l/76.0%
associate-*r/78.8%
Simplified78.8%
if -2.1500000000000001e-8 < a < 3.59999999999999976e29Initial program 97.6%
associate-*l/97.8%
Simplified97.8%
Taylor expanded in y around 0 97.6%
*-commutative97.6%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in x around 0 82.0%
mul-1-neg82.0%
associate-*r/73.1%
distribute-rgt-neg-in73.1%
neg-sub073.1%
div-sub70.2%
associate--r-70.2%
neg-sub070.2%
distribute-frac-neg70.2%
+-commutative70.2%
distribute-frac-neg70.2%
sub-neg70.2%
distribute-rgt-out--63.8%
associate-/r/67.3%
associate-*l/71.2%
associate-*r/70.6%
*-commutative70.6%
associate-/l*71.1%
*-commutative71.1%
associate-*l/70.6%
distribute-lft-out--82.8%
Simplified82.8%
Final simplification81.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.8e-9) (not (<= a 2.8e+29))) (+ x (* y (/ t a))) (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.8e-9) || !(a <= 2.8e+29)) {
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 ((a <= (-2.8d-9)) .or. (.not. (a <= 2.8d+29))) 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 ((a <= -2.8e-9) || !(a <= 2.8e+29)) {
tmp = x + (y * (t / a));
} else {
tmp = (y / a) * (t - z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.8e-9) or not (a <= 2.8e+29): tmp = x + (y * (t / a)) else: tmp = (y / a) * (t - z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.8e-9) || !(a <= 2.8e+29)) 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 ((a <= -2.8e-9) || ~((a <= 2.8e+29))) 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[a, -2.8e-9], N[Not[LessEqual[a, 2.8e+29]], $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}\;a \leq -2.8 \cdot 10^{-9} \lor \neg \left(a \leq 2.8 \cdot 10^{+29}\right):\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if a < -2.79999999999999984e-9 or 2.8e29 < a Initial program 86.2%
associate-*l/93.1%
Simplified93.1%
Taylor expanded in z around 0 76.2%
cancel-sign-sub-inv76.2%
metadata-eval76.2%
*-lft-identity76.2%
+-commutative76.2%
associate-/l*78.9%
associate-/r/81.9%
Simplified81.9%
if -2.79999999999999984e-9 < a < 2.8e29Initial program 97.6%
associate-*l/97.8%
Simplified97.8%
Taylor expanded in y around 0 97.6%
*-commutative97.6%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in x around 0 81.9%
mul-1-neg81.9%
associate-*r/72.9%
distribute-rgt-neg-in72.9%
neg-sub072.9%
div-sub70.0%
associate--r-70.0%
neg-sub070.0%
distribute-frac-neg70.0%
+-commutative70.0%
distribute-frac-neg70.0%
sub-neg70.0%
distribute-rgt-out--63.5%
associate-/r/67.0%
associate-*l/71.0%
associate-*r/70.4%
*-commutative70.4%
associate-/l*70.9%
*-commutative70.9%
associate-*l/70.4%
distribute-lft-out--82.7%
Simplified82.7%
Final simplification82.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.5e+96) (not (<= t 5.4e+71))) (+ x (* t (/ y a))) (- x (/ (* y z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.5e+96) || !(t <= 5.4e+71)) {
tmp = x + (t * (y / a));
} else {
tmp = x - ((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) :: tmp
if ((t <= (-6.5d+96)) .or. (.not. (t <= 5.4d+71))) then
tmp = x + (t * (y / a))
else
tmp = x - ((y * 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 ((t <= -6.5e+96) || !(t <= 5.4e+71)) {
tmp = x + (t * (y / a));
} else {
tmp = x - ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.5e+96) or not (t <= 5.4e+71): tmp = x + (t * (y / a)) else: tmp = x - ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.5e+96) || !(t <= 5.4e+71)) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x - Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.5e+96) || ~((t <= 5.4e+71))) tmp = x + (t * (y / a)); else tmp = x - ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.5e+96], N[Not[LessEqual[t, 5.4e+71]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+96} \lor \neg \left(t \leq 5.4 \cdot 10^{+71}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if t < -6.5e96 or 5.39999999999999993e71 < t Initial program 89.8%
associate-*l/95.6%
Simplified95.6%
Taylor expanded in y around 0 89.8%
*-commutative89.8%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in z around 0 84.7%
cancel-sign-sub-inv84.7%
metadata-eval84.7%
associate-*l/85.2%
*-commutative85.2%
*-lft-identity85.2%
*-commutative85.2%
associate-*l/84.7%
associate-*r/87.8%
Simplified87.8%
if -6.5e96 < t < 5.39999999999999993e71Initial program 94.2%
associate-*l/95.7%
Simplified95.7%
Taylor expanded in z around inf 84.6%
Final simplification85.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.2e-9) (- x (/ y (/ a (- z t)))) (+ x (* (/ y a) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.2e-9) {
tmp = x - (y / (a / (z - t)));
} 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 (a <= (-1.2d-9)) then
tmp = x - (y / (a / (z - t)))
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 (a <= -1.2e-9) {
tmp = x - (y / (a / (z - t)));
} else {
tmp = x + ((y / a) * (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.2e-9: tmp = x - (y / (a / (z - t))) else: tmp = x + ((y / a) * (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.2e-9) tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); else tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.2e-9) tmp = x - (y / (a / (z - t))); else tmp = x + ((y / a) * (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.2e-9], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.2 \cdot 10^{-9}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if a < -1.2e-9Initial program 86.6%
associate-/l*99.9%
Simplified99.9%
if -1.2e-9 < a Initial program 94.3%
associate-*l/96.4%
Simplified96.4%
Final simplification97.3%
(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(Float64(y / 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[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{a} \cdot \left(t - z\right)
\end{array}
Initial program 92.4%
associate-*l/95.7%
Simplified95.7%
Final simplification95.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 92.4%
associate-*l/95.7%
Simplified95.7%
Taylor expanded in x around inf 37.3%
Final simplification37.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 2023318
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:herbie-target
(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)))