
(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 9 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) (/ 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 93.3%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in y around 0 93.3%
associate-*l/98.4%
*-commutative98.4%
Simplified98.4%
Final simplification98.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.8e+18) (+ x (* z (/ y a))) (if (<= z 1.6e+133) (- x (* t (/ y a))) (+ x (* y (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.8e+18) {
tmp = x + (z * (y / a));
} else if (z <= 1.6e+133) {
tmp = x - (t * (y / a));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-7.8d+18)) then
tmp = x + (z * (y / a))
else if (z <= 1.6d+133) then
tmp = x - (t * (y / a))
else
tmp = x + (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.8e+18) {
tmp = x + (z * (y / a));
} else if (z <= 1.6e+133) {
tmp = x - (t * (y / a));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.8e+18: tmp = x + (z * (y / a)) elif z <= 1.6e+133: tmp = x - (t * (y / a)) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.8e+18) tmp = Float64(x + Float64(z * Float64(y / a))); elseif (z <= 1.6e+133) tmp = Float64(x - Float64(t * Float64(y / 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 (z <= -7.8e+18) tmp = x + (z * (y / a)); elseif (z <= 1.6e+133) tmp = x - (t * (y / a)); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.8e+18], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+133], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+18}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+133}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if z < -7.8e18Initial program 84.7%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in y around 0 84.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 81.4%
+-commutative81.4%
associate-*l/93.0%
*-commutative93.0%
Simplified93.0%
if -7.8e18 < z < 1.59999999999999999e133Initial program 95.4%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in y around 0 95.4%
associate-*l/98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in z around 0 83.8%
mul-1-neg83.8%
sub-neg83.8%
associate-/l*87.5%
Simplified87.5%
if 1.59999999999999999e133 < z Initial program 97.0%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in t around 0 85.2%
+-commutative85.2%
associate-/l*85.4%
Simplified85.4%
Final simplification88.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.4e+22) (+ x (* z (/ y a))) (if (<= z 1.65e+133) (- x (/ t (/ a y))) (+ x (* y (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.4e+22) {
tmp = x + (z * (y / a));
} else if (z <= 1.65e+133) {
tmp = x - (t / (a / y));
} 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 (z <= (-1.4d+22)) then
tmp = x + (z * (y / a))
else if (z <= 1.65d+133) then
tmp = x - (t / (a / y))
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 (z <= -1.4e+22) {
tmp = x + (z * (y / a));
} else if (z <= 1.65e+133) {
tmp = x - (t / (a / y));
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.4e+22: tmp = x + (z * (y / a)) elif z <= 1.65e+133: tmp = x - (t / (a / y)) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.4e+22) tmp = Float64(x + Float64(z * Float64(y / a))); elseif (z <= 1.65e+133) tmp = Float64(x - Float64(t / Float64(a / y))); 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 (z <= -1.4e+22) tmp = x + (z * (y / a)); elseif (z <= 1.65e+133) tmp = x - (t / (a / y)); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.4e+22], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+133], N[(x - N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+22}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+133}:\\
\;\;\;\;x - \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if z < -1.4e22Initial program 84.7%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in y around 0 84.7%
associate-*l/99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in t around 0 81.4%
+-commutative81.4%
associate-*l/93.0%
*-commutative93.0%
Simplified93.0%
if -1.4e22 < z < 1.65e133Initial program 95.4%
associate-/l*93.8%
Simplified93.8%
Taylor expanded in z around 0 83.8%
mul-1-neg83.8%
unsub-neg83.8%
*-commutative83.8%
associate-/l*83.3%
Simplified83.3%
associate-*r/83.8%
associate-*l/87.5%
clear-num87.5%
associate-*l/87.5%
*-un-lft-identity87.5%
Applied egg-rr87.5%
if 1.65e133 < z Initial program 97.0%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in t around 0 85.2%
+-commutative85.2%
associate-/l*85.4%
Simplified85.4%
Final simplification88.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.9e+167) (- x (* t (/ y a))) (+ x (* y (/ (- z t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.9e+167) {
tmp = x - (t * (y / a));
} else {
tmp = x + (y * ((z - 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) :: tmp
if (t <= (-1.9d+167)) then
tmp = x - (t * (y / a))
else
tmp = x + (y * ((z - t) / 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.9e+167) {
tmp = x - (t * (y / a));
} else {
tmp = x + (y * ((z - t) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.9e+167: tmp = x - (t * (y / a)) else: tmp = x + (y * ((z - t) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.9e+167) tmp = Float64(x - Float64(t * Float64(y / a))); else tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.9e+167) tmp = x - (t * (y / a)); else tmp = x + (y * ((z - t) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.9e+167], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+167}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if t < -1.89999999999999997e167Initial program 82.6%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in y around 0 82.6%
associate-*l/98.9%
*-commutative98.9%
Simplified98.9%
Taylor expanded in z around 0 78.0%
mul-1-neg78.0%
sub-neg78.0%
associate-/l*90.3%
Simplified90.3%
if -1.89999999999999997e167 < t Initial program 94.3%
associate-/l*95.1%
Simplified95.1%
Final simplification94.7%
(FPCore (x y z t a) :precision binary64 (if (<= y -5e+82) (+ x (/ y (/ a z))) (+ x (/ (* z y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5e+82) {
tmp = x + (y / (a / z));
} 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 <= (-5d+82)) then
tmp = x + (y / (a / z))
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 <= -5e+82) {
tmp = x + (y / (a / z));
} else {
tmp = x + ((z * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5e+82: tmp = x + (y / (a / z)) else: tmp = x + ((z * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5e+82) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = Float64(x + Float64(Float64(z * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5e+82) tmp = x + (y / (a / z)); else tmp = x + ((z * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5e+82], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+82}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if y < -5.00000000000000015e82Initial program 80.7%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 71.5%
if -5.00000000000000015e82 < y Initial program 96.2%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in z around inf 70.7%
Final simplification70.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -2e-74) (+ x (* y (/ z a))) (+ x (/ (* z y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2e-74) {
tmp = x + (y * (z / 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 <= (-2d-74)) then
tmp = x + (y * (z / 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 <= -2e-74) {
tmp = x + (y * (z / a));
} else {
tmp = x + ((z * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2e-74: tmp = x + (y * (z / a)) else: tmp = x + ((z * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2e-74) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(Float64(z * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2e-74) tmp = x + (y * (z / a)); else tmp = x + ((z * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2e-74], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-74}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\end{array}
\end{array}
if y < -1.99999999999999992e-74Initial program 87.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around 0 64.1%
+-commutative64.1%
associate-/l*71.9%
Simplified71.9%
if -1.99999999999999992e-74 < y Initial program 96.0%
associate-/l*89.7%
Simplified89.7%
Taylor expanded in z around inf 70.8%
Final simplification71.2%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ a z))))
double code(double x, double y, double z, double t, double a) {
return x + (y / (a / 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 / z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / (a / z));
}
def code(x, y, z, t, a): return x + (y / (a / z))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(a / z))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / (a / z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a}{z}}
\end{array}
Initial program 93.3%
associate-/l*93.0%
Simplified93.0%
clear-num93.0%
un-div-inv93.1%
Applied egg-rr93.1%
Taylor expanded in z around inf 68.7%
Final simplification68.7%
(FPCore (x y z t a) :precision binary64 (+ x (* z (/ y a))))
double code(double x, double y, double z, double t, double a) {
return x + (z * (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 * (y / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (z * (y / a));
}
def code(x, y, z, t, a): return x + (z * (y / a))
function code(x, y, z, t, a) return Float64(x + Float64(z * Float64(y / a))) end
function tmp = code(x, y, z, t, a) tmp = x + (z * (y / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + z \cdot \frac{y}{a}
\end{array}
Initial program 93.3%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in y around 0 93.3%
associate-*l/98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in t around 0 68.7%
+-commutative68.7%
associate-*l/71.8%
*-commutative71.8%
Simplified71.8%
Final simplification71.8%
(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 93.3%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in x around inf 39.3%
Final simplification39.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(+ x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(+ x (/ (* y (- z t)) a))
(+ x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x + (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) / a);
} else {
tmp = x + (y / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = a / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x + (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) / a)
else
tmp = x + (y / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x + (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) / a);
} else {
tmp = x + (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x + (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) / a) else: tmp = x + (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x + Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x + Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x + (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) / a); else tmp = x + (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x + N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{1}{\frac{t\_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024059
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:alt
(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)))