
(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 11 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 (if (or (<= a -1e-36) (not (<= a 2.6e-52))) (+ x (/ y (/ a (- z t)))) (+ x (/ (* (- z t) y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1e-36) || !(a <= 2.6e-52)) {
tmp = x + (y / (a / (z - t)));
} else {
tmp = x + (((z - t) * 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 ((a <= (-1d-36)) .or. (.not. (a <= 2.6d-52))) then
tmp = x + (y / (a / (z - t)))
else
tmp = x + (((z - t) * 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 ((a <= -1e-36) || !(a <= 2.6e-52)) {
tmp = x + (y / (a / (z - t)));
} else {
tmp = x + (((z - t) * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1e-36) or not (a <= 2.6e-52): tmp = x + (y / (a / (z - t))) else: tmp = x + (((z - t) * y) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1e-36) || !(a <= 2.6e-52)) tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); else tmp = Float64(x + Float64(Float64(Float64(z - t) * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1e-36) || ~((a <= 2.6e-52))) tmp = x + (y / (a / (z - t))); else tmp = x + (((z - t) * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1e-36], N[Not[LessEqual[a, 2.6e-52]], $MachinePrecision]], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{-36} \lor \neg \left(a \leq 2.6 \cdot 10^{-52}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\left(z - t\right) \cdot y}{a}\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a z)))) (t_2 (/ (* t y) (- a))))
(if (<= t -3.3e+203)
t_2
(if (<= t -2.7e+159)
t_1
(if (<= t -2e+54)
t_2
(if (<= t 1.15e+69)
t_1
(if (<= t 3.4e+92)
t_2
(if (<= t 2.15e+201) t_1 (* t (- (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / z));
double t_2 = (t * y) / -a;
double tmp;
if (t <= -3.3e+203) {
tmp = t_2;
} else if (t <= -2.7e+159) {
tmp = t_1;
} else if (t <= -2e+54) {
tmp = t_2;
} else if (t <= 1.15e+69) {
tmp = t_1;
} else if (t <= 3.4e+92) {
tmp = t_2;
} else if (t <= 2.15e+201) {
tmp = t_1;
} else {
tmp = t * -(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) :: t_2
real(8) :: tmp
t_1 = x + (y / (a / z))
t_2 = (t * y) / -a
if (t <= (-3.3d+203)) then
tmp = t_2
else if (t <= (-2.7d+159)) then
tmp = t_1
else if (t <= (-2d+54)) then
tmp = t_2
else if (t <= 1.15d+69) then
tmp = t_1
else if (t <= 3.4d+92) then
tmp = t_2
else if (t <= 2.15d+201) then
tmp = t_1
else
tmp = t * -(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 = x + (y / (a / z));
double t_2 = (t * y) / -a;
double tmp;
if (t <= -3.3e+203) {
tmp = t_2;
} else if (t <= -2.7e+159) {
tmp = t_1;
} else if (t <= -2e+54) {
tmp = t_2;
} else if (t <= 1.15e+69) {
tmp = t_1;
} else if (t <= 3.4e+92) {
tmp = t_2;
} else if (t <= 2.15e+201) {
tmp = t_1;
} else {
tmp = t * -(y / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / z)) t_2 = (t * y) / -a tmp = 0 if t <= -3.3e+203: tmp = t_2 elif t <= -2.7e+159: tmp = t_1 elif t <= -2e+54: tmp = t_2 elif t <= 1.15e+69: tmp = t_1 elif t <= 3.4e+92: tmp = t_2 elif t <= 2.15e+201: tmp = t_1 else: tmp = t * -(y / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / z))) t_2 = Float64(Float64(t * y) / Float64(-a)) tmp = 0.0 if (t <= -3.3e+203) tmp = t_2; elseif (t <= -2.7e+159) tmp = t_1; elseif (t <= -2e+54) tmp = t_2; elseif (t <= 1.15e+69) tmp = t_1; elseif (t <= 3.4e+92) tmp = t_2; elseif (t <= 2.15e+201) tmp = t_1; else tmp = Float64(t * Float64(-Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / z)); t_2 = (t * y) / -a; tmp = 0.0; if (t <= -3.3e+203) tmp = t_2; elseif (t <= -2.7e+159) tmp = t_1; elseif (t <= -2e+54) tmp = t_2; elseif (t <= 1.15e+69) tmp = t_1; elseif (t <= 3.4e+92) tmp = t_2; elseif (t <= 2.15e+201) tmp = t_1; else tmp = t * -(y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * y), $MachinePrecision] / (-a)), $MachinePrecision]}, If[LessEqual[t, -3.3e+203], t$95$2, If[LessEqual[t, -2.7e+159], t$95$1, If[LessEqual[t, -2e+54], t$95$2, If[LessEqual[t, 1.15e+69], t$95$1, If[LessEqual[t, 3.4e+92], t$95$2, If[LessEqual[t, 2.15e+201], t$95$1, N[(t * (-N[(y / a), $MachinePrecision])), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{z}}\\
t_2 := \frac{t \cdot y}{-a}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+203}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{+159}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2 \cdot 10^{+54}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+92}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{+201}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-\frac{y}{a}\right)\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a z)))) (t_2 (/ (* t y) (- a))))
(if (<= t -2.7e+203)
t_2
(if (<= t -3.4e+159)
t_1
(if (<= t -2e+54)
t_2
(if (<= t 1.15e+69)
(+ x (* y (/ z a)))
(if (<= t 2.75e+91)
t_2
(if (<= t 1.3e+202) t_1 (* t (- (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / z));
double t_2 = (t * y) / -a;
double tmp;
if (t <= -2.7e+203) {
tmp = t_2;
} else if (t <= -3.4e+159) {
tmp = t_1;
} else if (t <= -2e+54) {
tmp = t_2;
} else if (t <= 1.15e+69) {
tmp = x + (y * (z / a));
} else if (t <= 2.75e+91) {
tmp = t_2;
} else if (t <= 1.3e+202) {
tmp = t_1;
} else {
tmp = t * -(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) :: t_2
real(8) :: tmp
t_1 = x + (y / (a / z))
t_2 = (t * y) / -a
if (t <= (-2.7d+203)) then
tmp = t_2
else if (t <= (-3.4d+159)) then
tmp = t_1
else if (t <= (-2d+54)) then
tmp = t_2
else if (t <= 1.15d+69) then
tmp = x + (y * (z / a))
else if (t <= 2.75d+91) then
tmp = t_2
else if (t <= 1.3d+202) then
tmp = t_1
else
tmp = t * -(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 = x + (y / (a / z));
double t_2 = (t * y) / -a;
double tmp;
if (t <= -2.7e+203) {
tmp = t_2;
} else if (t <= -3.4e+159) {
tmp = t_1;
} else if (t <= -2e+54) {
tmp = t_2;
} else if (t <= 1.15e+69) {
tmp = x + (y * (z / a));
} else if (t <= 2.75e+91) {
tmp = t_2;
} else if (t <= 1.3e+202) {
tmp = t_1;
} else {
tmp = t * -(y / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / z)) t_2 = (t * y) / -a tmp = 0 if t <= -2.7e+203: tmp = t_2 elif t <= -3.4e+159: tmp = t_1 elif t <= -2e+54: tmp = t_2 elif t <= 1.15e+69: tmp = x + (y * (z / a)) elif t <= 2.75e+91: tmp = t_2 elif t <= 1.3e+202: tmp = t_1 else: tmp = t * -(y / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / z))) t_2 = Float64(Float64(t * y) / Float64(-a)) tmp = 0.0 if (t <= -2.7e+203) tmp = t_2; elseif (t <= -3.4e+159) tmp = t_1; elseif (t <= -2e+54) tmp = t_2; elseif (t <= 1.15e+69) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= 2.75e+91) tmp = t_2; elseif (t <= 1.3e+202) tmp = t_1; else tmp = Float64(t * Float64(-Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / z)); t_2 = (t * y) / -a; tmp = 0.0; if (t <= -2.7e+203) tmp = t_2; elseif (t <= -3.4e+159) tmp = t_1; elseif (t <= -2e+54) tmp = t_2; elseif (t <= 1.15e+69) tmp = x + (y * (z / a)); elseif (t <= 2.75e+91) tmp = t_2; elseif (t <= 1.3e+202) tmp = t_1; else tmp = t * -(y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * y), $MachinePrecision] / (-a)), $MachinePrecision]}, If[LessEqual[t, -2.7e+203], t$95$2, If[LessEqual[t, -3.4e+159], t$95$1, If[LessEqual[t, -2e+54], t$95$2, If[LessEqual[t, 1.15e+69], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.75e+91], t$95$2, If[LessEqual[t, 1.3e+202], t$95$1, N[(t * (-N[(y / a), $MachinePrecision])), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{z}}\\
t_2 := \frac{t \cdot y}{-a}\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{+203}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.4 \cdot 10^{+159}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2 \cdot 10^{+54}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+69}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 2.75 \cdot 10^{+91}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+202}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-\frac{y}{a}\right)\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y a)))) (t_2 (/ (* t y) (- a))))
(if (<= t -3.3e+203)
t_2
(if (<= t -8.2e+92)
t_1
(if (<= t -2e+54)
t_2
(if (<= t 1.1e+69)
t_1
(if (<= t 3.4e+92)
t_2
(if (<= t 2.1e+201) t_1 (* t (- (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double t_2 = (t * y) / -a;
double tmp;
if (t <= -3.3e+203) {
tmp = t_2;
} else if (t <= -8.2e+92) {
tmp = t_1;
} else if (t <= -2e+54) {
tmp = t_2;
} else if (t <= 1.1e+69) {
tmp = t_1;
} else if (t <= 3.4e+92) {
tmp = t_2;
} else if (t <= 2.1e+201) {
tmp = t_1;
} else {
tmp = t * -(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) :: t_2
real(8) :: tmp
t_1 = x + (z * (y / a))
t_2 = (t * y) / -a
if (t <= (-3.3d+203)) then
tmp = t_2
else if (t <= (-8.2d+92)) then
tmp = t_1
else if (t <= (-2d+54)) then
tmp = t_2
else if (t <= 1.1d+69) then
tmp = t_1
else if (t <= 3.4d+92) then
tmp = t_2
else if (t <= 2.1d+201) then
tmp = t_1
else
tmp = t * -(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 = x + (z * (y / a));
double t_2 = (t * y) / -a;
double tmp;
if (t <= -3.3e+203) {
tmp = t_2;
} else if (t <= -8.2e+92) {
tmp = t_1;
} else if (t <= -2e+54) {
tmp = t_2;
} else if (t <= 1.1e+69) {
tmp = t_1;
} else if (t <= 3.4e+92) {
tmp = t_2;
} else if (t <= 2.1e+201) {
tmp = t_1;
} else {
tmp = t * -(y / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / a)) t_2 = (t * y) / -a tmp = 0 if t <= -3.3e+203: tmp = t_2 elif t <= -8.2e+92: tmp = t_1 elif t <= -2e+54: tmp = t_2 elif t <= 1.1e+69: tmp = t_1 elif t <= 3.4e+92: tmp = t_2 elif t <= 2.1e+201: tmp = t_1 else: tmp = t * -(y / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / a))) t_2 = Float64(Float64(t * y) / Float64(-a)) tmp = 0.0 if (t <= -3.3e+203) tmp = t_2; elseif (t <= -8.2e+92) tmp = t_1; elseif (t <= -2e+54) tmp = t_2; elseif (t <= 1.1e+69) tmp = t_1; elseif (t <= 3.4e+92) tmp = t_2; elseif (t <= 2.1e+201) tmp = t_1; else tmp = Float64(t * Float64(-Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / a)); t_2 = (t * y) / -a; tmp = 0.0; if (t <= -3.3e+203) tmp = t_2; elseif (t <= -8.2e+92) tmp = t_1; elseif (t <= -2e+54) tmp = t_2; elseif (t <= 1.1e+69) tmp = t_1; elseif (t <= 3.4e+92) tmp = t_2; elseif (t <= 2.1e+201) tmp = t_1; else tmp = t * -(y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t * y), $MachinePrecision] / (-a)), $MachinePrecision]}, If[LessEqual[t, -3.3e+203], t$95$2, If[LessEqual[t, -8.2e+92], t$95$1, If[LessEqual[t, -2e+54], t$95$2, If[LessEqual[t, 1.1e+69], t$95$1, If[LessEqual[t, 3.4e+92], t$95$2, If[LessEqual[t, 2.1e+201], t$95$1, N[(t * (-N[(y / a), $MachinePrecision])), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
t_2 := \frac{t \cdot y}{-a}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+203}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -8.2 \cdot 10^{+92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2 \cdot 10^{+54}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+92}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+201}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-\frac{y}{a}\right)\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= x -2.4e-33)
x
(if (or (<= x 1.4e-118) (and (not (<= x 1.04e-36)) (<= x 4.4e+19)))
(* t (- (/ y a)))
x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.4e-33) {
tmp = x;
} else if ((x <= 1.4e-118) || (!(x <= 1.04e-36) && (x <= 4.4e+19))) {
tmp = t * -(y / 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 (x <= (-2.4d-33)) then
tmp = x
else if ((x <= 1.4d-118) .or. (.not. (x <= 1.04d-36)) .and. (x <= 4.4d+19)) then
tmp = t * -(y / 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 (x <= -2.4e-33) {
tmp = x;
} else if ((x <= 1.4e-118) || (!(x <= 1.04e-36) && (x <= 4.4e+19))) {
tmp = t * -(y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.4e-33: tmp = x elif (x <= 1.4e-118) or (not (x <= 1.04e-36) and (x <= 4.4e+19)): tmp = t * -(y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.4e-33) tmp = x; elseif ((x <= 1.4e-118) || (!(x <= 1.04e-36) && (x <= 4.4e+19))) tmp = Float64(t * Float64(-Float64(y / a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.4e-33) tmp = x; elseif ((x <= 1.4e-118) || (~((x <= 1.04e-36)) && (x <= 4.4e+19))) tmp = t * -(y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.4e-33], x, If[Or[LessEqual[x, 1.4e-118], And[N[Not[LessEqual[x, 1.04e-36]], $MachinePrecision], LessEqual[x, 4.4e+19]]], N[(t * (-N[(y / a), $MachinePrecision])), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{-33}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.4 \cdot 10^{-118} \lor \neg \left(x \leq 1.04 \cdot 10^{-36}\right) \land x \leq 4.4 \cdot 10^{+19}:\\
\;\;\;\;t \cdot \left(-\frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.2e+51) (not (<= z 1.05e-15))) (+ x (* z (/ y a))) (- x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.2e+51) || !(z <= 1.05e-15)) {
tmp = x + (z * (y / a));
} 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 <= (-6.2d+51)) .or. (.not. (z <= 1.05d-15))) then
tmp = x + (z * (y / a))
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 <= -6.2e+51) || !(z <= 1.05e-15)) {
tmp = x + (z * (y / a));
} else {
tmp = x - (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.2e+51) or not (z <= 1.05e-15): tmp = x + (z * (y / a)) else: tmp = x - (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.2e+51) || !(z <= 1.05e-15)) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(x - Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.2e+51) || ~((z <= 1.05e-15))) tmp = x + (z * (y / a)); else tmp = x - (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.2e+51], N[Not[LessEqual[z, 1.05e-15]], $MachinePrecision]], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+51} \lor \neg \left(z \leq 1.05 \cdot 10^{-15}\right):\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{t}{a}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8e-38) (not (<= t 1.15e-10))) (- x (/ t (/ a y))) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8e-38) || !(t <= 1.15e-10)) {
tmp = x - (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 <= (-8d-38)) .or. (.not. (t <= 1.15d-10))) then
tmp = x - (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 <= -8e-38) || !(t <= 1.15e-10)) {
tmp = x - (t / (a / y));
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8e-38) or not (t <= 1.15e-10): tmp = x - (t / (a / y)) else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8e-38) || !(t <= 1.15e-10)) tmp = Float64(x - Float64(t / Float64(a / 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 <= -8e-38) || ~((t <= 1.15e-10))) tmp = x - (t / (a / y)); else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8e-38], N[Not[LessEqual[t, 1.15e-10]], $MachinePrecision]], N[(x - N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{-38} \lor \neg \left(t \leq 1.15 \cdot 10^{-10}\right):\\
\;\;\;\;x - \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= t -7.9e-38) (- x (/ (* t y) a)) (if (<= t 1.14e-10) (+ x (* z (/ y a))) (- x (/ t (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.9e-38) {
tmp = x - ((t * y) / a);
} else if (t <= 1.14e-10) {
tmp = x + (z * (y / a));
} else {
tmp = x - (t / (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 <= (-7.9d-38)) then
tmp = x - ((t * y) / a)
else if (t <= 1.14d-10) then
tmp = x + (z * (y / a))
else
tmp = x - (t / (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 <= -7.9e-38) {
tmp = x - ((t * y) / a);
} else if (t <= 1.14e-10) {
tmp = x + (z * (y / a));
} else {
tmp = x - (t / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7.9e-38: tmp = x - ((t * y) / a) elif t <= 1.14e-10: tmp = x + (z * (y / a)) else: tmp = x - (t / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7.9e-38) tmp = Float64(x - Float64(Float64(t * y) / a)); elseif (t <= 1.14e-10) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(x - Float64(t / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7.9e-38) tmp = x - ((t * y) / a); elseif (t <= 1.14e-10) tmp = x + (z * (y / a)); else tmp = x - (t / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.9e-38], N[(x - N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.14e-10], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.9 \cdot 10^{-38}:\\
\;\;\;\;x - \frac{t \cdot y}{a}\\
\mathbf{elif}\;t \leq 1.14 \cdot 10^{-10}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t}{\frac{a}{y}}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= t 4.8e+120) (+ x (/ y (/ a (- z t)))) (- x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 4.8e+120) {
tmp = x + (y / (a / (z - t)));
} else {
tmp = x - (t * (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+120) then
tmp = x + (y / (a / (z - t)))
else
tmp = x - (t * (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+120) {
tmp = x + (y / (a / (z - t)));
} else {
tmp = x - (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 4.8e+120: tmp = x + (y / (a / (z - t))) else: tmp = x - (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 4.8e+120) tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); else tmp = Float64(x - Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 4.8e+120) tmp = x + (y / (a / (z - t))); else tmp = x - (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 4.8e+120], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.8 \cdot 10^{+120}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\end{array}
\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}
(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, 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)))