
(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 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) a)))))
(if (<= y -5e-195)
t_1
(if (<= y 8.2e-289)
(+ x (/ (* z y) a))
(if (<= y 3.6e-154) (- x (/ (* t y) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / a));
double tmp;
if (y <= -5e-195) {
tmp = t_1;
} else if (y <= 8.2e-289) {
tmp = x + ((z * y) / a);
} else if (y <= 3.6e-154) {
tmp = x - ((t * y) / a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * ((z - t) / a))
if (y <= (-5d-195)) then
tmp = t_1
else if (y <= 8.2d-289) then
tmp = x + ((z * y) / a)
else if (y <= 3.6d-154) then
tmp = x - ((t * y) / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / a));
double tmp;
if (y <= -5e-195) {
tmp = t_1;
} else if (y <= 8.2e-289) {
tmp = x + ((z * y) / a);
} else if (y <= 3.6e-154) {
tmp = x - ((t * y) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / a)) tmp = 0 if y <= -5e-195: tmp = t_1 elif y <= 8.2e-289: tmp = x + ((z * y) / a) elif y <= 3.6e-154: tmp = x - ((t * y) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / a))) tmp = 0.0 if (y <= -5e-195) tmp = t_1; elseif (y <= 8.2e-289) tmp = Float64(x + Float64(Float64(z * y) / a)); elseif (y <= 3.6e-154) tmp = Float64(x - Float64(Float64(t * y) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / a)); tmp = 0.0; if (y <= -5e-195) tmp = t_1; elseif (y <= 8.2e-289) tmp = x + ((z * y) / a); elseif (y <= 3.6e-154) tmp = x - ((t * y) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5e-195], t$95$1, If[LessEqual[y, 8.2e-289], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.6e-154], N[(x - N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a}\\
\mathbf{if}\;y \leq -5 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{-289}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq 3.6 \cdot 10^{-154}:\\
\;\;\;\;x - \frac{t \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.00000000000000009e-195 or 3.6000000000000003e-154 < y Initial program 92.4%
associate-/l*97.9%
Simplified97.9%
if -5.00000000000000009e-195 < y < 8.1999999999999996e-289Initial program 100.0%
associate-/l*69.2%
Simplified69.2%
Taylor expanded in z around inf 90.7%
if 8.1999999999999996e-289 < y < 3.6000000000000003e-154Initial program 99.8%
associate-/l*75.6%
Simplified75.6%
Taylor expanded in z around 0 99.8%
mul-1-neg99.8%
unsub-neg99.8%
*-commutative99.8%
associate-/l*75.6%
Simplified75.6%
associate-*r/99.8%
Applied egg-rr99.8%
Final simplification97.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.76e+37) (not (<= t 5.4e+40))) (- x (* t (/ y a))) (+ x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.76e+37) || !(t <= 5.4e+40)) {
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 <= (-1.76d+37)) .or. (.not. (t <= 5.4d+40))) 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 <= -1.76e+37) || !(t <= 5.4e+40)) {
tmp = x - (t * (y / a));
} else {
tmp = x + (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.76e+37) or not (t <= 5.4e+40): 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 <= -1.76e+37) || !(t <= 5.4e+40)) 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 <= -1.76e+37) || ~((t <= 5.4e+40))) 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, -1.76e+37], N[Not[LessEqual[t, 5.4e+40]], $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 -1.76 \cdot 10^{+37} \lor \neg \left(t \leq 5.4 \cdot 10^{+40}\right):\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -1.76e37 or 5.40000000000000019e40 < t Initial program 88.6%
*-commutative88.6%
associate-/l*97.8%
Applied egg-rr97.8%
Taylor expanded in z around 0 81.1%
associate-*l/78.1%
*-commutative78.1%
neg-mul-178.1%
sub-neg78.1%
*-commutative78.1%
associate-*l/81.1%
associate-*r/88.5%
Simplified88.5%
if -1.76e37 < t < 5.40000000000000019e40Initial program 97.6%
*-commutative97.6%
associate-/l*96.3%
Applied egg-rr96.3%
Taylor expanded in z around inf 91.2%
clear-num91.2%
un-div-inv91.6%
Applied egg-rr91.6%
Final simplification90.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.42e+194) (not (<= t 7.5e+86))) (/ t (/ a (- y))) (+ x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.42e+194) || !(t <= 7.5e+86)) {
tmp = t / (a / -y);
} 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 <= (-1.42d+194)) .or. (.not. (t <= 7.5d+86))) then
tmp = t / (a / -y)
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 <= -1.42e+194) || !(t <= 7.5e+86)) {
tmp = t / (a / -y);
} else {
tmp = x + (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.42e+194) or not (t <= 7.5e+86): tmp = t / (a / -y) else: tmp = x + (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.42e+194) || !(t <= 7.5e+86)) tmp = Float64(t / Float64(a / Float64(-y))); 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 <= -1.42e+194) || ~((t <= 7.5e+86))) tmp = t / (a / -y); else tmp = x + (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.42e+194], N[Not[LessEqual[t, 7.5e+86]], $MachinePrecision]], N[(t / N[(a / (-y)), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.42 \cdot 10^{+194} \lor \neg \left(t \leq 7.5 \cdot 10^{+86}\right):\\
\;\;\;\;\frac{t}{\frac{a}{-y}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -1.4199999999999999e194 or 7.4999999999999997e86 < t Initial program 89.0%
*-commutative89.0%
associate-/l*96.5%
Applied egg-rr96.5%
Taylor expanded in z around 0 84.6%
associate-*l/80.0%
*-commutative80.0%
neg-mul-180.0%
sub-neg80.0%
*-commutative80.0%
associate-*l/84.6%
associate-*r/93.8%
Simplified93.8%
Taylor expanded in x around 0 70.3%
mul-1-neg70.3%
associate-*l/65.7%
associate-/r/77.7%
Simplified77.7%
if -1.4199999999999999e194 < t < 7.4999999999999997e86Initial program 95.6%
*-commutative95.6%
associate-/l*97.0%
Applied egg-rr97.0%
Taylor expanded in z around inf 87.6%
clear-num87.5%
un-div-inv87.9%
Applied egg-rr87.9%
Final simplification85.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -9.5e+198) (not (<= t 5.4e+85))) (/ t (/ a (- y))) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -9.5e+198) || !(t <= 5.4e+85)) {
tmp = t / (a / -y);
} 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 ((t <= (-9.5d+198)) .or. (.not. (t <= 5.4d+85))) then
tmp = t / (a / -y)
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 ((t <= -9.5e+198) || !(t <= 5.4e+85)) {
tmp = t / (a / -y);
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -9.5e+198) or not (t <= 5.4e+85): tmp = t / (a / -y) else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -9.5e+198) || !(t <= 5.4e+85)) tmp = Float64(t / Float64(a / Float64(-y))); 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 ((t <= -9.5e+198) || ~((t <= 5.4e+85))) tmp = t / (a / -y); else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -9.5e+198], N[Not[LessEqual[t, 5.4e+85]], $MachinePrecision]], N[(t / N[(a / (-y)), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{+198} \lor \neg \left(t \leq 5.4 \cdot 10^{+85}\right):\\
\;\;\;\;\frac{t}{\frac{a}{-y}}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -9.5e198 or 5.39999999999999966e85 < t Initial program 89.0%
*-commutative89.0%
associate-/l*96.5%
Applied egg-rr96.5%
Taylor expanded in z around 0 84.6%
associate-*l/80.0%
*-commutative80.0%
neg-mul-180.0%
sub-neg80.0%
*-commutative80.0%
associate-*l/84.6%
associate-*r/93.8%
Simplified93.8%
Taylor expanded in x around 0 70.3%
mul-1-neg70.3%
associate-*l/65.7%
associate-/r/77.7%
Simplified77.7%
if -9.5e198 < t < 5.39999999999999966e85Initial program 95.6%
*-commutative95.6%
associate-/l*97.0%
Applied egg-rr97.0%
Taylor expanded in z around inf 87.6%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.6e+143) (not (<= t 1.5e+83))) (/ t (/ a (- y))) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.6e+143) || !(t <= 1.5e+83)) {
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 ((t <= (-1.6d+143)) .or. (.not. (t <= 1.5d+83))) 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 ((t <= -1.6e+143) || !(t <= 1.5e+83)) {
tmp = t / (a / -y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.6e+143) or not (t <= 1.5e+83): tmp = t / (a / -y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.6e+143) || !(t <= 1.5e+83)) tmp = Float64(t / Float64(a / Float64(-y))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.6e+143) || ~((t <= 1.5e+83))) tmp = t / (a / -y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.6e+143], N[Not[LessEqual[t, 1.5e+83]], $MachinePrecision]], N[(t / N[(a / (-y)), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+143} \lor \neg \left(t \leq 1.5 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{t}{\frac{a}{-y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.60000000000000008e143 or 1.5e83 < t Initial program 89.7%
*-commutative89.7%
associate-/l*97.1%
Applied egg-rr97.1%
Taylor expanded in z around 0 81.1%
associate-*l/77.3%
*-commutative77.3%
neg-mul-177.3%
sub-neg77.3%
*-commutative77.3%
associate-*l/81.1%
associate-*r/89.9%
Simplified89.9%
Taylor expanded in x around 0 67.5%
mul-1-neg67.5%
associate-*l/63.7%
associate-/r/74.8%
Simplified74.8%
if -1.60000000000000008e143 < t < 1.5e83Initial program 95.9%
associate-/l*95.1%
Simplified95.1%
Taylor expanded in x around inf 46.1%
Final simplification54.3%
(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 94.1%
*-commutative94.1%
associate-/l*96.9%
Applied egg-rr96.9%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 94.1%
associate-/l*92.1%
Simplified92.1%
Taylor expanded in x around inf 37.9%
(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 2024135
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:alt
(! :herbie-platform default (if (< y -430450648655599/4000000000000000000000000) (+ x (/ 1 (/ (/ a (- z t)) y))) (if (< y 2894426862792089/10000000000000000000000000000000000000000000000000000000000000000) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t)))))))
(+ x (/ (* y (- z t)) a)))