
(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 13 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 (+ x (/ (- t z) (/ a y))))
double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / (a / y));
}
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 + ((t - z) / (a / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / (a / y));
}
def code(x, y, z, t, a): return x + ((t - z) / (a / y))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(t - z) / Float64(a / y))) end
function tmp = code(x, y, z, t, a) tmp = x + ((t - z) / (a / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{t - z}{\frac{a}{y}}
\end{array}
Initial program 92.2%
associate-*l/97.0%
Simplified97.0%
*-commutative97.0%
clear-num96.9%
un-div-inv97.3%
Applied egg-rr97.3%
Final simplification97.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ z a) (- y))))
(if (<= a -3.5e+73)
x
(if (<= a 1.25e-274)
t_1
(if (<= a 1.25e-159)
(/ (* t y) a)
(if (<= a 1400.0)
t_1
(if (<= a 6.5e+70)
x
(if (<= a 2.6e+80)
t_1
(if (<= a 1.04e+142) (* y (/ t a)) x)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z / a) * -y;
double tmp;
if (a <= -3.5e+73) {
tmp = x;
} else if (a <= 1.25e-274) {
tmp = t_1;
} else if (a <= 1.25e-159) {
tmp = (t * y) / a;
} else if (a <= 1400.0) {
tmp = t_1;
} else if (a <= 6.5e+70) {
tmp = x;
} else if (a <= 2.6e+80) {
tmp = t_1;
} else if (a <= 1.04e+142) {
tmp = y * (t / 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) :: t_1
real(8) :: tmp
t_1 = (z / a) * -y
if (a <= (-3.5d+73)) then
tmp = x
else if (a <= 1.25d-274) then
tmp = t_1
else if (a <= 1.25d-159) then
tmp = (t * y) / a
else if (a <= 1400.0d0) then
tmp = t_1
else if (a <= 6.5d+70) then
tmp = x
else if (a <= 2.6d+80) then
tmp = t_1
else if (a <= 1.04d+142) then
tmp = y * (t / 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 t_1 = (z / a) * -y;
double tmp;
if (a <= -3.5e+73) {
tmp = x;
} else if (a <= 1.25e-274) {
tmp = t_1;
} else if (a <= 1.25e-159) {
tmp = (t * y) / a;
} else if (a <= 1400.0) {
tmp = t_1;
} else if (a <= 6.5e+70) {
tmp = x;
} else if (a <= 2.6e+80) {
tmp = t_1;
} else if (a <= 1.04e+142) {
tmp = y * (t / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z / a) * -y tmp = 0 if a <= -3.5e+73: tmp = x elif a <= 1.25e-274: tmp = t_1 elif a <= 1.25e-159: tmp = (t * y) / a elif a <= 1400.0: tmp = t_1 elif a <= 6.5e+70: tmp = x elif a <= 2.6e+80: tmp = t_1 elif a <= 1.04e+142: tmp = y * (t / a) else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z / a) * Float64(-y)) tmp = 0.0 if (a <= -3.5e+73) tmp = x; elseif (a <= 1.25e-274) tmp = t_1; elseif (a <= 1.25e-159) tmp = Float64(Float64(t * y) / a); elseif (a <= 1400.0) tmp = t_1; elseif (a <= 6.5e+70) tmp = x; elseif (a <= 2.6e+80) tmp = t_1; elseif (a <= 1.04e+142) tmp = Float64(y * Float64(t / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z / a) * -y; tmp = 0.0; if (a <= -3.5e+73) tmp = x; elseif (a <= 1.25e-274) tmp = t_1; elseif (a <= 1.25e-159) tmp = (t * y) / a; elseif (a <= 1400.0) tmp = t_1; elseif (a <= 6.5e+70) tmp = x; elseif (a <= 2.6e+80) tmp = t_1; elseif (a <= 1.04e+142) tmp = y * (t / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / a), $MachinePrecision] * (-y)), $MachinePrecision]}, If[LessEqual[a, -3.5e+73], x, If[LessEqual[a, 1.25e-274], t$95$1, If[LessEqual[a, 1.25e-159], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 1400.0], t$95$1, If[LessEqual[a, 6.5e+70], x, If[LessEqual[a, 2.6e+80], t$95$1, If[LessEqual[a, 1.04e+142], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], x]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{a} \cdot \left(-y\right)\\
\mathbf{if}\;a \leq -3.5 \cdot 10^{+73}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-274}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-159}:\\
\;\;\;\;\frac{t \cdot y}{a}\\
\mathbf{elif}\;a \leq 1400:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{+70}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{+80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.04 \cdot 10^{+142}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.50000000000000002e73 or 1400 < a < 6.49999999999999978e70 or 1.04e142 < a Initial program 87.5%
associate-*l/99.0%
Simplified99.0%
Taylor expanded in x around inf 62.9%
if -3.50000000000000002e73 < a < 1.25e-274 or 1.25000000000000008e-159 < a < 1400 or 6.49999999999999978e70 < a < 2.59999999999999982e80Initial program 97.5%
associate-*l/98.4%
Simplified98.4%
*-commutative98.4%
clear-num98.2%
un-div-inv98.2%
Applied egg-rr98.2%
Taylor expanded in z around inf 59.9%
mul-1-neg59.9%
associate-*r/56.0%
distribute-rgt-neg-in56.0%
distribute-frac-neg56.0%
Simplified56.0%
if 1.25e-274 < a < 1.25000000000000008e-159Initial program 99.8%
associate-*l/79.0%
Simplified79.0%
Taylor expanded in t around inf 70.3%
if 2.59999999999999982e80 < a < 1.04e142Initial program 77.5%
associate-*l/94.1%
Simplified94.1%
*-commutative94.1%
clear-num93.7%
un-div-inv93.9%
Applied egg-rr93.9%
Taylor expanded in t around inf 27.2%
associate-*l/43.3%
Simplified43.3%
Final simplification59.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- a)))))
(if (<= a -3.8e+73)
x
(if (<= a 1.15e-273)
t_1
(if (<= a 1.12e-159)
(/ (* t y) a)
(if (<= a 9.5e-9)
t_1
(if (<= a 8.2e+70)
x
(if (<= a 3.1e+81)
(* (/ z a) (- y))
(if (<= a 3.3e+143) (* y (/ t a)) x)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / -a);
double tmp;
if (a <= -3.8e+73) {
tmp = x;
} else if (a <= 1.15e-273) {
tmp = t_1;
} else if (a <= 1.12e-159) {
tmp = (t * y) / a;
} else if (a <= 9.5e-9) {
tmp = t_1;
} else if (a <= 8.2e+70) {
tmp = x;
} else if (a <= 3.1e+81) {
tmp = (z / a) * -y;
} else if (a <= 3.3e+143) {
tmp = y * (t / 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) :: t_1
real(8) :: tmp
t_1 = z * (y / -a)
if (a <= (-3.8d+73)) then
tmp = x
else if (a <= 1.15d-273) then
tmp = t_1
else if (a <= 1.12d-159) then
tmp = (t * y) / a
else if (a <= 9.5d-9) then
tmp = t_1
else if (a <= 8.2d+70) then
tmp = x
else if (a <= 3.1d+81) then
tmp = (z / a) * -y
else if (a <= 3.3d+143) then
tmp = y * (t / 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 t_1 = z * (y / -a);
double tmp;
if (a <= -3.8e+73) {
tmp = x;
} else if (a <= 1.15e-273) {
tmp = t_1;
} else if (a <= 1.12e-159) {
tmp = (t * y) / a;
} else if (a <= 9.5e-9) {
tmp = t_1;
} else if (a <= 8.2e+70) {
tmp = x;
} else if (a <= 3.1e+81) {
tmp = (z / a) * -y;
} else if (a <= 3.3e+143) {
tmp = y * (t / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / -a) tmp = 0 if a <= -3.8e+73: tmp = x elif a <= 1.15e-273: tmp = t_1 elif a <= 1.12e-159: tmp = (t * y) / a elif a <= 9.5e-9: tmp = t_1 elif a <= 8.2e+70: tmp = x elif a <= 3.1e+81: tmp = (z / a) * -y elif a <= 3.3e+143: tmp = y * (t / a) else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(-a))) tmp = 0.0 if (a <= -3.8e+73) tmp = x; elseif (a <= 1.15e-273) tmp = t_1; elseif (a <= 1.12e-159) tmp = Float64(Float64(t * y) / a); elseif (a <= 9.5e-9) tmp = t_1; elseif (a <= 8.2e+70) tmp = x; elseif (a <= 3.1e+81) tmp = Float64(Float64(z / a) * Float64(-y)); elseif (a <= 3.3e+143) tmp = Float64(y * Float64(t / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / -a); tmp = 0.0; if (a <= -3.8e+73) tmp = x; elseif (a <= 1.15e-273) tmp = t_1; elseif (a <= 1.12e-159) tmp = (t * y) / a; elseif (a <= 9.5e-9) tmp = t_1; elseif (a <= 8.2e+70) tmp = x; elseif (a <= 3.1e+81) tmp = (z / a) * -y; elseif (a <= 3.3e+143) tmp = y * (t / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.8e+73], x, If[LessEqual[a, 1.15e-273], t$95$1, If[LessEqual[a, 1.12e-159], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 9.5e-9], t$95$1, If[LessEqual[a, 8.2e+70], x, If[LessEqual[a, 3.1e+81], N[(N[(z / a), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[a, 3.3e+143], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], x]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{-a}\\
\mathbf{if}\;a \leq -3.8 \cdot 10^{+73}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-273}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.12 \cdot 10^{-159}:\\
\;\;\;\;\frac{t \cdot y}{a}\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{+70}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{+81}:\\
\;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{+143}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.80000000000000022e73 or 9.5000000000000007e-9 < a < 8.2000000000000004e70 or 3.3e143 < a Initial program 87.5%
associate-*l/99.0%
Simplified99.0%
Taylor expanded in x around inf 62.9%
if -3.80000000000000022e73 < a < 1.1499999999999999e-273 or 1.12000000000000006e-159 < a < 9.5000000000000007e-9Initial program 98.3%
associate-*l/98.3%
Simplified98.3%
Taylor expanded in z around inf 59.7%
mul-1-neg59.7%
associate-*l/61.8%
*-commutative61.8%
distribute-rgt-neg-in61.8%
*-lft-identity61.8%
associate-*l/61.7%
remove-double-neg61.7%
neg-mul-161.7%
associate-*r*61.7%
*-commutative61.7%
associate-*r/61.7%
metadata-eval61.7%
metadata-eval61.7%
associate-/r*61.7%
neg-mul-161.7%
*-commutative61.7%
associate-*r/61.8%
*-rgt-identity61.8%
distribute-frac-neg61.8%
remove-double-neg61.8%
Simplified61.8%
if 1.1499999999999999e-273 < a < 1.12000000000000006e-159Initial program 99.8%
associate-*l/79.0%
Simplified79.0%
Taylor expanded in t around inf 70.3%
if 8.2000000000000004e70 < a < 3.1e81Initial program 69.0%
associate-*l/100.0%
Simplified100.0%
*-commutative100.0%
clear-num100.0%
un-div-inv100.0%
Applied egg-rr100.0%
Taylor expanded in z around inf 69.0%
mul-1-neg69.0%
associate-*r/100.0%
distribute-rgt-neg-in100.0%
distribute-frac-neg100.0%
Simplified100.0%
if 3.1e81 < a < 3.3e143Initial program 77.5%
associate-*l/94.1%
Simplified94.1%
*-commutative94.1%
clear-num93.7%
un-div-inv93.9%
Applied egg-rr93.9%
Taylor expanded in t around inf 27.2%
associate-*l/43.3%
Simplified43.3%
Final simplification62.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))) (t_2 (* (/ y a) (- t z))))
(if (<= z -1.1e+18)
t_2
(if (<= z 1.05e+64)
t_1
(if (<= z 4.8e+120)
t_2
(if (<= z 3.3e+168) t_1 (if (<= z 2e+223) (/ (- z) (/ a y)) t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double t_2 = (y / a) * (t - z);
double tmp;
if (z <= -1.1e+18) {
tmp = t_2;
} else if (z <= 1.05e+64) {
tmp = t_1;
} else if (z <= 4.8e+120) {
tmp = t_2;
} else if (z <= 3.3e+168) {
tmp = t_1;
} else if (z <= 2e+223) {
tmp = -z / (a / y);
} 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 + (t * (y / a))
t_2 = (y / a) * (t - z)
if (z <= (-1.1d+18)) then
tmp = t_2
else if (z <= 1.05d+64) then
tmp = t_1
else if (z <= 4.8d+120) then
tmp = t_2
else if (z <= 3.3d+168) then
tmp = t_1
else if (z <= 2d+223) then
tmp = -z / (a / y)
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 + (t * (y / a));
double t_2 = (y / a) * (t - z);
double tmp;
if (z <= -1.1e+18) {
tmp = t_2;
} else if (z <= 1.05e+64) {
tmp = t_1;
} else if (z <= 4.8e+120) {
tmp = t_2;
} else if (z <= 3.3e+168) {
tmp = t_1;
} else if (z <= 2e+223) {
tmp = -z / (a / y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) t_2 = (y / a) * (t - z) tmp = 0 if z <= -1.1e+18: tmp = t_2 elif z <= 1.05e+64: tmp = t_1 elif z <= 4.8e+120: tmp = t_2 elif z <= 3.3e+168: tmp = t_1 elif z <= 2e+223: tmp = -z / (a / y) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) t_2 = Float64(Float64(y / a) * Float64(t - z)) tmp = 0.0 if (z <= -1.1e+18) tmp = t_2; elseif (z <= 1.05e+64) tmp = t_1; elseif (z <= 4.8e+120) tmp = t_2; elseif (z <= 3.3e+168) tmp = t_1; elseif (z <= 2e+223) tmp = Float64(Float64(-z) / Float64(a / y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); t_2 = (y / a) * (t - z); tmp = 0.0; if (z <= -1.1e+18) tmp = t_2; elseif (z <= 1.05e+64) tmp = t_1; elseif (z <= 4.8e+120) tmp = t_2; elseif (z <= 3.3e+168) tmp = t_1; elseif (z <= 2e+223) tmp = -z / (a / y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+18], t$95$2, If[LessEqual[z, 1.05e+64], t$95$1, If[LessEqual[z, 4.8e+120], t$95$2, If[LessEqual[z, 3.3e+168], t$95$1, If[LessEqual[z, 2e+223], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
t_2 := \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+18}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+120}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+168}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+223}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.1e18 or 1.05e64 < z < 4.80000000000000002e120 or 2.00000000000000009e223 < z Initial program 88.9%
associate-*l/97.1%
Simplified97.1%
*-commutative97.1%
clear-num96.7%
un-div-inv96.8%
Applied egg-rr96.8%
Taylor expanded in x around 0 71.4%
mul-1-neg71.4%
associate-*r/73.5%
distribute-rgt-neg-in73.5%
neg-sub073.5%
div-sub71.4%
associate--r-71.4%
neg-sub071.4%
distribute-frac-neg71.4%
+-commutative71.4%
distribute-frac-neg71.4%
sub-neg71.4%
distribute-rgt-out--69.2%
associate-*l/69.4%
associate-*r/67.1%
associate-*l/63.0%
associate-*r/71.2%
distribute-rgt-out--78.6%
Simplified78.6%
if -1.1e18 < z < 1.05e64 or 4.80000000000000002e120 < z < 3.2999999999999999e168Initial program 93.7%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in z around 0 82.9%
cancel-sign-sub-inv82.9%
metadata-eval82.9%
*-lft-identity82.9%
+-commutative82.9%
associate-*r/87.3%
Simplified87.3%
if 3.2999999999999999e168 < z < 2.00000000000000009e223Initial program 99.8%
associate-*l/89.0%
Simplified89.0%
Taylor expanded in z around inf 89.6%
mul-1-neg89.6%
associate-*l/78.9%
*-commutative78.9%
distribute-rgt-neg-in78.9%
*-lft-identity78.9%
associate-*l/79.0%
remove-double-neg79.0%
neg-mul-179.0%
associate-*r*79.0%
*-commutative79.0%
associate-*r/79.0%
metadata-eval79.0%
metadata-eval79.0%
associate-/r*79.0%
neg-mul-179.0%
*-commutative79.0%
associate-*r/78.9%
*-rgt-identity78.9%
distribute-frac-neg78.9%
remove-double-neg78.9%
Simplified78.9%
associate-*r/89.6%
add-sqr-sqrt56.3%
sqrt-unprod55.8%
sqr-neg55.8%
sqrt-unprod0.0%
add-sqr-sqrt0.8%
associate-/l*1.0%
frac-2neg1.0%
distribute-frac-neg1.0%
add-sqr-sqrt0.9%
sqrt-unprod23.9%
sqr-neg23.9%
sqrt-unprod33.2%
add-sqr-sqrt79.2%
Applied egg-rr79.2%
Final simplification83.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) (- t z))))
(if (<= z -6.2e+22)
t_1
(if (<= z 6.4e+63)
(+ x (/ t (/ a y)))
(if (<= z 4.4e+120)
t_1
(if (<= z 4.6e+167)
(+ x (* t (/ y a)))
(if (<= z 7.2e+229) (/ (- z) (/ a y)) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * (t - z);
double tmp;
if (z <= -6.2e+22) {
tmp = t_1;
} else if (z <= 6.4e+63) {
tmp = x + (t / (a / y));
} else if (z <= 4.4e+120) {
tmp = t_1;
} else if (z <= 4.6e+167) {
tmp = x + (t * (y / a));
} else if (z <= 7.2e+229) {
tmp = -z / (a / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y / a) * (t - z)
if (z <= (-6.2d+22)) then
tmp = t_1
else if (z <= 6.4d+63) then
tmp = x + (t / (a / y))
else if (z <= 4.4d+120) then
tmp = t_1
else if (z <= 4.6d+167) then
tmp = x + (t * (y / a))
else if (z <= 7.2d+229) then
tmp = -z / (a / y)
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 / a) * (t - z);
double tmp;
if (z <= -6.2e+22) {
tmp = t_1;
} else if (z <= 6.4e+63) {
tmp = x + (t / (a / y));
} else if (z <= 4.4e+120) {
tmp = t_1;
} else if (z <= 4.6e+167) {
tmp = x + (t * (y / a));
} else if (z <= 7.2e+229) {
tmp = -z / (a / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) * (t - z) tmp = 0 if z <= -6.2e+22: tmp = t_1 elif z <= 6.4e+63: tmp = x + (t / (a / y)) elif z <= 4.4e+120: tmp = t_1 elif z <= 4.6e+167: tmp = x + (t * (y / a)) elif z <= 7.2e+229: tmp = -z / (a / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) * Float64(t - z)) tmp = 0.0 if (z <= -6.2e+22) tmp = t_1; elseif (z <= 6.4e+63) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 4.4e+120) tmp = t_1; elseif (z <= 4.6e+167) tmp = Float64(x + Float64(t * Float64(y / a))); elseif (z <= 7.2e+229) tmp = Float64(Float64(-z) / Float64(a / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) * (t - z); tmp = 0.0; if (z <= -6.2e+22) tmp = t_1; elseif (z <= 6.4e+63) tmp = x + (t / (a / y)); elseif (z <= 4.4e+120) tmp = t_1; elseif (z <= 4.6e+167) tmp = x + (t * (y / a)); elseif (z <= 7.2e+229) tmp = -z / (a / y); else tmp = t_1; 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[z, -6.2e+22], t$95$1, If[LessEqual[z, 6.4e+63], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+120], t$95$1, If[LessEqual[z, 4.6e+167], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+229], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+22}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+63}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+120}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+167}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+229}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.2000000000000004e22 or 6.40000000000000022e63 < z < 4.4000000000000003e120 or 7.19999999999999973e229 < z Initial program 88.9%
associate-*l/97.1%
Simplified97.1%
*-commutative97.1%
clear-num96.7%
un-div-inv96.8%
Applied egg-rr96.8%
Taylor expanded in x around 0 71.4%
mul-1-neg71.4%
associate-*r/73.5%
distribute-rgt-neg-in73.5%
neg-sub073.5%
div-sub71.4%
associate--r-71.4%
neg-sub071.4%
distribute-frac-neg71.4%
+-commutative71.4%
distribute-frac-neg71.4%
sub-neg71.4%
distribute-rgt-out--69.2%
associate-*l/69.4%
associate-*r/67.1%
associate-*l/63.0%
associate-*r/71.2%
distribute-rgt-out--78.6%
Simplified78.6%
if -6.2000000000000004e22 < z < 6.40000000000000022e63Initial program 94.0%
associate-*l/97.3%
Simplified97.3%
Taylor expanded in z around 0 83.2%
cancel-sign-sub-inv83.2%
metadata-eval83.2%
*-lft-identity83.2%
+-commutative83.2%
associate-*r/87.1%
Simplified87.1%
clear-num87.1%
div-inv87.7%
Applied egg-rr87.7%
if 4.4000000000000003e120 < z < 4.59999999999999976e167Initial program 88.9%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in z around 0 78.7%
cancel-sign-sub-inv78.7%
metadata-eval78.7%
*-lft-identity78.7%
+-commutative78.7%
associate-*r/89.8%
Simplified89.8%
if 4.59999999999999976e167 < z < 7.19999999999999973e229Initial program 99.8%
associate-*l/89.0%
Simplified89.0%
Taylor expanded in z around inf 89.6%
mul-1-neg89.6%
associate-*l/78.9%
*-commutative78.9%
distribute-rgt-neg-in78.9%
*-lft-identity78.9%
associate-*l/79.0%
remove-double-neg79.0%
neg-mul-179.0%
associate-*r*79.0%
*-commutative79.0%
associate-*r/79.0%
metadata-eval79.0%
metadata-eval79.0%
associate-/r*79.0%
neg-mul-179.0%
*-commutative79.0%
associate-*r/78.9%
*-rgt-identity78.9%
distribute-frac-neg78.9%
remove-double-neg78.9%
Simplified78.9%
associate-*r/89.6%
add-sqr-sqrt56.3%
sqrt-unprod55.8%
sqr-neg55.8%
sqrt-unprod0.0%
add-sqr-sqrt0.8%
associate-/l*1.0%
frac-2neg1.0%
distribute-frac-neg1.0%
add-sqr-sqrt0.9%
sqrt-unprod23.9%
sqr-neg23.9%
sqrt-unprod33.2%
add-sqr-sqrt79.2%
Applied egg-rr79.2%
Final simplification84.2%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -9.4e-194)
(and (not (<= y 5.2e-91)) (or (<= y 1.2e-27) (not (<= y 8.5e-20)))))
(* y (/ (- t z) a))
x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.4e-194) || (!(y <= 5.2e-91) && ((y <= 1.2e-27) || !(y <= 8.5e-20)))) {
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 <= (-9.4d-194)) .or. (.not. (y <= 5.2d-91)) .and. (y <= 1.2d-27) .or. (.not. (y <= 8.5d-20))) 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 <= -9.4e-194) || (!(y <= 5.2e-91) && ((y <= 1.2e-27) || !(y <= 8.5e-20)))) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.4e-194) or (not (y <= 5.2e-91) and ((y <= 1.2e-27) or not (y <= 8.5e-20))): tmp = y * ((t - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.4e-194) || (!(y <= 5.2e-91) && ((y <= 1.2e-27) || !(y <= 8.5e-20)))) 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 <= -9.4e-194) || (~((y <= 5.2e-91)) && ((y <= 1.2e-27) || ~((y <= 8.5e-20))))) tmp = y * ((t - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.4e-194], And[N[Not[LessEqual[y, 5.2e-91]], $MachinePrecision], Or[LessEqual[y, 1.2e-27], N[Not[LessEqual[y, 8.5e-20]], $MachinePrecision]]]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.4 \cdot 10^{-194} \lor \neg \left(y \leq 5.2 \cdot 10^{-91}\right) \land \left(y \leq 1.2 \cdot 10^{-27} \lor \neg \left(y \leq 8.5 \cdot 10^{-20}\right)\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.4000000000000005e-194 or 5.20000000000000028e-91 < y < 1.20000000000000001e-27 or 8.5000000000000005e-20 < y Initial program 90.1%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in x around 0 66.7%
mul-1-neg66.7%
associate-*r/70.9%
distribute-rgt-neg-out70.9%
distribute-neg-frac70.9%
neg-sub070.9%
associate--r-70.9%
neg-sub070.9%
+-commutative70.9%
sub-neg70.9%
Simplified70.9%
if -9.4000000000000005e-194 < y < 5.20000000000000028e-91 or 1.20000000000000001e-27 < y < 8.5000000000000005e-20Initial program 98.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around inf 71.4%
Final simplification71.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) (- t z))))
(if (<= y -9e-194)
t_1
(if (<= y 3.4e-93)
x
(if (<= y 9.5e-28) t_1 (if (<= y 5.8e-20) 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 <= -9e-194) {
tmp = t_1;
} else if (y <= 3.4e-93) {
tmp = x;
} else if (y <= 9.5e-28) {
tmp = t_1;
} else if (y <= 5.8e-20) {
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 <= (-9d-194)) then
tmp = t_1
else if (y <= 3.4d-93) then
tmp = x
else if (y <= 9.5d-28) then
tmp = t_1
else if (y <= 5.8d-20) 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 <= -9e-194) {
tmp = t_1;
} else if (y <= 3.4e-93) {
tmp = x;
} else if (y <= 9.5e-28) {
tmp = t_1;
} else if (y <= 5.8e-20) {
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 <= -9e-194: tmp = t_1 elif y <= 3.4e-93: tmp = x elif y <= 9.5e-28: tmp = t_1 elif y <= 5.8e-20: 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 <= -9e-194) tmp = t_1; elseif (y <= 3.4e-93) tmp = x; elseif (y <= 9.5e-28) tmp = t_1; elseif (y <= 5.8e-20) 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 <= -9e-194) tmp = t_1; elseif (y <= 3.4e-93) tmp = x; elseif (y <= 9.5e-28) tmp = t_1; elseif (y <= 5.8e-20) 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, -9e-194], t$95$1, If[LessEqual[y, 3.4e-93], x, If[LessEqual[y, 9.5e-28], t$95$1, If[LessEqual[y, 5.8e-20], 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 -9 \cdot 10^{-194}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-93}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-28}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if y < -8.9999999999999997e-194 or 3.40000000000000001e-93 < y < 9.50000000000000001e-28Initial program 94.3%
associate-*l/97.5%
Simplified97.5%
*-commutative97.5%
clear-num97.5%
un-div-inv97.6%
Applied egg-rr97.6%
Taylor expanded in x around 0 67.1%
mul-1-neg67.1%
associate-*r/65.2%
distribute-rgt-neg-in65.2%
neg-sub065.2%
div-sub63.5%
associate--r-63.5%
neg-sub063.5%
distribute-frac-neg63.5%
+-commutative63.5%
distribute-frac-neg63.5%
sub-neg63.5%
distribute-rgt-out--59.2%
associate-*l/60.6%
associate-*r/60.5%
associate-*l/61.2%
associate-*r/61.3%
distribute-rgt-out--68.1%
Simplified68.1%
if -8.9999999999999997e-194 < y < 3.40000000000000001e-93 or 9.50000000000000001e-28 < y < 5.8e-20Initial program 98.4%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around inf 71.4%
if 5.8e-20 < y Initial program 83.3%
associate-*l/97.3%
Simplified97.3%
Taylor expanded in x around 0 66.0%
mul-1-neg66.0%
associate-*r/80.0%
distribute-rgt-neg-out80.0%
distribute-neg-frac80.0%
neg-sub080.0%
associate--r-80.0%
neg-sub080.0%
+-commutative80.0%
sub-neg80.0%
Simplified80.0%
Final simplification72.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2e-84) (not (<= z 6.2e+63))) (* (/ y a) (- t z)) (+ x (/ (* t y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2e-84) || !(z <= 6.2e+63)) {
tmp = (y / a) * (t - z);
} 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 <= (-2d-84)) .or. (.not. (z <= 6.2d+63))) then
tmp = (y / a) * (t - z)
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 <= -2e-84) || !(z <= 6.2e+63)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + ((t * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2e-84) or not (z <= 6.2e+63): tmp = (y / a) * (t - z) else: tmp = x + ((t * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2e-84) || !(z <= 6.2e+63)) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = Float64(x + Float64(Float64(t * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2e-84) || ~((z <= 6.2e+63))) tmp = (y / a) * (t - z); else tmp = x + ((t * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2e-84], N[Not[LessEqual[z, 6.2e+63]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-84} \lor \neg \left(z \leq 6.2 \cdot 10^{+63}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\end{array}
\end{array}
if z < -2.0000000000000001e-84 or 6.2000000000000001e63 < z Initial program 90.8%
associate-*l/97.0%
Simplified97.0%
*-commutative97.0%
clear-num96.8%
un-div-inv96.8%
Applied egg-rr96.8%
Taylor expanded in x around 0 69.9%
mul-1-neg69.9%
associate-*r/69.2%
distribute-rgt-neg-in69.2%
neg-sub069.2%
div-sub65.9%
associate--r-65.9%
neg-sub065.9%
distribute-frac-neg65.9%
+-commutative65.9%
distribute-frac-neg65.9%
sub-neg65.9%
distribute-rgt-out--61.9%
associate-*l/62.1%
associate-*r/59.6%
associate-*l/58.8%
associate-*r/64.2%
distribute-rgt-out--74.6%
Simplified74.6%
if -2.0000000000000001e-84 < z < 6.2000000000000001e63Initial program 93.5%
sub-neg93.5%
distribute-frac-neg93.5%
distribute-lft-neg-out93.5%
+-commutative93.5%
distribute-lft-neg-out93.5%
distribute-rgt-neg-in93.5%
associate-*l/97.0%
fma-def97.0%
sub-neg97.0%
distribute-neg-in97.0%
remove-double-neg97.0%
+-commutative97.0%
sub-neg97.0%
Simplified97.0%
Taylor expanded in z around 0 85.5%
Final simplification80.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2e-84) (not (<= z 3.6e-36))) (- x (* z (/ y a))) (+ x (/ t (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2e-84) || !(z <= 3.6e-36)) {
tmp = x - (z * (y / a));
} else {
tmp = x + (t / (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 ((z <= (-2d-84)) .or. (.not. (z <= 3.6d-36))) then
tmp = x - (z * (y / a))
else
tmp = x + (t / (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 ((z <= -2e-84) || !(z <= 3.6e-36)) {
tmp = x - (z * (y / a));
} else {
tmp = x + (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2e-84) or not (z <= 3.6e-36): tmp = x - (z * (y / a)) else: tmp = x + (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2e-84) || !(z <= 3.6e-36)) tmp = Float64(x - Float64(z * Float64(y / a))); else tmp = Float64(x + Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2e-84) || ~((z <= 3.6e-36))) tmp = x - (z * (y / a)); else tmp = x + (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2e-84], N[Not[LessEqual[z, 3.6e-36]], $MachinePrecision]], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-84} \lor \neg \left(z \leq 3.6 \cdot 10^{-36}\right):\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -2.0000000000000001e-84 or 3.60000000000000032e-36 < z Initial program 90.9%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in z around inf 80.9%
associate-*l/84.9%
*-commutative84.9%
Simplified84.9%
if -2.0000000000000001e-84 < z < 3.60000000000000032e-36Initial program 93.9%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in z around 0 90.5%
cancel-sign-sub-inv90.5%
metadata-eval90.5%
*-lft-identity90.5%
+-commutative90.5%
associate-*r/91.4%
Simplified91.4%
clear-num91.4%
div-inv92.3%
Applied egg-rr92.3%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.6e+54) x (if (<= a 1.8e-55) (* t (/ y a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.6e+54) {
tmp = x;
} else if (a <= 1.8e-55) {
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 <= (-6.6d+54)) then
tmp = x
else if (a <= 1.8d-55) 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 <= -6.6e+54) {
tmp = x;
} else if (a <= 1.8e-55) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.6e+54: tmp = x elif a <= 1.8e-55: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.6e+54) tmp = x; elseif (a <= 1.8e-55) 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 <= -6.6e+54) tmp = x; elseif (a <= 1.8e-55) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.6e+54], x, If[LessEqual[a, 1.8e-55], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.6 \cdot 10^{+54}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-55}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.6e54 or 1.8e-55 < a Initial program 87.0%
associate-*l/97.8%
Simplified97.8%
Taylor expanded in x around inf 55.2%
if -6.6e54 < a < 1.8e-55Initial program 98.3%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in t around inf 41.7%
associate-*r/43.3%
Simplified43.3%
Final simplification49.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.42e+56) x (if (<= a 4.4e-54) (/ t (/ a y)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.42e+56) {
tmp = x;
} else if (a <= 4.4e-54) {
tmp = t / (a / y);
} 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.42d+56)) then
tmp = x
else if (a <= 4.4d-54) then
tmp = t / (a / y)
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.42e+56) {
tmp = x;
} else if (a <= 4.4e-54) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.42e+56: tmp = x elif a <= 4.4e-54: tmp = t / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.42e+56) tmp = x; elseif (a <= 4.4e-54) tmp = Float64(t / Float64(a / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.42e+56) tmp = x; elseif (a <= 4.4e-54) tmp = t / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.42e+56], x, If[LessEqual[a, 4.4e-54], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.42 \cdot 10^{+56}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{-54}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.42e56 or 4.3999999999999999e-54 < a Initial program 87.0%
associate-*l/97.8%
Simplified97.8%
Taylor expanded in x around inf 55.2%
if -1.42e56 < a < 4.3999999999999999e-54Initial program 98.3%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in t around inf 41.7%
associate-/l*44.1%
Simplified44.1%
Final simplification50.1%
(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.2%
associate-*l/97.0%
Simplified97.0%
Final simplification97.0%
(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.2%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in x around inf 37.5%
Final simplification37.5%
(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 2023336
(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)))