
(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 14 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) (+ (- z t) -1.0)) a x))
double code(double x, double y, double z, double t, double a) {
return fma(((y - z) / ((z - t) + -1.0)), a, x);
}
function code(x, y, z, t, a) return fma(Float64(Float64(y - z) / Float64(Float64(z - t) + -1.0)), a, x) end
code[x_, y_, z_, t_, a_] := N[(N[(N[(y - z), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{y - z}{\left(z - t\right) + -1}, a, x\right)
\end{array}
Initial program 96.2%
sub-neg96.2%
+-commutative96.2%
associate-/r/99.7%
distribute-lft-neg-in99.7%
fma-define99.7%
distribute-neg-frac299.7%
distribute-neg-in99.7%
sub-neg99.7%
distribute-neg-in99.7%
remove-double-neg99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))) (t_2 (+ x (* a (/ (- z y) t)))))
(if (<= t -14.5)
t_2
(if (<= t -3.6e-189)
t_1
(if (<= t 1e-271)
(* a (/ (- y z) (+ z -1.0)))
(if (<= t 1.6e-138) t_1 (if (<= t 9e-6) (- x a) t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double t_2 = x + (a * ((z - y) / t));
double tmp;
if (t <= -14.5) {
tmp = t_2;
} else if (t <= -3.6e-189) {
tmp = t_1;
} else if (t <= 1e-271) {
tmp = a * ((y - z) / (z + -1.0));
} else if (t <= 1.6e-138) {
tmp = t_1;
} else if (t <= 9e-6) {
tmp = x - a;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - (y * a)
t_2 = x + (a * ((z - y) / t))
if (t <= (-14.5d0)) then
tmp = t_2
else if (t <= (-3.6d-189)) then
tmp = t_1
else if (t <= 1d-271) then
tmp = a * ((y - z) / (z + (-1.0d0)))
else if (t <= 1.6d-138) then
tmp = t_1
else if (t <= 9d-6) then
tmp = x - a
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double t_2 = x + (a * ((z - y) / t));
double tmp;
if (t <= -14.5) {
tmp = t_2;
} else if (t <= -3.6e-189) {
tmp = t_1;
} else if (t <= 1e-271) {
tmp = a * ((y - z) / (z + -1.0));
} else if (t <= 1.6e-138) {
tmp = t_1;
} else if (t <= 9e-6) {
tmp = x - a;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) t_2 = x + (a * ((z - y) / t)) tmp = 0 if t <= -14.5: tmp = t_2 elif t <= -3.6e-189: tmp = t_1 elif t <= 1e-271: tmp = a * ((y - z) / (z + -1.0)) elif t <= 1.6e-138: tmp = t_1 elif t <= 9e-6: tmp = x - a else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) t_2 = Float64(x + Float64(a * Float64(Float64(z - y) / t))) tmp = 0.0 if (t <= -14.5) tmp = t_2; elseif (t <= -3.6e-189) tmp = t_1; elseif (t <= 1e-271) tmp = Float64(a * Float64(Float64(y - z) / Float64(z + -1.0))); elseif (t <= 1.6e-138) tmp = t_1; elseif (t <= 9e-6) tmp = Float64(x - a); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); t_2 = x + (a * ((z - y) / t)); tmp = 0.0; if (t <= -14.5) tmp = t_2; elseif (t <= -3.6e-189) tmp = t_1; elseif (t <= 1e-271) tmp = a * ((y - z) / (z + -1.0)); elseif (t <= 1.6e-138) tmp = t_1; elseif (t <= 9e-6) tmp = x - a; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -14.5], t$95$2, If[LessEqual[t, -3.6e-189], t$95$1, If[LessEqual[t, 1e-271], N[(a * N[(N[(y - z), $MachinePrecision] / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e-138], t$95$1, If[LessEqual[t, 9e-6], N[(x - a), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
t_2 := x + a \cdot \frac{z - y}{t}\\
\mathbf{if}\;t \leq -14.5:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.6 \cdot 10^{-189}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 10^{-271}:\\
\;\;\;\;a \cdot \frac{y - z}{z + -1}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-6}:\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -14.5 or 9.00000000000000023e-6 < t Initial program 94.7%
associate-/r/99.4%
Simplified99.4%
Taylor expanded in t around inf 83.4%
if -14.5 < t < -3.60000000000000017e-189 or 9.99999999999999963e-272 < t < 1.60000000000000005e-138Initial program 97.2%
associate-/r/100.0%
Simplified100.0%
associate-/r/97.2%
clear-num97.1%
Applied egg-rr97.1%
Taylor expanded in t around 0 97.1%
Taylor expanded in z around 0 83.2%
if -3.60000000000000017e-189 < t < 9.99999999999999963e-272Initial program 99.9%
associate-/r/100.0%
Simplified100.0%
associate-/r/99.9%
clear-num99.8%
Applied egg-rr99.8%
Taylor expanded in t around 0 99.8%
Taylor expanded in x around 0 57.7%
mul-1-neg57.7%
associate-/l*73.7%
distribute-rgt-neg-in73.7%
distribute-frac-neg273.7%
neg-sub073.7%
associate--r-73.7%
metadata-eval73.7%
Simplified73.7%
if 1.60000000000000005e-138 < t < 9.00000000000000023e-6Initial program 96.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 69.3%
Final simplification80.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))))
(if (<= z -1.45e+20)
(- x a)
(if (<= z 1.1e-196)
t_1
(if (<= z 3e-133)
(- x (* y (/ a t)))
(if (<= z 1.45e-7)
t_1
(if (<= z 1.05e+134) (+ x (/ a (/ z y))) (- x a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -1.45e+20) {
tmp = x - a;
} else if (z <= 1.1e-196) {
tmp = t_1;
} else if (z <= 3e-133) {
tmp = x - (y * (a / t));
} else if (z <= 1.45e-7) {
tmp = t_1;
} else if (z <= 1.05e+134) {
tmp = x + (a / (z / y));
} 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 = x - (y * a)
if (z <= (-1.45d+20)) then
tmp = x - a
else if (z <= 1.1d-196) then
tmp = t_1
else if (z <= 3d-133) then
tmp = x - (y * (a / t))
else if (z <= 1.45d-7) then
tmp = t_1
else if (z <= 1.05d+134) then
tmp = x + (a / (z / y))
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 = x - (y * a);
double tmp;
if (z <= -1.45e+20) {
tmp = x - a;
} else if (z <= 1.1e-196) {
tmp = t_1;
} else if (z <= 3e-133) {
tmp = x - (y * (a / t));
} else if (z <= 1.45e-7) {
tmp = t_1;
} else if (z <= 1.05e+134) {
tmp = x + (a / (z / y));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) tmp = 0 if z <= -1.45e+20: tmp = x - a elif z <= 1.1e-196: tmp = t_1 elif z <= 3e-133: tmp = x - (y * (a / t)) elif z <= 1.45e-7: tmp = t_1 elif z <= 1.05e+134: tmp = x + (a / (z / y)) else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) tmp = 0.0 if (z <= -1.45e+20) tmp = Float64(x - a); elseif (z <= 1.1e-196) tmp = t_1; elseif (z <= 3e-133) tmp = Float64(x - Float64(y * Float64(a / t))); elseif (z <= 1.45e-7) tmp = t_1; elseif (z <= 1.05e+134) tmp = Float64(x + Float64(a / Float64(z / y))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); tmp = 0.0; if (z <= -1.45e+20) tmp = x - a; elseif (z <= 1.1e-196) tmp = t_1; elseif (z <= 3e-133) tmp = x - (y * (a / t)); elseif (z <= 1.45e-7) tmp = t_1; elseif (z <= 1.05e+134) tmp = x + (a / (z / y)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.45e+20], N[(x - a), $MachinePrecision], If[LessEqual[z, 1.1e-196], t$95$1, If[LessEqual[z, 3e-133], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e-7], t$95$1, If[LessEqual[z, 1.05e+134], N[(x + N[(a / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+20}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-133}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+134}:\\
\;\;\;\;x + \frac{a}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.45e20 or 1.05e134 < z Initial program 92.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.7%
if -1.45e20 < z < 1.10000000000000007e-196 or 3.00000000000000019e-133 < z < 1.4499999999999999e-7Initial program 97.6%
associate-/r/99.5%
Simplified99.5%
associate-/r/97.6%
clear-num97.6%
Applied egg-rr97.6%
Taylor expanded in t around 0 81.1%
Taylor expanded in z around 0 81.8%
if 1.10000000000000007e-196 < z < 3.00000000000000019e-133Initial program 99.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around inf 94.8%
*-commutative94.8%
associate--l+94.8%
+-commutative94.8%
associate-*r/99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in t around inf 90.2%
if 1.4499999999999999e-7 < z < 1.05e134Initial program 99.8%
associate-/r/99.7%
Simplified99.7%
Taylor expanded in y around inf 78.4%
*-commutative78.4%
associate--l+78.4%
+-commutative78.4%
associate-*r/82.4%
+-commutative82.4%
Simplified82.4%
Taylor expanded in z around inf 67.4%
+-commutative67.4%
associate-/l*71.4%
Simplified71.4%
clear-num71.4%
un-div-inv71.5%
Applied egg-rr71.5%
Final simplification80.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -7.8e+18)
(- x a)
(if (<= z 5.8e-8)
(- x (* y a))
(if (<= z 4.2e+134) (+ x (* a (/ y z))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.8e+18) {
tmp = x - a;
} else if (z <= 5.8e-8) {
tmp = x - (y * a);
} else if (z <= 4.2e+134) {
tmp = x + (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 (z <= (-7.8d+18)) then
tmp = x - a
else if (z <= 5.8d-8) then
tmp = x - (y * a)
else if (z <= 4.2d+134) then
tmp = x + (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 (z <= -7.8e+18) {
tmp = x - a;
} else if (z <= 5.8e-8) {
tmp = x - (y * a);
} else if (z <= 4.2e+134) {
tmp = x + (a * (y / z));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.8e+18: tmp = x - a elif z <= 5.8e-8: tmp = x - (y * a) elif z <= 4.2e+134: tmp = x + (a * (y / z)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.8e+18) tmp = Float64(x - a); elseif (z <= 5.8e-8) tmp = Float64(x - Float64(y * a)); elseif (z <= 4.2e+134) tmp = Float64(x + 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 (z <= -7.8e+18) tmp = x - a; elseif (z <= 5.8e-8) tmp = x - (y * a); elseif (z <= 4.2e+134) tmp = x + (a * (y / z)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.8e+18], N[(x - a), $MachinePrecision], If[LessEqual[z, 5.8e-8], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+134], N[(x + N[(a * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.8 \cdot 10^{+18}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-8}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+134}:\\
\;\;\;\;x + a \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -7.8e18 or 4.2000000000000002e134 < z Initial program 92.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.7%
if -7.8e18 < z < 5.8000000000000003e-8Initial program 97.9%
associate-/r/99.6%
Simplified99.6%
associate-/r/97.9%
clear-num97.8%
Applied egg-rr97.8%
Taylor expanded in t around 0 79.4%
Taylor expanded in z around 0 80.0%
if 5.8000000000000003e-8 < z < 4.2000000000000002e134Initial program 99.8%
associate-/r/99.7%
Simplified99.7%
Taylor expanded in y around inf 78.4%
*-commutative78.4%
associate--l+78.4%
+-commutative78.4%
associate-*r/82.4%
+-commutative82.4%
Simplified82.4%
Taylor expanded in z around inf 67.4%
+-commutative67.4%
associate-/l*71.4%
Simplified71.4%
Final simplification79.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.6e+21)
(- x a)
(if (<= z 1.45e-7)
(- x (* y a))
(if (<= z 1.4e+134) (+ x (/ a (/ z y))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.6e+21) {
tmp = x - a;
} else if (z <= 1.45e-7) {
tmp = x - (y * a);
} else if (z <= 1.4e+134) {
tmp = x + (a / (z / y));
} 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 <= (-8.6d+21)) then
tmp = x - a
else if (z <= 1.45d-7) then
tmp = x - (y * a)
else if (z <= 1.4d+134) then
tmp = x + (a / (z / y))
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 <= -8.6e+21) {
tmp = x - a;
} else if (z <= 1.45e-7) {
tmp = x - (y * a);
} else if (z <= 1.4e+134) {
tmp = x + (a / (z / y));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.6e+21: tmp = x - a elif z <= 1.45e-7: tmp = x - (y * a) elif z <= 1.4e+134: tmp = x + (a / (z / y)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.6e+21) tmp = Float64(x - a); elseif (z <= 1.45e-7) tmp = Float64(x - Float64(y * a)); elseif (z <= 1.4e+134) tmp = Float64(x + Float64(a / Float64(z / y))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.6e+21) tmp = x - a; elseif (z <= 1.45e-7) tmp = x - (y * a); elseif (z <= 1.4e+134) tmp = x + (a / (z / y)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.6e+21], N[(x - a), $MachinePrecision], If[LessEqual[z, 1.45e-7], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+134], N[(x + N[(a / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.6 \cdot 10^{+21}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-7}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+134}:\\
\;\;\;\;x + \frac{a}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -8.6e21 or 1.3999999999999999e134 < z Initial program 92.5%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.7%
if -8.6e21 < z < 1.4499999999999999e-7Initial program 97.9%
associate-/r/99.6%
Simplified99.6%
associate-/r/97.9%
clear-num97.8%
Applied egg-rr97.8%
Taylor expanded in t around 0 79.4%
Taylor expanded in z around 0 80.0%
if 1.4499999999999999e-7 < z < 1.3999999999999999e134Initial program 99.8%
associate-/r/99.7%
Simplified99.7%
Taylor expanded in y around inf 78.4%
*-commutative78.4%
associate--l+78.4%
+-commutative78.4%
associate-*r/82.4%
+-commutative82.4%
Simplified82.4%
Taylor expanded in z around inf 67.4%
+-commutative67.4%
associate-/l*71.4%
Simplified71.4%
clear-num71.4%
un-div-inv71.5%
Applied egg-rr71.5%
Final simplification79.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.5e+116)
(- x a)
(if (<= z 1.22e+26)
(+ x (* y (/ a (+ (- z t) -1.0))))
(- x (/ (- z y) (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+116) {
tmp = x - a;
} else if (z <= 1.22e+26) {
tmp = x + (y * (a / ((z - t) + -1.0)));
} else {
tmp = x - ((z - y) / (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-9.5d+116)) then
tmp = x - a
else if (z <= 1.22d+26) then
tmp = x + (y * (a / ((z - t) + (-1.0d0))))
else
tmp = x - ((z - y) / (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+116) {
tmp = x - a;
} else if (z <= 1.22e+26) {
tmp = x + (y * (a / ((z - t) + -1.0)));
} else {
tmp = x - ((z - y) / (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e+116: tmp = x - a elif z <= 1.22e+26: tmp = x + (y * (a / ((z - t) + -1.0))) else: tmp = x - ((z - y) / (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+116) tmp = Float64(x - a); elseif (z <= 1.22e+26) tmp = Float64(x + Float64(y * Float64(a / Float64(Float64(z - t) + -1.0)))); else tmp = Float64(x - Float64(Float64(z - y) / Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e+116) tmp = x - a; elseif (z <= 1.22e+26) tmp = x + (y * (a / ((z - t) + -1.0))); else tmp = x - ((z - y) / (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+116], N[(x - a), $MachinePrecision], If[LessEqual[z, 1.22e+26], N[(x + N[(y * N[(a / N[(N[(z - t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z - y), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+116}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{+26}:\\
\;\;\;\;x + y \cdot \frac{a}{\left(z - t\right) + -1}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z - y}{\frac{z}{a}}\\
\end{array}
\end{array}
if z < -9.5000000000000004e116Initial program 88.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 84.9%
if -9.5000000000000004e116 < z < 1.2200000000000001e26Initial program 98.1%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in y around inf 90.0%
*-commutative90.0%
associate--l+90.0%
+-commutative90.0%
associate-*r/91.7%
+-commutative91.7%
Simplified91.7%
if 1.2200000000000001e26 < z Initial program 95.5%
Taylor expanded in z around inf 86.7%
mul-1-neg86.7%
distribute-neg-frac286.7%
Simplified86.7%
Final simplification89.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.2e+20)
(+ x (* z (/ a (- 1.0 (- z t)))))
(if (<= z 1.3e+26)
(+ x (* y (/ a (+ (- z t) -1.0))))
(- x (/ (- z y) (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+20) {
tmp = x + (z * (a / (1.0 - (z - t))));
} else if (z <= 1.3e+26) {
tmp = x + (y * (a / ((z - t) + -1.0)));
} else {
tmp = x - ((z - y) / (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.2d+20)) then
tmp = x + (z * (a / (1.0d0 - (z - t))))
else if (z <= 1.3d+26) then
tmp = x + (y * (a / ((z - t) + (-1.0d0))))
else
tmp = x - ((z - y) / (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.2e+20) {
tmp = x + (z * (a / (1.0 - (z - t))));
} else if (z <= 1.3e+26) {
tmp = x + (y * (a / ((z - t) + -1.0)));
} else {
tmp = x - ((z - y) / (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.2e+20: tmp = x + (z * (a / (1.0 - (z - t)))) elif z <= 1.3e+26: tmp = x + (y * (a / ((z - t) + -1.0))) else: tmp = x - ((z - y) / (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.2e+20) tmp = Float64(x + Float64(z * Float64(a / Float64(1.0 - Float64(z - t))))); elseif (z <= 1.3e+26) tmp = Float64(x + Float64(y * Float64(a / Float64(Float64(z - t) + -1.0)))); else tmp = Float64(x - Float64(Float64(z - y) / Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.2e+20) tmp = x + (z * (a / (1.0 - (z - t)))); elseif (z <= 1.3e+26) tmp = x + (y * (a / ((z - t) + -1.0))); else tmp = x - ((z - y) / (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.2e+20], N[(x + N[(z * N[(a / N[(1.0 - N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+26], N[(x + N[(y * N[(a / N[(N[(z - t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z - y), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+20}:\\
\;\;\;\;x + z \cdot \frac{a}{1 - \left(z - t\right)}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+26}:\\
\;\;\;\;x + y \cdot \frac{a}{\left(z - t\right) + -1}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z - y}{\frac{z}{a}}\\
\end{array}
\end{array}
if z < -1.2e20Initial program 92.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around 0 64.3%
mul-1-neg64.3%
*-commutative64.3%
associate--l+64.3%
+-commutative64.3%
associate-*r/81.8%
distribute-lft-neg-in81.8%
+-commutative81.8%
Simplified81.8%
if -1.2e20 < z < 1.30000000000000001e26Initial program 97.9%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in y around inf 92.8%
*-commutative92.8%
associate--l+92.8%
+-commutative92.8%
associate-*r/94.1%
+-commutative94.1%
Simplified94.1%
if 1.30000000000000001e26 < z Initial program 95.5%
Taylor expanded in z around inf 86.7%
mul-1-neg86.7%
distribute-neg-frac286.7%
Simplified86.7%
Final simplification89.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.7e-60) (not (<= z 2.8e+26))) (- x a) (+ x (/ (* y a) (- -1.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.7e-60) || !(z <= 2.8e+26)) {
tmp = x - a;
} else {
tmp = x + ((y * a) / (-1.0 - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.7d-60)) .or. (.not. (z <= 2.8d+26))) then
tmp = x - a
else
tmp = x + ((y * a) / ((-1.0d0) - t))
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.7e-60) || !(z <= 2.8e+26)) {
tmp = x - a;
} else {
tmp = x + ((y * a) / (-1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.7e-60) or not (z <= 2.8e+26): tmp = x - a else: tmp = x + ((y * a) / (-1.0 - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.7e-60) || !(z <= 2.8e+26)) tmp = Float64(x - a); else tmp = Float64(x + Float64(Float64(y * a) / Float64(-1.0 - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.7e-60) || ~((z <= 2.8e+26))) tmp = x - a; else tmp = x + ((y * a) / (-1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.7e-60], N[Not[LessEqual[z, 2.8e+26]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(N[(y * a), $MachinePrecision] / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-60} \lor \neg \left(z \leq 2.8 \cdot 10^{+26}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot a}{-1 - t}\\
\end{array}
\end{array}
if z < -2.7e-60 or 2.8e26 < z Initial program 94.3%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 75.7%
if -2.7e-60 < z < 2.8e26Initial program 97.8%
associate-/r/99.5%
Simplified99.5%
Taylor expanded in z around 0 93.0%
Final simplification85.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.7e-60) (not (<= z 3.3e+26))) (- x (/ (- z y) (/ z a))) (+ x (/ (* y a) (- -1.0 t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.7e-60) || !(z <= 3.3e+26)) {
tmp = x - ((z - y) / (z / a));
} else {
tmp = x + ((y * a) / (-1.0 - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.7d-60)) .or. (.not. (z <= 3.3d+26))) then
tmp = x - ((z - y) / (z / a))
else
tmp = x + ((y * a) / ((-1.0d0) - t))
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.7e-60) || !(z <= 3.3e+26)) {
tmp = x - ((z - y) / (z / a));
} else {
tmp = x + ((y * a) / (-1.0 - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.7e-60) or not (z <= 3.3e+26): tmp = x - ((z - y) / (z / a)) else: tmp = x + ((y * a) / (-1.0 - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.7e-60) || !(z <= 3.3e+26)) tmp = Float64(x - Float64(Float64(z - y) / Float64(z / a))); else tmp = Float64(x + Float64(Float64(y * a) / Float64(-1.0 - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.7e-60) || ~((z <= 3.3e+26))) tmp = x - ((z - y) / (z / a)); else tmp = x + ((y * a) / (-1.0 - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.7e-60], N[Not[LessEqual[z, 3.3e+26]], $MachinePrecision]], N[(x - N[(N[(z - y), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * a), $MachinePrecision] / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{-60} \lor \neg \left(z \leq 3.3 \cdot 10^{+26}\right):\\
\;\;\;\;x - \frac{z - y}{\frac{z}{a}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot a}{-1 - t}\\
\end{array}
\end{array}
if z < -2.7e-60 or 3.29999999999999993e26 < z Initial program 94.3%
Taylor expanded in z around inf 82.3%
mul-1-neg82.3%
distribute-neg-frac282.3%
Simplified82.3%
if -2.7e-60 < z < 3.29999999999999993e26Initial program 97.8%
associate-/r/99.5%
Simplified99.5%
Taylor expanded in z around 0 93.0%
Final simplification88.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.8e+21) (not (<= z 1.45e-7))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.8e+21) || !(z <= 1.45e-7)) {
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 <= (-3.8d+21)) .or. (.not. (z <= 1.45d-7))) 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 <= -3.8e+21) || !(z <= 1.45e-7)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.8e+21) or not (z <= 1.45e-7): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.8e+21) || !(z <= 1.45e-7)) 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 <= -3.8e+21) || ~((z <= 1.45e-7))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.8e+21], N[Not[LessEqual[z, 1.45e-7]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{+21} \lor \neg \left(z \leq 1.45 \cdot 10^{-7}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -3.8e21 or 1.4499999999999999e-7 < z Initial program 93.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 74.3%
if -3.8e21 < z < 1.4499999999999999e-7Initial program 97.9%
associate-/r/99.6%
Simplified99.6%
associate-/r/97.9%
clear-num97.8%
Applied egg-rr97.8%
Taylor expanded in t around 0 79.4%
Taylor expanded in z around 0 80.0%
Final simplification77.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.15e-84) (not (<= z 2.75e+31))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.15e-84) || !(z <= 2.75e+31)) {
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 <= (-1.15d-84)) .or. (.not. (z <= 2.75d+31))) 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 <= -1.15e-84) || !(z <= 2.75e+31)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.15e-84) or not (z <= 2.75e+31): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.15e-84) || !(z <= 2.75e+31)) 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 <= -1.15e-84) || ~((z <= 2.75e+31))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.15e-84], N[Not[LessEqual[z, 2.75e+31]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-84} \lor \neg \left(z \leq 2.75 \cdot 10^{+31}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.1499999999999999e-84 or 2.75000000000000001e31 < z Initial program 94.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 75.2%
if -1.1499999999999999e-84 < z < 2.75000000000000001e31Initial program 97.7%
associate-/r/99.5%
Simplified99.5%
Taylor expanded in x around inf 61.0%
Final simplification67.7%
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- y z) (+ (- z t) -1.0)))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / ((z - t) + -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 * ((y - z) / ((z - t) + (-1.0d0))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / ((z - t) + -1.0)));
}
def code(x, y, z, t, a): return x + (a * ((y - z) / ((z - t) + -1.0)))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(y - z) / Float64(Float64(z - t) + -1.0)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((y - z) / ((z - t) + -1.0))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(N[(z - t), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{y - z}{\left(z - t\right) + -1}
\end{array}
Initial program 96.2%
associate-/r/99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y z t a) :precision binary64 (if (<= x -2.3e-282) x (if (<= x 2.8e-152) (- a) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.3e-282) {
tmp = x;
} else if (x <= 2.8e-152) {
tmp = -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 (x <= (-2.3d-282)) then
tmp = x
else if (x <= 2.8d-152) then
tmp = -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 (x <= -2.3e-282) {
tmp = x;
} else if (x <= 2.8e-152) {
tmp = -a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.3e-282: tmp = x elif x <= 2.8e-152: tmp = -a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.3e-282) tmp = x; elseif (x <= 2.8e-152) tmp = Float64(-a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.3e-282) tmp = x; elseif (x <= 2.8e-152) tmp = -a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.3e-282], x, If[LessEqual[x, 2.8e-152], (-a), x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.3 \cdot 10^{-282}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-152}:\\
\;\;\;\;-a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.2999999999999999e-282 or 2.79999999999999984e-152 < x Initial program 97.4%
associate-/r/99.7%
Simplified99.7%
Taylor expanded in x around inf 64.4%
if -2.2999999999999999e-282 < x < 2.79999999999999984e-152Initial program 90.9%
associate-/r/99.9%
Simplified99.9%
associate-/r/90.9%
clear-num90.8%
Applied egg-rr90.8%
Taylor expanded in t around 0 64.8%
Taylor expanded in x around 0 47.9%
mul-1-neg47.9%
associate-/l*63.5%
distribute-rgt-neg-in63.5%
distribute-frac-neg263.5%
neg-sub063.5%
associate--r-63.5%
metadata-eval63.5%
Simplified63.5%
Taylor expanded in z around inf 41.2%
neg-mul-141.2%
Simplified41.2%
Final simplification60.0%
(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.2%
associate-/r/99.7%
Simplified99.7%
Taylor expanded in x around inf 55.4%
Final simplification55.4%
(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 2024067
(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))))