
(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 (+ 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
(let* ((t_1 (/ (* (- z t) y) a)))
(if (or (<= t_1 -4e+163)
(not
(or (<= t_1 5e+62) (and (not (<= t_1 1e+131)) (<= t_1 5e+171)))))
(* (- z t) (/ y a))
(- x (/ (* t y) a)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / a;
double tmp;
if ((t_1 <= -4e+163) || !((t_1 <= 5e+62) || (!(t_1 <= 1e+131) && (t_1 <= 5e+171)))) {
tmp = (z - t) * (y / a);
} 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) :: t_1
real(8) :: tmp
t_1 = ((z - t) * y) / a
if ((t_1 <= (-4d+163)) .or. (.not. (t_1 <= 5d+62) .or. (.not. (t_1 <= 1d+131)) .and. (t_1 <= 5d+171))) then
tmp = (z - t) * (y / a)
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 t_1 = ((z - t) * y) / a;
double tmp;
if ((t_1 <= -4e+163) || !((t_1 <= 5e+62) || (!(t_1 <= 1e+131) && (t_1 <= 5e+171)))) {
tmp = (z - t) * (y / a);
} else {
tmp = x - ((t * y) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((z - t) * y) / a tmp = 0 if (t_1 <= -4e+163) or not ((t_1 <= 5e+62) or (not (t_1 <= 1e+131) and (t_1 <= 5e+171))): tmp = (z - t) * (y / a) else: tmp = x - ((t * y) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - t) * y) / a) tmp = 0.0 if ((t_1 <= -4e+163) || !((t_1 <= 5e+62) || (!(t_1 <= 1e+131) && (t_1 <= 5e+171)))) tmp = Float64(Float64(z - t) * Float64(y / a)); else tmp = Float64(x - Float64(Float64(t * y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((z - t) * y) / a; tmp = 0.0; if ((t_1 <= -4e+163) || ~(((t_1 <= 5e+62) || (~((t_1 <= 1e+131)) && (t_1 <= 5e+171))))) tmp = (z - t) * (y / a); else tmp = x - ((t * y) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / a), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e+163], N[Not[Or[LessEqual[t$95$1, 5e+62], And[N[Not[LessEqual[t$95$1, 1e+131]], $MachinePrecision], LessEqual[t$95$1, 5e+171]]]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z - t\right) \cdot y}{a}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+163} \lor \neg \left(t_1 \leq 5 \cdot 10^{+62} \lor \neg \left(t_1 \leq 10^{+131}\right) \land t_1 \leq 5 \cdot 10^{+171}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t \cdot y}{a}\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* (- z t) y) a)))
(if (<= t_1 -4e+163)
(* (- z t) (/ y a))
(if (<= t_1 5e+62) (- x (/ (* t y) a)) (/ (- z t) (/ a y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / a;
double tmp;
if (t_1 <= -4e+163) {
tmp = (z - t) * (y / a);
} else if (t_1 <= 5e+62) {
tmp = x - ((t * y) / a);
} else {
tmp = (z - 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) :: t_1
real(8) :: tmp
t_1 = ((z - t) * y) / a
if (t_1 <= (-4d+163)) then
tmp = (z - t) * (y / a)
else if (t_1 <= 5d+62) then
tmp = x - ((t * y) / a)
else
tmp = (z - t) / (a / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = ((z - t) * y) / a;
double tmp;
if (t_1 <= -4e+163) {
tmp = (z - t) * (y / a);
} else if (t_1 <= 5e+62) {
tmp = x - ((t * y) / a);
} else {
tmp = (z - t) / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = ((z - t) * y) / a tmp = 0 if t_1 <= -4e+163: tmp = (z - t) * (y / a) elif t_1 <= 5e+62: tmp = x - ((t * y) / a) else: tmp = (z - t) / (a / y) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(Float64(z - t) * y) / a) tmp = 0.0 if (t_1 <= -4e+163) tmp = Float64(Float64(z - t) * Float64(y / a)); elseif (t_1 <= 5e+62) tmp = Float64(x - Float64(Float64(t * y) / a)); else tmp = Float64(Float64(z - t) / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = ((z - t) * y) / a; tmp = 0.0; if (t_1 <= -4e+163) tmp = (z - t) * (y / a); elseif (t_1 <= 5e+62) tmp = x - ((t * y) / a); else tmp = (z - t) / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[t$95$1, -4e+163], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+62], N[(x - N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z - t\right) \cdot y}{a}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{+163}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+62}:\\
\;\;\;\;x - \frac{t \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z - t}{\frac{a}{y}}\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* z y) a)) (t_2 (* t (/ (- y) a))))
(if (<= t -8.5e+177)
t_2
(if (<= t -1.05e-18)
x
(if (<= t -5.2e-90)
t_1
(if (<= t 1.25e-36)
x
(if (<= t 2.25e+17) t_1 (if (<= t 9.4e+139) x t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * y) / a;
double t_2 = t * (-y / a);
double tmp;
if (t <= -8.5e+177) {
tmp = t_2;
} else if (t <= -1.05e-18) {
tmp = x;
} else if (t <= -5.2e-90) {
tmp = t_1;
} else if (t <= 1.25e-36) {
tmp = x;
} else if (t <= 2.25e+17) {
tmp = t_1;
} else if (t <= 9.4e+139) {
tmp = x;
} else {
tmp = t_2;
}
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 = (z * y) / a
t_2 = t * (-y / a)
if (t <= (-8.5d+177)) then
tmp = t_2
else if (t <= (-1.05d-18)) then
tmp = x
else if (t <= (-5.2d-90)) then
tmp = t_1
else if (t <= 1.25d-36) then
tmp = x
else if (t <= 2.25d+17) then
tmp = t_1
else if (t <= 9.4d+139) then
tmp = x
else
tmp = t_2
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 t_2 = t * (-y / a);
double tmp;
if (t <= -8.5e+177) {
tmp = t_2;
} else if (t <= -1.05e-18) {
tmp = x;
} else if (t <= -5.2e-90) {
tmp = t_1;
} else if (t <= 1.25e-36) {
tmp = x;
} else if (t <= 2.25e+17) {
tmp = t_1;
} else if (t <= 9.4e+139) {
tmp = x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z * y) / a t_2 = t * (-y / a) tmp = 0 if t <= -8.5e+177: tmp = t_2 elif t <= -1.05e-18: tmp = x elif t <= -5.2e-90: tmp = t_1 elif t <= 1.25e-36: tmp = x elif t <= 2.25e+17: tmp = t_1 elif t <= 9.4e+139: tmp = x else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z * y) / a) t_2 = Float64(t * Float64(Float64(-y) / a)) tmp = 0.0 if (t <= -8.5e+177) tmp = t_2; elseif (t <= -1.05e-18) tmp = x; elseif (t <= -5.2e-90) tmp = t_1; elseif (t <= 1.25e-36) tmp = x; elseif (t <= 2.25e+17) tmp = t_1; elseif (t <= 9.4e+139) tmp = x; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z * y) / a; t_2 = t * (-y / a); tmp = 0.0; if (t <= -8.5e+177) tmp = t_2; elseif (t <= -1.05e-18) tmp = x; elseif (t <= -5.2e-90) tmp = t_1; elseif (t <= 1.25e-36) tmp = x; elseif (t <= 2.25e+17) tmp = t_1; elseif (t <= 9.4e+139) tmp = x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+177], t$95$2, If[LessEqual[t, -1.05e-18], x, If[LessEqual[t, -5.2e-90], t$95$1, If[LessEqual[t, 1.25e-36], x, If[LessEqual[t, 2.25e+17], t$95$1, If[LessEqual[t, 9.4e+139], x, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot y}{a}\\
t_2 := t \cdot \frac{-y}{a}\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+177}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-18}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-90}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-36}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 9.4 \cdot 10^{+139}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* z y) a)))
(if (<= t -2.02e+177)
(/ (- y) (/ a t))
(if (<= t -9.2e-20)
x
(if (<= t -7.5e-83)
t_1
(if (<= t 1.2e-36)
x
(if (<= t 7.1e+15)
t_1
(if (<= t 2.4e+140) x (* t (/ (- y) a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * y) / a;
double tmp;
if (t <= -2.02e+177) {
tmp = -y / (a / t);
} else if (t <= -9.2e-20) {
tmp = x;
} else if (t <= -7.5e-83) {
tmp = t_1;
} else if (t <= 1.2e-36) {
tmp = x;
} else if (t <= 7.1e+15) {
tmp = t_1;
} else if (t <= 2.4e+140) {
tmp = x;
} 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) :: tmp
t_1 = (z * y) / a
if (t <= (-2.02d+177)) then
tmp = -y / (a / t)
else if (t <= (-9.2d-20)) then
tmp = x
else if (t <= (-7.5d-83)) then
tmp = t_1
else if (t <= 1.2d-36) then
tmp = x
else if (t <= 7.1d+15) then
tmp = t_1
else if (t <= 2.4d+140) then
tmp = x
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 = (z * y) / a;
double tmp;
if (t <= -2.02e+177) {
tmp = -y / (a / t);
} else if (t <= -9.2e-20) {
tmp = x;
} else if (t <= -7.5e-83) {
tmp = t_1;
} else if (t <= 1.2e-36) {
tmp = x;
} else if (t <= 7.1e+15) {
tmp = t_1;
} else if (t <= 2.4e+140) {
tmp = x;
} else {
tmp = t * (-y / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z * y) / a tmp = 0 if t <= -2.02e+177: tmp = -y / (a / t) elif t <= -9.2e-20: tmp = x elif t <= -7.5e-83: tmp = t_1 elif t <= 1.2e-36: tmp = x elif t <= 7.1e+15: tmp = t_1 elif t <= 2.4e+140: tmp = x else: tmp = t * (-y / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z * y) / a) tmp = 0.0 if (t <= -2.02e+177) tmp = Float64(Float64(-y) / Float64(a / t)); elseif (t <= -9.2e-20) tmp = x; elseif (t <= -7.5e-83) tmp = t_1; elseif (t <= 1.2e-36) tmp = x; elseif (t <= 7.1e+15) tmp = t_1; elseif (t <= 2.4e+140) tmp = x; else tmp = Float64(t * Float64(Float64(-y) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z * y) / a; tmp = 0.0; if (t <= -2.02e+177) tmp = -y / (a / t); elseif (t <= -9.2e-20) tmp = x; elseif (t <= -7.5e-83) tmp = t_1; elseif (t <= 1.2e-36) tmp = x; elseif (t <= 7.1e+15) tmp = t_1; elseif (t <= 2.4e+140) tmp = x; else tmp = t * (-y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[t, -2.02e+177], N[((-y) / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.2e-20], x, If[LessEqual[t, -7.5e-83], t$95$1, If[LessEqual[t, 1.2e-36], x, If[LessEqual[t, 7.1e+15], t$95$1, If[LessEqual[t, 2.4e+140], x, N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot y}{a}\\
\mathbf{if}\;t \leq -2.02 \cdot 10^{+177}:\\
\;\;\;\;\frac{-y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq -9.2 \cdot 10^{-20}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{-83}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-36}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 7.1 \cdot 10^{+15}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+140}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{-y}{a}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.48e+181) (not (<= t 8.2e+139))) (* (- z t) (/ y a)) (+ x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.48e+181) || !(t <= 8.2e+139)) {
tmp = (z - 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 ((t <= (-1.48d+181)) .or. (.not. (t <= 8.2d+139))) then
tmp = (z - 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 ((t <= -1.48e+181) || !(t <= 8.2e+139)) {
tmp = (z - t) * (y / a);
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.48e+181) or not (t <= 8.2e+139): tmp = (z - t) * (y / a) else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.48e+181) || !(t <= 8.2e+139)) tmp = Float64(Float64(z - 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 ((t <= -1.48e+181) || ~((t <= 8.2e+139))) tmp = (z - t) * (y / a); else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.48e+181], N[Not[LessEqual[t, 8.2e+139]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.48 \cdot 10^{+181} \lor \neg \left(t \leq 8.2 \cdot 10^{+139}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= a -4.8e-36) x (if (<= a 2.75e+135) (* (- z t) (/ y a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.8e-36) {
tmp = x;
} else if (a <= 2.75e+135) {
tmp = (z - 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 (a <= (-4.8d-36)) then
tmp = x
else if (a <= 2.75d+135) then
tmp = (z - 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 (a <= -4.8e-36) {
tmp = x;
} else if (a <= 2.75e+135) {
tmp = (z - t) * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.8e-36: tmp = x elif a <= 2.75e+135: tmp = (z - t) * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.8e-36) tmp = x; elseif (a <= 2.75e+135) tmp = Float64(Float64(z - t) * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.8e-36) tmp = x; elseif (a <= 2.75e+135) tmp = (z - t) * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.8e-36], x, If[LessEqual[a, 2.75e+135], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{-36}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.75 \cdot 10^{+135}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= t -1.3e+15) (- x (* t (/ y a))) (if (<= t 6.8e+137) (+ x (* y (/ z a))) (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.3e+15) {
tmp = x - (t * (y / a));
} else if (t <= 6.8e+137) {
tmp = x + (y * (z / a));
} else {
tmp = (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 (t <= (-1.3d+15)) then
tmp = x - (t * (y / a))
else if (t <= 6.8d+137) then
tmp = x + (y * (z / a))
else
tmp = (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 (t <= -1.3e+15) {
tmp = x - (t * (y / a));
} else if (t <= 6.8e+137) {
tmp = x + (y * (z / a));
} else {
tmp = (z - t) * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.3e+15: tmp = x - (t * (y / a)) elif t <= 6.8e+137: tmp = x + (y * (z / a)) else: tmp = (z - t) * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.3e+15) tmp = Float64(x - Float64(t * Float64(y / a))); elseif (t <= 6.8e+137) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(Float64(z - t) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.3e+15) tmp = x - (t * (y / a)); elseif (t <= 6.8e+137) tmp = x + (y * (z / a)); else tmp = (z - t) * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.3e+15], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+137], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.3 \cdot 10^{+15}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+137}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.7e-13) (not (<= y 3.2e+191))) (* y (/ z a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.7e-13) || !(y <= 3.2e+191)) {
tmp = y * (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 <= (-3.7d-13)) .or. (.not. (y <= 3.2d+191))) then
tmp = y * (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 <= -3.7e-13) || !(y <= 3.2e+191)) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.7e-13) or not (y <= 3.2e+191): tmp = y * (z / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.7e-13) || !(y <= 3.2e+191)) tmp = Float64(y * Float64(z / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.7e-13) || ~((y <= 3.2e+191))) tmp = y * (z / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.7e-13], N[Not[LessEqual[y, 3.2e+191]], $MachinePrecision]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.7 \cdot 10^{-13} \lor \neg \left(y \leq 3.2 \cdot 10^{+191}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= y -3.8e-13) (* y (/ z a)) (if (<= y 1.85e+194) x (/ (* z y) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.8e-13) {
tmp = y * (z / a);
} else if (y <= 1.85e+194) {
tmp = x;
} else {
tmp = (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 <= (-3.8d-13)) then
tmp = y * (z / a)
else if (y <= 1.85d+194) then
tmp = x
else
tmp = (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 <= -3.8e-13) {
tmp = y * (z / a);
} else if (y <= 1.85e+194) {
tmp = x;
} else {
tmp = (z * y) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3.8e-13: tmp = y * (z / a) elif y <= 1.85e+194: tmp = x else: tmp = (z * y) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -3.8e-13) tmp = Float64(y * Float64(z / a)); elseif (y <= 1.85e+194) tmp = x; else tmp = Float64(Float64(z * y) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -3.8e-13) tmp = y * (z / a); elseif (y <= 1.85e+194) tmp = x; else tmp = (z * y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3.8e-13], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.85e+194], x, N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{-13}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+194}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\end{array}
\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}
(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 2024010
(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)))