
(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 8 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}
Initial program 96.9%
associate-/r/99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.6e+41) (not (<= z 92000000.0))) (+ x (/ (- z y) (/ (- z) a))) (- x (* a (/ y (+ t 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.6e+41) || !(z <= 92000000.0)) {
tmp = x + ((z - y) / (-z / 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 <= (-4.6d+41)) .or. (.not. (z <= 92000000.0d0))) then
tmp = x + ((z - y) / (-z / 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 <= -4.6e+41) || !(z <= 92000000.0)) {
tmp = x + ((z - y) / (-z / a));
} else {
tmp = x - (a * (y / (t + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.6e+41) or not (z <= 92000000.0): tmp = x + ((z - y) / (-z / a)) else: tmp = x - (a * (y / (t + 1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.6e+41) || !(z <= 92000000.0)) tmp = Float64(x + Float64(Float64(z - y) / Float64(Float64(-z) / 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 <= -4.6e+41) || ~((z <= 92000000.0))) tmp = x + ((z - y) / (-z / a)); else tmp = x - (a * (y / (t + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.6e+41], N[Not[LessEqual[z, 92000000.0]], $MachinePrecision]], N[(x + N[(N[(z - y), $MachinePrecision] / N[((-z) / a), $MachinePrecision]), $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 -4.6 \cdot 10^{+41} \lor \neg \left(z \leq 92000000\right):\\
\;\;\;\;x + \frac{z - y}{\frac{-z}{a}}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\end{array}
\end{array}
if z < -4.5999999999999997e41 or 9.2e7 < z Initial program 95.1%
Taylor expanded in z around inf 88.0%
mul-1-neg88.0%
distribute-neg-frac88.0%
Simplified88.0%
if -4.5999999999999997e41 < z < 9.2e7Initial program 98.4%
associate-/r/99.3%
Simplified99.3%
Taylor expanded in z around 0 94.3%
Final simplification91.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.5e+67)
(- x a)
(if (<= z -1.45e-212)
(- x (* y a))
(if (<= z 7000000000.0) (- x (/ (* y a) t)) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+67) {
tmp = x - a;
} else if (z <= -1.45e-212) {
tmp = x - (y * a);
} else if (z <= 7000000000.0) {
tmp = x - ((y * a) / t);
} 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 <= (-9.5d+67)) then
tmp = x - a
else if (z <= (-1.45d-212)) then
tmp = x - (y * a)
else if (z <= 7000000000.0d0) then
tmp = x - ((y * a) / t)
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 <= -9.5e+67) {
tmp = x - a;
} else if (z <= -1.45e-212) {
tmp = x - (y * a);
} else if (z <= 7000000000.0) {
tmp = x - ((y * a) / t);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e+67: tmp = x - a elif z <= -1.45e-212: tmp = x - (y * a) elif z <= 7000000000.0: tmp = x - ((y * a) / t) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+67) tmp = Float64(x - a); elseif (z <= -1.45e-212) tmp = Float64(x - Float64(y * a)); elseif (z <= 7000000000.0) tmp = Float64(x - Float64(Float64(y * a) / t)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e+67) tmp = x - a; elseif (z <= -1.45e-212) tmp = x - (y * a); elseif (z <= 7000000000.0) tmp = x - ((y * a) / t); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+67], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.45e-212], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7000000000.0], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+67}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-212}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 7000000000:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -9.5000000000000002e67 or 7e9 < z Initial program 94.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 78.4%
if -9.5000000000000002e67 < z < -1.45e-212Initial program 99.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 89.9%
Taylor expanded in t around 0 75.5%
if -1.45e-212 < z < 7e9Initial program 97.3%
associate-/r/98.7%
Simplified98.7%
Taylor expanded in t around inf 72.3%
Taylor expanded in y around inf 70.1%
Final simplification75.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.6e+87) (- x a) (if (<= z 5100000000000.0) (- x (* a (/ y (+ t 1.0)))) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+87) {
tmp = x - a;
} else if (z <= 5100000000000.0) {
tmp = x - (a * (y / (t + 1.0)));
} 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.6d+87)) then
tmp = x - a
else if (z <= 5100000000000.0d0) then
tmp = x - (a * (y / (t + 1.0d0)))
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.6e+87) {
tmp = x - a;
} else if (z <= 5100000000000.0) {
tmp = x - (a * (y / (t + 1.0)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.6e+87: tmp = x - a elif z <= 5100000000000.0: tmp = x - (a * (y / (t + 1.0))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.6e+87) tmp = Float64(x - a); elseif (z <= 5100000000000.0) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.6e+87) tmp = x - a; elseif (z <= 5100000000000.0) tmp = x - (a * (y / (t + 1.0))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.6e+87], N[(x - a), $MachinePrecision], If[LessEqual[z, 5100000000000.0], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+87}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 5100000000000:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.59999999999999998e87 or 5.1e12 < z Initial program 94.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 80.3%
if -2.59999999999999998e87 < z < 5.1e12Initial program 98.5%
associate-/r/99.3%
Simplified99.3%
Taylor expanded in z around 0 92.1%
Final simplification87.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.8e+67) (- x a) (if (<= z 1e+69) (+ x (* z a)) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+67) {
tmp = x - a;
} else if (z <= 1e+69) {
tmp = x + (z * 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 <= (-3.8d+67)) then
tmp = x - a
else if (z <= 1d+69) then
tmp = x + (z * 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 <= -3.8e+67) {
tmp = x - a;
} else if (z <= 1e+69) {
tmp = x + (z * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+67: tmp = x - a elif z <= 1e+69: tmp = x + (z * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+67) tmp = Float64(x - a); elseif (z <= 1e+69) tmp = Float64(x + Float64(z * a)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.8e+67) tmp = x - a; elseif (z <= 1e+69) tmp = x + (z * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+67], N[(x - a), $MachinePrecision], If[LessEqual[z, 1e+69], N[(x + N[(z * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+67}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 10^{+69}:\\
\;\;\;\;x + z \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -3.8000000000000002e67 or 1.0000000000000001e69 < z Initial program 94.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 81.0%
if -3.8000000000000002e67 < z < 1.0000000000000001e69Initial program 98.6%
associate-/r/99.3%
Simplified99.3%
*-commutative99.3%
clear-num99.3%
un-div-inv99.3%
+-commutative99.3%
associate-+r-99.3%
Applied egg-rr99.3%
Taylor expanded in y around 0 61.7%
associate-+r-61.7%
associate-*r/61.7%
neg-mul-161.7%
distribute-neg-in61.7%
metadata-eval61.7%
unsub-neg61.7%
Simplified61.7%
Taylor expanded in z around 0 62.4%
mul-1-neg62.4%
distribute-frac-neg62.4%
distribute-neg-in62.4%
metadata-eval62.4%
sub-neg62.4%
Simplified62.4%
Taylor expanded in t around 0 58.0%
cancel-sign-sub-inv58.0%
metadata-eval58.0%
*-lft-identity58.0%
Simplified58.0%
Final simplification67.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.8e+67) (- x a) (if (<= z 59000.0) (- x (* y a)) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e+67) {
tmp = x - a;
} else if (z <= 59000.0) {
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 <= (-3.8d+67)) then
tmp = x - a
else if (z <= 59000.0d0) 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 <= -3.8e+67) {
tmp = x - a;
} else if (z <= 59000.0) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e+67: tmp = x - a elif z <= 59000.0: tmp = x - (y * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e+67) tmp = Float64(x - a); elseif (z <= 59000.0) 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 <= -3.8e+67) tmp = x - a; elseif (z <= 59000.0) tmp = x - (y * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e+67], N[(x - a), $MachinePrecision], If[LessEqual[z, 59000.0], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+67}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 59000:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -3.8000000000000002e67 or 59000 < z Initial program 94.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 77.8%
if -3.8000000000000002e67 < z < 59000Initial program 98.5%
associate-/r/99.3%
Simplified99.3%
Taylor expanded in z around 0 89.9%
Taylor expanded in t around 0 70.0%
Final simplification73.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -2300000000.0) (- x a) (if (<= z 2.05e-131) x (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2300000000.0) {
tmp = x - a;
} else if (z <= 2.05e-131) {
tmp = x;
} 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 <= (-2300000000.0d0)) then
tmp = x - a
else if (z <= 2.05d-131) then
tmp = x
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 <= -2300000000.0) {
tmp = x - a;
} else if (z <= 2.05e-131) {
tmp = x;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2300000000.0: tmp = x - a elif z <= 2.05e-131: tmp = x else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2300000000.0) tmp = Float64(x - a); elseif (z <= 2.05e-131) tmp = x; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2300000000.0) tmp = x - a; elseif (z <= 2.05e-131) tmp = x; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2300000000.0], N[(x - a), $MachinePrecision], If[LessEqual[z, 2.05e-131], x, N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2300000000:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{-131}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.3e9 or 2.0500000000000001e-131 < z Initial program 95.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 69.2%
if -2.3e9 < z < 2.0500000000000001e-131Initial program 98.9%
associate-/r/99.1%
Simplified99.1%
Taylor expanded in x around inf 61.7%
Final simplification66.3%
(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}
Initial program 96.9%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in x around inf 52.2%
Final simplification52.2%
(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 2023230
(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))))