
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\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) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x + y) - (((z - t) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (+ x y) (/ (* y (- t z)) (- a t)))))
(if (<= t_1 -1e-217)
(+ (+ x y) (* y (/ (- t z) (- a t))))
(if (<= t_1 2e-209)
(+ x (/ (- (* y z) (* y a)) t))
(+ (+ x y) (/ (- t z) (/ (- a t) y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + ((y * (t - z)) / (a - t));
double tmp;
if (t_1 <= -1e-217) {
tmp = (x + y) + (y * ((t - z) / (a - t)));
} else if (t_1 <= 2e-209) {
tmp = x + (((y * z) - (y * a)) / t);
} else {
tmp = (x + y) + ((t - z) / ((a - t) / 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 = (x + y) + ((y * (t - z)) / (a - t))
if (t_1 <= (-1d-217)) then
tmp = (x + y) + (y * ((t - z) / (a - t)))
else if (t_1 <= 2d-209) then
tmp = x + (((y * z) - (y * a)) / t)
else
tmp = (x + y) + ((t - z) / ((a - t) / y))
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) + ((y * (t - z)) / (a - t));
double tmp;
if (t_1 <= -1e-217) {
tmp = (x + y) + (y * ((t - z) / (a - t)));
} else if (t_1 <= 2e-209) {
tmp = x + (((y * z) - (y * a)) / t);
} else {
tmp = (x + y) + ((t - z) / ((a - t) / y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) + ((y * (t - z)) / (a - t)) tmp = 0 if t_1 <= -1e-217: tmp = (x + y) + (y * ((t - z) / (a - t))) elif t_1 <= 2e-209: tmp = x + (((y * z) - (y * a)) / t) else: tmp = (x + y) + ((t - z) / ((a - t) / y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) + Float64(Float64(y * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if (t_1 <= -1e-217) tmp = Float64(Float64(x + y) + Float64(y * Float64(Float64(t - z) / Float64(a - t)))); elseif (t_1 <= 2e-209) tmp = Float64(x + Float64(Float64(Float64(y * z) - Float64(y * a)) / t)); else tmp = Float64(Float64(x + y) + Float64(Float64(t - z) / Float64(Float64(a - t) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) + ((y * (t - z)) / (a - t)); tmp = 0.0; if (t_1 <= -1e-217) tmp = (x + y) + (y * ((t - z) / (a - t))); elseif (t_1 <= 2e-209) tmp = x + (((y * z) - (y * a)) / t); else tmp = (x + y) + ((t - z) / ((a - t) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-217], N[(N[(x + y), $MachinePrecision] + N[(y * N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e-209], N[(x + N[(N[(N[(y * z), $MachinePrecision] - N[(y * a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-217}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{t - z}{a - t}\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{-209}:\\
\;\;\;\;x + \frac{y \cdot z - y \cdot a}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \frac{t - z}{\frac{a - t}{y}}\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (+ x y) (/ (* y (- t z)) (- a t)))))
(if (or (<= t_1 -1e-217) (not (<= t_1 2e-209)))
(+ (+ x y) (* y (/ (- t z) (- a t))))
(+ x (/ (- (* y z) (* y a)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + ((y * (t - z)) / (a - t));
double tmp;
if ((t_1 <= -1e-217) || !(t_1 <= 2e-209)) {
tmp = (x + y) + (y * ((t - z) / (a - t)));
} else {
tmp = x + (((y * z) - (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) :: t_1
real(8) :: tmp
t_1 = (x + y) + ((y * (t - z)) / (a - t))
if ((t_1 <= (-1d-217)) .or. (.not. (t_1 <= 2d-209))) then
tmp = (x + y) + (y * ((t - z) / (a - t)))
else
tmp = x + (((y * z) - (y * a)) / t)
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) + ((y * (t - z)) / (a - t));
double tmp;
if ((t_1 <= -1e-217) || !(t_1 <= 2e-209)) {
tmp = (x + y) + (y * ((t - z) / (a - t)));
} else {
tmp = x + (((y * z) - (y * a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) + ((y * (t - z)) / (a - t)) tmp = 0 if (t_1 <= -1e-217) or not (t_1 <= 2e-209): tmp = (x + y) + (y * ((t - z) / (a - t))) else: tmp = x + (((y * z) - (y * a)) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) + Float64(Float64(y * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= -1e-217) || !(t_1 <= 2e-209)) tmp = Float64(Float64(x + y) + Float64(y * Float64(Float64(t - z) / Float64(a - t)))); else tmp = Float64(x + Float64(Float64(Float64(y * z) - Float64(y * a)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) + ((y * (t - z)) / (a - t)); tmp = 0.0; if ((t_1 <= -1e-217) || ~((t_1 <= 2e-209))) tmp = (x + y) + (y * ((t - z) / (a - t))); else tmp = x + (((y * z) - (y * a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-217], N[Not[LessEqual[t$95$1, 2e-209]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] + N[(y * N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * z), $MachinePrecision] - N[(y * a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-217} \lor \neg \left(t_1 \leq 2 \cdot 10^{-209}\right):\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{t - z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z - y \cdot a}{t}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= t 3.4e-12) (+ (+ x y) (* y (/ -1.0 (/ (- a t) z)))) (+ x (* (/ y t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 3.4e-12) {
tmp = (x + y) + (y * (-1.0 / ((a - t) / z)));
} else {
tmp = x + ((y / t) * (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 <= 3.4d-12) then
tmp = (x + y) + (y * ((-1.0d0) / ((a - t) / z)))
else
tmp = x + ((y / t) * (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 <= 3.4e-12) {
tmp = (x + y) + (y * (-1.0 / ((a - t) / z)));
} else {
tmp = x + ((y / t) * (z - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 3.4e-12: tmp = (x + y) + (y * (-1.0 / ((a - t) / z))) else: tmp = x + ((y / t) * (z - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 3.4e-12) tmp = Float64(Float64(x + y) + Float64(y * Float64(-1.0 / Float64(Float64(a - t) / z)))); else tmp = Float64(x + Float64(Float64(y / t) * Float64(z - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 3.4e-12) tmp = (x + y) + (y * (-1.0 / ((a - t) / z))); else tmp = x + ((y / t) * (z - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 3.4e-12], N[(N[(x + y), $MachinePrecision] + N[(y * N[(-1.0 / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / t), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.4 \cdot 10^{-12}:\\
\;\;\;\;\left(x + y\right) + y \cdot \frac{-1}{\frac{a - t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{t} \cdot \left(z - a\right)\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= a -33.0) (not (<= a 1.4))) (+ x y) (+ x (* y (/ 1.0 (/ t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -33.0) || !(a <= 1.4)) {
tmp = x + y;
} else {
tmp = x + (y * (1.0 / (t / z)));
}
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 <= (-33.0d0)) .or. (.not. (a <= 1.4d0))) then
tmp = x + y
else
tmp = x + (y * (1.0d0 / (t / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -33.0) || !(a <= 1.4)) {
tmp = x + y;
} else {
tmp = x + (y * (1.0 / (t / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -33.0) or not (a <= 1.4): tmp = x + y else: tmp = x + (y * (1.0 / (t / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -33.0) || !(a <= 1.4)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(1.0 / Float64(t / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -33.0) || ~((a <= 1.4))) tmp = x + y; else tmp = x + (y * (1.0 / (t / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -33.0], N[Not[LessEqual[a, 1.4]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(1.0 / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -33 \lor \neg \left(a \leq 1.4\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{1}{\frac{t}{z}}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= a -192.0) (not (<= a 2400000000.0))) (+ x y) (- x (* y (/ (- a z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -192.0) || !(a <= 2400000000.0)) {
tmp = x + y;
} else {
tmp = x - (y * ((a - z) / 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 ((a <= (-192.0d0)) .or. (.not. (a <= 2400000000.0d0))) then
tmp = x + y
else
tmp = x - (y * ((a - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -192.0) || !(a <= 2400000000.0)) {
tmp = x + y;
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -192.0) or not (a <= 2400000000.0): tmp = x + y else: tmp = x - (y * ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -192.0) || !(a <= 2400000000.0)) tmp = Float64(x + y); else tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -192.0) || ~((a <= 2400000000.0))) tmp = x + y; else tmp = x - (y * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -192.0], N[Not[LessEqual[a, 2400000000.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -192 \lor \neg \left(a \leq 2400000000\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= a -8.6e-43) (not (<= a 1.15e-83))) (- (+ x y) (/ y (/ a z))) (- x (* y (/ (- a z) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.6e-43) || !(a <= 1.15e-83)) {
tmp = (x + y) - (y / (a / z));
} else {
tmp = x - (y * ((a - z) / 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 ((a <= (-8.6d-43)) .or. (.not. (a <= 1.15d-83))) then
tmp = (x + y) - (y / (a / z))
else
tmp = x - (y * ((a - z) / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -8.6e-43) || !(a <= 1.15e-83)) {
tmp = (x + y) - (y / (a / z));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -8.6e-43) or not (a <= 1.15e-83): tmp = (x + y) - (y / (a / z)) else: tmp = x - (y * ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -8.6e-43) || !(a <= 1.15e-83)) tmp = Float64(Float64(x + y) - Float64(y / Float64(a / z))); else tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -8.6e-43) || ~((a <= 1.15e-83))) tmp = (x + y) - (y / (a / z)); else tmp = x - (y * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -8.6e-43], N[Not[LessEqual[a, 1.15e-83]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{-43} \lor \neg \left(a \leq 1.15 \cdot 10^{-83}\right):\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= a -6.5e-43) (+ (+ x y) (/ (- t z) (/ a y))) (if (<= a 1.65e-93) (- x (* y (/ (- a z) t))) (- (+ x y) (/ y (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e-43) {
tmp = (x + y) + ((t - z) / (a / y));
} else if (a <= 1.65e-93) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = (x + y) - (y / (a / z));
}
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 <= (-6.5d-43)) then
tmp = (x + y) + ((t - z) / (a / y))
else if (a <= 1.65d-93) then
tmp = x - (y * ((a - z) / t))
else
tmp = (x + y) - (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e-43) {
tmp = (x + y) + ((t - z) / (a / y));
} else if (a <= 1.65e-93) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = (x + y) - (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.5e-43: tmp = (x + y) + ((t - z) / (a / y)) elif a <= 1.65e-93: tmp = x - (y * ((a - z) / t)) else: tmp = (x + y) - (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.5e-43) tmp = Float64(Float64(x + y) + Float64(Float64(t - z) / Float64(a / y))); elseif (a <= 1.65e-93) tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); else tmp = Float64(Float64(x + y) - Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.5e-43) tmp = (x + y) + ((t - z) / (a / y)); elseif (a <= 1.65e-93) tmp = x - (y * ((a - z) / t)); else tmp = (x + y) - (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.5e-43], N[(N[(x + y), $MachinePrecision] + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.65e-93], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{-43}:\\
\;\;\;\;\left(x + y\right) + \frac{t - z}{\frac{a}{y}}\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{-93}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= a -60.0) (not (<= a 41.0))) (+ x y) (+ x (/ y (/ t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -60.0) || !(a <= 41.0)) {
tmp = x + y;
} else {
tmp = x + (y / (t / z));
}
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 <= (-60.0d0)) .or. (.not. (a <= 41.0d0))) then
tmp = x + y
else
tmp = x + (y / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -60.0) || !(a <= 41.0)) {
tmp = x + y;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -60.0) or not (a <= 41.0): tmp = x + y else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -60.0) || !(a <= 41.0)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -60.0) || ~((a <= 41.0))) tmp = x + y; else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -60.0], N[Not[LessEqual[a, 41.0]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -60 \lor \neg \left(a \leq 41\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= a -6e-271) (+ x y) (if (<= a 3.1e-285) (* y (/ (- z a) t)) (if (<= a 0.4) x (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6e-271) {
tmp = x + y;
} else if (a <= 3.1e-285) {
tmp = y * ((z - a) / t);
} else if (a <= 0.4) {
tmp = x;
} else {
tmp = x + 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 (a <= (-6d-271)) then
tmp = x + y
else if (a <= 3.1d-285) then
tmp = y * ((z - a) / t)
else if (a <= 0.4d0) then
tmp = x
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6e-271) {
tmp = x + y;
} else if (a <= 3.1e-285) {
tmp = y * ((z - a) / t);
} else if (a <= 0.4) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6e-271: tmp = x + y elif a <= 3.1e-285: tmp = y * ((z - a) / t) elif a <= 0.4: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6e-271) tmp = Float64(x + y); elseif (a <= 3.1e-285) tmp = Float64(y * Float64(Float64(z - a) / t)); elseif (a <= 0.4) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6e-271) tmp = x + y; elseif (a <= 3.1e-285) tmp = y * ((z - a) / t); elseif (a <= 0.4) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6e-271], N[(x + y), $MachinePrecision], If[LessEqual[a, 3.1e-285], N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.4], x, N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{-271}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-285}:\\
\;\;\;\;y \cdot \frac{z - a}{t}\\
\mathbf{elif}\;a \leq 0.4:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= a -6.5e-273) (+ x y) (if (<= a 2.9e-286) (* y (/ z t)) (if (<= a 0.39) x (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e-273) {
tmp = x + y;
} else if (a <= 2.9e-286) {
tmp = y * (z / t);
} else if (a <= 0.39) {
tmp = x;
} else {
tmp = x + 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 (a <= (-6.5d-273)) then
tmp = x + y
else if (a <= 2.9d-286) then
tmp = y * (z / t)
else if (a <= 0.39d0) then
tmp = x
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.5e-273) {
tmp = x + y;
} else if (a <= 2.9e-286) {
tmp = y * (z / t);
} else if (a <= 0.39) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.5e-273: tmp = x + y elif a <= 2.9e-286: tmp = y * (z / t) elif a <= 0.39: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.5e-273) tmp = Float64(x + y); elseif (a <= 2.9e-286) tmp = Float64(y * Float64(z / t)); elseif (a <= 0.39) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.5e-273) tmp = x + y; elseif (a <= 2.9e-286) tmp = y * (z / t); elseif (a <= 0.39) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.5e-273], N[(x + y), $MachinePrecision], If[LessEqual[a, 2.9e-286], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.39], x, N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.5 \cdot 10^{-273}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-286}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 0.39:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x y))
double code(double x, double y, double z, double t, double a) {
return x + 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 + y
end function
public static double code(double x, double y, double z, double t, double a) {
return x + y;
}
def code(x, y, z, t, a): return x + y
function code(x, y, z, t, a) return Float64(x + y) end
function tmp = code(x, y, z, t, a) tmp = x + y; end
code[x_, y_, z_, t_, a_] := N[(x + y), $MachinePrecision]
\begin{array}{l}
\\
x + 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 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} 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) :: t_2
real(8) :: tmp
t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * t)) / (a - t)
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 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023350
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))