
(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 10 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 (fma (/ (- y z) (+ -1.0 (- z t))) a x))
double code(double x, double y, double z, double t, double a) {
return fma(((y - z) / (-1.0 + (z - t))), a, x);
}
function code(x, y, z, t, a) return fma(Float64(Float64(y - z) / Float64(-1.0 + Float64(z - t))), a, x) end
code[x_, y_, z_, t_, a_] := N[(N[(N[(y - z), $MachinePrecision] / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{y - z}{-1 + \left(z - t\right)}, a, x\right)
\end{array}
Initial program 98.0%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
distribute-lft-neg-inN/A
distribute-frac-neg2N/A
lower-fma.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6499.5
Applied rewrites99.5%
Final simplification99.5%
(FPCore (x y z t a) :precision binary64 (if (<= (/ (- y z) (/ (+ (- t z) 1.0) a)) -5e+280) (* a (/ y z)) (- x a)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (((y - z) / (((t - z) + 1.0) / a)) <= -5e+280) {
tmp = a * (y / z);
} 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 (((y - z) / (((t - z) + 1.0d0) / a)) <= (-5d+280)) then
tmp = a * (y / z)
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 (((y - z) / (((t - z) + 1.0) / a)) <= -5e+280) {
tmp = a * (y / z);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if ((y - z) / (((t - z) + 1.0) / a)) <= -5e+280: tmp = a * (y / z) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a)) <= -5e+280) tmp = Float64(a * Float64(y / z)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (((y - z) / (((t - z) + 1.0) / a)) <= -5e+280) tmp = a * (y / z); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], -5e+280], N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \leq -5 \cdot 10^{+280}:\\
\;\;\;\;a \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -5.0000000000000002e280Initial program 99.9%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
distribute-lft-neg-inN/A
distribute-frac-neg2N/A
lower-fma.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f64100.0
Applied rewrites100.0%
Taylor expanded in y around inf
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
sub-negN/A
lower-+.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6491.1
Applied rewrites91.1%
Taylor expanded in z around inf
Applied rewrites73.8%
if -5.0000000000000002e280 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) Initial program 97.9%
Taylor expanded in z around inf
lower--.f6463.6
Applied rewrites63.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3.8e+24)
(fma (- y z) (/ a (- t)) x)
(if (<= t 3.6)
(fma (/ (- y z) (+ z -1.0)) a x)
(fma a (/ z (+ t (- 1.0 z))) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3.8e+24) {
tmp = fma((y - z), (a / -t), x);
} else if (t <= 3.6) {
tmp = fma(((y - z) / (z + -1.0)), a, x);
} else {
tmp = fma(a, (z / (t + (1.0 - z))), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3.8e+24) tmp = fma(Float64(y - z), Float64(a / Float64(-t)), x); elseif (t <= 3.6) tmp = fma(Float64(Float64(y - z) / Float64(z + -1.0)), a, x); else tmp = fma(a, Float64(z / Float64(t + Float64(1.0 - z))), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.8e+24], N[(N[(y - z), $MachinePrecision] * N[(a / (-t)), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 3.6], N[(N[(N[(y - z), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], N[(a * N[(z / N[(t + N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+24}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{a}{-t}, x\right)\\
\mathbf{elif}\;t \leq 3.6:\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{z + -1}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{z}{t + \left(1 - z\right)}, x\right)\\
\end{array}
\end{array}
if t < -3.80000000000000015e24Initial program 98.3%
Taylor expanded in t around inf
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
lower-neg.f64N/A
lower-/.f6488.9
Applied rewrites88.9%
if -3.80000000000000015e24 < t < 3.60000000000000009Initial program 98.5%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
distribute-lft-neg-inN/A
distribute-frac-neg2N/A
lower-fma.f64N/A
lower-/.f64N/A
lift-+.f64N/A
+-commutativeN/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f64100.0
Applied rewrites100.0%
Taylor expanded in t around 0
sub-negN/A
metadata-evalN/A
lower-+.f6499.2
Applied rewrites99.2%
if 3.60000000000000009 < t Initial program 96.6%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
lower--.f6488.2
Applied rewrites88.2%
Final simplification94.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (fma a (/ z (+ t (- 1.0 z))) x)))
(if (<= z -4.6e+52)
t_1
(if (<= z 3.9e+136) (- x (* y (/ a (+ t 1.0)))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, (z / (t + (1.0 - z))), x);
double tmp;
if (z <= -4.6e+52) {
tmp = t_1;
} else if (z <= 3.9e+136) {
tmp = x - (y * (a / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(z / Float64(t + Float64(1.0 - z))), x) tmp = 0.0 if (z <= -4.6e+52) tmp = t_1; elseif (z <= 3.9e+136) tmp = Float64(x - Float64(y * Float64(a / Float64(t + 1.0)))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(z / N[(t + N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -4.6e+52], t$95$1, If[LessEqual[z, 3.9e+136], N[(x - N[(y * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{z}{t + \left(1 - z\right)}, x\right)\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{+136}:\\
\;\;\;\;x - y \cdot \frac{a}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.6e52 or 3.90000000000000019e136 < z Initial program 95.0%
Taylor expanded in y around 0
cancel-sign-sub-invN/A
metadata-evalN/A
*-lft-identityN/A
+-commutativeN/A
associate-/l*N/A
lower-fma.f64N/A
lower-/.f64N/A
+-commutativeN/A
associate--l+N/A
lower-+.f64N/A
lower--.f6492.7
Applied rewrites92.7%
if -4.6e52 < z < 3.90000000000000019e136Initial program 99.9%
Taylor expanded in z around 0
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6487.3
Applied rewrites87.3%
Final simplification89.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -7.9e+145) (- x a) (if (<= z 4.3e+136) (fma a (/ y (- -1.0 t)) x) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.9e+145) {
tmp = x - a;
} else if (z <= 4.3e+136) {
tmp = fma(a, (y / (-1.0 - t)), x);
} else {
tmp = x - a;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.9e+145) tmp = Float64(x - a); elseif (z <= 4.3e+136) tmp = fma(a, Float64(y / Float64(-1.0 - t)), x); else tmp = Float64(x - a); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.9e+145], N[(x - a), $MachinePrecision], If[LessEqual[z, 4.3e+136], N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.9 \cdot 10^{+145}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+136}:\\
\;\;\;\;\mathsf{fma}\left(a, \frac{y}{-1 - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -7.8999999999999997e145 or 4.2999999999999999e136 < z Initial program 95.0%
Taylor expanded in z around inf
lower--.f6490.4
Applied rewrites90.4%
if -7.8999999999999997e145 < z < 4.2999999999999999e136Initial program 99.3%
Taylor expanded in z around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
distribute-neg-frac2N/A
lower-/.f64N/A
distribute-neg-inN/A
metadata-evalN/A
unsub-negN/A
lower--.f6485.8
Applied rewrites85.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.5e+112) (- x a) (if (<= z 2.3e+108) (- x (/ (* y a) t)) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.5e+112) {
tmp = x - a;
} else if (z <= 2.3e+108) {
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 <= (-6.5d+112)) then
tmp = x - a
else if (z <= 2.3d+108) 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 <= -6.5e+112) {
tmp = x - a;
} else if (z <= 2.3e+108) {
tmp = x - ((y * a) / t);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.5e+112: tmp = x - a elif z <= 2.3e+108: tmp = x - ((y * a) / t) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.5e+112) tmp = Float64(x - a); elseif (z <= 2.3e+108) 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 <= -6.5e+112) tmp = x - a; elseif (z <= 2.3e+108) tmp = x - ((y * a) / t); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.5e+112], N[(x - a), $MachinePrecision], If[LessEqual[z, 2.3e+108], N[(x - N[(N[(y * a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+112}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+108}:\\
\;\;\;\;x - \frac{y \cdot a}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -6.4999999999999998e112 or 2.2999999999999999e108 < z Initial program 95.5%
Taylor expanded in z around inf
lower--.f6488.7
Applied rewrites88.7%
if -6.4999999999999998e112 < z < 2.2999999999999999e108Initial program 99.3%
Taylor expanded in t around inf
lower-/.f64N/A
lower-*.f64N/A
lower--.f6464.4
Applied rewrites64.4%
Taylor expanded in y around inf
Applied rewrites63.9%
Final simplification72.3%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (fma a (/ z t) x))) (if (<= t -8.6e+35) t_1 (if (<= t 5.8e+95) (- x a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = fma(a, (z / t), x);
double tmp;
if (t <= -8.6e+35) {
tmp = t_1;
} else if (t <= 5.8e+95) {
tmp = x - a;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = fma(a, Float64(z / t), x) tmp = 0.0 if (t <= -8.6e+35) tmp = t_1; elseif (t <= 5.8e+95) tmp = Float64(x - a); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a * N[(z / t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -8.6e+35], t$95$1, If[LessEqual[t, 5.8e+95], N[(x - a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(a, \frac{z}{t}, x\right)\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+95}:\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -8.5999999999999995e35 or 5.80000000000000027e95 < t Initial program 97.0%
Taylor expanded in t around inf
mul-1-negN/A
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
lower-fma.f64N/A
lower--.f64N/A
lower-neg.f64N/A
lower-/.f6487.7
Applied rewrites87.7%
Taylor expanded in y around 0
Applied rewrites71.5%
if -8.5999999999999995e35 < t < 5.80000000000000027e95Initial program 98.6%
Taylor expanded in z around inf
lower--.f6467.6
Applied rewrites67.6%
(FPCore (x y z t a) :precision binary64 (fma (/ a (+ -1.0 (- z t))) (- y z) x))
double code(double x, double y, double z, double t, double a) {
return fma((a / (-1.0 + (z - t))), (y - z), x);
}
function code(x, y, z, t, a) return fma(Float64(a / Float64(-1.0 + Float64(z - t))), Float64(y - z), x) end
code[x_, y_, z_, t_, a_] := N[(N[(a / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{a}{-1 + \left(z - t\right)}, y - z, x\right)
\end{array}
Initial program 98.0%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-/.f64N/A
clear-numN/A
associate-/r/N/A
lift-/.f64N/A
clear-numN/A
distribute-lft-neg-inN/A
clear-numN/A
lift-/.f64N/A
distribute-frac-neg2N/A
lower-fma.f64N/A
Applied rewrites98.3%
Final simplification98.3%
(FPCore (x y z t a) :precision binary64 (- x a))
double code(double x, double y, double z, double t, double a) {
return x - 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 - a
end function
public static double code(double x, double y, double z, double t, double a) {
return x - a;
}
def code(x, y, z, t, a): return x - a
function code(x, y, z, t, a) return Float64(x - a) end
function tmp = code(x, y, z, t, a) tmp = x - a; end
code[x_, y_, z_, t_, a_] := N[(x - a), $MachinePrecision]
\begin{array}{l}
\\
x - a
\end{array}
Initial program 98.0%
Taylor expanded in z around inf
lower--.f6461.4
Applied rewrites61.4%
(FPCore (x y z t a) :precision binary64 (- a))
double code(double x, double y, double z, double t, double a) {
return -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 = -a
end function
public static double code(double x, double y, double z, double t, double a) {
return -a;
}
def code(x, y, z, t, a): return -a
function code(x, y, z, t, a) return Float64(-a) end
function tmp = code(x, y, z, t, a) tmp = -a; end
code[x_, y_, z_, t_, a_] := (-a)
\begin{array}{l}
\\
-a
\end{array}
Initial program 98.0%
Taylor expanded in z around inf
lower--.f6461.4
Applied rewrites61.4%
Taylor expanded in x around 0
Applied rewrites16.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 2024221
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))