
(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 17 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 (* (/ (- 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}
Initial program 96.9%
associate-/r/99.6%
Simplified99.6%
Final simplification99.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* y a) (- 1.0 z)))))
(if (<= z -2.5e+24)
(- x a)
(if (<= z 9.5e-126)
(- x (* a (/ y (+ t 1.0))))
(if (<= z 3.6e-34)
(+ x (* z (/ a (+ t 1.0))))
(if (<= z 0.046)
(+ x (* y (/ a (- -1.0 t))))
(if (<= z 1.5e+95)
t_1
(if (<= z 4.4e+95)
(* a (/ (- y) t))
(if (<= z 2.2e+105) t_1 (- x a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y * a) / (1.0 - z));
double tmp;
if (z <= -2.5e+24) {
tmp = x - a;
} else if (z <= 9.5e-126) {
tmp = x - (a * (y / (t + 1.0)));
} else if (z <= 3.6e-34) {
tmp = x + (z * (a / (t + 1.0)));
} else if (z <= 0.046) {
tmp = x + (y * (a / (-1.0 - t)));
} else if (z <= 1.5e+95) {
tmp = t_1;
} else if (z <= 4.4e+95) {
tmp = a * (-y / t);
} else if (z <= 2.2e+105) {
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) :: tmp
t_1 = x - ((y * a) / (1.0d0 - z))
if (z <= (-2.5d+24)) then
tmp = x - a
else if (z <= 9.5d-126) then
tmp = x - (a * (y / (t + 1.0d0)))
else if (z <= 3.6d-34) then
tmp = x + (z * (a / (t + 1.0d0)))
else if (z <= 0.046d0) then
tmp = x + (y * (a / ((-1.0d0) - t)))
else if (z <= 1.5d+95) then
tmp = t_1
else if (z <= 4.4d+95) then
tmp = a * (-y / t)
else if (z <= 2.2d+105) 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 - ((y * a) / (1.0 - z));
double tmp;
if (z <= -2.5e+24) {
tmp = x - a;
} else if (z <= 9.5e-126) {
tmp = x - (a * (y / (t + 1.0)));
} else if (z <= 3.6e-34) {
tmp = x + (z * (a / (t + 1.0)));
} else if (z <= 0.046) {
tmp = x + (y * (a / (-1.0 - t)));
} else if (z <= 1.5e+95) {
tmp = t_1;
} else if (z <= 4.4e+95) {
tmp = a * (-y / t);
} else if (z <= 2.2e+105) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((y * a) / (1.0 - z)) tmp = 0 if z <= -2.5e+24: tmp = x - a elif z <= 9.5e-126: tmp = x - (a * (y / (t + 1.0))) elif z <= 3.6e-34: tmp = x + (z * (a / (t + 1.0))) elif z <= 0.046: tmp = x + (y * (a / (-1.0 - t))) elif z <= 1.5e+95: tmp = t_1 elif z <= 4.4e+95: tmp = a * (-y / t) elif z <= 2.2e+105: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y * a) / Float64(1.0 - z))) tmp = 0.0 if (z <= -2.5e+24) tmp = Float64(x - a); elseif (z <= 9.5e-126) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); elseif (z <= 3.6e-34) tmp = Float64(x + Float64(z * Float64(a / Float64(t + 1.0)))); elseif (z <= 0.046) tmp = Float64(x + Float64(y * Float64(a / Float64(-1.0 - t)))); elseif (z <= 1.5e+95) tmp = t_1; elseif (z <= 4.4e+95) tmp = Float64(a * Float64(Float64(-y) / t)); elseif (z <= 2.2e+105) tmp = t_1; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((y * a) / (1.0 - z)); tmp = 0.0; if (z <= -2.5e+24) tmp = x - a; elseif (z <= 9.5e-126) tmp = x - (a * (y / (t + 1.0))); elseif (z <= 3.6e-34) tmp = x + (z * (a / (t + 1.0))); elseif (z <= 0.046) tmp = x + (y * (a / (-1.0 - t))); elseif (z <= 1.5e+95) tmp = t_1; elseif (z <= 4.4e+95) tmp = a * (-y / t); elseif (z <= 2.2e+105) 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[(N[(y * a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.5e+24], N[(x - a), $MachinePrecision], If[LessEqual[z, 9.5e-126], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e-34], N[(x + N[(z * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.046], N[(x + N[(y * N[(a / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+95], t$95$1, If[LessEqual[z, 4.4e+95], N[(a * N[((-y) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+105], t$95$1, N[(x - a), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y \cdot a}{1 - z}\\
\mathbf{if}\;z \leq -2.5 \cdot 10^{+24}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-126}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-34}:\\
\;\;\;\;x + z \cdot \frac{a}{t + 1}\\
\mathbf{elif}\;z \leq 0.046:\\
\;\;\;\;x + y \cdot \frac{a}{-1 - t}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+95}:\\
\;\;\;\;a \cdot \frac{-y}{t}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+105}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -2.50000000000000023e24 or 2.20000000000000007e105 < z Initial program 93.3%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 87.7%
if -2.50000000000000023e24 < z < 9.5000000000000003e-126Initial program 98.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.8%
if 9.5000000000000003e-126 < z < 3.60000000000000008e-34Initial program 99.9%
associate-/r/95.5%
Simplified95.5%
Taylor expanded in y around 0 91.1%
mul-1-neg91.1%
*-commutative91.1%
associate--l+91.1%
+-commutative91.1%
associate-*r/91.2%
distribute-rgt-neg-in91.2%
distribute-neg-frac291.2%
+-commutative91.2%
distribute-neg-in91.2%
metadata-eval91.2%
unsub-neg91.2%
associate--r-91.2%
Simplified91.2%
Taylor expanded in z around 0 91.2%
associate-*r/91.2%
neg-mul-191.2%
Simplified91.2%
if 3.60000000000000008e-34 < z < 0.045999999999999999Initial program 100.0%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 80.1%
*-commutative80.1%
associate-/l*90.3%
Simplified90.3%
if 0.045999999999999999 < z < 1.49999999999999996e95 or 4.3999999999999998e95 < z < 2.20000000000000007e105Initial program 99.9%
Taylor expanded in t around 0 95.5%
Taylor expanded in y around inf 81.4%
if 1.49999999999999996e95 < z < 4.3999999999999998e95Initial program 98.4%
Taylor expanded in t around inf 98.4%
Taylor expanded in y around inf 53.0%
associate-*r/53.0%
*-commutative53.0%
neg-mul-153.0%
distribute-lft-neg-in53.0%
Simplified53.0%
Taylor expanded in y around 0 53.0%
mul-1-neg53.0%
associate-*r/100.0%
distribute-rgt-neg-in100.0%
distribute-frac-neg100.0%
Simplified100.0%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.6e+24)
(- x a)
(if (<= z 1.0)
(- x (/ a (/ (+ t 1.0) y)))
(if (<= z 1.5e+95)
(- x (/ (* y a) (- 1.0 z)))
(if (<= z 4.4e+95)
(* a (/ (- y) t))
(if (<= z 4.6e+161) (+ x (/ (* z a) (- 1.0 z))) (- x a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.6e+24) {
tmp = x - a;
} else if (z <= 1.0) {
tmp = x - (a / ((t + 1.0) / y));
} else if (z <= 1.5e+95) {
tmp = x - ((y * a) / (1.0 - z));
} else if (z <= 4.4e+95) {
tmp = a * (-y / t);
} else if (z <= 4.6e+161) {
tmp = x + ((z * a) / (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 <= (-1.6d+24)) then
tmp = x - a
else if (z <= 1.0d0) then
tmp = x - (a / ((t + 1.0d0) / y))
else if (z <= 1.5d+95) then
tmp = x - ((y * a) / (1.0d0 - z))
else if (z <= 4.4d+95) then
tmp = a * (-y / t)
else if (z <= 4.6d+161) then
tmp = x + ((z * a) / (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 <= -1.6e+24) {
tmp = x - a;
} else if (z <= 1.0) {
tmp = x - (a / ((t + 1.0) / y));
} else if (z <= 1.5e+95) {
tmp = x - ((y * a) / (1.0 - z));
} else if (z <= 4.4e+95) {
tmp = a * (-y / t);
} else if (z <= 4.6e+161) {
tmp = x + ((z * a) / (1.0 - z));
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.6e+24: tmp = x - a elif z <= 1.0: tmp = x - (a / ((t + 1.0) / y)) elif z <= 1.5e+95: tmp = x - ((y * a) / (1.0 - z)) elif z <= 4.4e+95: tmp = a * (-y / t) elif z <= 4.6e+161: tmp = x + ((z * a) / (1.0 - z)) else: tmp = x - a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.6e+24) tmp = Float64(x - a); elseif (z <= 1.0) tmp = Float64(x - Float64(a / Float64(Float64(t + 1.0) / y))); elseif (z <= 1.5e+95) tmp = Float64(x - Float64(Float64(y * a) / Float64(1.0 - z))); elseif (z <= 4.4e+95) tmp = Float64(a * Float64(Float64(-y) / t)); elseif (z <= 4.6e+161) tmp = Float64(x + Float64(Float64(z * a) / Float64(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 <= -1.6e+24) tmp = x - a; elseif (z <= 1.0) tmp = x - (a / ((t + 1.0) / y)); elseif (z <= 1.5e+95) tmp = x - ((y * a) / (1.0 - z)); elseif (z <= 4.4e+95) tmp = a * (-y / t); elseif (z <= 4.6e+161) tmp = x + ((z * a) / (1.0 - z)); else tmp = x - a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.6e+24], N[(x - a), $MachinePrecision], If[LessEqual[z, 1.0], N[(x - N[(a / N[(N[(t + 1.0), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+95], N[(x - N[(N[(y * a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.4e+95], N[(a * N[((-y) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.6e+161], N[(x + N[(N[(z * a), $MachinePrecision] / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+24}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq 1:\\
\;\;\;\;x - \frac{a}{\frac{t + 1}{y}}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+95}:\\
\;\;\;\;x - \frac{y \cdot a}{1 - z}\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{+95}:\\
\;\;\;\;a \cdot \frac{-y}{t}\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+161}:\\
\;\;\;\;x + \frac{z \cdot a}{1 - z}\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.5999999999999999e24 or 4.5999999999999999e161 < z Initial program 92.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 87.7%
if -1.5999999999999999e24 < z < 1Initial program 99.1%
associate-/r/99.2%
Simplified99.2%
Taylor expanded in z around 0 87.2%
*-commutative87.2%
clear-num87.2%
un-div-inv87.2%
+-commutative87.2%
Applied egg-rr87.2%
if 1 < z < 1.49999999999999996e95Initial program 100.0%
Taylor expanded in t around 0 94.9%
Taylor expanded in y around inf 78.3%
if 1.49999999999999996e95 < z < 4.3999999999999998e95Initial program 98.4%
Taylor expanded in t around inf 98.4%
Taylor expanded in y around inf 53.0%
associate-*r/53.0%
*-commutative53.0%
neg-mul-153.0%
distribute-lft-neg-in53.0%
Simplified53.0%
Taylor expanded in y around 0 53.0%
mul-1-neg53.0%
associate-*r/100.0%
distribute-rgt-neg-in100.0%
distribute-frac-neg100.0%
Simplified100.0%
if 4.3999999999999998e95 < z < 4.5999999999999999e161Initial program 99.8%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in y around 0 91.7%
mul-1-neg91.7%
*-commutative91.7%
associate--l+91.7%
+-commutative91.7%
associate-*r/85.0%
distribute-rgt-neg-in85.0%
distribute-neg-frac285.0%
+-commutative85.0%
distribute-neg-in85.0%
metadata-eval85.0%
unsub-neg85.0%
associate--r-85.0%
Simplified85.0%
Taylor expanded in t around 0 90.0%
Final simplification87.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))) (t_2 (- x (* y (/ a t)))))
(if (<= z -8.5e+18)
(- x a)
(if (<= z -2.5e-169)
t_2
(if (<= z -1.45e-267)
t_1
(if (<= z 6.5e-225) t_2 (if (<= z 5.5e-31) t_1 (- x a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double t_2 = x - (y * (a / t));
double tmp;
if (z <= -8.5e+18) {
tmp = x - a;
} else if (z <= -2.5e-169) {
tmp = t_2;
} else if (z <= -1.45e-267) {
tmp = t_1;
} else if (z <= 6.5e-225) {
tmp = t_2;
} else if (z <= 5.5e-31) {
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 - (y * a)
t_2 = x - (y * (a / t))
if (z <= (-8.5d+18)) then
tmp = x - a
else if (z <= (-2.5d-169)) then
tmp = t_2
else if (z <= (-1.45d-267)) then
tmp = t_1
else if (z <= 6.5d-225) then
tmp = t_2
else if (z <= 5.5d-31) 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 - (y * a);
double t_2 = x - (y * (a / t));
double tmp;
if (z <= -8.5e+18) {
tmp = x - a;
} else if (z <= -2.5e-169) {
tmp = t_2;
} else if (z <= -1.45e-267) {
tmp = t_1;
} else if (z <= 6.5e-225) {
tmp = t_2;
} else if (z <= 5.5e-31) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) t_2 = x - (y * (a / t)) tmp = 0 if z <= -8.5e+18: tmp = x - a elif z <= -2.5e-169: tmp = t_2 elif z <= -1.45e-267: tmp = t_1 elif z <= 6.5e-225: tmp = t_2 elif z <= 5.5e-31: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) t_2 = Float64(x - Float64(y * Float64(a / t))) tmp = 0.0 if (z <= -8.5e+18) tmp = Float64(x - a); elseif (z <= -2.5e-169) tmp = t_2; elseif (z <= -1.45e-267) tmp = t_1; elseif (z <= 6.5e-225) tmp = t_2; elseif (z <= 5.5e-31) tmp = t_1; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); t_2 = x - (y * (a / t)); tmp = 0.0; if (z <= -8.5e+18) tmp = x - a; elseif (z <= -2.5e-169) tmp = t_2; elseif (z <= -1.45e-267) tmp = t_1; elseif (z <= 6.5e-225) tmp = t_2; elseif (z <= 5.5e-31) 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[(y * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.5e+18], N[(x - a), $MachinePrecision], If[LessEqual[z, -2.5e-169], t$95$2, If[LessEqual[z, -1.45e-267], t$95$1, If[LessEqual[z, 6.5e-225], t$95$2, If[LessEqual[z, 5.5e-31], t$95$1, N[(x - a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
t_2 := x - y \cdot \frac{a}{t}\\
\mathbf{if}\;z \leq -8.5 \cdot 10^{+18}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-169}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.45 \cdot 10^{-267}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-225}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -8.5e18 or 5.49999999999999958e-31 < z Initial program 94.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 81.5%
if -8.5e18 < z < -2.5000000000000001e-169 or -1.45000000000000011e-267 < z < 6.5000000000000005e-225Initial program 98.2%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.3%
Taylor expanded in t around inf 75.7%
*-commutative75.7%
associate-*r/79.8%
Simplified79.8%
if -2.5000000000000001e-169 < z < -1.45000000000000011e-267 or 6.5000000000000005e-225 < z < 5.49999999999999958e-31Initial program 99.8%
associate-/r/98.5%
Simplified98.5%
Taylor expanded in z around 0 85.2%
Taylor expanded in t around 0 75.8%
*-commutative75.8%
Simplified75.8%
Final simplification79.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y a))))
(if (<= z -1.25e+17)
(- x a)
(if (<= z -1.2e-167)
(- x (* a (/ y t)))
(if (<= z -2.8e-265)
t_1
(if (<= z 7e-225)
(- x (* y (/ a t)))
(if (<= z 5.5e-31) t_1 (- x a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * a);
double tmp;
if (z <= -1.25e+17) {
tmp = x - a;
} else if (z <= -1.2e-167) {
tmp = x - (a * (y / t));
} else if (z <= -2.8e-265) {
tmp = t_1;
} else if (z <= 7e-225) {
tmp = x - (y * (a / t));
} else if (z <= 5.5e-31) {
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) :: tmp
t_1 = x - (y * a)
if (z <= (-1.25d+17)) then
tmp = x - a
else if (z <= (-1.2d-167)) then
tmp = x - (a * (y / t))
else if (z <= (-2.8d-265)) then
tmp = t_1
else if (z <= 7d-225) then
tmp = x - (y * (a / t))
else if (z <= 5.5d-31) 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 - (y * a);
double tmp;
if (z <= -1.25e+17) {
tmp = x - a;
} else if (z <= -1.2e-167) {
tmp = x - (a * (y / t));
} else if (z <= -2.8e-265) {
tmp = t_1;
} else if (z <= 7e-225) {
tmp = x - (y * (a / t));
} else if (z <= 5.5e-31) {
tmp = t_1;
} else {
tmp = x - a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * a) tmp = 0 if z <= -1.25e+17: tmp = x - a elif z <= -1.2e-167: tmp = x - (a * (y / t)) elif z <= -2.8e-265: tmp = t_1 elif z <= 7e-225: tmp = x - (y * (a / t)) elif z <= 5.5e-31: tmp = t_1 else: tmp = x - a return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * a)) tmp = 0.0 if (z <= -1.25e+17) tmp = Float64(x - a); elseif (z <= -1.2e-167) tmp = Float64(x - Float64(a * Float64(y / t))); elseif (z <= -2.8e-265) tmp = t_1; elseif (z <= 7e-225) tmp = Float64(x - Float64(y * Float64(a / t))); elseif (z <= 5.5e-31) tmp = t_1; else tmp = Float64(x - a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * a); tmp = 0.0; if (z <= -1.25e+17) tmp = x - a; elseif (z <= -1.2e-167) tmp = x - (a * (y / t)); elseif (z <= -2.8e-265) tmp = t_1; elseif (z <= 7e-225) tmp = x - (y * (a / t)); elseif (z <= 5.5e-31) 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[(y * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+17], N[(x - a), $MachinePrecision], If[LessEqual[z, -1.2e-167], N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.8e-265], t$95$1, If[LessEqual[z, 7e-225], N[(x - N[(y * N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-31], t$95$1, N[(x - a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot a\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+17}:\\
\;\;\;\;x - a\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-167}:\\
\;\;\;\;x - a \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq -2.8 \cdot 10^{-265}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-225}:\\
\;\;\;\;x - y \cdot \frac{a}{t}\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x - a\\
\end{array}
\end{array}
if z < -1.25e17 or 5.49999999999999958e-31 < z Initial program 94.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around inf 81.5%
if -1.25e17 < z < -1.19999999999999997e-167Initial program 97.4%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 85.3%
Taylor expanded in t around inf 75.1%
if -1.19999999999999997e-167 < z < -2.80000000000000023e-265 or 6.9999999999999994e-225 < z < 5.49999999999999958e-31Initial program 99.8%
associate-/r/98.5%
Simplified98.5%
Taylor expanded in z around 0 85.2%
Taylor expanded in t around 0 75.8%
*-commutative75.8%
Simplified75.8%
if -2.80000000000000023e-265 < z < 6.9999999999999994e-225Initial program 99.8%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 99.8%
Taylor expanded in t around inf 85.6%
*-commutative85.6%
associate-*r/90.4%
Simplified90.4%
Final simplification79.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- y z) (/ z a)))))
(if (<= z -1.05e+14)
t_1
(if (<= z 1.6e-126)
(- x (* a (/ y (+ t 1.0))))
(if (<= z 3.7e-34)
(+ x (* z (/ a (+ t 1.0))))
(if (<= z 260000.0) (+ x (* y (/ a (- -1.0 t)))) 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.05e+14) {
tmp = t_1;
} else if (z <= 1.6e-126) {
tmp = x - (a * (y / (t + 1.0)));
} else if (z <= 3.7e-34) {
tmp = x + (z * (a / (t + 1.0)));
} else if (z <= 260000.0) {
tmp = x + (y * (a / (-1.0 - 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 + ((y - z) / (z / a))
if (z <= (-1.05d+14)) then
tmp = t_1
else if (z <= 1.6d-126) then
tmp = x - (a * (y / (t + 1.0d0)))
else if (z <= 3.7d-34) then
tmp = x + (z * (a / (t + 1.0d0)))
else if (z <= 260000.0d0) then
tmp = x + (y * (a / ((-1.0d0) - 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 + ((y - z) / (z / a));
double tmp;
if (z <= -1.05e+14) {
tmp = t_1;
} else if (z <= 1.6e-126) {
tmp = x - (a * (y / (t + 1.0)));
} else if (z <= 3.7e-34) {
tmp = x + (z * (a / (t + 1.0)));
} else if (z <= 260000.0) {
tmp = x + (y * (a / (-1.0 - t)));
} 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.05e+14: tmp = t_1 elif z <= 1.6e-126: tmp = x - (a * (y / (t + 1.0))) elif z <= 3.7e-34: tmp = x + (z * (a / (t + 1.0))) elif z <= 260000.0: tmp = x + (y * (a / (-1.0 - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) / Float64(z / a))) tmp = 0.0 if (z <= -1.05e+14) tmp = t_1; elseif (z <= 1.6e-126) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); elseif (z <= 3.7e-34) tmp = Float64(x + Float64(z * Float64(a / Float64(t + 1.0)))); elseif (z <= 260000.0) tmp = Float64(x + Float64(y * Float64(a / Float64(-1.0 - t)))); 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.05e+14) tmp = t_1; elseif (z <= 1.6e-126) tmp = x - (a * (y / (t + 1.0))); elseif (z <= 3.7e-34) tmp = x + (z * (a / (t + 1.0))); elseif (z <= 260000.0) tmp = x + (y * (a / (-1.0 - t))); 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.05e+14], t$95$1, If[LessEqual[z, 1.6e-126], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e-34], N[(x + N[(z * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 260000.0], N[(x + N[(y * N[(a / N[(-1.0 - t), $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.05 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-126}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-34}:\\
\;\;\;\;x + z \cdot \frac{a}{t + 1}\\
\mathbf{elif}\;z \leq 260000:\\
\;\;\;\;x + y \cdot \frac{a}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.05e14 or 2.6e5 < z Initial program 94.7%
Taylor expanded in z around inf 87.9%
mul-1-neg87.9%
distribute-neg-frac287.9%
Simplified87.9%
if -1.05e14 < z < 1.6e-126Initial program 98.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 92.4%
if 1.6e-126 < z < 3.69999999999999988e-34Initial program 99.9%
associate-/r/95.5%
Simplified95.5%
Taylor expanded in y around 0 91.1%
mul-1-neg91.1%
*-commutative91.1%
associate--l+91.1%
+-commutative91.1%
associate-*r/91.2%
distribute-rgt-neg-in91.2%
distribute-neg-frac291.2%
+-commutative91.2%
distribute-neg-in91.2%
metadata-eval91.2%
unsub-neg91.2%
associate--r-91.2%
Simplified91.2%
Taylor expanded in z around 0 91.2%
associate-*r/91.2%
neg-mul-191.2%
Simplified91.2%
if 3.69999999999999988e-34 < z < 2.6e5Initial program 100.0%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 80.1%
*-commutative80.1%
associate-/l*90.3%
Simplified90.3%
Final simplification90.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -7.5e+25)
(+ x (* z (/ a (- (+ t 1.0) z))))
(if (<= z 9.5e-126)
(- x (* a (/ y (+ t 1.0))))
(if (<= z 2.9e-31)
(+ x (* z (/ a (+ t 1.0))))
(if (<= z 500000.0)
(+ x (* y (/ a (- -1.0 t))))
(+ x (/ (- y z) (/ z a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.5e+25) {
tmp = x + (z * (a / ((t + 1.0) - z)));
} else if (z <= 9.5e-126) {
tmp = x - (a * (y / (t + 1.0)));
} else if (z <= 2.9e-31) {
tmp = x + (z * (a / (t + 1.0)));
} else if (z <= 500000.0) {
tmp = x + (y * (a / (-1.0 - t)));
} else {
tmp = x + ((y - z) / (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-7.5d+25)) then
tmp = x + (z * (a / ((t + 1.0d0) - z)))
else if (z <= 9.5d-126) then
tmp = x - (a * (y / (t + 1.0d0)))
else if (z <= 2.9d-31) then
tmp = x + (z * (a / (t + 1.0d0)))
else if (z <= 500000.0d0) then
tmp = x + (y * (a / ((-1.0d0) - t)))
else
tmp = x + ((y - z) / (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7.5e+25) {
tmp = x + (z * (a / ((t + 1.0) - z)));
} else if (z <= 9.5e-126) {
tmp = x - (a * (y / (t + 1.0)));
} else if (z <= 2.9e-31) {
tmp = x + (z * (a / (t + 1.0)));
} else if (z <= 500000.0) {
tmp = x + (y * (a / (-1.0 - t)));
} else {
tmp = x + ((y - z) / (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7.5e+25: tmp = x + (z * (a / ((t + 1.0) - z))) elif z <= 9.5e-126: tmp = x - (a * (y / (t + 1.0))) elif z <= 2.9e-31: tmp = x + (z * (a / (t + 1.0))) elif z <= 500000.0: tmp = x + (y * (a / (-1.0 - t))) else: tmp = x + ((y - z) / (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7.5e+25) tmp = Float64(x + Float64(z * Float64(a / Float64(Float64(t + 1.0) - z)))); elseif (z <= 9.5e-126) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); elseif (z <= 2.9e-31) tmp = Float64(x + Float64(z * Float64(a / Float64(t + 1.0)))); elseif (z <= 500000.0) tmp = Float64(x + Float64(y * Float64(a / Float64(-1.0 - t)))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -7.5e+25) tmp = x + (z * (a / ((t + 1.0) - z))); elseif (z <= 9.5e-126) tmp = x - (a * (y / (t + 1.0))); elseif (z <= 2.9e-31) tmp = x + (z * (a / (t + 1.0))); elseif (z <= 500000.0) tmp = x + (y * (a / (-1.0 - t))); else tmp = x + ((y - z) / (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7.5e+25], N[(x + N[(z * N[(a / N[(N[(t + 1.0), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.5e-126], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-31], N[(x + N[(z * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 500000.0], N[(x + N[(y * N[(a / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+25}:\\
\;\;\;\;x + z \cdot \frac{a}{\left(t + 1\right) - z}\\
\mathbf{elif}\;z \leq 9.5 \cdot 10^{-126}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-31}:\\
\;\;\;\;x + z \cdot \frac{a}{t + 1}\\
\mathbf{elif}\;z \leq 500000:\\
\;\;\;\;x + y \cdot \frac{a}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\
\end{array}
\end{array}
if z < -7.49999999999999993e25Initial program 92.1%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in y around 0 78.1%
mul-1-neg78.1%
*-commutative78.1%
associate--l+78.1%
+-commutative78.1%
associate-*r/89.2%
distribute-rgt-neg-in89.2%
distribute-neg-frac289.2%
+-commutative89.2%
distribute-neg-in89.2%
metadata-eval89.2%
unsub-neg89.2%
associate--r-89.2%
Simplified89.2%
if -7.49999999999999993e25 < z < 9.5000000000000003e-126Initial program 98.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.8%
if 9.5000000000000003e-126 < z < 2.9000000000000001e-31Initial program 99.9%
associate-/r/95.5%
Simplified95.5%
Taylor expanded in y around 0 91.1%
mul-1-neg91.1%
*-commutative91.1%
associate--l+91.1%
+-commutative91.1%
associate-*r/91.2%
distribute-rgt-neg-in91.2%
distribute-neg-frac291.2%
+-commutative91.2%
distribute-neg-in91.2%
metadata-eval91.2%
unsub-neg91.2%
associate--r-91.2%
Simplified91.2%
Taylor expanded in z around 0 91.2%
associate-*r/91.2%
neg-mul-191.2%
Simplified91.2%
if 2.9000000000000001e-31 < z < 5e5Initial program 100.0%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 80.1%
*-commutative80.1%
associate-/l*90.3%
Simplified90.3%
if 5e5 < z Initial program 96.8%
Taylor expanded in z around inf 90.8%
mul-1-neg90.8%
distribute-neg-frac290.8%
Simplified90.8%
Final simplification90.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.5e+21)
(- x (* a (/ z (+ z (- -1.0 t)))))
(if (<= z 5.6e-126)
(- x (* a (/ y (+ t 1.0))))
(if (<= z 1.65e-34)
(+ x (* z (/ a (+ t 1.0))))
(if (<= z 255000.0)
(+ x (* y (/ a (- -1.0 t))))
(+ x (/ (- y z) (/ z a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.5e+21) {
tmp = x - (a * (z / (z + (-1.0 - t))));
} else if (z <= 5.6e-126) {
tmp = x - (a * (y / (t + 1.0)));
} else if (z <= 1.65e-34) {
tmp = x + (z * (a / (t + 1.0)));
} else if (z <= 255000.0) {
tmp = x + (y * (a / (-1.0 - t)));
} else {
tmp = x + ((y - z) / (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-4.5d+21)) then
tmp = x - (a * (z / (z + ((-1.0d0) - t))))
else if (z <= 5.6d-126) then
tmp = x - (a * (y / (t + 1.0d0)))
else if (z <= 1.65d-34) then
tmp = x + (z * (a / (t + 1.0d0)))
else if (z <= 255000.0d0) then
tmp = x + (y * (a / ((-1.0d0) - t)))
else
tmp = x + ((y - z) / (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.5e+21) {
tmp = x - (a * (z / (z + (-1.0 - t))));
} else if (z <= 5.6e-126) {
tmp = x - (a * (y / (t + 1.0)));
} else if (z <= 1.65e-34) {
tmp = x + (z * (a / (t + 1.0)));
} else if (z <= 255000.0) {
tmp = x + (y * (a / (-1.0 - t)));
} else {
tmp = x + ((y - z) / (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.5e+21: tmp = x - (a * (z / (z + (-1.0 - t)))) elif z <= 5.6e-126: tmp = x - (a * (y / (t + 1.0))) elif z <= 1.65e-34: tmp = x + (z * (a / (t + 1.0))) elif z <= 255000.0: tmp = x + (y * (a / (-1.0 - t))) else: tmp = x + ((y - z) / (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.5e+21) tmp = Float64(x - Float64(a * Float64(z / Float64(z + Float64(-1.0 - t))))); elseif (z <= 5.6e-126) tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); elseif (z <= 1.65e-34) tmp = Float64(x + Float64(z * Float64(a / Float64(t + 1.0)))); elseif (z <= 255000.0) tmp = Float64(x + Float64(y * Float64(a / Float64(-1.0 - t)))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.5e+21) tmp = x - (a * (z / (z + (-1.0 - t)))); elseif (z <= 5.6e-126) tmp = x - (a * (y / (t + 1.0))); elseif (z <= 1.65e-34) tmp = x + (z * (a / (t + 1.0))); elseif (z <= 255000.0) tmp = x + (y * (a / (-1.0 - t))); else tmp = x + ((y - z) / (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.5e+21], N[(x - N[(a * N[(z / N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.6e-126], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-34], N[(x + N[(z * N[(a / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 255000.0], N[(x + N[(y * N[(a / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+21}:\\
\;\;\;\;x - a \cdot \frac{z}{z + \left(-1 - t\right)}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{-126}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-34}:\\
\;\;\;\;x + z \cdot \frac{a}{t + 1}\\
\mathbf{elif}\;z \leq 255000:\\
\;\;\;\;x + y \cdot \frac{a}{-1 - t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\
\end{array}
\end{array}
if z < -4.5e21Initial program 92.1%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in y around 0 93.7%
mul-1-neg93.7%
associate--l+93.7%
+-commutative93.7%
distribute-neg-frac293.7%
+-commutative93.7%
distribute-neg-in93.7%
metadata-eval93.7%
unsub-neg93.7%
associate--r-93.7%
Simplified93.7%
if -4.5e21 < z < 5.59999999999999983e-126Initial program 98.9%
associate-/r/99.9%
Simplified99.9%
Taylor expanded in z around 0 90.8%
if 5.59999999999999983e-126 < z < 1.64999999999999991e-34Initial program 99.9%
associate-/r/95.5%
Simplified95.5%
Taylor expanded in y around 0 91.1%
mul-1-neg91.1%
*-commutative91.1%
associate--l+91.1%
+-commutative91.1%
associate-*r/91.2%
distribute-rgt-neg-in91.2%
distribute-neg-frac291.2%
+-commutative91.2%
distribute-neg-in91.2%
metadata-eval91.2%
unsub-neg91.2%
associate--r-91.2%
Simplified91.2%
Taylor expanded in z around 0 91.2%
associate-*r/91.2%
neg-mul-191.2%
Simplified91.2%
if 1.64999999999999991e-34 < z < 255000Initial program 100.0%
associate-/r/99.8%
Simplified99.8%
Taylor expanded in z around 0 80.1%
*-commutative80.1%
associate-/l*90.3%
Simplified90.3%
if 255000 < z Initial program 96.8%
Taylor expanded in z around inf 90.8%
mul-1-neg90.8%
distribute-neg-frac290.8%
Simplified90.8%
Final simplification91.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.3e+24)
(- x (* a (/ z (+ z (- -1.0 t)))))
(if (<= z 255000.0)
(+ x (/ (- y z) (/ (- -1.0 t) a)))
(+ x (/ (- y z) (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+24) {
tmp = x - (a * (z / (z + (-1.0 - t))));
} else if (z <= 255000.0) {
tmp = x + ((y - z) / ((-1.0 - t) / a));
} else {
tmp = x + ((y - z) / (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.3d+24)) then
tmp = x - (a * (z / (z + ((-1.0d0) - t))))
else if (z <= 255000.0d0) then
tmp = x + ((y - z) / (((-1.0d0) - t) / a))
else
tmp = x + ((y - z) / (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+24) {
tmp = x - (a * (z / (z + (-1.0 - t))));
} else if (z <= 255000.0) {
tmp = x + ((y - z) / ((-1.0 - t) / a));
} else {
tmp = x + ((y - z) / (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e+24: tmp = x - (a * (z / (z + (-1.0 - t)))) elif z <= 255000.0: tmp = x + ((y - z) / ((-1.0 - t) / a)) else: tmp = x + ((y - z) / (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e+24) tmp = Float64(x - Float64(a * Float64(z / Float64(z + Float64(-1.0 - t))))); elseif (z <= 255000.0) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(-1.0 - t) / a))); else tmp = Float64(x + Float64(Float64(y - z) / Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.3e+24) tmp = x - (a * (z / (z + (-1.0 - t)))); elseif (z <= 255000.0) tmp = x + ((y - z) / ((-1.0 - t) / a)); else tmp = x + ((y - z) / (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+24], N[(x - N[(a * N[(z / N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 255000.0], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(-1.0 - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - z), $MachinePrecision] / N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+24}:\\
\;\;\;\;x - a \cdot \frac{z}{z + \left(-1 - t\right)}\\
\mathbf{elif}\;z \leq 255000:\\
\;\;\;\;x + \frac{y - z}{\frac{-1 - t}{a}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - z}{\frac{z}{a}}\\
\end{array}
\end{array}
if z < -2.2999999999999999e24Initial program 92.1%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in y around 0 93.7%
mul-1-neg93.7%
associate--l+93.7%
+-commutative93.7%
distribute-neg-frac293.7%
+-commutative93.7%
distribute-neg-in93.7%
metadata-eval93.7%
unsub-neg93.7%
associate--r-93.7%
Simplified93.7%
if -2.2999999999999999e24 < z < 255000Initial program 99.1%
Taylor expanded in z around 0 97.1%
if 255000 < z Initial program 96.8%
Taylor expanded in z around inf 90.8%
mul-1-neg90.8%
distribute-neg-frac290.8%
Simplified90.8%
Final simplification94.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8e+23)
(- x (* a (/ z (+ z (- -1.0 t)))))
(if (<= z 820.0)
(+ x (/ (- y z) (/ (- -1.0 t) a)))
(- x (/ (- y z) (/ (- 1.0 z) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e+23) {
tmp = x - (a * (z / (z + (-1.0 - t))));
} else if (z <= 820.0) {
tmp = x + ((y - z) / ((-1.0 - t) / a));
} else {
tmp = x - ((y - z) / ((1.0 - z) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8d+23)) then
tmp = x - (a * (z / (z + ((-1.0d0) - t))))
else if (z <= 820.0d0) then
tmp = x + ((y - z) / (((-1.0d0) - t) / a))
else
tmp = x - ((y - z) / ((1.0d0 - z) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e+23) {
tmp = x - (a * (z / (z + (-1.0 - t))));
} else if (z <= 820.0) {
tmp = x + ((y - z) / ((-1.0 - t) / a));
} else {
tmp = x - ((y - z) / ((1.0 - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8e+23: tmp = x - (a * (z / (z + (-1.0 - t)))) elif z <= 820.0: tmp = x + ((y - z) / ((-1.0 - t) / a)) else: tmp = x - ((y - z) / ((1.0 - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8e+23) tmp = Float64(x - Float64(a * Float64(z / Float64(z + Float64(-1.0 - t))))); elseif (z <= 820.0) tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(-1.0 - t) / a))); else tmp = Float64(x - Float64(Float64(y - z) / Float64(Float64(1.0 - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8e+23) tmp = x - (a * (z / (z + (-1.0 - t)))); elseif (z <= 820.0) tmp = x + ((y - z) / ((-1.0 - t) / a)); else tmp = x - ((y - z) / ((1.0 - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8e+23], N[(x - N[(a * N[(z / N[(z + N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 820.0], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(-1.0 - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(1.0 - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+23}:\\
\;\;\;\;x - a \cdot \frac{z}{z + \left(-1 - t\right)}\\
\mathbf{elif}\;z \leq 820:\\
\;\;\;\;x + \frac{y - z}{\frac{-1 - t}{a}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y - z}{\frac{1 - z}{a}}\\
\end{array}
\end{array}
if z < -7.9999999999999993e23Initial program 92.1%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in y around 0 93.7%
mul-1-neg93.7%
associate--l+93.7%
+-commutative93.7%
distribute-neg-frac293.7%
+-commutative93.7%
distribute-neg-in93.7%
metadata-eval93.7%
unsub-neg93.7%
associate--r-93.7%
Simplified93.7%
if -7.9999999999999993e23 < z < 820Initial program 99.1%
Taylor expanded in z around 0 97.1%
if 820 < z Initial program 96.8%
Taylor expanded in t around 0 91.9%
Final simplification95.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.02e+30) (not (<= z 5000.0))) (- x a) (+ x (* y (/ a (- -1.0 t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.02e+30) || !(z <= 5000.0)) {
tmp = x - a;
} else {
tmp = x + (y * (a / (-1.0 - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.02d+30)) .or. (.not. (z <= 5000.0d0))) then
tmp = x - a
else
tmp = x + (y * (a / ((-1.0d0) - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.02e+30) || !(z <= 5000.0)) {
tmp = x - a;
} else {
tmp = x + (y * (a / (-1.0 - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.02e+30) or not (z <= 5000.0): tmp = x - a else: tmp = x + (y * (a / (-1.0 - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.02e+30) || !(z <= 5000.0)) tmp = Float64(x - a); else tmp = Float64(x + Float64(y * Float64(a / Float64(-1.0 - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.02e+30) || ~((z <= 5000.0))) tmp = x - a; else tmp = x + (y * (a / (-1.0 - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.02e+30], N[Not[LessEqual[z, 5000.0]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(y * N[(a / N[(-1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.02 \cdot 10^{+30} \lor \neg \left(z \leq 5000\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{a}{-1 - t}\\
\end{array}
\end{array}
if z < -1.02e30 or 5e3 < z Initial program 94.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 83.1%
if -1.02e30 < z < 5e3Initial program 99.1%
associate-/r/99.2%
Simplified99.2%
Taylor expanded in z around 0 84.4%
*-commutative84.4%
associate-/l*87.0%
Simplified87.0%
Final simplification85.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.25e+24) (not (<= z 1020000.0))) (- x a) (- x (* a (/ y (+ t 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.25e+24) || !(z <= 1020000.0)) {
tmp = x - a;
} else {
tmp = x - (a * (y / (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.25d+24)) .or. (.not. (z <= 1020000.0d0))) then
tmp = x - a
else
tmp = x - (a * (y / (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.25e+24) || !(z <= 1020000.0)) {
tmp = x - a;
} else {
tmp = x - (a * (y / (t + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.25e+24) or not (z <= 1020000.0): tmp = x - a else: tmp = x - (a * (y / (t + 1.0))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.25e+24) || !(z <= 1020000.0)) tmp = Float64(x - a); else tmp = Float64(x - Float64(a * Float64(y / Float64(t + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.25e+24) || ~((z <= 1020000.0))) tmp = x - a; else tmp = x - (a * (y / (t + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.25e+24], N[Not[LessEqual[z, 1020000.0]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(a * N[(y / N[(t + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+24} \lor \neg \left(z \leq 1020000\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - a \cdot \frac{y}{t + 1}\\
\end{array}
\end{array}
if z < -1.25000000000000011e24 or 1.02e6 < z Initial program 94.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 83.1%
if -1.25000000000000011e24 < z < 1.02e6Initial program 99.1%
associate-/r/99.2%
Simplified99.2%
Taylor expanded in z around 0 87.2%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.5e+22) (not (<= z 400.0))) (- x a) (- x (/ a (/ (+ t 1.0) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.5e+22) || !(z <= 400.0)) {
tmp = x - a;
} 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 <= (-4.5d+22)) .or. (.not. (z <= 400.0d0))) then
tmp = x - a
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 <= -4.5e+22) || !(z <= 400.0)) {
tmp = x - a;
} else {
tmp = x - (a / ((t + 1.0) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.5e+22) or not (z <= 400.0): tmp = x - a else: tmp = x - (a / ((t + 1.0) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.5e+22) || !(z <= 400.0)) tmp = Float64(x - a); 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 <= -4.5e+22) || ~((z <= 400.0))) tmp = x - a; else tmp = x - (a / ((t + 1.0) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.5e+22], N[Not[LessEqual[z, 400.0]], $MachinePrecision]], N[(x - a), $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 -4.5 \cdot 10^{+22} \lor \neg \left(z \leq 400\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - \frac{a}{\frac{t + 1}{y}}\\
\end{array}
\end{array}
if z < -4.4999999999999998e22 or 400 < z Initial program 94.5%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 83.1%
if -4.4999999999999998e22 < z < 400Initial program 99.1%
associate-/r/99.2%
Simplified99.2%
Taylor expanded in z around 0 87.2%
*-commutative87.2%
clear-num87.2%
un-div-inv87.2%
+-commutative87.2%
Applied egg-rr87.2%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.2e+22) (not (<= z 2e-10))) (- x a) (+ x (* z a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.2e+22) || !(z <= 2e-10)) {
tmp = x - a;
} else {
tmp = x + (z * a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.2d+22)) .or. (.not. (z <= 2d-10))) then
tmp = x - a
else
tmp = x + (z * a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.2e+22) || !(z <= 2e-10)) {
tmp = x - a;
} else {
tmp = x + (z * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.2e+22) or not (z <= 2e-10): tmp = x - a else: tmp = x + (z * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.2e+22) || !(z <= 2e-10)) tmp = Float64(x - a); else tmp = Float64(x + Float64(z * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.2e+22) || ~((z <= 2e-10))) tmp = x - a; else tmp = x + (z * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.2e+22], N[Not[LessEqual[z, 2e-10]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x + N[(z * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+22} \lor \neg \left(z \leq 2 \cdot 10^{-10}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot a\\
\end{array}
\end{array}
if z < -1.2e22 or 2.00000000000000007e-10 < z Initial program 94.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 82.9%
if -1.2e22 < z < 2.00000000000000007e-10Initial program 99.1%
associate-/r/99.1%
Simplified99.1%
Taylor expanded in y around 0 69.7%
mul-1-neg69.7%
*-commutative69.7%
associate--l+69.7%
+-commutative69.7%
associate-*r/69.7%
distribute-rgt-neg-in69.7%
distribute-neg-frac269.7%
+-commutative69.7%
distribute-neg-in69.7%
metadata-eval69.7%
unsub-neg69.7%
associate--r-69.7%
Simplified69.7%
Taylor expanded in t around 0 63.2%
Taylor expanded in z around 0 63.2%
+-commutative63.2%
Simplified63.2%
Final simplification73.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.45e+26) (not (<= z 4e-32))) (- x a) (- x (* y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.45e+26) || !(z <= 4e-32)) {
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 <= (-1.45d+26)) .or. (.not. (z <= 4d-32))) 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 <= -1.45e+26) || !(z <= 4e-32)) {
tmp = x - a;
} else {
tmp = x - (y * a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.45e+26) or not (z <= 4e-32): tmp = x - a else: tmp = x - (y * a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.45e+26) || !(z <= 4e-32)) 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 <= -1.45e+26) || ~((z <= 4e-32))) tmp = x - a; else tmp = x - (y * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.45e+26], N[Not[LessEqual[z, 4e-32]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(y * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{+26} \lor \neg \left(z \leq 4 \cdot 10^{-32}\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot a\\
\end{array}
\end{array}
if z < -1.45e26 or 4.00000000000000022e-32 < z Initial program 94.9%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 82.1%
if -1.45e26 < z < 4.00000000000000022e-32Initial program 99.1%
associate-/r/99.1%
Simplified99.1%
Taylor expanded in z around 0 87.0%
Taylor expanded in t around 0 67.8%
*-commutative67.8%
Simplified67.8%
Final simplification75.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -48000000000000.0) (not (<= z 54.0))) (- x a) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -48000000000000.0) || !(z <= 54.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 <= (-48000000000000.0d0)) .or. (.not. (z <= 54.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 <= -48000000000000.0) || !(z <= 54.0)) {
tmp = x - a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -48000000000000.0) or not (z <= 54.0): tmp = x - a else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -48000000000000.0) || !(z <= 54.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 <= -48000000000000.0) || ~((z <= 54.0))) tmp = x - a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -48000000000000.0], N[Not[LessEqual[z, 54.0]], $MachinePrecision]], N[(x - a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -48000000000000 \lor \neg \left(z \leq 54\right):\\
\;\;\;\;x - a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -4.8e13 or 54 < z Initial program 94.7%
associate-/r/100.0%
Simplified100.0%
Taylor expanded in z around inf 82.0%
if -4.8e13 < z < 54Initial program 99.1%
associate-/r/99.2%
Simplified99.2%
Taylor expanded in z around 0 88.3%
Taylor expanded in x around inf 60.8%
Final simplification71.3%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.9%
associate-/r/99.6%
Simplified99.6%
Taylor expanded in z around 0 69.1%
Taylor expanded in x around inf 55.9%
Final simplification55.9%
(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 2024059
(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))))