
(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 19 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 (/ (+ 1.0 (- t z)) (- y z)))))
double code(double x, double y, double z, double t, double a) {
return x - (a / ((1.0 + (t - z)) / (y - z)));
}
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 / ((1.0d0 + (t - z)) / (y - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - (a / ((1.0 + (t - z)) / (y - z)));
}
def code(x, y, z, t, a): return x - (a / ((1.0 + (t - z)) / (y - z)))
function code(x, y, z, t, a) return Float64(x - Float64(a / Float64(Float64(1.0 + Float64(t - z)) / Float64(y - z)))) end
function tmp = code(x, y, z, t, a) tmp = x - (a / ((1.0 + (t - z)) / (y - z))); end
code[x_, y_, z_, t_, a_] := N[(x - N[(a / N[(N[(1.0 + N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{a}{\frac{1 + \left(t - z\right)}{y - z}}
\end{array}
Initial program 96.8%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
*-commutativeN/A
clear-numN/A
un-div-invN/A
lower-/.f64N/A
lower-/.f6499.2
lift-+.f64N/A
+-commutativeN/A
lower-+.f6499.2
Applied rewrites99.2%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (- y z) (/ (+ (- t z) 1.0) a)))) (if (or (<= t_1 -5e+290) (not (<= t_1 1e+243))) (* (- y) a) (- x a))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) / (((t - z) + 1.0) / a);
double tmp;
if ((t_1 <= -5e+290) || !(t_1 <= 1e+243)) {
tmp = -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) :: t_1
real(8) :: tmp
t_1 = (y - z) / (((t - z) + 1.0d0) / a)
if ((t_1 <= (-5d+290)) .or. (.not. (t_1 <= 1d+243))) then
tmp = -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 t_1 = (y - z) / (((t - z) + 1.0) / a);
double tmp;
if ((t_1 <= -5e+290) || !(t_1 <= 1e+243)) {
tmp = -y * a;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - z) / (((t - z) + 1.0) / a) tmp = 0 if (t_1 <= -5e+290) or not (t_1 <= 1e+243): tmp = -y * a else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a)) tmp = 0.0 if ((t_1 <= -5e+290) || !(t_1 <= 1e+243)) tmp = Float64(Float64(-y) * a); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - z) / (((t - z) + 1.0) / a); tmp = 0.0; if ((t_1 <= -5e+290) || ~((t_1 <= 1e+243))) tmp = -y * a; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+290], N[Not[LessEqual[t$95$1, 1e+243]], $MachinePrecision]], N[((-y) * a), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+290} \lor \neg \left(t\_1 \leq 10^{+243}\right):\\
\;\;\;\;\left(-y\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -4.9999999999999998e290 or 1.0000000000000001e243 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) Initial program 99.8%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6485.3
Applied rewrites85.3%
Taylor expanded in x around 0
Applied rewrites85.3%
Taylor expanded in z around 0
Applied rewrites59.8%
if -4.9999999999999998e290 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < 1.0000000000000001e243Initial program 96.5%
Taylor expanded in z around inf
lower--.f6466.0
Applied rewrites66.0%
Final simplification65.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.7e+163) (not (<= z 1.3e+36))) (fma (- a) (+ (/ (- 1.0 y) z) 1.0) x) (- x (/ (* (- y z) a) (+ 1.0 (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.7e+163) || !(z <= 1.3e+36)) {
tmp = fma(-a, (((1.0 - y) / z) + 1.0), x);
} else {
tmp = x - (((y - z) * a) / (1.0 + (t - z)));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.7e+163) || !(z <= 1.3e+36)) tmp = fma(Float64(-a), Float64(Float64(Float64(1.0 - y) / z) + 1.0), x); else tmp = Float64(x - Float64(Float64(Float64(y - z) * a) / Float64(1.0 + Float64(t - z)))); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.7e+163], N[Not[LessEqual[z, 1.3e+36]], $MachinePrecision]], N[((-a) * N[(N[(N[(1.0 - y), $MachinePrecision] / z), $MachinePrecision] + 1.0), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(N[(N[(y - z), $MachinePrecision] * a), $MachinePrecision] / N[(1.0 + N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+163} \lor \neg \left(z \leq 1.3 \cdot 10^{+36}\right):\\
\;\;\;\;\mathsf{fma}\left(-a, \frac{1 - y}{z} + 1, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{\left(y - z\right) \cdot a}{1 + \left(t - z\right)}\\
\end{array}
\end{array}
if z < -2.69999999999999999e163 or 1.3000000000000001e36 < z Initial program 91.6%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6494.6
Applied rewrites94.6%
Taylor expanded in z around inf
Applied rewrites94.7%
if -2.69999999999999999e163 < z < 1.3000000000000001e36Initial program 99.3%
lift-/.f64N/A
lift-/.f64N/A
associate-/r/N/A
associate-*l/N/A
lower-/.f64N/A
lower-*.f6491.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6491.4
Applied rewrites91.4%
Final simplification92.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.5e+29) (not (<= z 2.7e+30))) (fma (- a) (+ (/ (- 1.0 y) z) 1.0) x) (- x (* (/ y (+ 1.0 t)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.5e+29) || !(z <= 2.7e+30)) {
tmp = fma(-a, (((1.0 - y) / z) + 1.0), x);
} else {
tmp = x - ((y / (1.0 + t)) * a);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.5e+29) || !(z <= 2.7e+30)) tmp = fma(Float64(-a), Float64(Float64(Float64(1.0 - y) / z) + 1.0), x); else tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.5e+29], N[Not[LessEqual[z, 2.7e+30]], $MachinePrecision]], N[((-a) * N[(N[(N[(1.0 - y), $MachinePrecision] / z), $MachinePrecision] + 1.0), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+29} \lor \neg \left(z \leq 2.7 \cdot 10^{+30}\right):\\
\;\;\;\;\mathsf{fma}\left(-a, \frac{1 - y}{z} + 1, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\end{array}
\end{array}
if z < -9.5000000000000003e29 or 2.6999999999999999e30 < z Initial program 94.1%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6490.5
Applied rewrites90.5%
Taylor expanded in z around inf
Applied rewrites90.5%
if -9.5000000000000003e29 < z < 2.6999999999999999e30Initial program 99.1%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6489.9
Applied rewrites89.9%
Final simplification90.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (/ y t) a))))
(if (<= t -2e+61)
t_1
(if (<= t -1.12e-228)
(fma (/ z (- 1.0 z)) a x)
(if (<= t 0.75) (- x (* (fma (- y) t y) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y / t) * a);
double tmp;
if (t <= -2e+61) {
tmp = t_1;
} else if (t <= -1.12e-228) {
tmp = fma((z / (1.0 - z)), a, x);
} else if (t <= 0.75) {
tmp = x - (fma(-y, t, y) * a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y / t) * a)) tmp = 0.0 if (t <= -2e+61) tmp = t_1; elseif (t <= -1.12e-228) tmp = fma(Float64(z / Float64(1.0 - z)), a, x); elseif (t <= 0.75) tmp = Float64(x - Float64(fma(Float64(-y), t, y) * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e+61], t$95$1, If[LessEqual[t, -1.12e-228], N[(N[(z / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], If[LessEqual[t, 0.75], N[(x - N[(N[((-y) * t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{t} \cdot a\\
\mathbf{if}\;t \leq -2 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-228}:\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\
\mathbf{elif}\;t \leq 0.75:\\
\;\;\;\;x - \mathsf{fma}\left(-y, t, y\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.9999999999999999e61 or 0.75 < t Initial program 96.9%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6476.4
Applied rewrites76.4%
Taylor expanded in t around inf
Applied rewrites76.3%
if -1.9999999999999999e61 < t < -1.11999999999999996e-228Initial program 94.4%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6491.3
Applied rewrites91.3%
Taylor expanded in y around 0
Applied rewrites68.7%
if -1.11999999999999996e-228 < t < 0.75Initial program 98.5%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6475.9
Applied rewrites75.9%
Taylor expanded in t around 0
Applied rewrites75.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (/ y t) a))))
(if (<= t -2e+61)
t_1
(if (<= t -1.15e-228)
(fma z (/ a (- 1.0 z)) x)
(if (<= t 0.75) (- x (* (fma (- y) t y) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y / t) * a);
double tmp;
if (t <= -2e+61) {
tmp = t_1;
} else if (t <= -1.15e-228) {
tmp = fma(z, (a / (1.0 - z)), x);
} else if (t <= 0.75) {
tmp = x - (fma(-y, t, y) * a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y / t) * a)) tmp = 0.0 if (t <= -2e+61) tmp = t_1; elseif (t <= -1.15e-228) tmp = fma(z, Float64(a / Float64(1.0 - z)), x); elseif (t <= 0.75) tmp = Float64(x - Float64(fma(Float64(-y), t, y) * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e+61], t$95$1, If[LessEqual[t, -1.15e-228], N[(z * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 0.75], N[(x - N[(N[((-y) * t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{t} \cdot a\\
\mathbf{if}\;t \leq -2 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.15 \cdot 10^{-228}:\\
\;\;\;\;\mathsf{fma}\left(z, \frac{a}{1 - z}, x\right)\\
\mathbf{elif}\;t \leq 0.75:\\
\;\;\;\;x - \mathsf{fma}\left(-y, t, y\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.9999999999999999e61 or 0.75 < t Initial program 96.9%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6476.4
Applied rewrites76.4%
Taylor expanded in t around inf
Applied rewrites76.3%
if -1.9999999999999999e61 < t < -1.1499999999999999e-228Initial program 94.4%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6491.3
Applied rewrites91.3%
Taylor expanded in y around 0
Applied rewrites68.7%
Applied rewrites66.9%
if -1.1499999999999999e-228 < t < 0.75Initial program 98.5%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6475.9
Applied rewrites75.9%
Taylor expanded in t around 0
Applied rewrites75.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (/ y t) a))))
(if (<= t -4.15e+52)
t_1
(if (<= t -1.12e-228)
(- x a)
(if (<= t 0.75) (- x (* (fma (- y) t y) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y / t) * a);
double tmp;
if (t <= -4.15e+52) {
tmp = t_1;
} else if (t <= -1.12e-228) {
tmp = x - a;
} else if (t <= 0.75) {
tmp = x - (fma(-y, t, y) * a);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y / t) * a)) tmp = 0.0 if (t <= -4.15e+52) tmp = t_1; elseif (t <= -1.12e-228) tmp = Float64(x - a); elseif (t <= 0.75) tmp = Float64(x - Float64(fma(Float64(-y), t, y) * a)); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.15e+52], t$95$1, If[LessEqual[t, -1.12e-228], N[(x - a), $MachinePrecision], If[LessEqual[t, 0.75], N[(x - N[(N[((-y) * t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{t} \cdot a\\
\mathbf{if}\;t \leq -4.15 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-228}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;t \leq 0.75:\\
\;\;\;\;x - \mathsf{fma}\left(-y, t, y\right) \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.14999999999999997e52 or 0.75 < t Initial program 96.3%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6476.4
Applied rewrites76.4%
Taylor expanded in t around inf
Applied rewrites76.3%
if -4.14999999999999997e52 < t < -1.11999999999999996e-228Initial program 95.9%
Taylor expanded in z around inf
lower--.f6464.5
Applied rewrites64.5%
if -1.11999999999999996e-228 < t < 0.75Initial program 98.5%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6475.9
Applied rewrites75.9%
Taylor expanded in t around 0
Applied rewrites75.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -8.6e+60)
(fma (- a) (/ (- y z) t) x)
(if (<= t 5.5e+62)
(fma (- a) (/ (- y z) (- 1.0 z)) x)
(- x (* (/ a t) (- y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.6e+60) {
tmp = fma(-a, ((y - z) / t), x);
} else if (t <= 5.5e+62) {
tmp = fma(-a, ((y - z) / (1.0 - z)), x);
} else {
tmp = x - ((a / t) * (y - z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8.6e+60) tmp = fma(Float64(-a), Float64(Float64(y - z) / t), x); elseif (t <= 5.5e+62) tmp = fma(Float64(-a), Float64(Float64(y - z) / Float64(1.0 - z)), x); else tmp = Float64(x - Float64(Float64(a / t) * Float64(y - z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.6e+60], N[((-a) * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 5.5e+62], N[((-a) * N[(N[(y - z), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(N[(a / t), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.6 \cdot 10^{+60}:\\
\;\;\;\;\mathsf{fma}\left(-a, \frac{y - z}{t}, x\right)\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+62}:\\
\;\;\;\;\mathsf{fma}\left(-a, \frac{y - z}{1 - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{t} \cdot \left(y - z\right)\\
\end{array}
\end{array}
if t < -8.59999999999999942e60Initial program 96.8%
Taylor expanded in t around inf
mul-1-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f6486.3
Applied rewrites86.3%
if -8.59999999999999942e60 < t < 5.4999999999999997e62Initial program 95.6%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6494.3
Applied rewrites94.3%
if 5.4999999999999997e62 < t Initial program 99.9%
Taylor expanded in t around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6474.0
Applied rewrites74.0%
Applied rewrites88.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4e-25) (not (<= z 3.5e-37))) (fma (/ z (- (+ 1.0 t) z)) a x) (- x (* (/ y (+ 1.0 t)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4e-25) || !(z <= 3.5e-37)) {
tmp = fma((z / ((1.0 + t) - z)), a, x);
} else {
tmp = x - ((y / (1.0 + t)) * a);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4e-25) || !(z <= 3.5e-37)) tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x); else tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4e-25], N[Not[LessEqual[z, 3.5e-37]], $MachinePrecision]], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-25} \lor \neg \left(z \leq 3.5 \cdot 10^{-37}\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\end{array}
\end{array}
if z < -4.00000000000000015e-25 or 3.5000000000000001e-37 < 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
*-commutativeN/A
lower-fma.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower-+.f6486.3
Applied rewrites86.3%
if -4.00000000000000015e-25 < z < 3.5000000000000001e-37Initial program 99.0%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6493.2
Applied rewrites93.2%
Final simplification89.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.2e+43) (not (<= z 2.45e+42))) (- x a) (- x (* (/ y (+ 1.0 t)) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.2e+43) || !(z <= 2.45e+42)) {
tmp = x - a;
} else {
tmp = x - ((y / (1.0 + t)) * 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.2d+43)) .or. (.not. (z <= 2.45d+42))) then
tmp = x - a
else
tmp = x - ((y / (1.0d0 + t)) * 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.2e+43) || !(z <= 2.45e+42)) {
tmp = x - a;
} else {
tmp = x - ((y / (1.0 + t)) * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.2e+43) or not (z <= 2.45e+42): tmp = x - a else: tmp = x - ((y / (1.0 + t)) * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.2e+43) || !(z <= 2.45e+42)) tmp = Float64(x - a); else tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -5.2e+43) || ~((z <= 2.45e+42))) tmp = x - a; else tmp = x - ((y / (1.0 + t)) * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.2e+43], N[Not[LessEqual[z, 2.45e+42]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{+43} \lor \neg \left(z \leq 2.45 \cdot 10^{+42}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{1 + t} \cdot a\\
\end{array}
\end{array}
if z < -5.20000000000000042e43 or 2.4500000000000001e42 < z Initial program 93.8%
Taylor expanded in z around inf
lower--.f6478.2
Applied rewrites78.2%
if -5.20000000000000042e43 < z < 2.4500000000000001e42Initial program 99.2%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6489.8
Applied rewrites89.8%
Final simplification84.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.1e+33) (not (<= t 410000000000.0))) (fma (- a) (/ (- y z) t) x) (fma (- a) (/ y (- 1.0 z)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.1e+33) || !(t <= 410000000000.0)) {
tmp = fma(-a, ((y - z) / t), x);
} else {
tmp = fma(-a, (y / (1.0 - z)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.1e+33) || !(t <= 410000000000.0)) tmp = fma(Float64(-a), Float64(Float64(y - z) / t), x); else tmp = fma(Float64(-a), Float64(y / Float64(1.0 - z)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.1e+33], N[Not[LessEqual[t, 410000000000.0]], $MachinePrecision]], N[((-a) * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision] + x), $MachinePrecision], N[((-a) * N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+33} \lor \neg \left(t \leq 410000000000\right):\\
\;\;\;\;\mathsf{fma}\left(-a, \frac{y - z}{t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, \frac{y}{1 - z}, x\right)\\
\end{array}
\end{array}
if t < -1.09999999999999997e33 or 4.1e11 < t Initial program 96.4%
Taylor expanded in t around inf
mul-1-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f6482.5
Applied rewrites82.5%
if -1.09999999999999997e33 < t < 4.1e11Initial program 97.3%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.9
Applied rewrites97.9%
Taylor expanded in y around inf
Applied rewrites78.3%
Final simplification80.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.1e+33) (not (<= t 4800000000.0))) (- x (* (/ y t) a)) (fma (- a) (/ y (- 1.0 z)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.1e+33) || !(t <= 4800000000.0)) {
tmp = x - ((y / t) * a);
} else {
tmp = fma(-a, (y / (1.0 - z)), x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.1e+33) || !(t <= 4800000000.0)) tmp = Float64(x - Float64(Float64(y / t) * a)); else tmp = fma(Float64(-a), Float64(y / Float64(1.0 - z)), x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.1e+33], N[Not[LessEqual[t, 4800000000.0]], $MachinePrecision]], N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[((-a) * N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+33} \lor \neg \left(t \leq 4800000000\right):\\
\;\;\;\;x - \frac{y}{t} \cdot a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, \frac{y}{1 - z}, x\right)\\
\end{array}
\end{array}
if t < -1.09999999999999997e33 or 4.8e9 < t Initial program 96.4%
Taylor expanded in z around 0
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
lower-/.f64N/A
lower-+.f6475.2
Applied rewrites75.2%
Taylor expanded in t around inf
Applied rewrites75.0%
if -1.09999999999999997e33 < t < 4.8e9Initial program 97.3%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.9
Applied rewrites97.9%
Taylor expanded in y around inf
Applied rewrites78.3%
Final simplification76.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.1e+33)
(fma (- a) (/ (- y z) t) x)
(if (<= t 410000000000.0)
(fma (- a) (/ y (- 1.0 z)) x)
(- x (* (/ a t) (- y z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.1e+33) {
tmp = fma(-a, ((y - z) / t), x);
} else if (t <= 410000000000.0) {
tmp = fma(-a, (y / (1.0 - z)), x);
} else {
tmp = x - ((a / t) * (y - z));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.1e+33) tmp = fma(Float64(-a), Float64(Float64(y - z) / t), x); elseif (t <= 410000000000.0) tmp = fma(Float64(-a), Float64(y / Float64(1.0 - z)), x); else tmp = Float64(x - Float64(Float64(a / t) * Float64(y - z))); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.1e+33], N[((-a) * N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t, 410000000000.0], N[((-a) * N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(x - N[(N[(a / t), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.1 \cdot 10^{+33}:\\
\;\;\;\;\mathsf{fma}\left(-a, \frac{y - z}{t}, x\right)\\
\mathbf{elif}\;t \leq 410000000000:\\
\;\;\;\;\mathsf{fma}\left(-a, \frac{y}{1 - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{t} \cdot \left(y - z\right)\\
\end{array}
\end{array}
if t < -1.09999999999999997e33Initial program 95.8%
Taylor expanded in t around inf
mul-1-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f6482.5
Applied rewrites82.5%
if -1.09999999999999997e33 < t < 4.1e11Initial program 97.3%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6497.9
Applied rewrites97.9%
Taylor expanded in y around inf
Applied rewrites78.3%
if 4.1e11 < t Initial program 97.1%
Taylor expanded in t around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6473.1
Applied rewrites73.1%
Applied rewrites85.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -350000.0) (- (- x a) (/ a z)) (if (<= z 1650000000.0) (fma (- a) (fma (- y 1.0) z y) x) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -350000.0) {
tmp = (x - a) - (a / z);
} else if (z <= 1650000000.0) {
tmp = fma(-a, fma((y - 1.0), z, y), x);
} else {
tmp = x - a;
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if (z <= -350000.0) tmp = Float64(Float64(x - a) - Float64(a / z)); elseif (z <= 1650000000.0) tmp = fma(Float64(-a), fma(Float64(y - 1.0), z, y), x); else tmp = Float64(x - a); end return tmp end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -350000.0], N[(N[(x - a), $MachinePrecision] - N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1650000000.0], N[((-a) * N[(N[(y - 1.0), $MachinePrecision] * z + y), $MachinePrecision] + x), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -350000:\\
\;\;\;\;\left(x - a\right) - \frac{a}{z}\\
\mathbf{elif}\;z \leq 1650000000:\\
\;\;\;\;\mathsf{fma}\left(-a, \mathsf{fma}\left(y - 1, z, y\right), x\right)\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -3.5e5Initial program 95.7%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6486.5
Applied rewrites86.5%
Taylor expanded in y around 0
Applied rewrites75.5%
Taylor expanded in z around inf
Applied rewrites75.5%
if -3.5e5 < z < 1.65e9Initial program 99.1%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6468.9
Applied rewrites68.9%
Taylor expanded in z around 0
Applied rewrites68.8%
if 1.65e9 < z Initial program 92.6%
Taylor expanded in z around inf
lower--.f6475.4
Applied rewrites75.4%
(FPCore (x y z t a) :precision binary64 (fma (- y z) (/ a (- -1.0 (- t z))) x))
double code(double x, double y, double z, double t, double a) {
return fma((y - z), (a / (-1.0 - (t - z))), x);
}
function code(x, y, z, t, a) return fma(Float64(y - z), Float64(a / Float64(-1.0 - Float64(t - z))), x) end
code[x_, y_, z_, t_, a_] := N[(N[(y - z), $MachinePrecision] * N[(a / N[(-1.0 - N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - z, \frac{a}{-1 - \left(t - z\right)}, x\right)
\end{array}
Initial program 96.8%
lift--.f64N/A
sub-negN/A
+-commutativeN/A
lift-/.f64N/A
distribute-neg-frac2N/A
div-invN/A
lower-fma.f64N/A
lift-/.f64N/A
clear-numN/A
distribute-neg-frac2N/A
remove-double-divN/A
lower-neg.f64N/A
lower-/.f6497.4
lift-+.f64N/A
+-commutativeN/A
lower-+.f6497.4
Applied rewrites97.4%
Final simplification97.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.35e+42) (not (<= z 2.7e+30))) (- x a) (fma (- a) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.35e+42) || !(z <= 2.7e+30)) {
tmp = x - a;
} else {
tmp = fma(-a, y, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.35e+42) || !(z <= 2.7e+30)) tmp = Float64(x - a); else tmp = fma(Float64(-a), y, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.35e+42], N[Not[LessEqual[z, 2.7e+30]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[((-a) * y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+42} \lor \neg \left(z \leq 2.7 \cdot 10^{+30}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-a, y, x\right)\\
\end{array}
\end{array}
if z < -1.35e42 or 2.6999999999999999e30 < z Initial program 93.9%
Taylor expanded in z around inf
lower--.f6477.5
Applied rewrites77.5%
if -1.35e42 < z < 2.6999999999999999e30Initial program 99.2%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6468.4
Applied rewrites68.4%
Taylor expanded in z around 0
Applied rewrites66.1%
Final simplification71.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -490.0) (not (<= z 2.7e+30))) (- x a) (fma z a x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -490.0) || !(z <= 2.7e+30)) {
tmp = x - a;
} else {
tmp = fma(z, a, x);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -490.0) || !(z <= 2.7e+30)) tmp = Float64(x - a); else tmp = fma(z, a, x); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -490.0], N[Not[LessEqual[z, 2.7e+30]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(z * a + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -490 \lor \neg \left(z \leq 2.7 \cdot 10^{+30}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, a, x\right)\\
\end{array}
\end{array}
if z < -490 or 2.6999999999999999e30 < z Initial program 94.2%
Taylor expanded in z around inf
lower--.f6476.4
Applied rewrites76.4%
if -490 < z < 2.6999999999999999e30Initial program 99.1%
Taylor expanded in t around 0
sub-negN/A
+-commutativeN/A
associate-/l*N/A
distribute-lft-neg-inN/A
lower-fma.f64N/A
lower-neg.f64N/A
lower-/.f64N/A
lower--.f64N/A
lower--.f6468.1
Applied rewrites68.1%
Taylor expanded in y around 0
Applied rewrites55.6%
Taylor expanded in z around 0
Applied rewrites55.6%
Final simplification65.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 96.8%
Taylor expanded in z around inf
lower--.f6460.3
Applied rewrites60.3%
(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 96.8%
Taylor expanded in z around inf
lower--.f6460.3
Applied rewrites60.3%
Taylor expanded in x around 0
Applied rewrites15.0%
(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 2024299
(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))))