
(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 (fma (/ y a) (- t z) x))
double code(double x, double y, double z, double t, double a) {
return fma((y / a), (t - z), x);
}
function code(x, y, z, t, a) return fma(Float64(y / a), Float64(t - z), x) end
code[x_, y_, z_, t_, a_] := N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{y}{a}, t - z, x\right)
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- a)))))
(if (<= z -8.2e+42)
t_1
(if (<= z -1.65e-105)
(/ t (/ a y))
(if (<= z 3.5e-97)
x
(if (<= z 5.4e-75) (* (/ y a) t) (if (<= z 2.6e+61) x t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / -a);
double tmp;
if (z <= -8.2e+42) {
tmp = t_1;
} else if (z <= -1.65e-105) {
tmp = t / (a / y);
} else if (z <= 3.5e-97) {
tmp = x;
} else if (z <= 5.4e-75) {
tmp = (y / a) * t;
} else if (z <= 2.6e+61) {
tmp = x;
} 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 = z * (y / -a)
if (z <= (-8.2d+42)) then
tmp = t_1
else if (z <= (-1.65d-105)) then
tmp = t / (a / y)
else if (z <= 3.5d-97) then
tmp = x
else if (z <= 5.4d-75) then
tmp = (y / a) * t
else if (z <= 2.6d+61) then
tmp = x
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 = z * (y / -a);
double tmp;
if (z <= -8.2e+42) {
tmp = t_1;
} else if (z <= -1.65e-105) {
tmp = t / (a / y);
} else if (z <= 3.5e-97) {
tmp = x;
} else if (z <= 5.4e-75) {
tmp = (y / a) * t;
} else if (z <= 2.6e+61) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / -a) tmp = 0 if z <= -8.2e+42: tmp = t_1 elif z <= -1.65e-105: tmp = t / (a / y) elif z <= 3.5e-97: tmp = x elif z <= 5.4e-75: tmp = (y / a) * t elif z <= 2.6e+61: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(-a))) tmp = 0.0 if (z <= -8.2e+42) tmp = t_1; elseif (z <= -1.65e-105) tmp = Float64(t / Float64(a / y)); elseif (z <= 3.5e-97) tmp = x; elseif (z <= 5.4e-75) tmp = Float64(Float64(y / a) * t); elseif (z <= 2.6e+61) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / -a); tmp = 0.0; if (z <= -8.2e+42) tmp = t_1; elseif (z <= -1.65e-105) tmp = t / (a / y); elseif (z <= 3.5e-97) tmp = x; elseif (z <= 5.4e-75) tmp = (y / a) * t; elseif (z <= 2.6e+61) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.2e+42], t$95$1, If[LessEqual[z, -1.65e-105], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e-97], x, If[LessEqual[z, 5.4e-75], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[z, 2.6e+61], x, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{-a}\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{+42}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-105}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-97}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-75}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+61}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ y a) t))))
(if (<= t -3.4e+131)
t_1
(if (<= t -7.8e+54)
(/ (* y (- t z)) a)
(if (<= t -5.5e-38)
(+ x (/ (* y t) a))
(if (<= t 6.5e-11) (- x (/ (* y z) a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y / a) * t);
double tmp;
if (t <= -3.4e+131) {
tmp = t_1;
} else if (t <= -7.8e+54) {
tmp = (y * (t - z)) / a;
} else if (t <= -5.5e-38) {
tmp = x + ((y * t) / a);
} else if (t <= 6.5e-11) {
tmp = x - ((y * z) / 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 / a) * t)
if (t <= (-3.4d+131)) then
tmp = t_1
else if (t <= (-7.8d+54)) then
tmp = (y * (t - z)) / a
else if (t <= (-5.5d-38)) then
tmp = x + ((y * t) / a)
else if (t <= 6.5d-11) then
tmp = x - ((y * z) / 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 / a) * t);
double tmp;
if (t <= -3.4e+131) {
tmp = t_1;
} else if (t <= -7.8e+54) {
tmp = (y * (t - z)) / a;
} else if (t <= -5.5e-38) {
tmp = x + ((y * t) / a);
} else if (t <= 6.5e-11) {
tmp = x - ((y * z) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y / a) * t) tmp = 0 if t <= -3.4e+131: tmp = t_1 elif t <= -7.8e+54: tmp = (y * (t - z)) / a elif t <= -5.5e-38: tmp = x + ((y * t) / a) elif t <= 6.5e-11: tmp = x - ((y * z) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y / a) * t)) tmp = 0.0 if (t <= -3.4e+131) tmp = t_1; elseif (t <= -7.8e+54) tmp = Float64(Float64(y * Float64(t - z)) / a); elseif (t <= -5.5e-38) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (t <= 6.5e-11) tmp = Float64(x - Float64(Float64(y * z) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y / a) * t); tmp = 0.0; if (t <= -3.4e+131) tmp = t_1; elseif (t <= -7.8e+54) tmp = (y * (t - z)) / a; elseif (t <= -5.5e-38) tmp = x + ((y * t) / a); elseif (t <= 6.5e-11) tmp = x - ((y * z) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.4e+131], t$95$1, If[LessEqual[t, -7.8e+54], N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, -5.5e-38], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e-11], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{a} \cdot t\\
\mathbf{if}\;t \leq -3.4 \cdot 10^{+131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{+54}:\\
\;\;\;\;\frac{y \cdot \left(t - z\right)}{a}\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-38}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{-11}:\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= y -8.5e-146) (not (<= y 2.3e-181))) (* y (/ (- t z) a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.5e-146) || !(y <= 2.3e-181)) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-8.5d-146)) .or. (.not. (y <= 2.3d-181))) then
tmp = y * ((t - z) / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -8.5e-146) || !(y <= 2.3e-181)) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -8.5e-146) or not (y <= 2.3e-181): tmp = y * ((t - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -8.5e-146) || !(y <= 2.3e-181)) tmp = Float64(y * Float64(Float64(t - z) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -8.5e-146) || ~((y <= 2.3e-181))) tmp = y * ((t - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -8.5e-146], N[Not[LessEqual[y, 2.3e-181]], $MachinePrecision]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{-146} \lor \neg \left(y \leq 2.3 \cdot 10^{-181}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.15e-146) (not (<= y 1.2e-182))) (* (/ y a) (- t z)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.15e-146) || !(y <= 1.2e-182)) {
tmp = (y / a) * (t - z);
} 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 <= (-1.15d-146)) .or. (.not. (y <= 1.2d-182))) then
tmp = (y / a) * (t - z)
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 <= -1.15e-146) || !(y <= 1.2e-182)) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.15e-146) or not (y <= 1.2e-182): tmp = (y / a) * (t - z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.15e-146) || !(y <= 1.2e-182)) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.15e-146) || ~((y <= 1.2e-182))) tmp = (y / a) * (t - z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.15e-146], N[Not[LessEqual[y, 1.2e-182]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-146} \lor \neg \left(y \leq 1.2 \cdot 10^{-182}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.4e+136) (not (<= z 9.5e+56))) (* (/ y a) (- t z)) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.4e+136) || !(z <= 9.5e+56)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + ((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) :: tmp
if ((z <= (-5.4d+136)) .or. (.not. (z <= 9.5d+56))) then
tmp = (y / a) * (t - z)
else
tmp = x + ((y * 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 ((z <= -5.4e+136) || !(z <= 9.5e+56)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.4e+136) or not (z <= 9.5e+56): tmp = (y / a) * (t - z) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.4e+136) || !(z <= 9.5e+56)) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -5.4e+136) || ~((z <= 9.5e+56))) tmp = (y / a) * (t - z); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.4e+136], N[Not[LessEqual[z, 9.5e+56]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+136} \lor \neg \left(z \leq 9.5 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.2e+133) (not (<= z 1e+58))) (* (/ y a) (- t z)) (+ x (* (/ y a) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.2e+133) || !(z <= 1e+58)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + ((y / a) * t);
}
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 <= (-3.2d+133)) .or. (.not. (z <= 1d+58))) then
tmp = (y / a) * (t - z)
else
tmp = x + ((y / a) * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.2e+133) || !(z <= 1e+58)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + ((y / a) * t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.2e+133) or not (z <= 1e+58): tmp = (y / a) * (t - z) else: tmp = x + ((y / a) * t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.2e+133) || !(z <= 1e+58)) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = Float64(x + Float64(Float64(y / a) * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.2e+133) || ~((z <= 1e+58))) tmp = (y / a) * (t - z); else tmp = x + ((y / a) * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.2e+133], N[Not[LessEqual[z, 1e+58]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+133} \lor \neg \left(z \leq 10^{+58}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot t\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.5e-38) (not (<= t 3.5e-11))) (+ x (* (/ y a) t)) (- x (/ (* y z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.5e-38) || !(t <= 3.5e-11)) {
tmp = x + ((y / a) * t);
} 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 <= (-5.5d-38)) .or. (.not. (t <= 3.5d-11))) then
tmp = x + ((y / a) * t)
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 <= -5.5e-38) || !(t <= 3.5e-11)) {
tmp = x + ((y / a) * t);
} else {
tmp = x - ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.5e-38) or not (t <= 3.5e-11): tmp = x + ((y / a) * t) else: tmp = x - ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.5e-38) || !(t <= 3.5e-11)) tmp = Float64(x + Float64(Float64(y / a) * t)); else tmp = Float64(x - Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.5e-38) || ~((t <= 3.5e-11))) tmp = x + ((y / a) * t); else tmp = x - ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.5e-38], N[Not[LessEqual[t, 3.5e-11]], $MachinePrecision]], N[(x + N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{-38} \lor \neg \left(t \leq 3.5 \cdot 10^{-11}\right):\\
\;\;\;\;x + \frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= a -3.9e-11) x (if (<= a 2.4e-72) (* (/ y a) t) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.9e-11) {
tmp = x;
} else if (a <= 2.4e-72) {
tmp = (y / a) * t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.9d-11)) then
tmp = x
else if (a <= 2.4d-72) then
tmp = (y / a) * t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.9e-11) {
tmp = x;
} else if (a <= 2.4e-72) {
tmp = (y / a) * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.9e-11: tmp = x elif a <= 2.4e-72: tmp = (y / a) * t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.9e-11) tmp = x; elseif (a <= 2.4e-72) tmp = Float64(Float64(y / a) * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.9e-11) tmp = x; elseif (a <= 2.4e-72) tmp = (y / a) * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.9e-11], x, If[LessEqual[a, 2.4e-72], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.9 \cdot 10^{-11}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-72}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y / a) * (t - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
def code(x, y, z, t, a): return x + ((y / a) * (t - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y / a) * Float64(t - z))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y / a) * (t - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{a} \cdot \left(t - z\right)
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ (- t z) (/ a y))))
double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / (a / y));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((t - z) / (a / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / (a / y));
}
def code(x, y, z, t, a): return x + ((t - z) / (a / y))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(t - z) / Float64(a / y))) end
function tmp = code(x, y, z, t, a) tmp = x + ((t - z) / (a / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{t - z}{\frac{a}{y}}
\end{array}
(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}
(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 2024008
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:herbie-target
(if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))
(- x (/ (* y (- z t)) a)))