
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a): return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a))) end
function tmp = code(x, y, z, t, a) tmp = x - ((y - z) / (((t - z) + 1.0) / a)); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}
(FPCore (x y z t a) :precision binary64 (fma (/ (- y z) (+ -1.0 (- z t))) a x))
double code(double x, double y, double z, double t, double a) {
return fma(((y - z) / (-1.0 + (z - t))), a, x);
}
function code(x, y, z, t, a) return fma(Float64(Float64(y - z) / Float64(-1.0 + Float64(z - t))), a, x) end
code[x_, y_, z_, t_, a_] := N[(N[(N[(y - z), $MachinePrecision] / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{y - z}{-1 + \left(z - t\right)}, a, x\right)
\end{array}
Initial program 98.8%
sub-neg98.8%
+-commutative98.8%
associate-/r/99.9%
distribute-lft-neg-in99.9%
fma-define99.9%
distribute-neg-frac299.9%
distribute-neg-in99.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ a (+ z -1.0)))))
(t_2 (- x (* a (/ y t))))
(t_3 (- x (* a (/ z (+ z -1.0))))))
(if (<= t -1350.0)
t_2
(if (<= t -2.06e-209)
t_1
(if (<= t -9.2e-266)
t_3
(if (<= t 3.9e-181)
t_1
(if (<= t 1.2e-94) t_3 (if (<= t 2.4e+14) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (a / (z + -1.0)));
double t_2 = x - (a * (y / t));
double t_3 = x - (a * (z / (z + -1.0)));
double tmp;
if (t <= -1350.0) {
tmp = t_2;
} else if (t <= -2.06e-209) {
tmp = t_1;
} else if (t <= -9.2e-266) {
tmp = t_3;
} else if (t <= 3.9e-181) {
tmp = t_1;
} else if (t <= 1.2e-94) {
tmp = t_3;
} else if (t <= 2.4e+14) {
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) :: t_3
real(8) :: tmp
t_1 = x + (y * (a / (z + (-1.0d0))))
t_2 = x - (a * (y / t))
t_3 = x - (a * (z / (z + (-1.0d0))))
if (t <= (-1350.0d0)) then
tmp = t_2
else if (t <= (-2.06d-209)) then
tmp = t_1
else if (t <= (-9.2d-266)) then
tmp = t_3
else if (t <= 3.9d-181) then
tmp = t_1
else if (t <= 1.2d-94) then
tmp = t_3
else if (t <= 2.4d+14) 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 * (a / (z + -1.0)));
double t_2 = x - (a * (y / t));
double t_3 = x - (a * (z / (z + -1.0)));
double tmp;
if (t <= -1350.0) {
tmp = t_2;
} else if (t <= -2.06e-209) {
tmp = t_1;
} else if (t <= -9.2e-266) {
tmp = t_3;
} else if (t <= 3.9e-181) {
tmp = t_1;
} else if (t <= 1.2e-94) {
tmp = t_3;
} else if (t <= 2.4e+14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (a / (z + -1.0))) t_2 = x - (a * (y / t)) t_3 = x - (a * (z / (z + -1.0))) tmp = 0 if t <= -1350.0: tmp = t_2 elif t <= -2.06e-209: tmp = t_1 elif t <= -9.2e-266: tmp = t_3 elif t <= 3.9e-181: tmp = t_1 elif t <= 1.2e-94: tmp = t_3 elif t <= 2.4e+14: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(a / Float64(z + -1.0)))) t_2 = Float64(x - Float64(a * Float64(y / t))) t_3 = Float64(x - Float64(a * Float64(z / Float64(z + -1.0)))) tmp = 0.0 if (t <= -1350.0) tmp = t_2; elseif (t <= -2.06e-209) tmp = t_1; elseif (t <= -9.2e-266) tmp = t_3; elseif (t <= 3.9e-181) tmp = t_1; elseif (t <= 1.2e-94) tmp = t_3; elseif (t <= 2.4e+14) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (a / (z + -1.0))); t_2 = x - (a * (y / t)); t_3 = x - (a * (z / (z + -1.0))); tmp = 0.0; if (t <= -1350.0) tmp = t_2; elseif (t <= -2.06e-209) tmp = t_1; elseif (t <= -9.2e-266) tmp = t_3; elseif (t <= 3.9e-181) tmp = t_1; elseif (t <= 1.2e-94) tmp = t_3; elseif (t <= 2.4e+14) 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[(y * N[(a / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(a * N[(z / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1350.0], t$95$2, If[LessEqual[t, -2.06e-209], t$95$1, If[LessEqual[t, -9.2e-266], t$95$3, If[LessEqual[t, 3.9e-181], t$95$1, If[LessEqual[t, 1.2e-94], t$95$3, If[LessEqual[t, 2.4e+14], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{a}{z + -1}\\
t_2 := x - a \cdot \frac{y}{t}\\
t_3 := x - a \cdot \frac{z}{z + -1}\\
\mathbf{if}\;t \leq -1350:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -2.06 \cdot 10^{-209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9.2 \cdot 10^{-266}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-181}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-94}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1350 or 2.4e14 < t Initial program 99.1%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 90.4%
Taylor expanded in y around inf 85.4%
if -1350 < t < -2.0600000000000001e-209 or -9.19999999999999986e-266 < t < 3.9e-181 or 1.2e-94 < t < 2.4e14Initial program 98.8%
Taylor expanded in t around 0 97.9%
Taylor expanded in y around inf 81.3%
*-commutative81.3%
associate-*r/82.9%
Simplified82.9%
if -2.0600000000000001e-209 < t < -9.19999999999999986e-266 or 3.9e-181 < t < 1.2e-94Initial program 97.3%
Taylor expanded in t around 0 97.3%
Taylor expanded in y around 0 62.0%
mul-1-neg62.0%
associate-/l*87.0%
distribute-rgt-neg-in87.0%
distribute-frac-neg287.0%
neg-sub087.0%
associate--r-87.0%
metadata-eval87.0%
Simplified87.0%
Final simplification84.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.95e+28)
(- x a)
(if (<= z 0.0135)
(+ x (* a (/ y (- -1.0 t))))
(if (<= z 7.2e+45)
(+ x (* y (/ a (+ z -1.0))))
(if (<= z 2.4e+74) (+ x (* a (/ z t))) (- x a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e+28) {
tmp = x - a;
} else if (z <= 0.0135) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 7.2e+45) {
tmp = x + (y * (a / (z + -1.0)));
} else if (z <= 2.4e+74) {
tmp = x + (a * (z / t));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.95d+28)) then
tmp = x - a
else if (z <= 0.0135d0) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else if (z <= 7.2d+45) then
tmp = x + (y * (a / (z + (-1.0d0))))
else if (z <= 2.4d+74) then
tmp = x + (a * (z / t))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.95e+28) {
tmp = x - a;
} else if (z <= 0.0135) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 7.2e+45) {
tmp = x + (y * (a / (z + -1.0)));
} else if (z <= 2.4e+74) {
tmp = x + (a * (z / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.95e+28: tmp = x - a elif z <= 0.0135: tmp = x + (a * (y / (-1.0 - t))) elif z <= 7.2e+45: tmp = x + (y * (a / (z + -1.0))) elif z <= 2.4e+74: tmp = x + (a * (z / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.95e+28) tmp = Float64(x - a); elseif (z <= 0.0135) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); elseif (z <= 7.2e+45) tmp = Float64(x + Float64(y * Float64(a / Float64(z + -1.0)))); elseif (z <= 2.4e+74) tmp = Float64(x + Float64(a * Float64(z / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.95e+28) tmp = x - a; elseif (z <= 0.0135) tmp = x + (a * (y / (-1.0 - t))); elseif (z <= 7.2e+45) tmp = x + (y * (a / (z + -1.0))); elseif (z <= 2.4e+74) tmp = x + (a * (z / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.95e+28], N[(x - a), $MachinePrecision], If[LessEqual[z, 0.0135], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+45], N[(x + N[(y * N[(a / N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e+74], N[(x + N[(a * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+28}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 0.0135:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+45}:\\
\;\;\;\;x + y \cdot \frac{a}{z + -1}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+74}:\\
\;\;\;\;x + a \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.9499999999999999e28 or 2.40000000000000008e74 < z Initial program 98.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 84.7%
if -1.9499999999999999e28 < z < 0.0134999999999999998Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 93.4%
if 0.0134999999999999998 < z < 7.2e45Initial program 100.0%
Taylor expanded in t around 0 86.8%
Taylor expanded in y around inf 80.0%
*-commutative80.0%
associate-*r/80.1%
Simplified80.1%
if 7.2e45 < z < 2.40000000000000008e74Initial program 88.4%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 87.7%
Taylor expanded in y around 0 75.6%
sub-neg75.6%
mul-1-neg75.6%
remove-double-neg75.6%
associate-/l*75.6%
Simplified75.6%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -215000000000.0)
(- x (/ (- z y) (/ z a)))
(if (<= z 0.85)
(+ x (* a (/ y (- -1.0 t))))
(if (<= z 2.75e+175) (+ x (/ (* z a) (- (+ t 1.0) z))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -215000000000.0) {
tmp = x - ((z - y) / (z / a));
} else if (z <= 0.85) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 2.75e+175) {
tmp = x + ((z * a) / ((t + 1.0) - 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 <= (-215000000000.0d0)) then
tmp = x - ((z - y) / (z / a))
else if (z <= 0.85d0) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else if (z <= 2.75d+175) then
tmp = x + ((z * a) / ((t + 1.0d0) - 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 <= -215000000000.0) {
tmp = x - ((z - y) / (z / a));
} else if (z <= 0.85) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 2.75e+175) {
tmp = x + ((z * a) / ((t + 1.0) - z));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -215000000000.0: tmp = x - ((z - y) / (z / a)) elif z <= 0.85: tmp = x + (a * (y / (-1.0 - t))) elif z <= 2.75e+175: tmp = x + ((z * a) / ((t + 1.0) - z)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -215000000000.0) tmp = Float64(x - Float64(Float64(z - y) / Float64(z / a))); elseif (z <= 0.85) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); elseif (z <= 2.75e+175) tmp = Float64(x + Float64(Float64(z * a) / Float64(Float64(t + 1.0) - z))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -215000000000.0) tmp = x - ((z - y) / (z / a)); elseif (z <= 0.85) tmp = x + (a * (y / (-1.0 - t))); elseif (z <= 2.75e+175) tmp = x + ((z * a) / ((t + 1.0) - z)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -215000000000.0], N[(x - N[(N[(z - y), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.85], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.75e+175], N[(x + N[(N[(z * a), $MachinePrecision] / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -215000000000:\\
\;\;\;\;x - \frac{z - y}{\frac{z}{a}}\\
\mathbf{elif}\;z \leq 0.85:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{elif}\;z \leq 2.75 \cdot 10^{+175}:\\
\;\;\;\;x + \frac{z \cdot a}{\left(t + 1\right) - z}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.15e11Initial program 98.5%
Taylor expanded in z around inf 86.3%
associate-*r/86.3%
neg-mul-186.3%
Simplified86.3%
if -2.15e11 < z < 0.849999999999999978Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 94.2%
if 0.849999999999999978 < z < 2.75000000000000009e175Initial program 94.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in y around 0 81.6%
sub-neg81.6%
mul-1-neg81.6%
*-commutative81.6%
associate--l+81.6%
+-commutative81.6%
associate-*r/78.7%
remove-double-neg78.7%
associate-*r/81.6%
*-commutative81.6%
+-commutative81.6%
associate--l+81.6%
Simplified81.6%
if 2.75000000000000009e175 < z Initial program 99.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
Final simplification90.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.6e+28)
(- x a)
(if (<= z 15.0)
(+ x (* a (/ y (- -1.0 t))))
(if (<= z 6.4e+75) (+ x (* a (/ (- z y) t))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+28) {
tmp = x - a;
} else if (z <= 15.0) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 6.4e+75) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.6d+28)) then
tmp = x - a
else if (z <= 15.0d0) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else if (z <= 6.4d+75) then
tmp = x + (a * ((z - y) / t))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+28) {
tmp = x - a;
} else if (z <= 15.0) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 6.4e+75) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.6e+28: tmp = x - a elif z <= 15.0: tmp = x + (a * (y / (-1.0 - t))) elif z <= 6.4e+75: tmp = x + (a * ((z - y) / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.6e+28) tmp = Float64(x - a); elseif (z <= 15.0) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); elseif (z <= 6.4e+75) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.6e+28) tmp = x - a; elseif (z <= 15.0) tmp = x + (a * (y / (-1.0 - t))); elseif (z <= 6.4e+75) tmp = x + (a * ((z - y) / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.6e+28], N[(x - a), $MachinePrecision], If[LessEqual[z, 15.0], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.4e+75], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+28}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 15:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{elif}\;z \leq 6.4 \cdot 10^{+75}:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.6000000000000002e28 or 6.39999999999999969e75 < z Initial program 98.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 84.7%
if -2.6000000000000002e28 < z < 15Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 92.9%
if 15 < z < 6.39999999999999969e75Initial program 95.6%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 81.2%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(if (<= z -7400000.0)
(- x (/ (- z y) (/ z a)))
(if (<= z 0.46)
(+ x (* a (/ y (- -1.0 t))))
(if (<= z 9e+73) (+ x (* a (/ (- z y) t))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7400000.0) {
tmp = x - ((z - y) / (z / a));
} else if (z <= 0.46) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 9e+73) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-7400000.0d0)) then
tmp = x - ((z - y) / (z / a))
else if (z <= 0.46d0) then
tmp = x + (a * (y / ((-1.0d0) - t)))
else if (z <= 9d+73) then
tmp = x + (a * ((z - y) / t))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7400000.0) {
tmp = x - ((z - y) / (z / a));
} else if (z <= 0.46) {
tmp = x + (a * (y / (-1.0 - t)));
} else if (z <= 9e+73) {
tmp = x + (a * ((z - y) / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7400000.0: tmp = x - ((z - y) / (z / a)) elif z <= 0.46: tmp = x + (a * (y / (-1.0 - t))) elif z <= 9e+73: tmp = x + (a * ((z - y) / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7400000.0) tmp = Float64(x - Float64(Float64(z - y) / Float64(z / a))); elseif (z <= 0.46) tmp = Float64(x + Float64(a * Float64(y / Float64(-1.0 - t)))); elseif (z <= 9e+73) tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7400000.0) tmp = x - ((z - y) / (z / a)); elseif (z <= 0.46) tmp = x + (a * (y / (-1.0 - t))); elseif (z <= 9e+73) tmp = x + (a * ((z - y) / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7400000.0], N[(x - N[(N[(z - y), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.46], N[(x + N[(a * N[(y / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+73], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7400000:\\
\;\;\;\;x - \frac{z - y}{\frac{z}{a}}\\
\mathbf{elif}\;z \leq 0.46:\\
\;\;\;\;x + a \cdot \frac{y}{-1 - t}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+73}:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -7.4e6Initial program 98.5%
Taylor expanded in z around inf 86.3%
associate-*r/86.3%
neg-mul-186.3%
Simplified86.3%
if -7.4e6 < z < 0.46000000000000002Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 94.2%
if 0.46000000000000002 < z < 8.99999999999999969e73Initial program 95.6%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 81.2%
if 8.99999999999999969e73 < z Initial program 97.1%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 91.4%
Final simplification90.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8.2e+15)
(- x a)
(if (<= z 3.6e-24)
(+ x (* a (- z y)))
(if (<= z 1.45e+74) (- x (* a (/ y t))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.2e+15) {
tmp = x - a;
} else if (z <= 3.6e-24) {
tmp = x + (a * (z - y));
} else if (z <= 1.45e+74) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8.2d+15)) then
tmp = x - a
else if (z <= 3.6d-24) then
tmp = x + (a * (z - y))
else if (z <= 1.45d+74) then
tmp = x - (a * (y / t))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8.2e+15) {
tmp = x - a;
} else if (z <= 3.6e-24) {
tmp = x + (a * (z - y));
} else if (z <= 1.45e+74) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8.2e+15: tmp = x - a elif z <= 3.6e-24: tmp = x + (a * (z - y)) elif z <= 1.45e+74: tmp = x - (a * (y / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8.2e+15) tmp = Float64(x - a); elseif (z <= 3.6e-24) tmp = Float64(x + Float64(a * Float64(z - y))); elseif (z <= 1.45e+74) tmp = Float64(x - Float64(a * Float64(y / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8.2e+15) tmp = x - a; elseif (z <= 3.6e-24) tmp = x + (a * (z - y)); elseif (z <= 1.45e+74) tmp = x - (a * (y / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8.2e+15], N[(x - a), $MachinePrecision], If[LessEqual[z, 3.6e-24], N[(x + N[(a * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+74], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.2 \cdot 10^{+15}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-24}:\\
\;\;\;\;x + a \cdot \left(z - y\right)\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+74}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -8.2e15 or 1.4500000000000001e74 < z Initial program 98.0%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 84.1%
if -8.2e15 < z < 3.6000000000000001e-24Initial program 99.9%
Taylor expanded in z around 0 99.2%
Taylor expanded in t around 0 76.4%
if 3.6000000000000001e-24 < z < 1.4500000000000001e74Initial program 96.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 80.7%
Taylor expanded in y around inf 71.4%
Final simplification79.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.35e-27)
(- x (+ a (/ a z)))
(if (<= z 4.2e-24)
(+ x (* a (- z y)))
(if (<= z 2.1e+74) (- x (* a (/ y t))) (- x a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e-27) {
tmp = x - (a + (a / z));
} else if (z <= 4.2e-24) {
tmp = x + (a * (z - y));
} else if (z <= 2.1e+74) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.35d-27)) then
tmp = x - (a + (a / z))
else if (z <= 4.2d-24) then
tmp = x + (a * (z - y))
else if (z <= 2.1d+74) then
tmp = x - (a * (y / t))
else
tmp = x - a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.35e-27) {
tmp = x - (a + (a / z));
} else if (z <= 4.2e-24) {
tmp = x + (a * (z - y));
} else if (z <= 2.1e+74) {
tmp = x - (a * (y / t));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.35e-27: tmp = x - (a + (a / z)) elif z <= 4.2e-24: tmp = x + (a * (z - y)) elif z <= 2.1e+74: tmp = x - (a * (y / t)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.35e-27) tmp = Float64(x - Float64(a + Float64(a / z))); elseif (z <= 4.2e-24) tmp = Float64(x + Float64(a * Float64(z - y))); elseif (z <= 2.1e+74) tmp = Float64(x - Float64(a * Float64(y / t))); else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.35e-27) tmp = x - (a + (a / z)); elseif (z <= 4.2e-24) tmp = x + (a * (z - y)); elseif (z <= 2.1e+74) tmp = x - (a * (y / t)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e-27], N[(x - N[(a + N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-24], N[(x + N[(a * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+74], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-27}:\\
\;\;\;\;x - \left(a + \frac{a}{z}\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-24}:\\
\;\;\;\;x + a \cdot \left(z - y\right)\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+74}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.34999999999999994e-27Initial program 98.5%
Taylor expanded in t around 0 84.2%
Taylor expanded in y around 0 63.4%
mul-1-neg63.4%
associate-/l*77.6%
distribute-rgt-neg-in77.6%
distribute-frac-neg277.6%
neg-sub077.6%
associate--r-77.6%
metadata-eval77.6%
Simplified77.6%
Taylor expanded in z around inf 77.8%
if -1.34999999999999994e-27 < z < 4.1999999999999999e-24Initial program 99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in t around 0 78.0%
if 4.1999999999999999e-24 < z < 2.0999999999999999e74Initial program 96.3%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in t around inf 80.7%
Taylor expanded in y around inf 71.4%
if 2.0999999999999999e74 < z Initial program 97.1%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 91.4%
Final simplification79.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.45e+28) (- x (/ (- z y) (/ z a))) (if (<= z 5e+76) (+ x (/ (- y z) (/ (- -1.0 t) a))) (- x a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.45e+28) {
tmp = x - ((z - y) / (z / a));
} else if (z <= 5e+76) {
tmp = x + ((y - z) / ((-1.0 - t) / 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.45d+28)) then
tmp = x - ((z - y) / (z / a))
else if (z <= 5d+76) then
tmp = x + ((y - z) / (((-1.0d0) - t) / 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.45e+28) {
tmp = x - ((z - y) / (z / a));
} else if (z <= 5e+76) {
tmp = x + ((y - z) / ((-1.0 - t) / a));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.45e+28: tmp = x - ((z - y) / (z / a)) elif z <= 5e+76: tmp = x + ((y - z) / ((-1.0 - t) / a)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.45e+28) tmp = Float64(x - Float64(Float64(z - y) / Float64(z / a))); elseif (z <= 5e+76) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(-1.0 - t) / 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.45e+28) tmp = x - ((z - y) / (z / a)); elseif (z <= 5e+76) tmp = x + ((y - z) / ((-1.0 - t) / a)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.45e+28], N[(x - N[(N[(z - y), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+76], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(-1.0 - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+28}:\\
\;\;\;\;x - \frac{z - y}{\frac{z}{a}}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+76}:\\
\;\;\;\;x + \frac{y - z}{\frac{-1 - t}{a}}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.4500000000000001e28Initial program 98.4%
Taylor expanded in z around inf 87.2%
associate-*r/87.2%
neg-mul-187.2%
Simplified87.2%
if -1.4500000000000001e28 < z < 4.99999999999999991e76Initial program 99.3%
Taylor expanded in z around 0 94.3%
if 4.99999999999999991e76 < z Initial program 97.1%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 91.4%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(if (<= t -950000.0)
(+ x (/ (- y z) (/ (- -1.0 t) a)))
(if (<= t 2.6e+23)
(- x (/ (- y z) (/ (- 1.0 z) a)))
(+ x (* a (/ (- z y) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -950000.0) {
tmp = x + ((y - z) / ((-1.0 - t) / a));
} else if (t <= 2.6e+23) {
tmp = x - ((y - z) / ((1.0 - z) / a));
} else {
tmp = x + (a * ((z - y) / 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 <= (-950000.0d0)) then
tmp = x + ((y - z) / (((-1.0d0) - t) / a))
else if (t <= 2.6d+23) then
tmp = x - ((y - z) / ((1.0d0 - z) / a))
else
tmp = x + (a * ((z - y) / 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 <= -950000.0) {
tmp = x + ((y - z) / ((-1.0 - t) / a));
} else if (t <= 2.6e+23) {
tmp = x - ((y - z) / ((1.0 - z) / a));
} else {
tmp = x + (a * ((z - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -950000.0: tmp = x + ((y - z) / ((-1.0 - t) / a)) elif t <= 2.6e+23: tmp = x - ((y - z) / ((1.0 - z) / a)) else: tmp = x + (a * ((z - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -950000.0) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(-1.0 - t) / a))); elseif (t <= 2.6e+23) tmp = Float64(x - Float64(Float64(y - z) / Float64(Float64(1.0 - z) / a))); else tmp = Float64(x + Float64(a * Float64(Float64(z - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -950000.0) tmp = x + ((y - z) / ((-1.0 - t) / a)); elseif (t <= 2.6e+23) tmp = x - ((y - z) / ((1.0 - z) / a)); else tmp = x + (a * ((z - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -950000.0], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(-1.0 - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e+23], N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(1.0 - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(N[(z - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -950000:\\
\;\;\;\;x + \frac{y - z}{\frac{-1 - t}{a}}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+23}:\\
\;\;\;\;x - \frac{y - z}{\frac{1 - z}{a}}\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \frac{z - y}{t}\\
\end{array}
\end{array}
if t < -9.5e5Initial program 98.5%
Taylor expanded in z around 0 90.5%
if -9.5e5 < t < 2.59999999999999992e23Initial program 98.4%
Taylor expanded in t around 0 97.8%
if 2.59999999999999992e23 < t Initial program 99.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in t around inf 91.0%
Final simplification94.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2e+16) (not (<= z 5e-24))) (- x a) (+ x (* a (- z y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2e+16) || !(z <= 5e-24)) {
tmp = x - a;
} else {
tmp = x + (a * (z - 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 <= (-2d+16)) .or. (.not. (z <= 5d-24))) then
tmp = x - a
else
tmp = x + (a * (z - 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 <= -2e+16) || !(z <= 5e-24)) {
tmp = x - a;
} else {
tmp = x + (a * (z - y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2e+16) or not (z <= 5e-24): tmp = x - a else: tmp = x + (a * (z - y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2e+16) || !(z <= 5e-24)) tmp = Float64(x - a); else tmp = Float64(x + Float64(a * Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2e+16) || ~((z <= 5e-24))) tmp = x - a; else tmp = x + (a * (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2e+16], N[Not[LessEqual[z, 5e-24]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(a * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+16} \lor \neg \left(z \leq 5 \cdot 10^{-24}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(z - y\right)\\
\end{array}
\end{array}
if z < -2e16 or 4.9999999999999998e-24 < z Initial program 97.7%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 78.1%
if -2e16 < z < 4.9999999999999998e-24Initial program 99.9%
Taylor expanded in z around 0 99.2%
Taylor expanded in t around 0 76.4%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1e+28) (not (<= z 5e-24))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1e+28) || !(z <= 5e-24)) {
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 <= (-1d+28)) .or. (.not. (z <= 5d-24))) 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 <= -1e+28) || !(z <= 5e-24)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1e+28) or not (z <= 5e-24): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1e+28) || !(z <= 5e-24)) 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 <= -1e+28) || ~((z <= 5e-24))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1e+28], N[Not[LessEqual[z, 5e-24]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+28} \lor \neg \left(z \leq 5 \cdot 10^{-24}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -9.99999999999999958e27 or 4.9999999999999998e-24 < z Initial program 97.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 78.5%
if -9.99999999999999958e27 < z < 4.9999999999999998e-24Initial program 99.9%
Taylor expanded in t around 0 76.7%
Taylor expanded in z around 0 73.3%
Final simplification75.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.7e+28) (not (<= z 5e-22))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.7e+28) || !(z <= 5e-22)) {
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.7d+28)) .or. (.not. (z <= 5d-22))) 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.7e+28) || !(z <= 5e-22)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.7e+28) or not (z <= 5e-22): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.7e+28) || !(z <= 5e-22)) 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.7e+28) || ~((z <= 5e-22))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.7e+28], N[Not[LessEqual[z, 5e-22]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+28} \lor \neg \left(z \leq 5 \cdot 10^{-22}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.7e28 or 4.99999999999999954e-22 < z Initial program 97.6%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 79.1%
if -1.7e28 < z < 4.99999999999999954e-22Initial program 99.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 57.3%
Final simplification68.0%
(FPCore (x y z t a) :precision binary64 (+ x (* a (/ (- y z) (+ -1.0 (- z t))))))
double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 + (z - t))));
}
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) / ((-1.0d0) + (z - t))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (a * ((y - z) / (-1.0 + (z - t))));
}
def code(x, y, z, t, a): return x + (a * ((y - z) / (-1.0 + (z - t))))
function code(x, y, z, t, a) return Float64(x + Float64(a * Float64(Float64(y - z) / Float64(-1.0 + Float64(z - t))))) end
function tmp = code(x, y, z, t, a) tmp = x + (a * ((y - z) / (-1.0 + (z - t)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(a * N[(N[(y - z), $MachinePrecision] / N[(-1.0 + N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + a \cdot \frac{y - z}{-1 + \left(z - t\right)}
\end{array}
Initial program 98.8%
associate-/r/99.9%
Simplified99.9%
Final simplification99.9%
(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.8%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in x around inf 56.3%
Final simplification56.3%
(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 2024066
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
:precision binary64
:alt
(- x (* (/ (- y z) (+ (- t z) 1.0)) a))
(- x (/ (- y z) (/ (+ (- t z) 1.0) a))))