
(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 12 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 (/ (- z t) (/ a y))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) / (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 + ((z - t) / (a / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) / (a / y));
}
def code(x, y, z, t, a): return x + ((z - t) / (a / y))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) / Float64(a / y))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) / (a / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{z - t}{\frac{a}{y}}
\end{array}
Initial program 91.1%
associate-*l/97.2%
Simplified97.2%
*-commutative97.2%
clear-num97.1%
un-div-inv97.8%
Applied egg-rr97.8%
Final simplification97.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z a))) (t_2 (* t (/ (- y) a))))
(if (<= y -1.65e+156)
t_2
(if (<= y -5.2e-56)
t_1
(if (<= y 2.7e+15)
x
(if (or (<= y 1.4e+86) (and (not (<= y 2.7e+169)) (<= y 1.9e+210)))
t_1
t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / a);
double t_2 = t * (-y / a);
double tmp;
if (y <= -1.65e+156) {
tmp = t_2;
} else if (y <= -5.2e-56) {
tmp = t_1;
} else if (y <= 2.7e+15) {
tmp = x;
} else if ((y <= 1.4e+86) || (!(y <= 2.7e+169) && (y <= 1.9e+210))) {
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 = y * (z / a)
t_2 = t * (-y / a)
if (y <= (-1.65d+156)) then
tmp = t_2
else if (y <= (-5.2d-56)) then
tmp = t_1
else if (y <= 2.7d+15) then
tmp = x
else if ((y <= 1.4d+86) .or. (.not. (y <= 2.7d+169)) .and. (y <= 1.9d+210)) 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 = y * (z / a);
double t_2 = t * (-y / a);
double tmp;
if (y <= -1.65e+156) {
tmp = t_2;
} else if (y <= -5.2e-56) {
tmp = t_1;
} else if (y <= 2.7e+15) {
tmp = x;
} else if ((y <= 1.4e+86) || (!(y <= 2.7e+169) && (y <= 1.9e+210))) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / a) t_2 = t * (-y / a) tmp = 0 if y <= -1.65e+156: tmp = t_2 elif y <= -5.2e-56: tmp = t_1 elif y <= 2.7e+15: tmp = x elif (y <= 1.4e+86) or (not (y <= 2.7e+169) and (y <= 1.9e+210)): tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / a)) t_2 = Float64(t * Float64(Float64(-y) / a)) tmp = 0.0 if (y <= -1.65e+156) tmp = t_2; elseif (y <= -5.2e-56) tmp = t_1; elseif (y <= 2.7e+15) tmp = x; elseif ((y <= 1.4e+86) || (!(y <= 2.7e+169) && (y <= 1.9e+210))) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / a); t_2 = t * (-y / a); tmp = 0.0; if (y <= -1.65e+156) tmp = t_2; elseif (y <= -5.2e-56) tmp = t_1; elseif (y <= 2.7e+15) tmp = x; elseif ((y <= 1.4e+86) || (~((y <= 2.7e+169)) && (y <= 1.9e+210))) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.65e+156], t$95$2, If[LessEqual[y, -5.2e-56], t$95$1, If[LessEqual[y, 2.7e+15], x, If[Or[LessEqual[y, 1.4e+86], And[N[Not[LessEqual[y, 2.7e+169]], $MachinePrecision], LessEqual[y, 1.9e+210]]], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a}\\
t_2 := t \cdot \frac{-y}{a}\\
\mathbf{if}\;y \leq -1.65 \cdot 10^{+156}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+15}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+86} \lor \neg \left(y \leq 2.7 \cdot 10^{+169}\right) \land y \leq 1.9 \cdot 10^{+210}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.6499999999999999e156 or 1.40000000000000002e86 < y < 2.69999999999999991e169 or 1.90000000000000014e210 < y Initial program 77.4%
+-commutative77.4%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
clear-num99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 68.9%
*-commutative68.9%
*-un-lft-identity68.9%
times-frac87.5%
/-rgt-identity87.5%
Applied egg-rr87.5%
Taylor expanded in z around 0 52.8%
mul-1-neg52.8%
associate-*l/66.7%
distribute-rgt-neg-in66.7%
Simplified66.7%
if -1.6499999999999999e156 < y < -5.19999999999999994e-56 or 2.7e15 < y < 1.40000000000000002e86 or 2.69999999999999991e169 < y < 1.90000000000000014e210Initial program 93.5%
+-commutative93.5%
associate-*r/98.7%
fma-def98.7%
Simplified98.7%
clear-num98.5%
associate-/r/98.6%
Applied egg-rr98.6%
Taylor expanded in a around 0 75.2%
associate-/l*77.3%
*-un-lft-identity77.3%
div-inv77.3%
frac-times75.1%
associate-*r/78.5%
div-inv78.5%
remove-double-div78.5%
Applied egg-rr78.5%
Taylor expanded in z around inf 57.4%
if -5.19999999999999994e-56 < y < 2.7e15Initial program 99.9%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in x around inf 62.7%
Final simplification62.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z a))) (t_2 (* t (/ (- y) a))))
(if (<= y -1.7e+156)
t_2
(if (<= y -1.5e-56)
t_1
(if (<= y 1.45e+15)
x
(if (<= y 1.3e+85)
t_1
(if (<= y 2.9e+169)
t_2
(if (<= y 2.8e+209) t_1 (* y (/ (- t) a))))))))))
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 <= -1.7e+156) {
tmp = t_2;
} else if (y <= -1.5e-56) {
tmp = t_1;
} else if (y <= 1.45e+15) {
tmp = x;
} else if (y <= 1.3e+85) {
tmp = t_1;
} else if (y <= 2.9e+169) {
tmp = t_2;
} else if (y <= 2.8e+209) {
tmp = t_1;
} 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) :: t_2
real(8) :: tmp
t_1 = y * (z / a)
t_2 = t * (-y / a)
if (y <= (-1.7d+156)) then
tmp = t_2
else if (y <= (-1.5d-56)) then
tmp = t_1
else if (y <= 1.45d+15) then
tmp = x
else if (y <= 1.3d+85) then
tmp = t_1
else if (y <= 2.9d+169) then
tmp = t_2
else if (y <= 2.8d+209) then
tmp = t_1
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 = y * (z / a);
double t_2 = t * (-y / a);
double tmp;
if (y <= -1.7e+156) {
tmp = t_2;
} else if (y <= -1.5e-56) {
tmp = t_1;
} else if (y <= 1.45e+15) {
tmp = x;
} else if (y <= 1.3e+85) {
tmp = t_1;
} else if (y <= 2.9e+169) {
tmp = t_2;
} else if (y <= 2.8e+209) {
tmp = t_1;
} else {
tmp = y * (-t / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / a) t_2 = t * (-y / a) tmp = 0 if y <= -1.7e+156: tmp = t_2 elif y <= -1.5e-56: tmp = t_1 elif y <= 1.45e+15: tmp = x elif y <= 1.3e+85: tmp = t_1 elif y <= 2.9e+169: tmp = t_2 elif y <= 2.8e+209: tmp = t_1 else: tmp = y * (-t / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / a)) t_2 = Float64(t * Float64(Float64(-y) / a)) tmp = 0.0 if (y <= -1.7e+156) tmp = t_2; elseif (y <= -1.5e-56) tmp = t_1; elseif (y <= 1.45e+15) tmp = x; elseif (y <= 1.3e+85) tmp = t_1; elseif (y <= 2.9e+169) tmp = t_2; elseif (y <= 2.8e+209) tmp = t_1; else tmp = Float64(y * Float64(Float64(-t) / a)); 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 <= -1.7e+156) tmp = t_2; elseif (y <= -1.5e-56) tmp = t_1; elseif (y <= 1.45e+15) tmp = x; elseif (y <= 1.3e+85) tmp = t_1; elseif (y <= 2.9e+169) tmp = t_2; elseif (y <= 2.8e+209) tmp = t_1; else tmp = y * (-t / a); 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, -1.7e+156], t$95$2, If[LessEqual[y, -1.5e-56], t$95$1, If[LessEqual[y, 1.45e+15], x, If[LessEqual[y, 1.3e+85], t$95$1, If[LessEqual[y, 2.9e+169], t$95$2, If[LessEqual[y, 2.8e+209], t$95$1, N[(y * N[((-t) / a), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a}\\
t_2 := t \cdot \frac{-y}{a}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+156}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+15}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{+169}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+209}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{-t}{a}\\
\end{array}
\end{array}
if y < -1.7e156 or 1.30000000000000005e85 < y < 2.9000000000000001e169Initial program 74.8%
+-commutative74.8%
associate-*r/99.8%
fma-def99.8%
Simplified99.8%
clear-num99.8%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 67.8%
*-commutative67.8%
*-un-lft-identity67.8%
times-frac89.3%
/-rgt-identity89.3%
Applied egg-rr89.3%
Taylor expanded in z around 0 52.2%
mul-1-neg52.2%
associate-*l/68.6%
distribute-rgt-neg-in68.6%
Simplified68.6%
if -1.7e156 < y < -1.49999999999999995e-56 or 1.45e15 < y < 1.30000000000000005e85 or 2.9000000000000001e169 < y < 2.80000000000000013e209Initial program 93.5%
+-commutative93.5%
associate-*r/98.7%
fma-def98.7%
Simplified98.7%
clear-num98.5%
associate-/r/98.6%
Applied egg-rr98.6%
Taylor expanded in a around 0 75.2%
associate-/l*77.3%
*-un-lft-identity77.3%
div-inv77.3%
frac-times75.1%
associate-*r/78.5%
div-inv78.5%
remove-double-div78.5%
Applied egg-rr78.5%
Taylor expanded in z around inf 57.4%
if -1.49999999999999995e-56 < y < 1.45e15Initial program 99.9%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in x around inf 62.7%
if 2.80000000000000013e209 < y Initial program 83.7%
+-commutative83.7%
associate-*r/99.9%
fma-def99.9%
Simplified99.9%
clear-num99.9%
associate-/r/99.9%
Applied egg-rr99.9%
Taylor expanded in a around 0 71.4%
associate-/l*82.4%
*-un-lft-identity82.4%
div-inv82.4%
frac-times71.4%
associate-*r/83.2%
div-inv83.2%
remove-double-div83.2%
Applied egg-rr83.2%
Taylor expanded in z around 0 65.9%
mul-1-neg65.9%
distribute-neg-frac65.9%
Simplified65.9%
Final simplification62.8%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -2.8e+124)
(and (not (<= y -9.3e+95))
(or (<= y -1.55e-73) (not (<= y 3.4e+15)))))
(* y (/ (- z t) a))
(+ x (/ y (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.8e+124) || (!(y <= -9.3e+95) && ((y <= -1.55e-73) || !(y <= 3.4e+15)))) {
tmp = y * ((z - t) / a);
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-2.8d+124)) .or. (.not. (y <= (-9.3d+95))) .and. (y <= (-1.55d-73)) .or. (.not. (y <= 3.4d+15))) then
tmp = y * ((z - t) / a)
else
tmp = x + (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.8e+124) || (!(y <= -9.3e+95) && ((y <= -1.55e-73) || !(y <= 3.4e+15)))) {
tmp = y * ((z - t) / a);
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.8e+124) or (not (y <= -9.3e+95) and ((y <= -1.55e-73) or not (y <= 3.4e+15))): tmp = y * ((z - t) / a) else: tmp = x + (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.8e+124) || (!(y <= -9.3e+95) && ((y <= -1.55e-73) || !(y <= 3.4e+15)))) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = Float64(x + Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.8e+124) || (~((y <= -9.3e+95)) && ((y <= -1.55e-73) || ~((y <= 3.4e+15))))) tmp = y * ((z - t) / a); else tmp = x + (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.8e+124], And[N[Not[LessEqual[y, -9.3e+95]], $MachinePrecision], Or[LessEqual[y, -1.55e-73], N[Not[LessEqual[y, 3.4e+15]], $MachinePrecision]]]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.8 \cdot 10^{+124} \lor \neg \left(y \leq -9.3 \cdot 10^{+95}\right) \land \left(y \leq -1.55 \cdot 10^{-73} \lor \neg \left(y \leq 3.4 \cdot 10^{+15}\right)\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if y < -2.8e124 or -9.29999999999999967e95 < y < -1.54999999999999985e-73 or 3.4e15 < y Initial program 85.3%
+-commutative85.3%
associate-*r/99.3%
fma-def99.3%
Simplified99.3%
clear-num99.2%
associate-/r/99.2%
Applied egg-rr99.2%
Taylor expanded in a around 0 74.2%
*-commutative74.2%
*-un-lft-identity74.2%
times-frac85.9%
/-rgt-identity85.9%
Applied egg-rr85.9%
if -2.8e124 < y < -9.29999999999999967e95 or -1.54999999999999985e-73 < y < 3.4e15Initial program 99.1%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in z around inf 79.3%
Final simplification83.1%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -9e+162)
(and (not (<= y -2.1e+96)) (or (<= y -2.1e-74) (not (<= y 7.5e+14)))))
(* y (/ (- z t) a))
(+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9e+162) || (!(y <= -2.1e+96) && ((y <= -2.1e-74) || !(y <= 7.5e+14)))) {
tmp = y * ((z - t) / a);
} else {
tmp = x + (z * (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 ((y <= (-9d+162)) .or. (.not. (y <= (-2.1d+96))) .and. (y <= (-2.1d-74)) .or. (.not. (y <= 7.5d+14))) then
tmp = y * ((z - t) / a)
else
tmp = x + (z * (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 ((y <= -9e+162) || (!(y <= -2.1e+96) && ((y <= -2.1e-74) || !(y <= 7.5e+14)))) {
tmp = y * ((z - t) / a);
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9e+162) or (not (y <= -2.1e+96) and ((y <= -2.1e-74) or not (y <= 7.5e+14))): tmp = y * ((z - t) / a) else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9e+162) || (!(y <= -2.1e+96) && ((y <= -2.1e-74) || !(y <= 7.5e+14)))) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -9e+162) || (~((y <= -2.1e+96)) && ((y <= -2.1e-74) || ~((y <= 7.5e+14))))) tmp = y * ((z - t) / a); else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9e+162], And[N[Not[LessEqual[y, -2.1e+96]], $MachinePrecision], Or[LessEqual[y, -2.1e-74], N[Not[LessEqual[y, 7.5e+14]], $MachinePrecision]]]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+162} \lor \neg \left(y \leq -2.1 \cdot 10^{+96}\right) \land \left(y \leq -2.1 \cdot 10^{-74} \lor \neg \left(y \leq 7.5 \cdot 10^{+14}\right)\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -8.99999999999999944e162 or -2.1000000000000001e96 < y < -2.1e-74 or 7.5e14 < y Initial program 85.0%
+-commutative85.0%
associate-*r/99.2%
fma-def99.2%
Simplified99.2%
clear-num99.1%
associate-/r/99.2%
Applied egg-rr99.2%
Taylor expanded in a around 0 73.1%
*-commutative73.1%
*-un-lft-identity73.1%
times-frac85.6%
/-rgt-identity85.6%
Applied egg-rr85.6%
if -8.99999999999999944e162 < y < -2.1000000000000001e96 or -2.1e-74 < y < 7.5e14Initial program 98.3%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in t around 0 81.0%
associate-*l/82.6%
*-commutative82.6%
Simplified82.6%
Final simplification84.2%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -6.6e+162)
(not (or (<= y -6e+98) (and (not (<= y -3.2e-77)) (<= y 1.35e+15)))))
(* y (/ (- z t) a))
(+ x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6.6e+162) || !((y <= -6e+98) || (!(y <= -3.2e-77) && (y <= 1.35e+15)))) {
tmp = y * ((z - t) / a);
} else {
tmp = x + (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 ((y <= (-6.6d+162)) .or. (.not. (y <= (-6d+98)) .or. (.not. (y <= (-3.2d-77))) .and. (y <= 1.35d+15))) then
tmp = y * ((z - t) / a)
else
tmp = x + (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 ((y <= -6.6e+162) || !((y <= -6e+98) || (!(y <= -3.2e-77) && (y <= 1.35e+15)))) {
tmp = y * ((z - t) / a);
} else {
tmp = x + (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -6.6e+162) or not ((y <= -6e+98) or (not (y <= -3.2e-77) and (y <= 1.35e+15))): tmp = y * ((z - t) / a) else: tmp = x + (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -6.6e+162) || !((y <= -6e+98) || (!(y <= -3.2e-77) && (y <= 1.35e+15)))) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = Float64(x + Float64(z / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -6.6e+162) || ~(((y <= -6e+98) || (~((y <= -3.2e-77)) && (y <= 1.35e+15))))) tmp = y * ((z - t) / a); else tmp = x + (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -6.6e+162], N[Not[Or[LessEqual[y, -6e+98], And[N[Not[LessEqual[y, -3.2e-77]], $MachinePrecision], LessEqual[y, 1.35e+15]]]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.6 \cdot 10^{+162} \lor \neg \left(y \leq -6 \cdot 10^{+98} \lor \neg \left(y \leq -3.2 \cdot 10^{-77}\right) \land y \leq 1.35 \cdot 10^{+15}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < -6.59999999999999975e162 or -6.0000000000000003e98 < y < -3.2e-77 or 1.35e15 < y Initial program 85.0%
+-commutative85.0%
associate-*r/99.2%
fma-def99.2%
Simplified99.2%
clear-num99.1%
associate-/r/99.2%
Applied egg-rr99.2%
Taylor expanded in a around 0 73.1%
*-commutative73.1%
*-un-lft-identity73.1%
times-frac85.6%
/-rgt-identity85.6%
Applied egg-rr85.6%
if -6.59999999999999975e162 < y < -6.0000000000000003e98 or -3.2e-77 < y < 1.35e15Initial program 98.3%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in t around 0 81.0%
associate-*l/82.6%
*-commutative82.6%
Simplified82.6%
clear-num82.6%
un-div-inv82.6%
Applied egg-rr82.6%
Final simplification84.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) a))))
(if (<= y -1.7e+163)
t_1
(if (<= y -7.6e+92)
(+ x (/ z (/ a y)))
(if (or (<= y -2.5e-77) (not (<= y 4.3e+15)))
t_1
(+ x (/ (* z y) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / a);
double tmp;
if (y <= -1.7e+163) {
tmp = t_1;
} else if (y <= -7.6e+92) {
tmp = x + (z / (a / y));
} else if ((y <= -2.5e-77) || !(y <= 4.3e+15)) {
tmp = t_1;
} else {
tmp = x + ((z * 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) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / a)
if (y <= (-1.7d+163)) then
tmp = t_1
else if (y <= (-7.6d+92)) then
tmp = x + (z / (a / y))
else if ((y <= (-2.5d-77)) .or. (.not. (y <= 4.3d+15))) then
tmp = t_1
else
tmp = x + ((z * y) / 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) / a);
double tmp;
if (y <= -1.7e+163) {
tmp = t_1;
} else if (y <= -7.6e+92) {
tmp = x + (z / (a / y));
} else if ((y <= -2.5e-77) || !(y <= 4.3e+15)) {
tmp = t_1;
} else {
tmp = x + ((z * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / a) tmp = 0 if y <= -1.7e+163: tmp = t_1 elif y <= -7.6e+92: tmp = x + (z / (a / y)) elif (y <= -2.5e-77) or not (y <= 4.3e+15): tmp = t_1 else: tmp = x + ((z * y) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / a)) tmp = 0.0 if (y <= -1.7e+163) tmp = t_1; elseif (y <= -7.6e+92) tmp = Float64(x + Float64(z / Float64(a / y))); elseif ((y <= -2.5e-77) || !(y <= 4.3e+15)) tmp = t_1; else tmp = Float64(x + Float64(Float64(z * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / a); tmp = 0.0; if (y <= -1.7e+163) tmp = t_1; elseif (y <= -7.6e+92) tmp = x + (z / (a / y)); elseif ((y <= -2.5e-77) || ~((y <= 4.3e+15))) tmp = t_1; else tmp = x + ((z * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+163], t$95$1, If[LessEqual[y, -7.6e+92], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.5e-77], N[Not[LessEqual[y, 4.3e+15]], $MachinePrecision]], t$95$1, N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+163}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -7.6 \cdot 10^{+92}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-77} \lor \neg \left(y \leq 4.3 \cdot 10^{+15}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if y < -1.7000000000000001e163 or -7.6000000000000001e92 < y < -2.49999999999999982e-77 or 4.3e15 < y Initial program 85.0%
+-commutative85.0%
associate-*r/99.2%
fma-def99.2%
Simplified99.2%
clear-num99.1%
associate-/r/99.2%
Applied egg-rr99.2%
Taylor expanded in a around 0 73.1%
*-commutative73.1%
*-un-lft-identity73.1%
times-frac85.6%
/-rgt-identity85.6%
Applied egg-rr85.6%
if -1.7000000000000001e163 < y < -7.6000000000000001e92Initial program 88.0%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in t around 0 76.6%
associate-*l/94.1%
*-commutative94.1%
Simplified94.1%
clear-num94.1%
un-div-inv94.3%
Applied egg-rr94.3%
if -2.49999999999999982e-77 < y < 4.3e15Initial program 99.9%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in t around 0 81.7%
Final simplification84.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -4.2e-152) (not (<= y 5.5e+14))) (* y (/ (- z t) a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.2e-152) || !(y <= 5.5e+14)) {
tmp = y * ((z - 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) :: tmp
if ((y <= (-4.2d-152)) .or. (.not. (y <= 5.5d+14))) then
tmp = y * ((z - 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 tmp;
if ((y <= -4.2e-152) || !(y <= 5.5e+14)) {
tmp = y * ((z - t) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.2e-152) or not (y <= 5.5e+14): tmp = y * ((z - t) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -4.2e-152) || !(y <= 5.5e+14)) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -4.2e-152) || ~((y <= 5.5e+14))) tmp = y * ((z - t) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -4.2e-152], N[Not[LessEqual[y, 5.5e+14]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-152} \lor \neg \left(y \leq 5.5 \cdot 10^{+14}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -4.19999999999999998e-152 or 5.5e14 < y Initial program 86.7%
+-commutative86.7%
associate-*r/98.7%
fma-def98.7%
Simplified98.7%
clear-num98.7%
associate-/r/98.7%
Applied egg-rr98.7%
Taylor expanded in a around 0 70.3%
*-commutative70.3%
*-un-lft-identity70.3%
times-frac80.4%
/-rgt-identity80.4%
Applied egg-rr80.4%
if -4.19999999999999998e-152 < y < 5.5e14Initial program 99.9%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in x around inf 66.2%
Final simplification75.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.4e+78) (not (<= t 3.7e-56))) (- x (* t (/ y a))) (+ x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.4e+78) || !(t <= 3.7e-56)) {
tmp = x - (t * (y / a));
} else {
tmp = x + (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 ((t <= (-2.4d+78)) .or. (.not. (t <= 3.7d-56))) then
tmp = x - (t * (y / a))
else
tmp = x + (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 ((t <= -2.4e+78) || !(t <= 3.7e-56)) {
tmp = x - (t * (y / a));
} else {
tmp = x + (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.4e+78) or not (t <= 3.7e-56): tmp = x - (t * (y / a)) else: tmp = x + (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.4e+78) || !(t <= 3.7e-56)) tmp = Float64(x - Float64(t * Float64(y / a))); else tmp = Float64(x + Float64(z / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.4e+78) || ~((t <= 3.7e-56))) tmp = x - (t * (y / a)); else tmp = x + (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.4e+78], N[Not[LessEqual[t, 3.7e-56]], $MachinePrecision]], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+78} \lor \neg \left(t \leq 3.7 \cdot 10^{-56}\right):\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -2.3999999999999999e78 or 3.7000000000000002e-56 < t Initial program 88.0%
associate-*l/98.1%
Simplified98.1%
Taylor expanded in z around 0 81.0%
mul-1-neg81.0%
associate-*l/88.1%
distribute-rgt-neg-out88.1%
+-commutative88.1%
*-commutative88.1%
distribute-lft-neg-out88.1%
unsub-neg88.1%
Simplified88.1%
if -2.3999999999999999e78 < t < 3.7000000000000002e-56Initial program 94.1%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in t around 0 82.8%
associate-*l/87.8%
*-commutative87.8%
Simplified87.8%
clear-num87.8%
un-div-inv88.0%
Applied egg-rr88.0%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.5e-56) (not (<= y 4.3e+15))) (* y (/ z a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.5e-56) || !(y <= 4.3e+15)) {
tmp = y * (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 <= (-5.5d-56)) .or. (.not. (y <= 4.3d+15))) then
tmp = y * (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 <= -5.5e-56) || !(y <= 4.3e+15)) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.5e-56) or not (y <= 4.3e+15): tmp = y * (z / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.5e-56) || !(y <= 4.3e+15)) tmp = Float64(y * Float64(z / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -5.5e-56) || ~((y <= 4.3e+15))) tmp = y * (z / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.5e-56], N[Not[LessEqual[y, 4.3e+15]], $MachinePrecision]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{-56} \lor \neg \left(y \leq 4.3 \cdot 10^{+15}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.4999999999999999e-56 or 4.3e15 < y Initial program 85.2%
+-commutative85.2%
associate-*r/99.3%
fma-def99.3%
Simplified99.3%
clear-num99.2%
associate-/r/99.2%
Applied egg-rr99.2%
Taylor expanded in a around 0 71.9%
associate-/l*82.5%
*-un-lft-identity82.5%
div-inv82.4%
frac-times71.9%
associate-*r/83.1%
div-inv83.1%
remove-double-div83.2%
Applied egg-rr83.2%
Taylor expanded in z around inf 44.6%
if -5.4999999999999999e-56 < y < 4.3e15Initial program 99.9%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in x around inf 62.7%
Final simplification51.9%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y a))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / 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 + ((z - t) * (y / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / a));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a}
\end{array}
Initial program 91.1%
associate-*l/97.2%
Simplified97.2%
Final simplification97.2%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 91.1%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in x around inf 36.1%
Final simplification36.1%
(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 2023185
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
: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)))