
(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 (+ 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.2%
associate-/r/99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (- y z) (/ a t)))) (t_2 (+ x (/ a (/ z (- y z))))))
(if (<= z -5e-5)
t_2
(if (<= z 5.2e-258)
t_1
(if (<= z 2.65e-77) (- x (* y a)) (if (<= z 7200000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y - z) * (a / t));
double t_2 = x + (a / (z / (y - z)));
double tmp;
if (z <= -5e-5) {
tmp = t_2;
} else if (z <= 5.2e-258) {
tmp = t_1;
} else if (z <= 2.65e-77) {
tmp = x - (y * a);
} else if (z <= 7200000000.0) {
tmp = t_1;
} 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 - z) * (a / t))
t_2 = x + (a / (z / (y - z)))
if (z <= (-5d-5)) then
tmp = t_2
else if (z <= 5.2d-258) then
tmp = t_1
else if (z <= 2.65d-77) then
tmp = x - (y * a)
else if (z <= 7200000000.0d0) then
tmp = t_1
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 - z) * (a / t));
double t_2 = x + (a / (z / (y - z)));
double tmp;
if (z <= -5e-5) {
tmp = t_2;
} else if (z <= 5.2e-258) {
tmp = t_1;
} else if (z <= 2.65e-77) {
tmp = x - (y * a);
} else if (z <= 7200000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((y - z) * (a / t)) t_2 = x + (a / (z / (y - z))) tmp = 0 if z <= -5e-5: tmp = t_2 elif z <= 5.2e-258: tmp = t_1 elif z <= 2.65e-77: tmp = x - (y * a) elif z <= 7200000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y - z) * Float64(a / t))) t_2 = Float64(x + Float64(a / Float64(z / Float64(y - z)))) tmp = 0.0 if (z <= -5e-5) tmp = t_2; elseif (z <= 5.2e-258) tmp = t_1; elseif (z <= 2.65e-77) tmp = Float64(x - Float64(y * a)); elseif (z <= 7200000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((y - z) * (a / t)); t_2 = x + (a / (z / (y - z))); tmp = 0.0; if (z <= -5e-5) tmp = t_2; elseif (z <= 5.2e-258) tmp = t_1; elseif (z <= 2.65e-77) tmp = x - (y * a); elseif (z <= 7200000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(a / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5e-5], t$95$2, If[LessEqual[z, 5.2e-258], t$95$1, If[LessEqual[z, 2.65e-77], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7200000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \left(y - z\right) \cdot \frac{a}{t}\\
t_2 := x + \frac{a}{\frac{z}{y - z}}\\
\mathbf{if}\;z \leq -5 \cdot 10^{-5}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-258}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.65 \cdot 10^{-77}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 7200000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -5.00000000000000024e-5 or 7.2e9 < z Initial program 97.2%
Taylor expanded in z around inf 85.0%
mul-1-neg85.0%
distribute-neg-frac85.0%
Simplified85.0%
Taylor expanded in x around 0 63.3%
+-commutative63.3%
associate-/l*87.4%
Simplified87.4%
if -5.00000000000000024e-5 < z < 5.20000000000000036e-258 or 2.65000000000000007e-77 < z < 7.2e9Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 72.4%
associate-/l*77.5%
associate-/r/76.5%
Simplified76.5%
if 5.20000000000000036e-258 < z < 2.65000000000000007e-77Initial program 97.2%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 94.5%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in t around 0 80.4%
Final simplification82.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (/ z (- y z))))))
(if (<= z -4.8e-5)
t_1
(if (<= z 5.7e-258)
(- x (* (- y z) (/ a t)))
(if (<= z 6.1e-77)
(- x (* y a))
(if (<= z 29000000000.0) (+ x (* a (/ (- z y) t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / (z / (y - z)));
double tmp;
if (z <= -4.8e-5) {
tmp = t_1;
} else if (z <= 5.7e-258) {
tmp = x - ((y - z) * (a / t));
} else if (z <= 6.1e-77) {
tmp = x - (y * a);
} else if (z <= 29000000000.0) {
tmp = x + (a * ((z - y) / t));
} 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 + (a / (z / (y - z)))
if (z <= (-4.8d-5)) then
tmp = t_1
else if (z <= 5.7d-258) then
tmp = x - ((y - z) * (a / t))
else if (z <= 6.1d-77) then
tmp = x - (y * a)
else if (z <= 29000000000.0d0) then
tmp = x + (a * ((z - y) / t))
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 + (a / (z / (y - z)));
double tmp;
if (z <= -4.8e-5) {
tmp = t_1;
} else if (z <= 5.7e-258) {
tmp = x - ((y - z) * (a / t));
} else if (z <= 6.1e-77) {
tmp = x - (y * a);
} else if (z <= 29000000000.0) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / (z / (y - z))) tmp = 0 if z <= -4.8e-5: tmp = t_1 elif z <= 5.7e-258: tmp = x - ((y - z) * (a / t)) elif z <= 6.1e-77: tmp = x - (y * a) elif z <= 29000000000.0: tmp = x + (a * ((z - y) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(z / Float64(y - z)))) tmp = 0.0 if (z <= -4.8e-5) tmp = t_1; elseif (z <= 5.7e-258) tmp = Float64(x - Float64(Float64(y - z) * Float64(a / t))); elseif (z <= 6.1e-77) tmp = Float64(x - Float64(y * a)); elseif (z <= 29000000000.0) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / (z / (y - z))); tmp = 0.0; if (z <= -4.8e-5) tmp = t_1; elseif (z <= 5.7e-258) tmp = x - ((y - z) * (a / t)); elseif (z <= 6.1e-77) tmp = x - (y * a); elseif (z <= 29000000000.0) tmp = x + (a * ((z - y) / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e-5], t$95$1, If[LessEqual[z, 5.7e-258], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.1e-77], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 29000000000.0], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{\frac{z}{y - z}}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{-5}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{-258}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{t}\\
\mathbf{elif}\;z \leq 6.1 \cdot 10^{-77}:\\
\;\;\;\;x - y \cdot a\\
\mathbf{elif}\;z \leq 29000000000:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.8000000000000001e-5 or 2.9e10 < z Initial program 97.2%
Taylor expanded in z around inf 85.0%
mul-1-neg85.0%
distribute-neg-frac85.0%
Simplified85.0%
Taylor expanded in x around 0 63.3%
+-commutative63.3%
associate-/l*87.4%
Simplified87.4%
if -4.8000000000000001e-5 < z < 5.7000000000000002e-258Initial program 100.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 73.2%
associate-/l*79.6%
associate-/r/78.4%
Simplified78.4%
if 5.7000000000000002e-258 < z < 6.1000000000000002e-77Initial program 97.2%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around 0 94.5%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in t around 0 80.4%
if 6.1000000000000002e-77 < z < 2.9e10Initial program 99.6%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 69.5%
Final simplification82.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ a (/ z (- y z))))))
(if (<= z -0.000205)
t_1
(if (<= z 8.4e-254)
(- x (/ a (/ t y)))
(if (<= z 1.15) (- x (* y a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (a / (z / (y - z)));
double tmp;
if (z <= -0.000205) {
tmp = t_1;
} else if (z <= 8.4e-254) {
tmp = x - (a / (t / y));
} else if (z <= 1.15) {
tmp = x - (y * a);
} 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 + (a / (z / (y - z)))
if (z <= (-0.000205d0)) then
tmp = t_1
else if (z <= 8.4d-254) then
tmp = x - (a / (t / y))
else if (z <= 1.15d0) then
tmp = x - (y * a)
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 + (a / (z / (y - z)));
double tmp;
if (z <= -0.000205) {
tmp = t_1;
} else if (z <= 8.4e-254) {
tmp = x - (a / (t / y));
} else if (z <= 1.15) {
tmp = x - (y * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (a / (z / (y - z))) tmp = 0 if z <= -0.000205: tmp = t_1 elif z <= 8.4e-254: tmp = x - (a / (t / y)) elif z <= 1.15: tmp = x - (y * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(a / Float64(z / Float64(y - z)))) tmp = 0.0 if (z <= -0.000205) tmp = t_1; elseif (z <= 8.4e-254) tmp = Float64(x - Float64(a / Float64(t / y))); elseif (z <= 1.15) tmp = Float64(x - Float64(y * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (a / (z / (y - z))); tmp = 0.0; if (z <= -0.000205) tmp = t_1; elseif (z <= 8.4e-254) tmp = x - (a / (t / y)); elseif (z <= 1.15) tmp = x - (y * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(a / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -0.000205], t$95$1, If[LessEqual[z, 8.4e-254], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.15], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{a}{\frac{z}{y - z}}\\
\mathbf{if}\;z \leq -0.000205:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-254}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq 1.15:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.05e-4 or 1.1499999999999999 < z Initial program 97.3%
Taylor expanded in z around inf 83.4%
mul-1-neg83.4%
distribute-neg-frac83.4%
Simplified83.4%
Taylor expanded in x around 0 62.0%
+-commutative62.0%
associate-/l*85.7%
Simplified85.7%
if -2.05e-4 < z < 8.39999999999999987e-254Initial program 100.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 84.3%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in t around inf 71.9%
associate-/l*77.0%
Simplified77.0%
if 8.39999999999999987e-254 < z < 1.1499999999999999Initial program 97.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 87.0%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in t around 0 71.5%
Final simplification80.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6e+25)
(+ x (* a (/ (- z y) t)))
(if (<= t -1e-80)
(+ x (/ a (/ z (- y z))))
(if (<= t 1.8e+55)
(- x (/ a (/ (+ z -1.0) z)))
(- x (* (- y z) (/ a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e+25) {
tmp = x + (a * ((z - y) / t));
} else if (t <= -1e-80) {
tmp = x + (a / (z / (y - z)));
} else if (t <= 1.8e+55) {
tmp = x - (a / ((z + -1.0) / z));
} else {
tmp = x - ((y - z) * (a / 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 (t <= (-6d+25)) then
tmp = x + (a * ((z - y) / t))
else if (t <= (-1d-80)) then
tmp = x + (a / (z / (y - z)))
else if (t <= 1.8d+55) then
tmp = x - (a / ((z + (-1.0d0)) / z))
else
tmp = x - ((y - z) * (a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e+25) {
tmp = x + (a * ((z - y) / t));
} else if (t <= -1e-80) {
tmp = x + (a / (z / (y - z)));
} else if (t <= 1.8e+55) {
tmp = x - (a / ((z + -1.0) / z));
} else {
tmp = x - ((y - z) * (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6e+25: tmp = x + (a * ((z - y) / t)) elif t <= -1e-80: tmp = x + (a / (z / (y - z))) elif t <= 1.8e+55: tmp = x - (a / ((z + -1.0) / z)) else: tmp = x - ((y - z) * (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6e+25) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); elseif (t <= -1e-80) tmp = Float64(x + Float64(a / Float64(z / Float64(y - z)))); elseif (t <= 1.8e+55) tmp = Float64(x - Float64(a / Float64(Float64(z + -1.0) / z))); else tmp = Float64(x - Float64(Float64(y - z) * Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6e+25) tmp = x + (a * ((z - y) / t)); elseif (t <= -1e-80) tmp = x + (a / (z / (y - z))); elseif (t <= 1.8e+55) tmp = x - (a / ((z + -1.0) / z)); else tmp = x - ((y - z) * (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6e+25], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1e-80], N[(x + N[(a / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+55], N[(x - N[(a / N[(N[(z + -1.0), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+25}:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-80}:\\
\;\;\;\;x + \frac{a}{\frac{z}{y - z}}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+55}:\\
\;\;\;\;x - \frac{a}{\frac{z + -1}{z}}\\
\mathbf{else}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{t}\\
\end{array}
\end{array}
if t < -6.00000000000000011e25Initial program 99.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 86.0%
if -6.00000000000000011e25 < t < -9.99999999999999961e-81Initial program 98.5%
Taylor expanded in z around inf 73.1%
mul-1-neg73.1%
distribute-neg-frac73.1%
Simplified73.1%
Taylor expanded in x around 0 58.2%
+-commutative58.2%
associate-/l*74.3%
Simplified74.3%
if -9.99999999999999961e-81 < t < 1.79999999999999994e55Initial program 97.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 82.4%
associate-/l*97.9%
Simplified97.9%
Taylor expanded in y around 0 81.8%
associate-*r/81.8%
neg-mul-181.8%
neg-sub081.8%
associate--r-81.8%
metadata-eval81.8%
Simplified81.8%
if 1.79999999999999994e55 < t Initial program 98.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 74.6%
associate-/l*84.0%
associate-/r/85.4%
Simplified85.4%
Final simplification82.9%
(FPCore (x y z t a)
:precision binary64
(if (<= t -2.5e+26)
(+ x (* a (/ (- z y) t)))
(if (<= t 2e+53)
(- x (* a (/ (- y z) (- 1.0 z))))
(- x (* (- y z) (/ a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.5e+26) {
tmp = x + (a * ((z - y) / t));
} else if (t <= 2e+53) {
tmp = x - (a * ((y - z) / (1.0 - z)));
} else {
tmp = x - ((y - z) * (a / 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 (t <= (-2.5d+26)) then
tmp = x + (a * ((z - y) / t))
else if (t <= 2d+53) then
tmp = x - (a * ((y - z) / (1.0d0 - z)))
else
tmp = x - ((y - z) * (a / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.5e+26) {
tmp = x + (a * ((z - y) / t));
} else if (t <= 2e+53) {
tmp = x - (a * ((y - z) / (1.0 - z)));
} else {
tmp = x - ((y - z) * (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.5e+26: tmp = x + (a * ((z - y) / t)) elif t <= 2e+53: tmp = x - (a * ((y - z) / (1.0 - z))) else: tmp = x - ((y - z) * (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.5e+26) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); elseif (t <= 2e+53) tmp = Float64(x - Float64(a * Float64(Float64(y - z) / Float64(1.0 - z)))); else tmp = Float64(x - Float64(Float64(y - z) * Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.5e+26) tmp = x + (a * ((z - y) / t)); elseif (t <= 2e+53) tmp = x - (a * ((y - z) / (1.0 - z))); else tmp = x - ((y - z) * (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.5e+26], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e+53], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+26}:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+53}:\\
\;\;\;\;x - a \cdot \frac{y - z}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{t}\\
\end{array}
\end{array}
if t < -2.5e26Initial program 99.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 86.0%
if -2.5e26 < t < 2e53Initial program 97.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 97.5%
if 2e53 < t Initial program 98.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 74.6%
associate-/l*84.0%
associate-/r/85.4%
Simplified85.4%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -46000000000000.0)
(- x (* a (/ (- y z) (- 1.0 z))))
(if (<= z 4000000000.0)
(- x (/ (- y z) (/ (+ t 1.0) a)))
(- x (/ a (/ (- 1.0 z) (- y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -46000000000000.0) {
tmp = x - (a * ((y - z) / (1.0 - z)));
} else if (z <= 4000000000.0) {
tmp = x - ((y - z) / ((t + 1.0) / a));
} else {
tmp = x - (a / ((1.0 - z) / (y - 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 (z <= (-46000000000000.0d0)) then
tmp = x - (a * ((y - z) / (1.0d0 - z)))
else if (z <= 4000000000.0d0) then
tmp = x - ((y - z) / ((t + 1.0d0) / a))
else
tmp = x - (a / ((1.0d0 - z) / (y - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -46000000000000.0) {
tmp = x - (a * ((y - z) / (1.0 - z)));
} else if (z <= 4000000000.0) {
tmp = x - ((y - z) / ((t + 1.0) / a));
} else {
tmp = x - (a / ((1.0 - z) / (y - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -46000000000000.0: tmp = x - (a * ((y - z) / (1.0 - z))) elif z <= 4000000000.0: tmp = x - ((y - z) / ((t + 1.0) / a)) else: tmp = x - (a / ((1.0 - z) / (y - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -46000000000000.0) tmp = Float64(x - Float64(a * Float64(Float64(y - z) / Float64(1.0 - z)))); elseif (z <= 4000000000.0) tmp = Float64(x - Float64(Float64(y - z) / Float64(Float64(t + 1.0) / a))); else tmp = Float64(x - Float64(a / Float64(Float64(1.0 - z) / Float64(y - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -46000000000000.0) tmp = x - (a * ((y - z) / (1.0 - z))); elseif (z <= 4000000000.0) tmp = x - ((y - z) / ((t + 1.0) / a)); else tmp = x - (a / ((1.0 - z) / (y - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -46000000000000.0], N[(x - N[(a * N[(N[(y - z), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4000000000.0], N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(t + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a / N[(N[(1.0 - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -46000000000000:\\
\;\;\;\;x - a \cdot \frac{y - z}{1 - z}\\
\mathbf{elif}\;z \leq 4000000000:\\
\;\;\;\;x - \frac{y - z}{\frac{t + 1}{a}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{1 - z}{y - z}}\\
\end{array}
\end{array}
if z < -4.6e13Initial program 96.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around 0 87.7%
if -4.6e13 < z < 4e9Initial program 99.2%
Taylor expanded in z around 0 97.4%
if 4e9 < z Initial program 97.7%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around 0 58.9%
associate-/l*89.1%
Simplified89.1%
Final simplification93.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.7e+92)
(- x a)
(if (<= z -1.36e-6)
(+ x (* y (/ a z)))
(if (<= z 6.5e-258)
(+ x (/ a (/ t z)))
(if (<= z 205.0) (- x (* y a)) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.7e+92) {
tmp = x - a;
} else if (z <= -1.36e-6) {
tmp = x + (y * (a / z));
} else if (z <= 6.5e-258) {
tmp = x + (a / (t / z));
} else if (z <= 205.0) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4.7d+92)) then
tmp = x - a
else if (z <= (-1.36d-6)) then
tmp = x + (y * (a / z))
else if (z <= 6.5d-258) then
tmp = x + (a / (t / z))
else if (z <= 205.0d0) then
tmp = x - (y * a)
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.7e+92) {
tmp = x - a;
} else if (z <= -1.36e-6) {
tmp = x + (y * (a / z));
} else if (z <= 6.5e-258) {
tmp = x + (a / (t / z));
} else if (z <= 205.0) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.7e+92: tmp = x - a elif z <= -1.36e-6: tmp = x + (y * (a / z)) elif z <= 6.5e-258: tmp = x + (a / (t / z)) elif z <= 205.0: tmp = x - (y * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.7e+92) tmp = Float64(x - a); elseif (z <= -1.36e-6) tmp = Float64(x + Float64(y * Float64(a / z))); elseif (z <= 6.5e-258) tmp = Float64(x + Float64(a / Float64(t / z))); elseif (z <= 205.0) tmp = Float64(x - Float64(y * a)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.7e+92) tmp = x - a; elseif (z <= -1.36e-6) tmp = x + (y * (a / z)); elseif (z <= 6.5e-258) tmp = x + (a / (t / z)); elseif (z <= 205.0) tmp = x - (y * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.7e+92], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.36e-6], N[(x + N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e-258], N[(x + N[(a / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 205.0], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+92}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.36 \cdot 10^{-6}:\\
\;\;\;\;x + y \cdot \frac{a}{z}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-258}:\\
\;\;\;\;x + \frac{a}{\frac{t}{z}}\\
\mathbf{elif}\;z \leq 205:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -4.7e92 or 205 < z Initial program 96.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 76.7%
if -4.7e92 < z < -1.3599999999999999e-6Initial program 99.9%
Taylor expanded in z around inf 80.0%
mul-1-neg80.0%
distribute-neg-frac80.0%
Simplified80.0%
Taylor expanded in y around inf 75.3%
mul-1-neg75.3%
*-commutative75.3%
associate-*r/81.9%
distribute-rgt-neg-in81.9%
distribute-neg-frac81.9%
Simplified81.9%
*-commutative81.9%
distribute-frac-neg81.9%
cancel-sign-sub81.9%
*-commutative81.9%
add-sqr-sqrt32.6%
sqrt-unprod62.3%
sqr-neg62.3%
distribute-frac-neg62.3%
distribute-frac-neg62.3%
sqrt-unprod37.2%
add-sqr-sqrt66.2%
+-commutative66.2%
Applied egg-rr81.9%
if -1.3599999999999999e-6 < z < 6.5000000000000002e-258Initial program 100.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 78.3%
Taylor expanded in y around 0 65.5%
sub-neg65.5%
mul-1-neg65.5%
remove-double-neg65.5%
associate-/l*65.3%
Simplified65.3%
if 6.5000000000000002e-258 < z < 205Initial program 97.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 87.0%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in t around 0 71.5%
Final simplification73.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.9e+93)
(- x a)
(if (<= z -2.5e-11)
(+ x (* y (/ a z)))
(if (<= z 5.8e-257)
(- x (* a (/ y t)))
(if (<= z 0.0225) (- x (* y a)) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e+93) {
tmp = x - a;
} else if (z <= -2.5e-11) {
tmp = x + (y * (a / z));
} else if (z <= 5.8e-257) {
tmp = x - (a * (y / t));
} else if (z <= 0.0225) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.9d+93)) then
tmp = x - a
else if (z <= (-2.5d-11)) then
tmp = x + (y * (a / z))
else if (z <= 5.8d-257) then
tmp = x - (a * (y / t))
else if (z <= 0.0225d0) then
tmp = x - (y * a)
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.9e+93) {
tmp = x - a;
} else if (z <= -2.5e-11) {
tmp = x + (y * (a / z));
} else if (z <= 5.8e-257) {
tmp = x - (a * (y / t));
} else if (z <= 0.0225) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.9e+93: tmp = x - a elif z <= -2.5e-11: tmp = x + (y * (a / z)) elif z <= 5.8e-257: tmp = x - (a * (y / t)) elif z <= 0.0225: tmp = x - (y * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.9e+93) tmp = Float64(x - a); elseif (z <= -2.5e-11) tmp = Float64(x + Float64(y * Float64(a / z))); elseif (z <= 5.8e-257) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (z <= 0.0225) tmp = Float64(x - Float64(y * a)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.9e+93) tmp = x - a; elseif (z <= -2.5e-11) tmp = x + (y * (a / z)); elseif (z <= 5.8e-257) tmp = x - (a * (y / t)); elseif (z <= 0.0225) tmp = x - (y * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.9e+93], N[(x - a), $MachinePrecision], If[LessEqual[z, -2.5e-11], N[(x + N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-257], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.0225], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+93}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-11}:\\
\;\;\;\;x + y \cdot \frac{a}{z}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-257}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 0.0225:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.8999999999999999e93 or 0.022499999999999999 < z Initial program 96.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 76.7%
if -1.8999999999999999e93 < z < -2.50000000000000009e-11Initial program 99.9%
Taylor expanded in z around inf 77.2%
mul-1-neg77.2%
distribute-neg-frac77.2%
Simplified77.2%
Taylor expanded in y around inf 72.8%
mul-1-neg72.8%
*-commutative72.8%
associate-*r/79.2%
distribute-rgt-neg-in79.2%
distribute-neg-frac79.2%
Simplified79.2%
*-commutative79.2%
distribute-frac-neg79.2%
cancel-sign-sub79.2%
*-commutative79.2%
add-sqr-sqrt31.6%
sqrt-unprod60.3%
sqr-neg60.3%
distribute-frac-neg60.3%
distribute-frac-neg60.3%
sqrt-unprod35.8%
add-sqr-sqrt63.9%
+-commutative63.9%
Applied egg-rr79.2%
if -2.50000000000000009e-11 < z < 5.8000000000000003e-257Initial program 100.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 78.0%
Taylor expanded in y around inf 76.4%
if 5.8000000000000003e-257 < z < 0.022499999999999999Initial program 97.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 87.0%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in t around 0 71.5%
Final simplification75.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.15e+99)
(- x a)
(if (<= z -6.5e-13)
(+ x (* y (/ a z)))
(if (<= z 2.55e-256)
(- x (/ a (/ t y)))
(if (<= z 0.185) (- x (* y a)) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+99) {
tmp = x - a;
} else if (z <= -6.5e-13) {
tmp = x + (y * (a / z));
} else if (z <= 2.55e-256) {
tmp = x - (a / (t / y));
} else if (z <= 0.185) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.15d+99)) then
tmp = x - a
else if (z <= (-6.5d-13)) then
tmp = x + (y * (a / z))
else if (z <= 2.55d-256) then
tmp = x - (a / (t / y))
else if (z <= 0.185d0) then
tmp = x - (y * a)
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.15e+99) {
tmp = x - a;
} else if (z <= -6.5e-13) {
tmp = x + (y * (a / z));
} else if (z <= 2.55e-256) {
tmp = x - (a / (t / y));
} else if (z <= 0.185) {
tmp = x - (y * a);
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.15e+99: tmp = x - a elif z <= -6.5e-13: tmp = x + (y * (a / z)) elif z <= 2.55e-256: tmp = x - (a / (t / y)) elif z <= 0.185: tmp = x - (y * a) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.15e+99) tmp = Float64(x - a); elseif (z <= -6.5e-13) tmp = Float64(x + Float64(y * Float64(a / z))); elseif (z <= 2.55e-256) tmp = Float64(x - Float64(a / Float64(t / y))); elseif (z <= 0.185) tmp = Float64(x - Float64(y * a)); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.15e+99) tmp = x - a; elseif (z <= -6.5e-13) tmp = x + (y * (a / z)); elseif (z <= 2.55e-256) tmp = x - (a / (t / y)); elseif (z <= 0.185) tmp = x - (y * a); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.15e+99], N[(x - a), $MachinePrecision], If[LessEqual[z, -6.5e-13], N[(x + N[(y * N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.55e-256], N[(x - N[(a / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.185], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{+99}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-13}:\\
\;\;\;\;x + y \cdot \frac{a}{z}\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-256}:\\
\;\;\;\;x - \frac{a}{\frac{t}{y}}\\
\mathbf{elif}\;z \leq 0.185:\\
\;\;\;\;x - y \cdot a\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.1500000000000001e99 or 0.185 < z Initial program 96.6%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 76.7%
if -1.1500000000000001e99 < z < -6.49999999999999957e-13Initial program 99.9%
Taylor expanded in z around inf 77.2%
mul-1-neg77.2%
distribute-neg-frac77.2%
Simplified77.2%
Taylor expanded in y around inf 72.8%
mul-1-neg72.8%
*-commutative72.8%
associate-*r/79.2%
distribute-rgt-neg-in79.2%
distribute-neg-frac79.2%
Simplified79.2%
*-commutative79.2%
distribute-frac-neg79.2%
cancel-sign-sub79.2%
*-commutative79.2%
add-sqr-sqrt31.6%
sqrt-unprod60.3%
sqr-neg60.3%
distribute-frac-neg60.3%
distribute-frac-neg60.3%
sqrt-unprod35.8%
add-sqr-sqrt63.9%
+-commutative63.9%
Applied egg-rr79.2%
if -6.49999999999999957e-13 < z < 2.55000000000000005e-256Initial program 100.0%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 85.3%
associate-/l*93.1%
Simplified93.1%
Taylor expanded in t around inf 72.5%
associate-/l*77.7%
Simplified77.7%
if 2.55000000000000005e-256 < z < 0.185Initial program 97.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 87.0%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in t around 0 71.5%
Final simplification76.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -9.5e+20) (not (<= z 1400000000.0))) (+ x (/ a (/ z (- y z)))) (- x (/ a (/ (+ t 1.0) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -9.5e+20) || !(z <= 1400000000.0)) {
tmp = x + (a / (z / (y - z)));
} else {
tmp = x - (a / ((t + 1.0) / y));
}
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+20)) .or. (.not. (z <= 1400000000.0d0))) then
tmp = x + (a / (z / (y - z)))
else
tmp = x - (a / ((t + 1.0d0) / y))
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+20) || !(z <= 1400000000.0)) {
tmp = x + (a / (z / (y - z)));
} else {
tmp = x - (a / ((t + 1.0) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -9.5e+20) or not (z <= 1400000000.0): tmp = x + (a / (z / (y - z))) else: tmp = x - (a / ((t + 1.0) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -9.5e+20) || !(z <= 1400000000.0)) tmp = Float64(x + Float64(a / Float64(z / Float64(y - z)))); else tmp = Float64(x - Float64(a / Float64(Float64(t + 1.0) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -9.5e+20) || ~((z <= 1400000000.0))) tmp = x + (a / (z / (y - z))); else tmp = x - (a / ((t + 1.0) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -9.5e+20], N[Not[LessEqual[z, 1400000000.0]], $MachinePrecision]], N[(x + N[(a / N[(z / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(a / N[(N[(t + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+20} \lor \neg \left(z \leq 1400000000\right):\\
\;\;\;\;x + \frac{a}{\frac{z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{t + 1}{y}}\\
\end{array}
\end{array}
if z < -9.5e20 or 1.4e9 < z Initial program 97.1%
Taylor expanded in z around inf 85.4%
mul-1-neg85.4%
distribute-neg-frac85.4%
Simplified85.4%
Taylor expanded in x around 0 62.2%
+-commutative62.2%
associate-/l*87.9%
Simplified87.9%
if -9.5e20 < z < 1.4e9Initial program 99.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 84.4%
associate-/l*89.3%
Simplified89.3%
Final simplification88.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8.8e+64) (not (<= z 0.00033))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.8e+64) || !(z <= 0.00033)) {
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 <= (-8.8d+64)) .or. (.not. (z <= 0.00033d0))) 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 <= -8.8e+64) || !(z <= 0.00033)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.8e+64) or not (z <= 0.00033): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.8e+64) || !(z <= 0.00033)) 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 <= -8.8e+64) || ~((z <= 0.00033))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8.8e+64], N[Not[LessEqual[z, 0.00033]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+64} \lor \neg \left(z \leq 0.00033\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -8.80000000000000007e64 or 3.3e-4 < z Initial program 96.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 74.7%
if -8.80000000000000007e64 < z < 3.3e-4Initial program 99.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 84.8%
associate-/l*89.3%
Simplified89.3%
Taylor expanded in t around 0 67.8%
Final simplification70.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.2e+22) (not (<= z 3400.0))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.2e+22) || !(z <= 3400.0)) {
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.2d+22)) .or. (.not. (z <= 3400.0d0))) 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.2e+22) || !(z <= 3400.0)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.2e+22) or not (z <= 3400.0): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.2e+22) || !(z <= 3400.0)) 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.2e+22) || ~((z <= 3400.0))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.2e+22], N[Not[LessEqual[z, 3400.0]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+22} \lor \neg \left(z \leq 3400\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.2e22 or 3400 < z Initial program 97.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 74.2%
if -1.2e22 < z < 3400Initial program 99.2%
Taylor expanded in z around inf 37.9%
mul-1-neg37.9%
distribute-neg-frac37.9%
Simplified37.9%
Taylor expanded in x around inf 63.1%
Final simplification68.5%
(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.2%
Taylor expanded in z around inf 60.5%
mul-1-neg60.5%
distribute-neg-frac60.5%
Simplified60.5%
Taylor expanded in x around inf 54.7%
Final simplification54.7%
(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 2024011
(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))))