
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- z y) (+ (- t z) 1.0)))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (a * ((z - y) / ((t - z) + 1.0d0)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((z - y) / ((t - z) + 1.0)));
}
def code(x, y, z, t, a): return x + (a * ((z - y) / ((t - z) + 1.0)))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(z - y) / Float64(Float64(t - z) + 1.0)))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((z - y) / ((t - z) + 1.0))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{z - y}{\left(t - z\right) + 1}
\end{array}
Initial program 98.9%
associate-/r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (- y z) (/ (- z) a)))))
(if (<= z -1.65e+73)
t_1
(if (<= z -2.7)
(+ x (* a (/ (- z y) t)))
(if (<= z -0.00125)
(* a (/ (- z y) (- 1.0 z)))
(if (<= z 800000000000.0) (- x (* y (/ a (+ t 1.0)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y - z) / (-z / a));
double tmp;
if (z <= -1.65e+73) {
tmp = t_1;
} else if (z <= -2.7) {
tmp = x + (a * ((z - y) / t));
} else if (z <= -0.00125) {
tmp = a * ((z - y) / (1.0 - z));
} else if (z <= 800000000000.0) {
tmp = x - (y * (a / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - ((y - z) / (-z / a))
if (z <= (-1.65d+73)) then
tmp = t_1
else if (z <= (-2.7d0)) then
tmp = x + (a * ((z - y) / t))
else if (z <= (-0.00125d0)) then
tmp = a * ((z - y) / (1.0d0 - z))
else if (z <= 800000000000.0d0) then
tmp = x - (y * (a / (t + 1.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y - z) / (-z / a));
double tmp;
if (z <= -1.65e+73) {
tmp = t_1;
} else if (z <= -2.7) {
tmp = x + (a * ((z - y) / t));
} else if (z <= -0.00125) {
tmp = a * ((z - y) / (1.0 - z));
} else if (z <= 800000000000.0) {
tmp = x - (y * (a / (t + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((y - z) / (-z / a)) tmp = 0 if z <= -1.65e+73: tmp = t_1 elif z <= -2.7: tmp = x + (a * ((z - y) / t)) elif z <= -0.00125: tmp = a * ((z - y) / (1.0 - z)) elif z <= 800000000000.0: tmp = x - (y * (a / (t + 1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y - z) / Float64(Float64(-z) / a))) tmp = 0.0 if (z <= -1.65e+73) tmp = t_1; elseif (z <= -2.7) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); elseif (z <= -0.00125) tmp = Float64(a * Float64(Float64(z - y) / Float64(1.0 - z))); elseif (z <= 800000000000.0) tmp = Float64(x - Float64(y * Float64(a / Float64(t + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((y - z) / (-z / a)); tmp = 0.0; if (z <= -1.65e+73) tmp = t_1; elseif (z <= -2.7) tmp = x + (a * ((z - y) / t)); elseif (z <= -0.00125) tmp = a * ((z - y) / (1.0 - z)); elseif (z <= 800000000000.0) tmp = x - (y * (a / (t + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y - z), $MachinePrecision] / N[((-z) / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.65e+73], t$95$1, If[LessEqual[z, -2.7], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.00125], N[(a * N[(N[(z - y), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 800000000000.0], 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 := x - \frac{y - z}{\frac{-z}{a}}\\
\mathbf{if}\;z \leq -1.65 \cdot 10^{+73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -2.7:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{elif}\;z \leq -0.00125:\\
\;\;\;\;a \cdot \frac{z - y}{1 - z}\\
\mathbf{elif}\;z \leq 800000000000:\\
\;\;\;\;x - y \cdot \frac{a}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.65000000000000015e73 or 8e11 < z Initial program 97.7%
Taylor expanded in z around inf 88.9%
associate-*r/88.9%
neg-mul-188.9%
Simplified88.9%
if -1.65000000000000015e73 < z < -2.7000000000000002Initial program 99.9%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 75.5%
if -2.7000000000000002 < z < -0.00125000000000000003Initial program 99.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in x around 0 99.5%
associate-*r/100.0%
associate-*r*100.0%
mul-1-neg100.0%
Simplified100.0%
if -0.00125000000000000003 < z < 8e11Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.5%
associate-/l*93.7%
associate-/r/93.7%
Simplified93.7%
Final simplification90.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ a (/ t y)))) (t_2 (- x (* y a))))
(if (<= z -4e+21)
(- x a)
(if (<= z 1e-213)
t_2
(if (<= z 1.66e-155)
t_1
(if (<= z 1.2e-78) t_2 (if (<= z 5000000000.0) t_1 (- x a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (a / (t / y));
double t_2 = x - (y * a);
double tmp;
if (z <= -4e+21) {
tmp = x - a;
} else if (z <= 1e-213) {
tmp = t_2;
} else if (z <= 1.66e-155) {
tmp = t_1;
} else if (z <= 1.2e-78) {
tmp = t_2;
} else if (z <= 5000000000.0) {
tmp = t_1;
} 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) :: t_2
real(8) :: tmp
t_1 = x - (a / (t / y))
t_2 = x - (y * a)
if (z <= (-4d+21)) then
tmp = x - a
else if (z <= 1d-213) then
tmp = t_2
else if (z <= 1.66d-155) then
tmp = t_1
else if (z <= 1.2d-78) then
tmp = t_2
else if (z <= 5000000000.0d0) then
tmp = t_1
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 - (a / (t / y));
double t_2 = x - (y * a);
double tmp;
if (z <= -4e+21) {
tmp = x - a;
} else if (z <= 1e-213) {
tmp = t_2;
} else if (z <= 1.66e-155) {
tmp = t_1;
} else if (z <= 1.2e-78) {
tmp = t_2;
} else if (z <= 5000000000.0) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (a / (t / y)) t_2 = x - (y * a) tmp = 0 if z <= -4e+21: tmp = x - a elif z <= 1e-213: tmp = t_2 elif z <= 1.66e-155: tmp = t_1 elif z <= 1.2e-78: tmp = t_2 elif z <= 5000000000.0: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(a / Float64(t / y))) t_2 = Float64(x - Float64(y * a)) tmp = 0.0 if (z <= -4e+21) tmp = Float64(x - a); elseif (z <= 1e-213) tmp = t_2; elseif (z <= 1.66e-155) tmp = t_1; elseif (z <= 1.2e-78) tmp = t_2; elseif (z <= 5000000000.0) tmp = t_1; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (a / (t / y)); t_2 = x - (y * a); tmp = 0.0; if (z <= -4e+21) tmp = x - a; elseif (z <= 1e-213) tmp = t_2; elseif (z <= 1.66e-155) tmp = t_1; elseif (z <= 1.2e-78) tmp = t_2; elseif (z <= 5000000000.0) tmp = t_1; else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+21], N[(x - a), $MachinePrecision], If[LessEqual[z, 1e-213], t$95$2, If[LessEqual[z, 1.66e-155], t$95$1, If[LessEqual[z, 1.2e-78], t$95$2, If[LessEqual[z, 5000000000.0], t$95$1, N[(x - a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{a}{\frac{t}{y}}\\
t_2 := x - y \cdot a\\
\mathbf{if}\;z \leq -4 \cdot 10^{+21}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 10^{-213}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.66 \cdot 10^{-155}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-78}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 5000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -4e21 or 5e9 < z Initial program 98.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 82.1%
if -4e21 < z < 9.9999999999999995e-214 or 1.65999999999999999e-155 < z < 1.2e-78Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 82.7%
Taylor expanded in z around 0 76.8%
if 9.9999999999999995e-214 < z < 1.65999999999999999e-155 or 1.2e-78 < z < 5e9Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 85.6%
Taylor expanded in y around inf 75.2%
associate-/l*83.2%
Simplified83.2%
Final simplification80.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.9e+75)
(- x a)
(if (<= z -3.0)
(+ x (* a (/ (- z y) t)))
(if (<= z -1.86e-6)
(/ (- y z) (/ (+ z -1.0) a))
(if (<= z 8e+23) (- x (* y (/ a (+ t 1.0)))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e+75) {
tmp = x - a;
} else if (z <= -3.0) {
tmp = x + (a * ((z - y) / t));
} else if (z <= -1.86e-6) {
tmp = (y - z) / ((z + -1.0) / a);
} else if (z <= 8e+23) {
tmp = x - (y * (a / (t + 1.0)));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.9d+75)) then
tmp = x - a
else if (z <= (-3.0d0)) then
tmp = x + (a * ((z - y) / t))
else if (z <= (-1.86d-6)) then
tmp = (y - z) / ((z + (-1.0d0)) / a)
else if (z <= 8d+23) then
tmp = x - (y * (a / (t + 1.0d0)))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e+75) {
tmp = x - a;
} else if (z <= -3.0) {
tmp = x + (a * ((z - y) / t));
} else if (z <= -1.86e-6) {
tmp = (y - z) / ((z + -1.0) / a);
} else if (z <= 8e+23) {
tmp = x - (y * (a / (t + 1.0)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.9e+75: tmp = x - a elif z <= -3.0: tmp = x + (a * ((z - y) / t)) elif z <= -1.86e-6: tmp = (y - z) / ((z + -1.0) / a) elif z <= 8e+23: tmp = x - (y * (a / (t + 1.0))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.9e+75) tmp = Float64(x - a); elseif (z <= -3.0) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); elseif (z <= -1.86e-6) tmp = Float64(Float64(y - z) / Float64(Float64(z + -1.0) / a)); elseif (z <= 8e+23) tmp = Float64(x - Float64(y * Float64(a / Float64(t + 1.0)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.9e+75) tmp = x - a; elseif (z <= -3.0) tmp = x + (a * ((z - y) / t)); elseif (z <= -1.86e-6) tmp = (y - z) / ((z + -1.0) / a); elseif (z <= 8e+23) tmp = x - (y * (a / (t + 1.0))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e+75], N[(x - a), $MachinePrecision], If[LessEqual[z, -3.0], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.86e-6], N[(N[(y - z), $MachinePrecision] / N[(N[(z + -1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+23], N[(x - N[(y * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+75}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -3:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{elif}\;z \leq -1.86 \cdot 10^{-6}:\\
\;\;\;\;\frac{y - z}{\frac{z + -1}{a}}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+23}:\\
\;\;\;\;x - y \cdot \frac{a}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.9000000000000001e75 or 7.9999999999999993e23 < z Initial program 97.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 85.3%
if -1.9000000000000001e75 < z < -3Initial program 99.9%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 75.5%
if -3 < z < -1.86e-6Initial program 99.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in x around 0 99.5%
associate-*r/100.0%
associate-*r*100.0%
mul-1-neg100.0%
Simplified100.0%
associate-*r/99.5%
frac-2neg99.5%
add-sqr-sqrt99.5%
sqrt-unprod6.9%
sqr-neg6.9%
sqrt-unprod0.0%
add-sqr-sqrt0.3%
distribute-lft-neg-out0.3%
add-sqr-sqrt0.3%
sqrt-unprod0.1%
sqr-neg0.1%
sqrt-unprod0.0%
add-sqr-sqrt99.5%
Applied egg-rr99.5%
*-commutative99.5%
associate-/l*99.5%
neg-sub099.5%
associate--r-99.5%
metadata-eval99.5%
Simplified99.5%
if -1.86e-6 < z < 7.9999999999999993e23Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.5%
associate-/l*93.7%
associate-/r/93.7%
Simplified93.7%
Final simplification88.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6.3e+74)
(- x a)
(if (<= z -200.0)
(+ x (* a (/ (- z y) t)))
(if (<= z -0.00125)
(* a (/ (- z y) (- 1.0 z)))
(if (<= z 29000000000000.0) (- x (* y (/ a (+ t 1.0)))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.3e+74) {
tmp = x - a;
} else if (z <= -200.0) {
tmp = x + (a * ((z - y) / t));
} else if (z <= -0.00125) {
tmp = a * ((z - y) / (1.0 - z));
} else if (z <= 29000000000000.0) {
tmp = x - (y * (a / (t + 1.0)));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6.3d+74)) then
tmp = x - a
else if (z <= (-200.0d0)) then
tmp = x + (a * ((z - y) / t))
else if (z <= (-0.00125d0)) then
tmp = a * ((z - y) / (1.0d0 - z))
else if (z <= 29000000000000.0d0) then
tmp = x - (y * (a / (t + 1.0d0)))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.3e+74) {
tmp = x - a;
} else if (z <= -200.0) {
tmp = x + (a * ((z - y) / t));
} else if (z <= -0.00125) {
tmp = a * ((z - y) / (1.0 - z));
} else if (z <= 29000000000000.0) {
tmp = x - (y * (a / (t + 1.0)));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.3e+74: tmp = x - a elif z <= -200.0: tmp = x + (a * ((z - y) / t)) elif z <= -0.00125: tmp = a * ((z - y) / (1.0 - z)) elif z <= 29000000000000.0: tmp = x - (y * (a / (t + 1.0))) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.3e+74) tmp = Float64(x - a); elseif (z <= -200.0) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); elseif (z <= -0.00125) tmp = Float64(a * Float64(Float64(z - y) / Float64(1.0 - z))); elseif (z <= 29000000000000.0) tmp = Float64(x - Float64(y * Float64(a / Float64(t + 1.0)))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.3e+74) tmp = x - a; elseif (z <= -200.0) tmp = x + (a * ((z - y) / t)); elseif (z <= -0.00125) tmp = a * ((z - y) / (1.0 - z)); elseif (z <= 29000000000000.0) tmp = x - (y * (a / (t + 1.0))); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.3e+74], N[(x - a), $MachinePrecision], If[LessEqual[z, -200.0], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -0.00125], N[(a * N[(N[(z - y), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 29000000000000.0], N[(x - N[(y * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.3 \cdot 10^{+74}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -200:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{elif}\;z \leq -0.00125:\\
\;\;\;\;a \cdot \frac{z - y}{1 - z}\\
\mathbf{elif}\;z \leq 29000000000000:\\
\;\;\;\;x - y \cdot \frac{a}{t + 1}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -6.30000000000000016e74 or 2.9e13 < z Initial program 97.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 85.3%
if -6.30000000000000016e74 < z < -200Initial program 99.9%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 75.5%
if -200 < z < -0.00125000000000000003Initial program 99.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 100.0%
Taylor expanded in x around 0 99.5%
associate-*r/100.0%
associate-*r*100.0%
mul-1-neg100.0%
Simplified100.0%
if -0.00125000000000000003 < z < 2.9e13Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.5%
associate-/l*93.7%
associate-/r/93.7%
Simplified93.7%
Final simplification88.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* a (/ (- z y) t)))))
(if (<= t -2e+60)
t_1
(if (<= t 4e+18)
(- x (* a (/ (- y z) (- 1.0 z))))
(if (<= t 1.5e+64) t_1 (+ x (* a (/ z (+ (- t z) 1.0)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a * ((z - y) / t));
double tmp;
if (t <= -2e+60) {
tmp = t_1;
} else if (t <= 4e+18) {
tmp = x - (a * ((y - z) / (1.0 - z)));
} else if (t <= 1.5e+64) {
tmp = t_1;
} else {
tmp = x + (a * (z / ((t - z) + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (a * ((z - y) / t))
if (t <= (-2d+60)) then
tmp = t_1
else if (t <= 4d+18) then
tmp = x - (a * ((y - z) / (1.0d0 - z)))
else if (t <= 1.5d+64) then
tmp = t_1
else
tmp = x + (a * (z / ((t - z) + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a * ((z - y) / t));
double tmp;
if (t <= -2e+60) {
tmp = t_1;
} else if (t <= 4e+18) {
tmp = x - (a * ((y - z) / (1.0 - z)));
} else if (t <= 1.5e+64) {
tmp = t_1;
} else {
tmp = x + (a * (z / ((t - z) + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a * ((z - y) / t)) tmp = 0 if t <= -2e+60: tmp = t_1 elif t <= 4e+18: tmp = x - (a * ((y - z) / (1.0 - z))) elif t <= 1.5e+64: tmp = t_1 else: tmp = x + (a * (z / ((t - z) + 1.0))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a * Float64(Float64(z - y) / t))) tmp = 0.0 if (t <= -2e+60) tmp = t_1; elseif (t <= 4e+18) tmp = Float64(x - Float64(a * Float64(Float64(y - z) / Float64(1.0 - z)))); elseif (t <= 1.5e+64) tmp = t_1; else tmp = Float64(x + Float64(a * Float64(z / Float64(Float64(t - z) + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a * ((z - y) / t)); tmp = 0.0; if (t <= -2e+60) tmp = t_1; elseif (t <= 4e+18) tmp = x - (a * ((y - z) / (1.0 - z))); elseif (t <= 1.5e+64) tmp = t_1; else tmp = x + (a * (z / ((t - z) + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e+60], t$95$1, If[LessEqual[t, 4e+18], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.5e+64], t$95$1, N[(x + N[(a * N[(z / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \frac{z - y}{t}\\
\mathbf{if}\;t \leq -2 \cdot 10^{+60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4 \cdot 10^{+18}:\\
\;\;\;\;x - a \cdot \frac{y - z}{1 - z}\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{z}{\left(t - z\right) + 1}\\
\end{array}
\end{array}
if t < -1.9999999999999999e60 or 4e18 < t < 1.5000000000000001e64Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 91.4%
if -1.9999999999999999e60 < t < 4e18Initial program 98.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 99.1%
if 1.5000000000000001e64 < t Initial program 99.9%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in y around 0 93.5%
associate--l+93.5%
+-commutative93.5%
associate-*r/93.5%
neg-mul-193.5%
+-commutative93.5%
Simplified93.5%
Final simplification96.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* a (/ (- z y) t)))))
(if (<= t -6.2e+59)
t_1
(if (<= t 2.7e+19)
(- x (* a (/ (- y z) (- 1.0 z))))
(if (<= t 1.95e+64) t_1 (- x (/ a (/ (+ z (- -1.0 t)) z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a * ((z - y) / t));
double tmp;
if (t <= -6.2e+59) {
tmp = t_1;
} else if (t <= 2.7e+19) {
tmp = x - (a * ((y - z) / (1.0 - z)));
} else if (t <= 1.95e+64) {
tmp = t_1;
} else {
tmp = x - (a / ((z + (-1.0 - t)) / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (a * ((z - y) / t))
if (t <= (-6.2d+59)) then
tmp = t_1
else if (t <= 2.7d+19) then
tmp = x - (a * ((y - z) / (1.0d0 - z)))
else if (t <= 1.95d+64) then
tmp = t_1
else
tmp = x - (a / ((z + ((-1.0d0) - t)) / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a * ((z - y) / t));
double tmp;
if (t <= -6.2e+59) {
tmp = t_1;
} else if (t <= 2.7e+19) {
tmp = x - (a * ((y - z) / (1.0 - z)));
} else if (t <= 1.95e+64) {
tmp = t_1;
} else {
tmp = x - (a / ((z + (-1.0 - t)) / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a * ((z - y) / t)) tmp = 0 if t <= -6.2e+59: tmp = t_1 elif t <= 2.7e+19: tmp = x - (a * ((y - z) / (1.0 - z))) elif t <= 1.95e+64: tmp = t_1 else: tmp = x - (a / ((z + (-1.0 - t)) / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a * Float64(Float64(z - y) / t))) tmp = 0.0 if (t <= -6.2e+59) tmp = t_1; elseif (t <= 2.7e+19) tmp = Float64(x - Float64(a * Float64(Float64(y - z) / Float64(1.0 - z)))); elseif (t <= 1.95e+64) tmp = t_1; else tmp = Float64(x - Float64(a / Float64(Float64(z + Float64(-1.0 - t)) / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a * ((z - y) / t)); tmp = 0.0; if (t <= -6.2e+59) tmp = t_1; elseif (t <= 2.7e+19) tmp = x - (a * ((y - z) / (1.0 - z))); elseif (t <= 1.95e+64) tmp = t_1; else tmp = x - (a / ((z + (-1.0 - t)) / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+59], t$95$1, If[LessEqual[t, 2.7e+19], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.95e+64], t$95$1, N[(x - N[(a / N[(N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot \frac{z - y}{t}\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{+19}:\\
\;\;\;\;x - a \cdot \frac{y - z}{1 - z}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{z + \left(-1 - t\right)}{z}}\\
\end{array}
\end{array}
if t < -6.20000000000000029e59 or 2.7e19 < t < 1.9499999999999999e64Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 91.4%
if -6.20000000000000029e59 < t < 2.7e19Initial program 98.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 99.1%
if 1.9499999999999999e64 < t Initial program 99.9%
associate-/r/99.8%
Simplified99.8%
associate-*l/86.1%
*-commutative86.1%
associate-/l*99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 93.5%
mul-1-neg93.5%
Simplified93.5%
Final simplification96.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.2e+59) (not (<= t 3.5e+19))) (+ x (* a (/ (- z y) t))) (- x (* a (/ (- y z) (- 1.0 z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.2e+59) || !(t <= 3.5e+19)) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x - (a * ((y - z) / (1.0 - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-6.2d+59)) .or. (.not. (t <= 3.5d+19))) then
tmp = x + (a * ((z - y) / t))
else
tmp = x - (a * ((y - z) / (1.0d0 - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.2e+59) || !(t <= 3.5e+19)) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x - (a * ((y - z) / (1.0 - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.2e+59) or not (t <= 3.5e+19): tmp = x + (a * ((z - y) / t)) else: tmp = x - (a * ((y - z) / (1.0 - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.2e+59) || !(t <= 3.5e+19)) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); else tmp = Float64(x - Float64(a * Float64(Float64(y - z) / Float64(1.0 - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.2e+59) || ~((t <= 3.5e+19))) tmp = x + (a * ((z - y) / t)); else tmp = x - (a * ((y - z) / (1.0 - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.2e+59], N[Not[LessEqual[t, 3.5e+19]], $MachinePrecision]], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+59} \lor \neg \left(t \leq 3.5 \cdot 10^{+19}\right):\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{y - z}{1 - z}\\
\end{array}
\end{array}
if t < -6.20000000000000029e59 or 3.5e19 < t Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 86.8%
if -6.20000000000000029e59 < t < 3.5e19Initial program 98.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 99.1%
Final simplification93.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.1e+62) (not (<= z 320000000000.0))) (- x a) (- x (* y (/ a (+ t 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.1e+62) || !(z <= 320000000000.0)) {
tmp = x - a;
} else {
tmp = x - (y * (a / (t + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.1d+62)) .or. (.not. (z <= 320000000000.0d0))) then
tmp = x - a
else
tmp = x - (y * (a / (t + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.1e+62) || !(z <= 320000000000.0)) {
tmp = x - a;
} else {
tmp = x - (y * (a / (t + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.1e+62) or not (z <= 320000000000.0): tmp = x - a else: tmp = x - (y * (a / (t + 1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.1e+62) || !(z <= 320000000000.0)) tmp = Float64(x - a); else tmp = Float64(x - Float64(y * Float64(a / Float64(t + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.1e+62) || ~((z <= 320000000000.0))) tmp = x - a; else tmp = x - (y * (a / (t + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.1e+62], N[Not[LessEqual[z, 320000000000.0]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+62} \lor \neg \left(z \leq 320000000000\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a}{t + 1}\\
\end{array}
\end{array}
if z < -1.10000000000000007e62 or 3.2e11 < z Initial program 97.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 84.1%
if -1.10000000000000007e62 < z < 3.2e11Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 85.1%
associate-/l*89.1%
associate-/r/89.2%
Simplified89.2%
Final simplification86.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3e+21) (not (<= z 1.8e-30))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3e+21) || !(z <= 1.8e-30)) {
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 <= (-3d+21)) .or. (.not. (z <= 1.8d-30))) 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 <= -3e+21) || !(z <= 1.8e-30)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3e+21) or not (z <= 1.8e-30): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3e+21) || !(z <= 1.8e-30)) 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 <= -3e+21) || ~((z <= 1.8e-30))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3e+21], N[Not[LessEqual[z, 1.8e-30]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+21} \lor \neg \left(z \leq 1.8 \cdot 10^{-30}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -3e21 or 1.8000000000000002e-30 < z Initial program 98.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.5%
if -3e21 < z < 1.8000000000000002e-30Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 76.0%
Taylor expanded in z around 0 71.2%
Final simplification75.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.8e-7) (not (<= z 3.6e+15))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.8e-7) || !(z <= 3.6e+15)) {
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 <= (-2.8d-7)) .or. (.not. (z <= 3.6d+15))) 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 <= -2.8e-7) || !(z <= 3.6e+15)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.8e-7) or not (z <= 3.6e+15): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.8e-7) || !(z <= 3.6e+15)) 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 <= -2.8e-7) || ~((z <= 3.6e+15))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.8e-7], N[Not[LessEqual[z, 3.6e+15]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{-7} \lor \neg \left(z \leq 3.6 \cdot 10^{+15}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -2.80000000000000019e-7 or 3.6e15 < z Initial program 98.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 79.0%
if -2.80000000000000019e-7 < z < 3.6e15Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 74.6%
Taylor expanded in x around inf 58.5%
Final simplification69.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.8e+46) (- a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.8e+46) {
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 (a <= (-2.8d+46)) 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 (a <= -2.8e+46) {
tmp = -a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.8e+46: tmp = -a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.8e+46) tmp = Float64(-a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.8e+46) tmp = -a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.8e+46], (-a), x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.8 \cdot 10^{+46}:\\
\;\;\;\;-a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.80000000000000018e46Initial program 99.7%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around 0 70.5%
Taylor expanded in x around 0 31.4%
associate-*r/58.3%
associate-*r*58.3%
mul-1-neg58.3%
Simplified58.3%
Taylor expanded in z around inf 36.0%
mul-1-neg36.0%
Simplified36.0%
if -2.80000000000000018e46 < a Initial program 98.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in t around 0 83.8%
Taylor expanded in x around inf 60.9%
Final simplification55.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 98.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 80.7%
Taylor expanded in x around inf 50.2%
Final simplification50.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 2023301
(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))))