
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / 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 - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / 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 - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- z y) (+ (- t z) 1.0)))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
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 + (a * ((z - y) / ((t - z) + 1.0d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
def code(x, y, z, t, a): return x + (a * ((z - y) / ((t - z) + 1.0)))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(z - y) / Float64(Float64(t - z) + 1.0)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((z - y) / ((t - z) + 1.0))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{z - y}{\left(t - z\right) + 1}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.8e+25) (not (<= z 3.7e+40))) (+ x (- (/ a (/ z y)) a)) (- x (* y (/ a (+ t (- 1.0 z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.8e+25) || !(z <= 3.7e+40)) {
tmp = x + ((a / (z / y)) - a);
} else {
tmp = x - (y * (a / (t + (1.0 - 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 ((z <= (-4.8d+25)) .or. (.not. (z <= 3.7d+40))) then
tmp = x + ((a / (z / y)) - a)
else
tmp = x - (y * (a / (t + (1.0d0 - z))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.8e+25) || !(z <= 3.7e+40)) {
tmp = x + ((a / (z / y)) - a);
} else {
tmp = x - (y * (a / (t + (1.0 - z))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.8e+25) or not (z <= 3.7e+40): tmp = x + ((a / (z / y)) - a) else: tmp = x - (y * (a / (t + (1.0 - z)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.8e+25) || !(z <= 3.7e+40)) tmp = Float64(x + Float64(Float64(a / Float64(z / y)) - a)); else tmp = Float64(x - Float64(y * Float64(a / Float64(t + Float64(1.0 - z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.8e+25) || ~((z <= 3.7e+40))) tmp = x + ((a / (z / y)) - a); else tmp = x - (y * (a / (t + (1.0 - z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.8e+25], N[Not[LessEqual[z, 3.7e+40]], $MachinePrecision]], N[(x + N[(N[(a / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(a / N[(t + N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+25} \lor \neg \left(z \leq 3.7 \cdot 10^{+40}\right):\\
\;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a}{t + \left(1 - z\right)}\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.6e+25)
(+ x (* a (+ -1.0 (/ (+ y -1.0) z))))
(if (<= z 1e+42)
(- x (* y (/ a (+ t (- 1.0 z)))))
(+ x (- (/ a (/ z y)) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.6e+25) {
tmp = x + (a * (-1.0 + ((y + -1.0) / z)));
} else if (z <= 1e+42) {
tmp = x - (y * (a / (t + (1.0 - z))));
} else {
tmp = x + ((a / (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 (z <= (-5.6d+25)) then
tmp = x + (a * ((-1.0d0) + ((y + (-1.0d0)) / z)))
else if (z <= 1d+42) then
tmp = x - (y * (a / (t + (1.0d0 - z))))
else
tmp = x + ((a / (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 (z <= -5.6e+25) {
tmp = x + (a * (-1.0 + ((y + -1.0) / z)));
} else if (z <= 1e+42) {
tmp = x - (y * (a / (t + (1.0 - z))));
} else {
tmp = x + ((a / (z / y)) - a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.6e+25: tmp = x + (a * (-1.0 + ((y + -1.0) / z))) elif z <= 1e+42: tmp = x - (y * (a / (t + (1.0 - z)))) else: tmp = x + ((a / (z / y)) - a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.6e+25) tmp = Float64(x + Float64(a * Float64(-1.0 + Float64(Float64(y + -1.0) / z)))); elseif (z <= 1e+42) tmp = Float64(x - Float64(y * Float64(a / Float64(t + Float64(1.0 - z))))); else tmp = Float64(x + Float64(Float64(a / Float64(z / y)) - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.6e+25) tmp = x + (a * (-1.0 + ((y + -1.0) / z))); elseif (z <= 1e+42) tmp = x - (y * (a / (t + (1.0 - z)))); else tmp = x + ((a / (z / y)) - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.6e+25], N[(x + N[(a * N[(-1.0 + N[(N[(y + -1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+42], N[(x - N[(y * N[(a / N[(t + N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+25}:\\
\;\;\;\;x + a \cdot \left(-1 + \frac{y + -1}{z}\right)\\
\mathbf{elif}\;z \leq 10^{+42}:\\
\;\;\;\;x - y \cdot \frac{a}{t + \left(1 - z\right)}\\
\mathbf{else}:\\
\;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.9e+83)
(+ x (* a (/ (- z y) t)))
(if (<= t 1.62e-7)
(+ x (* a (/ (- z y) (- 1.0 z))))
(- x (* y (/ a (+ t (- 1.0 z))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.9e+83) {
tmp = x + (a * ((z - y) / t));
} else if (t <= 1.62e-7) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else {
tmp = x - (y * (a / (t + (1.0 - 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 (t <= (-3.9d+83)) then
tmp = x + (a * ((z - y) / t))
else if (t <= 1.62d-7) then
tmp = x + (a * ((z - y) / (1.0d0 - z)))
else
tmp = x - (y * (a / (t + (1.0d0 - z))))
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.9e+83) {
tmp = x + (a * ((z - y) / t));
} else if (t <= 1.62e-7) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else {
tmp = x - (y * (a / (t + (1.0 - z))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3.9e+83: tmp = x + (a * ((z - y) / t)) elif t <= 1.62e-7: tmp = x + (a * ((z - y) / (1.0 - z))) else: tmp = x - (y * (a / (t + (1.0 - z)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.9e+83) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); elseif (t <= 1.62e-7) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / Float64(1.0 - z)))); else tmp = Float64(x - Float64(y * Float64(a / Float64(t + Float64(1.0 - z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3.9e+83) tmp = x + (a * ((z - y) / t)); elseif (t <= 1.62e-7) tmp = x + (a * ((z - y) / (1.0 - z))); else tmp = x - (y * (a / (t + (1.0 - z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.9e+83], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.62e-7], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(a / N[(t + N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.9 \cdot 10^{+83}:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{elif}\;t \leq 1.62 \cdot 10^{-7}:\\
\;\;\;\;x + a \cdot \frac{z - y}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a}{t + \left(1 - z\right)}\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (- 1.0 z))))
(if (<= t -3.3e+40)
(+ x (* a (/ z t_1)))
(if (<= t 1.62e-7)
(+ x (* a (/ (- z y) (- 1.0 z))))
(- x (* y (/ a t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + (1.0 - z);
double tmp;
if (t <= -3.3e+40) {
tmp = x + (a * (z / t_1));
} else if (t <= 1.62e-7) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else {
tmp = x - (y * (a / 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 = t + (1.0d0 - z)
if (t <= (-3.3d+40)) then
tmp = x + (a * (z / t_1))
else if (t <= 1.62d-7) then
tmp = x + (a * ((z - y) / (1.0d0 - z)))
else
tmp = x - (y * (a / 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 = t + (1.0 - z);
double tmp;
if (t <= -3.3e+40) {
tmp = x + (a * (z / t_1));
} else if (t <= 1.62e-7) {
tmp = x + (a * ((z - y) / (1.0 - z)));
} else {
tmp = x - (y * (a / t_1));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + (1.0 - z) tmp = 0 if t <= -3.3e+40: tmp = x + (a * (z / t_1)) elif t <= 1.62e-7: tmp = x + (a * ((z - y) / (1.0 - z))) else: tmp = x - (y * (a / t_1)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(1.0 - z)) tmp = 0.0 if (t <= -3.3e+40) tmp = Float64(x + Float64(a * Float64(z / t_1))); elseif (t <= 1.62e-7) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / Float64(1.0 - z)))); else tmp = Float64(x - Float64(y * Float64(a / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + (1.0 - z); tmp = 0.0; if (t <= -3.3e+40) tmp = x + (a * (z / t_1)); elseif (t <= 1.62e-7) tmp = x + (a * ((z - y) / (1.0 - z))); else tmp = x - (y * (a / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e+40], N[(x + N[(a * N[(z / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.62e-7], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(a / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(1 - z\right)\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+40}:\\
\;\;\;\;x + a \cdot \frac{z}{t_1}\\
\mathbf{elif}\;t \leq 1.62 \cdot 10^{-7}:\\
\;\;\;\;x + a \cdot \frac{z - y}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a}{t_1}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.2e+157) (not (<= t 1.62e-7))) (- x (* a (/ y t))) (+ x (/ a (+ -1.0 (/ 1.0 z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.2e+157) || !(t <= 1.62e-7)) {
tmp = x - (a * (y / t));
} else {
tmp = x + (a / (-1.0 + (1.0 / 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 ((t <= (-3.2d+157)) .or. (.not. (t <= 1.62d-7))) then
tmp = x - (a * (y / t))
else
tmp = x + (a / ((-1.0d0) + (1.0d0 / z)))
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.2e+157) || !(t <= 1.62e-7)) {
tmp = x - (a * (y / t));
} else {
tmp = x + (a / (-1.0 + (1.0 / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.2e+157) or not (t <= 1.62e-7): tmp = x - (a * (y / t)) else: tmp = x + (a / (-1.0 + (1.0 / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.2e+157) || !(t <= 1.62e-7)) tmp = Float64(x - Float64(a * Float64(y / t))); else tmp = Float64(x + Float64(a / Float64(-1.0 + Float64(1.0 / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.2e+157) || ~((t <= 1.62e-7))) tmp = x - (a * (y / t)); else tmp = x + (a / (-1.0 + (1.0 / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.2e+157], N[Not[LessEqual[t, 1.62e-7]], $MachinePrecision]], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a / N[(-1.0 + N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+157} \lor \neg \left(t \leq 1.62 \cdot 10^{-7}\right):\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{-1 + \frac{1}{z}}\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.6e+21) (not (<= z 3.3e+40))) (+ x (- (/ a (/ z y)) a)) (- x (* a (/ y (+ t 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.6e+21) || !(z <= 3.3e+40)) {
tmp = x + ((a / (z / y)) - a);
} else {
tmp = x - (a * (y / (t + 1.0)));
}
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 <= (-2.6d+21)) .or. (.not. (z <= 3.3d+40))) then
tmp = x + ((a / (z / y)) - a)
else
tmp = x - (a * (y / (t + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.6e+21) || !(z <= 3.3e+40)) {
tmp = x + ((a / (z / y)) - a);
} else {
tmp = x - (a * (y / (t + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.6e+21) or not (z <= 3.3e+40): tmp = x + ((a / (z / y)) - a) else: tmp = x - (a * (y / (t + 1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.6e+21) || !(z <= 3.3e+40)) tmp = Float64(x + Float64(Float64(a / Float64(z / y)) - a)); else tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.6e+21) || ~((z <= 3.3e+40))) tmp = x + ((a / (z / y)) - a); else tmp = x - (a * (y / (t + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.6e+21], N[Not[LessEqual[z, 3.3e+40]], $MachinePrecision]], N[(x + N[(N[(a / N[(z / y), $MachinePrecision]), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+21} \lor \neg \left(z \leq 3.3 \cdot 10^{+40}\right):\\
\;\;\;\;x + \left(\frac{a}{\frac{z}{y}} - a\right)\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.95e+66)
(- x a)
(if (<= z 0.00065)
(- x (* a (/ y (+ t 1.0))))
(+ x (/ a (+ -1.0 (/ 1.0 z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e+66) {
tmp = x - a;
} else if (z <= 0.00065) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = x + (a / (-1.0 + (1.0 / 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 (z <= (-1.95d+66)) then
tmp = x - a
else if (z <= 0.00065d0) then
tmp = x - (a * (y / (t + 1.0d0)))
else
tmp = x + (a / ((-1.0d0) + (1.0d0 / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e+66) {
tmp = x - a;
} else if (z <= 0.00065) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = x + (a / (-1.0 + (1.0 / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.95e+66: tmp = x - a elif z <= 0.00065: tmp = x - (a * (y / (t + 1.0))) else: tmp = x + (a / (-1.0 + (1.0 / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.95e+66) tmp = Float64(x - a); elseif (z <= 0.00065) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); else tmp = Float64(x + Float64(a / Float64(-1.0 + Float64(1.0 / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.95e+66) tmp = x - a; elseif (z <= 0.00065) tmp = x - (a * (y / (t + 1.0))); else tmp = x + (a / (-1.0 + (1.0 / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.95e+66], N[(x - a), $MachinePrecision], If[LessEqual[z, 0.00065], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a / N[(-1.0 + N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+66}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 0.00065:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{a}{-1 + \frac{1}{z}}\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.3e+21)
(- x a)
(if (<= z 1.9e-147)
(- x (* y (/ a t)))
(if (<= z 3.5) (- x (* y a)) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+21) {
tmp = x - a;
} else if (z <= 1.9e-147) {
tmp = x - (y * (a / t));
} else if (z <= 3.5) {
tmp = x - (y * a);
} else {
tmp = x - 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 <= (-2.3d+21)) then
tmp = x - a
else if (z <= 1.9d-147) then
tmp = x - (y * (a / t))
else if (z <= 3.5d0) then
tmp = x - (y * a)
else
tmp = x - 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 <= -2.3e+21) {
tmp = x - a;
} else if (z <= 1.9e-147) {
tmp = x - (y * (a / t));
} else if (z <= 3.5) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e+21: tmp = x - a elif z <= 1.9e-147: tmp = x - (y * (a / t)) elif z <= 3.5: tmp = x - (y * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e+21) tmp = Float64(x - a); elseif (z <= 1.9e-147) tmp = Float64(x - Float64(y * Float64(a / t))); elseif (z <= 3.5) tmp = Float64(x - Float64(y * a)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.3e+21) tmp = x - a; elseif (z <= 1.9e-147) tmp = x - (y * (a / t)); elseif (z <= 3.5) tmp = x - (y * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+21], N[(x - a), $MachinePrecision], If[LessEqual[z, 1.9e-147], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+21}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-147}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{elif}\;z \leq 3.5:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.6e+21)
(- x a)
(if (<= z 8.5e-148)
(- x (* a (/ y t)))
(if (<= z 1.1) (- x (* y a)) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.6e+21) {
tmp = x - a;
} else if (z <= 8.5e-148) {
tmp = x - (a * (y / t));
} else if (z <= 1.1) {
tmp = x - (y * a);
} else {
tmp = x - 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.6d+21)) then
tmp = x - a
else if (z <= 8.5d-148) then
tmp = x - (a * (y / t))
else if (z <= 1.1d0) then
tmp = x - (y * a)
else
tmp = x - 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.6e+21) {
tmp = x - a;
} else if (z <= 8.5e-148) {
tmp = x - (a * (y / t));
} else if (z <= 1.1) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.6e+21: tmp = x - a elif z <= 8.5e-148: tmp = x - (a * (y / t)) elif z <= 1.1: tmp = x - (y * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.6e+21) tmp = Float64(x - a); elseif (z <= 8.5e-148) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (z <= 1.1) tmp = Float64(x - Float64(y * a)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.6e+21) tmp = x - a; elseif (z <= 8.5e-148) tmp = x - (a * (y / t)); elseif (z <= 1.1) tmp = x - (y * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.6e+21], N[(x - a), $MachinePrecision], If[LessEqual[z, 8.5e-148], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.1], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+21}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-148}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 1.1:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+66) (not (<= z 14000.0))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+66) || !(z <= 14000.0)) {
tmp = x - a;
} else {
tmp = x - (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 ((z <= (-1.45d+66)) .or. (.not. (z <= 14000.0d0))) then
tmp = x - a
else
tmp = x - (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 ((z <= -1.45e+66) || !(z <= 14000.0)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e+66) or not (z <= 14000.0): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e+66) || !(z <= 14000.0)) tmp = Float64(x - a); else tmp = Float64(x - Float64(y * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.45e+66) || ~((z <= 14000.0))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+66], N[Not[LessEqual[z, 14000.0]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+66} \lor \neg \left(z \leq 14000\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= z -22.5) (not (<= z 7200.0))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -22.5) || !(z <= 7200.0)) {
tmp = x - 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 ((z <= (-22.5d0)) .or. (.not. (z <= 7200.0d0))) then
tmp = x - 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 ((z <= -22.5) || !(z <= 7200.0)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -22.5) or not (z <= 7200.0): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -22.5) || !(z <= 7200.0)) tmp = Float64(x - a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -22.5) || ~((z <= 7200.0))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -22.5], N[Not[LessEqual[z, 7200.0]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -22.5 \lor \neg \left(z \leq 7200\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\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 (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * 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 - z) + 1.0d0)) * a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (((y - z) / ((t - z) + 1.0)) * a);
}
def code(x, y, z, t, a): return x - (((y - z) / ((t - z) + 1.0)) * a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a)) end
function tmp = code(x, y, z, t, a) tmp = x - (((y - z) / ((t - z) + 1.0)) * a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
\end{array}
herbie shell --seed 2024008
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:herbie-target
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))