
(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 8 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 (/ 1.0 (/ (/ a y) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (1.0 / ((a / y) / (z - t)));
}
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 + (1.0d0 / ((a / y) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (1.0 / ((a / y) / (z - t)));
}
def code(x, y, z, t, a): return x + (1.0 / ((a / y) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(1.0 / Float64(Float64(a / y) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (1.0 / ((a / y) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(1.0 / N[(N[(a / y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{1}{\frac{\frac{a}{y}}{z - t}}
\end{array}
Initial program 94.8%
associate-*l/97.4%
Simplified97.4%
associate-*l/94.8%
clear-num94.8%
associate-/r*97.5%
Applied egg-rr97.5%
Final simplification97.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.1e+145) (not (<= t 3.6e+105))) (* y (/ (- t) a)) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.1e+145) || !(t <= 3.6e+105)) {
tmp = y * (-t / a);
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-1.1d+145)) .or. (.not. (t <= 3.6d+105))) then
tmp = y * (-t / a)
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.1e+145) || !(t <= 3.6e+105)) {
tmp = y * (-t / a);
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.1e+145) or not (t <= 3.6e+105): tmp = y * (-t / a) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.1e+145) || !(t <= 3.6e+105)) tmp = Float64(y * Float64(Float64(-t) / a)); else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.1e+145) || ~((t <= 3.6e+105))) tmp = y * (-t / a); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.1e+145], N[Not[LessEqual[t, 3.6e+105]], $MachinePrecision]], N[(y * N[((-t) / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+145} \lor \neg \left(t \leq 3.6 \cdot 10^{+105}\right):\\
\;\;\;\;y \cdot \frac{-t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -1.10000000000000004e145 or 3.5999999999999999e105 < t Initial program 91.5%
associate-*l/95.7%
Simplified95.7%
Taylor expanded in z around 0 80.6%
mul-1-neg80.6%
unsub-neg80.6%
associate-*r/84.7%
Simplified84.7%
associate-*r/80.6%
clear-num80.5%
add-sqr-sqrt49.9%
sqrt-unprod34.1%
sqr-neg34.1%
sqrt-unprod9.1%
add-sqr-sqrt23.0%
*-commutative23.0%
add-sqr-sqrt9.1%
sqrt-unprod34.1%
sqr-neg34.1%
sqrt-unprod49.9%
add-sqr-sqrt80.5%
Applied egg-rr80.5%
Taylor expanded in x around 0 62.2%
mul-1-neg62.2%
associate-*l/67.5%
distribute-rgt-neg-in67.5%
Simplified67.5%
if -1.10000000000000004e145 < t < 3.5999999999999999e105Initial program 96.6%
associate-*l/98.3%
Simplified98.3%
associate-*l/96.6%
clear-num96.5%
associate-/r*98.6%
Applied egg-rr98.6%
Taylor expanded in z around inf 80.7%
associate-*r/81.2%
Simplified81.2%
Final simplification76.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -7.5e+144) (not (<= t 9e+99))) (* y (/ (- t) a)) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -7.5e+144) || !(t <= 9e+99)) {
tmp = y * (-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 ((t <= (-7.5d+144)) .or. (.not. (t <= 9d+99))) then
tmp = y * (-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 ((t <= -7.5e+144) || !(t <= 9e+99)) {
tmp = y * (-t / a);
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -7.5e+144) or not (t <= 9e+99): tmp = y * (-t / a) else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -7.5e+144) || !(t <= 9e+99)) tmp = Float64(y * Float64(Float64(-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 ((t <= -7.5e+144) || ~((t <= 9e+99))) tmp = y * (-t / a); else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -7.5e+144], N[Not[LessEqual[t, 9e+99]], $MachinePrecision]], N[(y * N[((-t) / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.5 \cdot 10^{+144} \lor \neg \left(t \leq 9 \cdot 10^{+99}\right):\\
\;\;\;\;y \cdot \frac{-t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -7.5000000000000006e144 or 8.9999999999999999e99 < t Initial program 91.5%
associate-*l/95.7%
Simplified95.7%
Taylor expanded in z around 0 80.6%
mul-1-neg80.6%
unsub-neg80.6%
associate-*r/84.7%
Simplified84.7%
associate-*r/80.6%
clear-num80.5%
add-sqr-sqrt49.9%
sqrt-unprod34.1%
sqr-neg34.1%
sqrt-unprod9.1%
add-sqr-sqrt23.0%
*-commutative23.0%
add-sqr-sqrt9.1%
sqrt-unprod34.1%
sqr-neg34.1%
sqrt-unprod49.9%
add-sqr-sqrt80.5%
Applied egg-rr80.5%
Taylor expanded in x around 0 62.2%
mul-1-neg62.2%
associate-*l/67.5%
distribute-rgt-neg-in67.5%
Simplified67.5%
if -7.5000000000000006e144 < t < 8.9999999999999999e99Initial program 96.6%
associate-*l/98.3%
Simplified98.3%
Taylor expanded in t around 0 80.7%
+-commutative80.7%
associate-*l/85.1%
*-commutative85.1%
Simplified85.1%
Final simplification79.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.8e+123) (not (<= t 38000000.0))) (- x (* t (/ y a))) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.8e+123) || !(t <= 38000000.0)) {
tmp = x - (t * (y / 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 ((t <= (-4.8d+123)) .or. (.not. (t <= 38000000.0d0))) then
tmp = x - (t * (y / 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 ((t <= -4.8e+123) || !(t <= 38000000.0)) {
tmp = x - (t * (y / a));
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.8e+123) or not (t <= 38000000.0): tmp = x - (t * (y / a)) else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.8e+123) || !(t <= 38000000.0)) tmp = Float64(x - Float64(t * Float64(y / 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 ((t <= -4.8e+123) || ~((t <= 38000000.0))) tmp = x - (t * (y / a)); else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.8e+123], N[Not[LessEqual[t, 38000000.0]], $MachinePrecision]], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+123} \lor \neg \left(t \leq 38000000\right):\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -4.79999999999999978e123 or 3.8e7 < t Initial program 92.9%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in z around 0 81.1%
mul-1-neg81.1%
unsub-neg81.1%
associate-*r/84.5%
Simplified84.5%
if -4.79999999999999978e123 < t < 3.8e7Initial program 96.2%
associate-*l/98.1%
Simplified98.1%
Taylor expanded in t around 0 82.8%
+-commutative82.8%
associate-*l/87.8%
*-commutative87.8%
Simplified87.8%
Final simplification86.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.8e+123) (not (<= t 26000000.0))) (- x (/ y (/ a t))) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.8e+123) || !(t <= 26000000.0)) {
tmp = x - (y / (a / t));
} 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 <= (-4.8d+123)) .or. (.not. (t <= 26000000.0d0))) then
tmp = x - (y / (a / t))
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 <= -4.8e+123) || !(t <= 26000000.0)) {
tmp = x - (y / (a / t));
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.8e+123) or not (t <= 26000000.0): tmp = x - (y / (a / t)) else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.8e+123) || !(t <= 26000000.0)) tmp = Float64(x - Float64(y / Float64(a / t))); 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 <= -4.8e+123) || ~((t <= 26000000.0))) tmp = x - (y / (a / t)); else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.8e+123], N[Not[LessEqual[t, 26000000.0]], $MachinePrecision]], N[(x - N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{+123} \lor \neg \left(t \leq 26000000\right):\\
\;\;\;\;x - \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -4.79999999999999978e123 or 2.6e7 < t Initial program 92.9%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in z around 0 81.1%
mul-1-neg81.1%
unsub-neg81.1%
associate-*r/84.5%
Simplified84.5%
associate-*r/81.1%
add-cube-cbrt80.7%
times-frac85.0%
add-sqr-sqrt54.1%
sqrt-unprod42.2%
sqr-neg42.2%
sqrt-unprod10.4%
add-sqr-sqrt29.6%
times-frac28.7%
*-commutative28.7%
add-cube-cbrt28.7%
associate-/l*29.6%
add-sqr-sqrt10.4%
sqrt-unprod43.2%
sqr-neg43.2%
sqrt-unprod55.3%
add-sqr-sqrt86.3%
Applied egg-rr86.3%
if -4.79999999999999978e123 < t < 2.6e7Initial program 96.2%
associate-*l/98.1%
Simplified98.1%
Taylor expanded in t around 0 82.8%
+-commutative82.8%
associate-*l/87.8%
*-commutative87.8%
Simplified87.8%
Final simplification87.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6e+143) (not (<= t 6000000000.0))) (* y (/ (- t) a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6e+143) || !(t <= 6000000000.0)) {
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) :: tmp
if ((t <= (-6d+143)) .or. (.not. (t <= 6000000000.0d0))) 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 tmp;
if ((t <= -6e+143) || !(t <= 6000000000.0)) {
tmp = y * (-t / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6e+143) or not (t <= 6000000000.0): tmp = y * (-t / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6e+143) || !(t <= 6000000000.0)) tmp = Float64(y * Float64(Float64(-t) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6e+143) || ~((t <= 6000000000.0))) tmp = y * (-t / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6e+143], N[Not[LessEqual[t, 6000000000.0]], $MachinePrecision]], N[(y * N[((-t) / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+143} \lor \neg \left(t \leq 6000000000\right):\\
\;\;\;\;y \cdot \frac{-t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -6.0000000000000001e143 or 6e9 < t Initial program 92.6%
associate-*l/96.2%
Simplified96.2%
Taylor expanded in z around 0 80.1%
mul-1-neg80.1%
unsub-neg80.1%
associate-*r/83.7%
Simplified83.7%
associate-*r/80.1%
clear-num80.0%
add-sqr-sqrt53.2%
sqrt-unprod39.5%
sqr-neg39.5%
sqrt-unprod7.9%
add-sqr-sqrt26.2%
*-commutative26.2%
add-sqr-sqrt7.9%
sqrt-unprod39.5%
sqr-neg39.5%
sqrt-unprod53.2%
add-sqr-sqrt80.0%
Applied egg-rr80.0%
Taylor expanded in x around 0 59.9%
mul-1-neg59.9%
associate-*l/64.5%
distribute-rgt-neg-in64.5%
Simplified64.5%
if -6.0000000000000001e143 < t < 6e9Initial program 96.3%
associate-*l/98.1%
Simplified98.1%
Taylor expanded in x around inf 48.6%
Final simplification54.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 94.8%
associate-*l/97.4%
Simplified97.4%
Final simplification97.4%
(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.8%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in x around inf 38.2%
Final simplification38.2%
(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 2023275
(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)))