
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
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 - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
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 - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -2e-274)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0)
(- t (/ (* (- t x) (- y a)) z))
(+ x (/ (- t x) (/ (- a z) (- y z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -2e-274) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = t - (((t - x) * (y - a)) / z);
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -2e-274) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (t_1 <= 0.0) tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-274], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-274}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999993e-274Initial program 87.5%
+-commutative87.5%
remove-double-neg87.5%
unsub-neg87.5%
*-commutative87.5%
associate-*l/86.2%
associate-/l*93.2%
fma-neg93.2%
remove-double-neg93.2%
Simplified93.2%
if -1.99999999999999993e-274 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.3%
+-commutative3.3%
remove-double-neg3.3%
unsub-neg3.3%
*-commutative3.3%
associate-*l/6.7%
associate-/l*6.8%
fma-neg6.8%
remove-double-neg6.8%
Simplified6.8%
Taylor expanded in z around inf 89.0%
associate--l+89.0%
associate-*r/89.0%
associate-*r/89.0%
mul-1-neg89.0%
div-sub89.0%
mul-1-neg89.0%
distribute-lft-out--89.0%
associate-*r/89.0%
mul-1-neg89.0%
unsub-neg89.0%
distribute-rgt-out--89.2%
Simplified89.2%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.1%
Taylor expanded in y around 0 76.0%
+-commutative76.0%
div-sub76.0%
mul-1-neg76.0%
associate-/l*83.9%
distribute-lft-neg-out83.9%
distribute-rgt-out90.1%
sub-neg90.1%
associate-/r/93.2%
Simplified93.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-274) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(- t (/ (* (- t x) (- y a)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-274) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-274)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t - (((t - x) * (y - a)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-274) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-274) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-274) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-274) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-274], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-274} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999993e-274 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 88.8%
Taylor expanded in y around 0 80.1%
+-commutative80.1%
div-sub80.2%
mul-1-neg80.2%
associate-/l*85.7%
distribute-lft-neg-out85.7%
distribute-rgt-out88.8%
sub-neg88.8%
associate-/r/92.6%
Simplified92.6%
if -1.99999999999999993e-274 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.3%
+-commutative3.3%
remove-double-neg3.3%
unsub-neg3.3%
*-commutative3.3%
associate-*l/6.7%
associate-/l*6.8%
fma-neg6.8%
remove-double-neg6.8%
Simplified6.8%
Taylor expanded in z around inf 89.0%
associate--l+89.0%
associate-*r/89.0%
associate-*r/89.0%
mul-1-neg89.0%
div-sub89.0%
mul-1-neg89.0%
distribute-lft-out--89.0%
associate-*r/89.0%
mul-1-neg89.0%
unsub-neg89.0%
distribute-rgt-out--89.2%
Simplified89.2%
Final simplification92.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -2e-274) (not (<= t_1 0.0)))
t_1
(- t (/ (* (- t x) (- y a)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-274) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-2d-274)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = t - (((t - x) * (y - a)) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -2e-274) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t - (((t - x) * (y - a)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -2e-274) or not (t_1 <= 0.0): tmp = t_1 else: tmp = t - (((t - x) * (y - a)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -2e-274) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / (a - z))); tmp = 0.0; if ((t_1 <= -2e-274) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = t - (((t - x) * (y - a)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e-274], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-274} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.99999999999999993e-274 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 88.8%
if -1.99999999999999993e-274 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.3%
+-commutative3.3%
remove-double-neg3.3%
unsub-neg3.3%
*-commutative3.3%
associate-*l/6.7%
associate-/l*6.8%
fma-neg6.8%
remove-double-neg6.8%
Simplified6.8%
Taylor expanded in z around inf 89.0%
associate--l+89.0%
associate-*r/89.0%
associate-*r/89.0%
mul-1-neg89.0%
div-sub89.0%
mul-1-neg89.0%
distribute-lft-out--89.0%
associate-*r/89.0%
mul-1-neg89.0%
unsub-neg89.0%
distribute-rgt-out--89.2%
Simplified89.2%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -2.7e+52)
t_1
(if (<= z -7200.0)
(/ (* x (- y a)) z)
(if (<= z -6e-97)
(+ x (/ t (/ a (- y z))))
(if (<= z -8.2e-243)
(+ x (/ (* y t) (- a z)))
(if (<= z 1.6e-11)
(+ x (/ y (/ a (- t x))))
(if (<= z 8e+70)
(+ x (/ t (/ z (- z y))))
(if (<= z 3.5e+148) (- x (/ (* y (- t x)) z)) t_1)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -2.7e+52) {
tmp = t_1;
} else if (z <= -7200.0) {
tmp = (x * (y - a)) / z;
} else if (z <= -6e-97) {
tmp = x + (t / (a / (y - z)));
} else if (z <= -8.2e-243) {
tmp = x + ((y * t) / (a - z));
} else if (z <= 1.6e-11) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 8e+70) {
tmp = x + (t / (z / (z - y)));
} else if (z <= 3.5e+148) {
tmp = x - ((y * (t - x)) / z);
} 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 = t * (1.0d0 - (y / z))
if (z <= (-2.7d+52)) then
tmp = t_1
else if (z <= (-7200.0d0)) then
tmp = (x * (y - a)) / z
else if (z <= (-6d-97)) then
tmp = x + (t / (a / (y - z)))
else if (z <= (-8.2d-243)) then
tmp = x + ((y * t) / (a - z))
else if (z <= 1.6d-11) then
tmp = x + (y / (a / (t - x)))
else if (z <= 8d+70) then
tmp = x + (t / (z / (z - y)))
else if (z <= 3.5d+148) then
tmp = x - ((y * (t - x)) / z)
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 = t * (1.0 - (y / z));
double tmp;
if (z <= -2.7e+52) {
tmp = t_1;
} else if (z <= -7200.0) {
tmp = (x * (y - a)) / z;
} else if (z <= -6e-97) {
tmp = x + (t / (a / (y - z)));
} else if (z <= -8.2e-243) {
tmp = x + ((y * t) / (a - z));
} else if (z <= 1.6e-11) {
tmp = x + (y / (a / (t - x)));
} else if (z <= 8e+70) {
tmp = x + (t / (z / (z - y)));
} else if (z <= 3.5e+148) {
tmp = x - ((y * (t - x)) / z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -2.7e+52: tmp = t_1 elif z <= -7200.0: tmp = (x * (y - a)) / z elif z <= -6e-97: tmp = x + (t / (a / (y - z))) elif z <= -8.2e-243: tmp = x + ((y * t) / (a - z)) elif z <= 1.6e-11: tmp = x + (y / (a / (t - x))) elif z <= 8e+70: tmp = x + (t / (z / (z - y))) elif z <= 3.5e+148: tmp = x - ((y * (t - x)) / z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -2.7e+52) tmp = t_1; elseif (z <= -7200.0) tmp = Float64(Float64(x * Float64(y - a)) / z); elseif (z <= -6e-97) tmp = Float64(x + Float64(t / Float64(a / Float64(y - z)))); elseif (z <= -8.2e-243) tmp = Float64(x + Float64(Float64(y * t) / Float64(a - z))); elseif (z <= 1.6e-11) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (z <= 8e+70) tmp = Float64(x + Float64(t / Float64(z / Float64(z - y)))); elseif (z <= 3.5e+148) tmp = Float64(x - Float64(Float64(y * Float64(t - x)) / z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -2.7e+52) tmp = t_1; elseif (z <= -7200.0) tmp = (x * (y - a)) / z; elseif (z <= -6e-97) tmp = x + (t / (a / (y - z))); elseif (z <= -8.2e-243) tmp = x + ((y * t) / (a - z)); elseif (z <= 1.6e-11) tmp = x + (y / (a / (t - x))); elseif (z <= 8e+70) tmp = x + (t / (z / (z - y))); elseif (z <= 3.5e+148) tmp = x - ((y * (t - x)) / z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.7e+52], t$95$1, If[LessEqual[z, -7200.0], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -6e-97], N[(x + N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8.2e-243], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e-11], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+70], N[(x + N[(t / N[(z / N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+148], N[(x - N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -2.7 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7200:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-97}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y - z}}\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-243}:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-11}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+70}:\\
\;\;\;\;x + \frac{t}{\frac{z}{z - y}}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+148}:\\
\;\;\;\;x - \frac{y \cdot \left(t - x\right)}{z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.7e52 or 3.4999999999999999e148 < z Initial program 57.7%
+-commutative57.7%
remove-double-neg57.7%
unsub-neg57.7%
*-commutative57.7%
associate-*l/41.6%
associate-/l*67.2%
fma-neg67.2%
remove-double-neg67.2%
Simplified67.2%
Taylor expanded in a around 0 34.2%
mul-1-neg34.2%
unsub-neg34.2%
associate-/l*53.4%
div-sub53.4%
sub-neg53.4%
*-inverses53.4%
metadata-eval53.4%
Simplified53.4%
Taylor expanded in t around inf 66.0%
if -2.7e52 < z < -7200Initial program 67.5%
+-commutative67.5%
remove-double-neg67.5%
unsub-neg67.5%
*-commutative67.5%
associate-*l/68.8%
associate-/l*68.1%
fma-neg68.1%
remove-double-neg68.1%
Simplified68.1%
Taylor expanded in t around 0 68.8%
mul-1-neg68.8%
*-rgt-identity68.8%
associate-/l*68.1%
distribute-rgt-neg-in68.1%
mul-1-neg68.1%
distribute-lft-in68.1%
mul-1-neg68.1%
unsub-neg68.1%
Simplified68.1%
Taylor expanded in z around inf 83.3%
associate-*r/83.3%
associate-*r*83.3%
neg-mul-183.3%
neg-mul-183.3%
sub-neg83.3%
Simplified83.3%
if -7200 < z < -6.00000000000000048e-97Initial program 92.6%
Taylor expanded in t around inf 87.6%
Taylor expanded in a around inf 67.4%
associate-/l*71.9%
Simplified71.9%
clear-num71.8%
un-div-inv72.0%
Applied egg-rr72.0%
if -6.00000000000000048e-97 < z < -8.19999999999999962e-243Initial program 85.7%
Taylor expanded in t around inf 80.2%
Taylor expanded in y around inf 77.1%
if -8.19999999999999962e-243 < z < 1.59999999999999997e-11Initial program 94.8%
Taylor expanded in z around 0 75.8%
associate-/l*81.9%
Simplified81.9%
clear-num81.8%
un-div-inv83.1%
Applied egg-rr83.1%
if 1.59999999999999997e-11 < z < 8.00000000000000058e70Initial program 90.7%
Taylor expanded in y around 0 81.5%
+-commutative81.5%
div-sub81.6%
mul-1-neg81.6%
associate-/l*90.7%
distribute-lft-neg-out90.7%
distribute-rgt-out90.7%
sub-neg90.7%
associate-/r/90.7%
Simplified90.7%
Taylor expanded in t around inf 73.2%
Taylor expanded in a around 0 58.8%
neg-mul-158.8%
distribute-neg-frac58.8%
Simplified58.8%
if 8.00000000000000058e70 < z < 3.4999999999999999e148Initial program 75.8%
+-commutative75.8%
remove-double-neg75.8%
unsub-neg75.8%
*-commutative75.8%
associate-*l/72.0%
associate-/l*87.7%
fma-neg87.6%
remove-double-neg87.6%
Simplified87.6%
Taylor expanded in a around 0 47.8%
mul-1-neg47.8%
unsub-neg47.8%
associate-/l*55.5%
div-sub55.5%
sub-neg55.5%
*-inverses55.5%
metadata-eval55.5%
Simplified55.5%
Taylor expanded in y around inf 54.6%
Final simplification71.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -7.5e+53)
t_1
(if (<= z -10500.0)
(/ (* x (- y a)) z)
(if (<= z -6.2e-95)
(+ x (/ t (/ a (- y z))))
(if (<= z -1.2e-242)
(+ x (/ (* y t) (- a z)))
(if (<= z 6e-11) (+ x (/ y (/ a (- t x)))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -7.5e+53) {
tmp = t_1;
} else if (z <= -10500.0) {
tmp = (x * (y - a)) / z;
} else if (z <= -6.2e-95) {
tmp = x + (t / (a / (y - z)));
} else if (z <= -1.2e-242) {
tmp = x + ((y * t) / (a - z));
} else if (z <= 6e-11) {
tmp = x + (y / (a / (t - x)));
} 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 = t * (1.0d0 - (y / z))
if (z <= (-7.5d+53)) then
tmp = t_1
else if (z <= (-10500.0d0)) then
tmp = (x * (y - a)) / z
else if (z <= (-6.2d-95)) then
tmp = x + (t / (a / (y - z)))
else if (z <= (-1.2d-242)) then
tmp = x + ((y * t) / (a - z))
else if (z <= 6d-11) then
tmp = x + (y / (a / (t - x)))
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 = t * (1.0 - (y / z));
double tmp;
if (z <= -7.5e+53) {
tmp = t_1;
} else if (z <= -10500.0) {
tmp = (x * (y - a)) / z;
} else if (z <= -6.2e-95) {
tmp = x + (t / (a / (y - z)));
} else if (z <= -1.2e-242) {
tmp = x + ((y * t) / (a - z));
} else if (z <= 6e-11) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -7.5e+53: tmp = t_1 elif z <= -10500.0: tmp = (x * (y - a)) / z elif z <= -6.2e-95: tmp = x + (t / (a / (y - z))) elif z <= -1.2e-242: tmp = x + ((y * t) / (a - z)) elif z <= 6e-11: tmp = x + (y / (a / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -7.5e+53) tmp = t_1; elseif (z <= -10500.0) tmp = Float64(Float64(x * Float64(y - a)) / z); elseif (z <= -6.2e-95) tmp = Float64(x + Float64(t / Float64(a / Float64(y - z)))); elseif (z <= -1.2e-242) tmp = Float64(x + Float64(Float64(y * t) / Float64(a - z))); elseif (z <= 6e-11) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -7.5e+53) tmp = t_1; elseif (z <= -10500.0) tmp = (x * (y - a)) / z; elseif (z <= -6.2e-95) tmp = x + (t / (a / (y - z))); elseif (z <= -1.2e-242) tmp = x + ((y * t) / (a - z)); elseif (z <= 6e-11) tmp = x + (y / (a / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+53], t$95$1, If[LessEqual[z, -10500.0], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -6.2e-95], N[(x + N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.2e-242], N[(x + N[(N[(y * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6e-11], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -10500:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-95}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y - z}}\\
\mathbf{elif}\;z \leq -1.2 \cdot 10^{-242}:\\
\;\;\;\;x + \frac{y \cdot t}{a - z}\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-11}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.4999999999999997e53 or 6e-11 < z Initial program 67.1%
+-commutative67.1%
remove-double-neg67.1%
unsub-neg67.1%
*-commutative67.1%
associate-*l/54.8%
associate-/l*75.4%
fma-neg75.4%
remove-double-neg75.4%
Simplified75.4%
Taylor expanded in a around 0 42.1%
mul-1-neg42.1%
unsub-neg42.1%
associate-/l*56.4%
div-sub56.4%
sub-neg56.4%
*-inverses56.4%
metadata-eval56.4%
Simplified56.4%
Taylor expanded in t around inf 55.5%
if -7.4999999999999997e53 < z < -10500Initial program 67.5%
+-commutative67.5%
remove-double-neg67.5%
unsub-neg67.5%
*-commutative67.5%
associate-*l/68.8%
associate-/l*68.1%
fma-neg68.1%
remove-double-neg68.1%
Simplified68.1%
Taylor expanded in t around 0 68.8%
mul-1-neg68.8%
*-rgt-identity68.8%
associate-/l*68.1%
distribute-rgt-neg-in68.1%
mul-1-neg68.1%
distribute-lft-in68.1%
mul-1-neg68.1%
unsub-neg68.1%
Simplified68.1%
Taylor expanded in z around inf 83.3%
associate-*r/83.3%
associate-*r*83.3%
neg-mul-183.3%
neg-mul-183.3%
sub-neg83.3%
Simplified83.3%
if -10500 < z < -6.19999999999999983e-95Initial program 92.6%
Taylor expanded in t around inf 87.6%
Taylor expanded in a around inf 67.4%
associate-/l*71.9%
Simplified71.9%
clear-num71.8%
un-div-inv72.0%
Applied egg-rr72.0%
if -6.19999999999999983e-95 < z < -1.2e-242Initial program 85.7%
Taylor expanded in t around inf 80.2%
Taylor expanded in y around inf 77.1%
if -1.2e-242 < z < 6e-11Initial program 94.8%
Taylor expanded in z around 0 75.8%
associate-/l*81.9%
Simplified81.9%
clear-num81.8%
un-div-inv83.1%
Applied egg-rr83.1%
Final simplification68.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -1.95e+55)
t_1
(if (<= z -7700.0)
(/ (* x (- y a)) z)
(if (<= z -1.1e-152)
(+ x (* (- y z) (/ t a)))
(if (<= z 7.5e-9) (+ x (/ y (/ a (- t x)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -1.95e+55) {
tmp = t_1;
} else if (z <= -7700.0) {
tmp = (x * (y - a)) / z;
} else if (z <= -1.1e-152) {
tmp = x + ((y - z) * (t / a));
} else if (z <= 7.5e-9) {
tmp = x + (y / (a / (t - x)));
} 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 = t * (1.0d0 - (y / z))
if (z <= (-1.95d+55)) then
tmp = t_1
else if (z <= (-7700.0d0)) then
tmp = (x * (y - a)) / z
else if (z <= (-1.1d-152)) then
tmp = x + ((y - z) * (t / a))
else if (z <= 7.5d-9) then
tmp = x + (y / (a / (t - x)))
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 = t * (1.0 - (y / z));
double tmp;
if (z <= -1.95e+55) {
tmp = t_1;
} else if (z <= -7700.0) {
tmp = (x * (y - a)) / z;
} else if (z <= -1.1e-152) {
tmp = x + ((y - z) * (t / a));
} else if (z <= 7.5e-9) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -1.95e+55: tmp = t_1 elif z <= -7700.0: tmp = (x * (y - a)) / z elif z <= -1.1e-152: tmp = x + ((y - z) * (t / a)) elif z <= 7.5e-9: tmp = x + (y / (a / (t - x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.95e+55) tmp = t_1; elseif (z <= -7700.0) tmp = Float64(Float64(x * Float64(y - a)) / z); elseif (z <= -1.1e-152) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / a))); elseif (z <= 7.5e-9) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.95e+55) tmp = t_1; elseif (z <= -7700.0) tmp = (x * (y - a)) / z; elseif (z <= -1.1e-152) tmp = x + ((y - z) * (t / a)); elseif (z <= 7.5e-9) tmp = x + (y / (a / (t - x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e+55], t$95$1, If[LessEqual[z, -7700.0], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -1.1e-152], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-9], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7700:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{-152}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-9}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.95000000000000014e55 or 7.49999999999999933e-9 < z Initial program 67.1%
+-commutative67.1%
remove-double-neg67.1%
unsub-neg67.1%
*-commutative67.1%
associate-*l/54.8%
associate-/l*75.4%
fma-neg75.4%
remove-double-neg75.4%
Simplified75.4%
Taylor expanded in a around 0 42.1%
mul-1-neg42.1%
unsub-neg42.1%
associate-/l*56.4%
div-sub56.4%
sub-neg56.4%
*-inverses56.4%
metadata-eval56.4%
Simplified56.4%
Taylor expanded in t around inf 55.5%
if -1.95000000000000014e55 < z < -7700Initial program 67.5%
+-commutative67.5%
remove-double-neg67.5%
unsub-neg67.5%
*-commutative67.5%
associate-*l/68.8%
associate-/l*68.1%
fma-neg68.1%
remove-double-neg68.1%
Simplified68.1%
Taylor expanded in t around 0 68.8%
mul-1-neg68.8%
*-rgt-identity68.8%
associate-/l*68.1%
distribute-rgt-neg-in68.1%
mul-1-neg68.1%
distribute-lft-in68.1%
mul-1-neg68.1%
unsub-neg68.1%
Simplified68.1%
Taylor expanded in z around inf 83.3%
associate-*r/83.3%
associate-*r*83.3%
neg-mul-183.3%
neg-mul-183.3%
sub-neg83.3%
Simplified83.3%
if -7700 < z < -1.09999999999999992e-152Initial program 87.9%
Taylor expanded in t around inf 82.7%
Taylor expanded in a around inf 64.3%
if -1.09999999999999992e-152 < z < 7.49999999999999933e-9Initial program 93.8%
Taylor expanded in z around 0 73.1%
associate-/l*78.9%
Simplified78.9%
clear-num78.8%
un-div-inv79.9%
Applied egg-rr79.9%
Final simplification66.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -3.1e+53)
t_1
(if (<= z -4200.0)
(/ (* x (- y a)) z)
(if (<= z -8.2e-151)
(+ x (* (- y z) (/ t a)))
(if (<= z 7.4e-10) (+ x (* y (/ (- t x) a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -3.1e+53) {
tmp = t_1;
} else if (z <= -4200.0) {
tmp = (x * (y - a)) / z;
} else if (z <= -8.2e-151) {
tmp = x + ((y - z) * (t / a));
} else if (z <= 7.4e-10) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (y / z))
if (z <= (-3.1d+53)) then
tmp = t_1
else if (z <= (-4200.0d0)) then
tmp = (x * (y - a)) / z
else if (z <= (-8.2d-151)) then
tmp = x + ((y - z) * (t / a))
else if (z <= 7.4d-10) then
tmp = x + (y * ((t - x) / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -3.1e+53) {
tmp = t_1;
} else if (z <= -4200.0) {
tmp = (x * (y - a)) / z;
} else if (z <= -8.2e-151) {
tmp = x + ((y - z) * (t / a));
} else if (z <= 7.4e-10) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -3.1e+53: tmp = t_1 elif z <= -4200.0: tmp = (x * (y - a)) / z elif z <= -8.2e-151: tmp = x + ((y - z) * (t / a)) elif z <= 7.4e-10: tmp = x + (y * ((t - x) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -3.1e+53) tmp = t_1; elseif (z <= -4200.0) tmp = Float64(Float64(x * Float64(y - a)) / z); elseif (z <= -8.2e-151) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / a))); elseif (z <= 7.4e-10) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -3.1e+53) tmp = t_1; elseif (z <= -4200.0) tmp = (x * (y - a)) / z; elseif (z <= -8.2e-151) tmp = x + ((y - z) * (t / a)); elseif (z <= 7.4e-10) tmp = x + (y * ((t - x) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.1e+53], t$95$1, If[LessEqual[z, -4200.0], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -8.2e-151], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.4e-10], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4200:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{-151}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 7.4 \cdot 10^{-10}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.10000000000000019e53 or 7.4000000000000003e-10 < z Initial program 67.1%
+-commutative67.1%
remove-double-neg67.1%
unsub-neg67.1%
*-commutative67.1%
associate-*l/54.8%
associate-/l*75.4%
fma-neg75.4%
remove-double-neg75.4%
Simplified75.4%
Taylor expanded in a around 0 42.1%
mul-1-neg42.1%
unsub-neg42.1%
associate-/l*56.4%
div-sub56.4%
sub-neg56.4%
*-inverses56.4%
metadata-eval56.4%
Simplified56.4%
Taylor expanded in t around inf 55.5%
if -3.10000000000000019e53 < z < -4200Initial program 67.5%
+-commutative67.5%
remove-double-neg67.5%
unsub-neg67.5%
*-commutative67.5%
associate-*l/68.8%
associate-/l*68.1%
fma-neg68.1%
remove-double-neg68.1%
Simplified68.1%
Taylor expanded in t around 0 68.8%
mul-1-neg68.8%
*-rgt-identity68.8%
associate-/l*68.1%
distribute-rgt-neg-in68.1%
mul-1-neg68.1%
distribute-lft-in68.1%
mul-1-neg68.1%
unsub-neg68.1%
Simplified68.1%
Taylor expanded in z around inf 83.3%
associate-*r/83.3%
associate-*r*83.3%
neg-mul-183.3%
neg-mul-183.3%
sub-neg83.3%
Simplified83.3%
if -4200 < z < -8.2000000000000002e-151Initial program 87.9%
Taylor expanded in t around inf 82.7%
Taylor expanded in a around inf 64.3%
if -8.2000000000000002e-151 < z < 7.4000000000000003e-10Initial program 93.8%
Taylor expanded in z around 0 73.1%
associate-/l*78.9%
Simplified78.9%
Final simplification65.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -1.1e+52)
t_1
(if (<= z -11000.0)
(/ (* x (- y a)) z)
(if (<= z -7.5e-94)
(+ x (* t (/ (- y z) a)))
(if (<= z 8.5e-9) (+ x (* y (/ (- t x) a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -1.1e+52) {
tmp = t_1;
} else if (z <= -11000.0) {
tmp = (x * (y - a)) / z;
} else if (z <= -7.5e-94) {
tmp = x + (t * ((y - z) / a));
} else if (z <= 8.5e-9) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (y / z))
if (z <= (-1.1d+52)) then
tmp = t_1
else if (z <= (-11000.0d0)) then
tmp = (x * (y - a)) / z
else if (z <= (-7.5d-94)) then
tmp = x + (t * ((y - z) / a))
else if (z <= 8.5d-9) then
tmp = x + (y * ((t - x) / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -1.1e+52) {
tmp = t_1;
} else if (z <= -11000.0) {
tmp = (x * (y - a)) / z;
} else if (z <= -7.5e-94) {
tmp = x + (t * ((y - z) / a));
} else if (z <= 8.5e-9) {
tmp = x + (y * ((t - x) / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -1.1e+52: tmp = t_1 elif z <= -11000.0: tmp = (x * (y - a)) / z elif z <= -7.5e-94: tmp = x + (t * ((y - z) / a)) elif z <= 8.5e-9: tmp = x + (y * ((t - x) / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.1e+52) tmp = t_1; elseif (z <= -11000.0) tmp = Float64(Float64(x * Float64(y - a)) / z); elseif (z <= -7.5e-94) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / a))); elseif (z <= 8.5e-9) tmp = Float64(x + Float64(y * Float64(Float64(t - x) / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.1e+52) tmp = t_1; elseif (z <= -11000.0) tmp = (x * (y - a)) / z; elseif (z <= -7.5e-94) tmp = x + (t * ((y - z) / a)); elseif (z <= 8.5e-9) tmp = x + (y * ((t - x) / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.1e+52], t$95$1, If[LessEqual[z, -11000.0], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -7.5e-94], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e-9], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.1 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -11000:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-94}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-9}:\\
\;\;\;\;x + y \cdot \frac{t - x}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.1e52 or 8.5e-9 < z Initial program 67.1%
+-commutative67.1%
remove-double-neg67.1%
unsub-neg67.1%
*-commutative67.1%
associate-*l/54.8%
associate-/l*75.4%
fma-neg75.4%
remove-double-neg75.4%
Simplified75.4%
Taylor expanded in a around 0 42.1%
mul-1-neg42.1%
unsub-neg42.1%
associate-/l*56.4%
div-sub56.4%
sub-neg56.4%
*-inverses56.4%
metadata-eval56.4%
Simplified56.4%
Taylor expanded in t around inf 55.5%
if -1.1e52 < z < -11000Initial program 67.5%
+-commutative67.5%
remove-double-neg67.5%
unsub-neg67.5%
*-commutative67.5%
associate-*l/68.8%
associate-/l*68.1%
fma-neg68.1%
remove-double-neg68.1%
Simplified68.1%
Taylor expanded in t around 0 68.8%
mul-1-neg68.8%
*-rgt-identity68.8%
associate-/l*68.1%
distribute-rgt-neg-in68.1%
mul-1-neg68.1%
distribute-lft-in68.1%
mul-1-neg68.1%
unsub-neg68.1%
Simplified68.1%
Taylor expanded in z around inf 83.3%
associate-*r/83.3%
associate-*r*83.3%
neg-mul-183.3%
neg-mul-183.3%
sub-neg83.3%
Simplified83.3%
if -11000 < z < -7.5000000000000003e-94Initial program 92.6%
Taylor expanded in t around inf 87.6%
Taylor expanded in a around inf 67.4%
associate-/l*71.9%
Simplified71.9%
if -7.5000000000000003e-94 < z < 8.5e-9Initial program 92.0%
Taylor expanded in z around 0 70.0%
associate-/l*74.9%
Simplified74.9%
Final simplification65.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))) (t_2 (+ x (* t (/ (- y z) a)))))
(if (<= a -3.9e+58)
t_2
(if (<= a 1.35e-305)
t_1
(if (<= a 1.95e-177)
(* x (/ (- y a) z))
(if (<= a 1.05e-86) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double t_2 = x + (t * ((y - z) / a));
double tmp;
if (a <= -3.9e+58) {
tmp = t_2;
} else if (a <= 1.35e-305) {
tmp = t_1;
} else if (a <= 1.95e-177) {
tmp = x * ((y - a) / z);
} else if (a <= 1.05e-86) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (1.0d0 - (y / z))
t_2 = x + (t * ((y - z) / a))
if (a <= (-3.9d+58)) then
tmp = t_2
else if (a <= 1.35d-305) then
tmp = t_1
else if (a <= 1.95d-177) then
tmp = x * ((y - a) / z)
else if (a <= 1.05d-86) 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 = t * (1.0 - (y / z));
double t_2 = x + (t * ((y - z) / a));
double tmp;
if (a <= -3.9e+58) {
tmp = t_2;
} else if (a <= 1.35e-305) {
tmp = t_1;
} else if (a <= 1.95e-177) {
tmp = x * ((y - a) / z);
} else if (a <= 1.05e-86) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) t_2 = x + (t * ((y - z) / a)) tmp = 0 if a <= -3.9e+58: tmp = t_2 elif a <= 1.35e-305: tmp = t_1 elif a <= 1.95e-177: tmp = x * ((y - a) / z) elif a <= 1.05e-86: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) t_2 = Float64(x + Float64(t * Float64(Float64(y - z) / a))) tmp = 0.0 if (a <= -3.9e+58) tmp = t_2; elseif (a <= 1.35e-305) tmp = t_1; elseif (a <= 1.95e-177) tmp = Float64(x * Float64(Float64(y - a) / z)); elseif (a <= 1.05e-86) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); t_2 = x + (t * ((y - z) / a)); tmp = 0.0; if (a <= -3.9e+58) tmp = t_2; elseif (a <= 1.35e-305) tmp = t_1; elseif (a <= 1.95e-177) tmp = x * ((y - a) / z); elseif (a <= 1.05e-86) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.9e+58], t$95$2, If[LessEqual[a, 1.35e-305], t$95$1, If[LessEqual[a, 1.95e-177], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.05e-86], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
t_2 := x + t \cdot \frac{y - z}{a}\\
\mathbf{if}\;a \leq -3.9 \cdot 10^{+58}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{-305}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{-177}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -3.9000000000000001e58 or 1.05e-86 < a Initial program 85.6%
Taylor expanded in t around inf 74.9%
Taylor expanded in a around inf 59.4%
associate-/l*63.5%
Simplified63.5%
if -3.9000000000000001e58 < a < 1.35e-305 or 1.95000000000000007e-177 < a < 1.05e-86Initial program 76.4%
+-commutative76.4%
remove-double-neg76.4%
unsub-neg76.4%
*-commutative76.4%
associate-*l/72.8%
associate-/l*81.9%
fma-neg81.9%
remove-double-neg81.9%
Simplified81.9%
Taylor expanded in a around 0 51.2%
mul-1-neg51.2%
unsub-neg51.2%
associate-/l*62.1%
div-sub62.1%
sub-neg62.1%
*-inverses62.1%
metadata-eval62.1%
Simplified62.1%
Taylor expanded in t around inf 61.1%
if 1.35e-305 < a < 1.95000000000000007e-177Initial program 62.5%
+-commutative62.5%
remove-double-neg62.5%
unsub-neg62.5%
*-commutative62.5%
associate-*l/66.5%
associate-/l*74.4%
fma-neg74.4%
remove-double-neg74.4%
Simplified74.4%
Taylor expanded in t around 0 40.9%
mul-1-neg40.9%
*-rgt-identity40.9%
associate-/l*48.3%
distribute-rgt-neg-in48.3%
mul-1-neg48.3%
distribute-lft-in48.2%
mul-1-neg48.2%
unsub-neg48.2%
Simplified48.2%
Taylor expanded in z around inf 74.0%
neg-mul-174.0%
sub-neg74.0%
mul-1-neg74.0%
Simplified74.0%
Final simplification63.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (/ (* (- t x) (- y a)) z))))
(if (<= z -7200.0)
t_1
(if (<= z -3.9e-154)
(+ x (* (- y z) (/ t (- a z))))
(if (<= z 6.6e-9) (+ x (/ (- t x) (/ (- a z) y))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (((t - x) * (y - a)) / z);
double tmp;
if (z <= -7200.0) {
tmp = t_1;
} else if (z <= -3.9e-154) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 6.6e-9) {
tmp = x + ((t - x) / ((a - z) / y));
} 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 = t - (((t - x) * (y - a)) / z)
if (z <= (-7200.0d0)) then
tmp = t_1
else if (z <= (-3.9d-154)) then
tmp = x + ((y - z) * (t / (a - z)))
else if (z <= 6.6d-9) then
tmp = x + ((t - x) / ((a - z) / y))
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 = t - (((t - x) * (y - a)) / z);
double tmp;
if (z <= -7200.0) {
tmp = t_1;
} else if (z <= -3.9e-154) {
tmp = x + ((y - z) * (t / (a - z)));
} else if (z <= 6.6e-9) {
tmp = x + ((t - x) / ((a - z) / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (((t - x) * (y - a)) / z) tmp = 0 if z <= -7200.0: tmp = t_1 elif z <= -3.9e-154: tmp = x + ((y - z) * (t / (a - z))) elif z <= 6.6e-9: tmp = x + ((t - x) / ((a - z) / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z)) tmp = 0.0 if (z <= -7200.0) tmp = t_1; elseif (z <= -3.9e-154) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); elseif (z <= 6.6e-9) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (((t - x) * (y - a)) / z); tmp = 0.0; if (z <= -7200.0) tmp = t_1; elseif (z <= -3.9e-154) tmp = x + ((y - z) * (t / (a - z))); elseif (z <= 6.6e-9) tmp = x + ((t - x) / ((a - z) / y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7200.0], t$95$1, If[LessEqual[z, -3.9e-154], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e-9], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
\mathbf{if}\;z \leq -7200:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.9 \cdot 10^{-154}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-9}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7200 or 6.60000000000000037e-9 < z Initial program 67.1%
+-commutative67.1%
remove-double-neg67.1%
unsub-neg67.1%
*-commutative67.1%
associate-*l/55.4%
associate-/l*75.1%
fma-neg75.0%
remove-double-neg75.0%
Simplified75.0%
Taylor expanded in z around inf 75.8%
associate--l+75.8%
associate-*r/75.8%
associate-*r/75.8%
mul-1-neg75.8%
div-sub75.8%
mul-1-neg75.8%
distribute-lft-out--75.8%
associate-*r/75.8%
mul-1-neg75.8%
unsub-neg75.8%
distribute-rgt-out--75.9%
Simplified75.9%
if -7200 < z < -3.90000000000000032e-154Initial program 87.9%
Taylor expanded in t around inf 82.7%
if -3.90000000000000032e-154 < z < 6.60000000000000037e-9Initial program 93.8%
Taylor expanded in y around 0 93.6%
+-commutative93.6%
div-sub93.7%
mul-1-neg93.7%
associate-/l*87.2%
distribute-lft-neg-out87.2%
distribute-rgt-out93.8%
sub-neg93.8%
associate-/r/94.8%
Simplified94.8%
Taylor expanded in y around inf 89.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -1.02e+55)
t_1
(if (<= z -3.8e-13)
(/ (* x (- y a)) z)
(if (<= z 1.85e-13) (+ x (* t (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -1.02e+55) {
tmp = t_1;
} else if (z <= -3.8e-13) {
tmp = (x * (y - a)) / z;
} else if (z <= 1.85e-13) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (y / z))
if (z <= (-1.02d+55)) then
tmp = t_1
else if (z <= (-3.8d-13)) then
tmp = (x * (y - a)) / z
else if (z <= 1.85d-13) then
tmp = x + (t * (y / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -1.02e+55) {
tmp = t_1;
} else if (z <= -3.8e-13) {
tmp = (x * (y - a)) / z;
} else if (z <= 1.85e-13) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -1.02e+55: tmp = t_1 elif z <= -3.8e-13: tmp = (x * (y - a)) / z elif z <= 1.85e-13: tmp = x + (t * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -1.02e+55) tmp = t_1; elseif (z <= -3.8e-13) tmp = Float64(Float64(x * Float64(y - a)) / z); elseif (z <= 1.85e-13) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -1.02e+55) tmp = t_1; elseif (z <= -3.8e-13) tmp = (x * (y - a)) / z; elseif (z <= 1.85e-13) tmp = x + (t * (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.02e+55], t$95$1, If[LessEqual[z, -3.8e-13], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.85e-13], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -1.02 \cdot 10^{+55}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-13}:\\
\;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-13}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.02000000000000002e55 or 1.84999999999999994e-13 < z Initial program 67.1%
+-commutative67.1%
remove-double-neg67.1%
unsub-neg67.1%
*-commutative67.1%
associate-*l/54.8%
associate-/l*75.4%
fma-neg75.4%
remove-double-neg75.4%
Simplified75.4%
Taylor expanded in a around 0 42.1%
mul-1-neg42.1%
unsub-neg42.1%
associate-/l*56.4%
div-sub56.4%
sub-neg56.4%
*-inverses56.4%
metadata-eval56.4%
Simplified56.4%
Taylor expanded in t around inf 55.5%
if -1.02000000000000002e55 < z < -3.8e-13Initial program 78.3%
+-commutative78.3%
remove-double-neg78.3%
unsub-neg78.3%
*-commutative78.3%
associate-*l/79.0%
associate-/l*78.5%
fma-neg78.5%
remove-double-neg78.5%
Simplified78.5%
Taylor expanded in t around 0 68.2%
mul-1-neg68.2%
*-rgt-identity68.2%
associate-/l*67.5%
distribute-rgt-neg-in67.5%
mul-1-neg67.5%
distribute-lft-in67.5%
mul-1-neg67.5%
unsub-neg67.5%
Simplified67.5%
Taylor expanded in z around inf 67.8%
associate-*r/67.8%
associate-*r*67.8%
neg-mul-167.8%
neg-mul-167.8%
sub-neg67.8%
Simplified67.8%
if -3.8e-13 < z < 1.84999999999999994e-13Initial program 91.9%
Taylor expanded in y around 0 91.8%
+-commutative91.8%
div-sub91.9%
mul-1-neg91.9%
associate-/l*86.3%
distribute-lft-neg-out86.3%
distribute-rgt-out91.9%
sub-neg91.9%
associate-/r/91.5%
Simplified91.5%
Taylor expanded in t around inf 76.3%
Taylor expanded in z around 0 56.8%
associate-/l*59.8%
Simplified59.8%
Final simplification58.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (- 1.0 (/ y z)))))
(if (<= z -9e+52)
t_1
(if (<= z -7.8e-13)
(* x (/ (- y a) z))
(if (<= z 5.8e-9) (+ x (* t (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -9e+52) {
tmp = t_1;
} else if (z <= -7.8e-13) {
tmp = x * ((y - a) / z);
} else if (z <= 5.8e-9) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * (1.0d0 - (y / z))
if (z <= (-9d+52)) then
tmp = t_1
else if (z <= (-7.8d-13)) then
tmp = x * ((y - a) / z)
else if (z <= 5.8d-9) then
tmp = x + (t * (y / a))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (1.0 - (y / z));
double tmp;
if (z <= -9e+52) {
tmp = t_1;
} else if (z <= -7.8e-13) {
tmp = x * ((y - a) / z);
} else if (z <= 5.8e-9) {
tmp = x + (t * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (1.0 - (y / z)) tmp = 0 if z <= -9e+52: tmp = t_1 elif z <= -7.8e-13: tmp = x * ((y - a) / z) elif z <= 5.8e-9: tmp = x + (t * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(1.0 - Float64(y / z))) tmp = 0.0 if (z <= -9e+52) tmp = t_1; elseif (z <= -7.8e-13) tmp = Float64(x * Float64(Float64(y - a) / z)); elseif (z <= 5.8e-9) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (1.0 - (y / z)); tmp = 0.0; if (z <= -9e+52) tmp = t_1; elseif (z <= -7.8e-13) tmp = x * ((y - a) / z); elseif (z <= 5.8e-9) tmp = x + (t * (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+52], t$95$1, If[LessEqual[z, -7.8e-13], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-9], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-13}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-9}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.9999999999999999e52 or 5.79999999999999982e-9 < z Initial program 67.1%
+-commutative67.1%
remove-double-neg67.1%
unsub-neg67.1%
*-commutative67.1%
associate-*l/54.8%
associate-/l*75.4%
fma-neg75.4%
remove-double-neg75.4%
Simplified75.4%
Taylor expanded in a around 0 42.1%
mul-1-neg42.1%
unsub-neg42.1%
associate-/l*56.4%
div-sub56.4%
sub-neg56.4%
*-inverses56.4%
metadata-eval56.4%
Simplified56.4%
Taylor expanded in t around inf 55.5%
if -8.9999999999999999e52 < z < -7.80000000000000009e-13Initial program 78.3%
+-commutative78.3%
remove-double-neg78.3%
unsub-neg78.3%
*-commutative78.3%
associate-*l/79.0%
associate-/l*78.5%
fma-neg78.5%
remove-double-neg78.5%
Simplified78.5%
Taylor expanded in t around 0 68.2%
mul-1-neg68.2%
*-rgt-identity68.2%
associate-/l*67.5%
distribute-rgt-neg-in67.5%
mul-1-neg67.5%
distribute-lft-in67.5%
mul-1-neg67.5%
unsub-neg67.5%
Simplified67.5%
Taylor expanded in z around inf 67.5%
neg-mul-167.5%
sub-neg67.5%
mul-1-neg67.5%
Simplified67.5%
if -7.80000000000000009e-13 < z < 5.79999999999999982e-9Initial program 91.9%
Taylor expanded in y around 0 91.8%
+-commutative91.8%
div-sub91.9%
mul-1-neg91.9%
associate-/l*86.3%
distribute-lft-neg-out86.3%
distribute-rgt-out91.9%
sub-neg91.9%
associate-/r/91.5%
Simplified91.5%
Taylor expanded in t around inf 76.3%
Taylor expanded in z around 0 56.8%
associate-/l*59.8%
Simplified59.8%
Final simplification58.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.2e+62) (not (<= y 1.4e+71))) (+ x (/ (- t x) (/ (- a z) y))) (+ x (* t (/ (- y z) (- a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.2e+62) || !(y <= 1.4e+71)) {
tmp = x + ((t - x) / ((a - z) / y));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-3.2d+62)) .or. (.not. (y <= 1.4d+71))) then
tmp = x + ((t - x) / ((a - z) / y))
else
tmp = x + (t * ((y - z) / (a - z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.2e+62) || !(y <= 1.4e+71)) {
tmp = x + ((t - x) / ((a - z) / y));
} else {
tmp = x + (t * ((y - z) / (a - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.2e+62) or not (y <= 1.4e+71): tmp = x + ((t - x) / ((a - z) / y)) else: tmp = x + (t * ((y - z) / (a - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.2e+62) || !(y <= 1.4e+71)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / y))); else tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.2e+62) || ~((y <= 1.4e+71))) tmp = x + ((t - x) / ((a - z) / y)); else tmp = x + (t * ((y - z) / (a - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.2e+62], N[Not[LessEqual[y, 1.4e+71]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+62} \lor \neg \left(y \leq 1.4 \cdot 10^{+71}\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if y < -3.19999999999999984e62 or 1.40000000000000001e71 < y Initial program 86.2%
Taylor expanded in y around 0 79.6%
+-commutative79.6%
div-sub79.6%
mul-1-neg79.6%
associate-/l*79.5%
distribute-lft-neg-out79.5%
distribute-rgt-out86.2%
sub-neg86.2%
associate-/r/91.2%
Simplified91.2%
Taylor expanded in y around inf 84.1%
if -3.19999999999999984e62 < y < 1.40000000000000001e71Initial program 76.4%
Taylor expanded in t around inf 68.1%
associate-/l*76.2%
Simplified76.2%
Final simplification79.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.8e-208) (not (<= t 2e-132))) (+ x (* t (/ (- y z) (- a z)))) (* x (+ (/ (- y z) (- z a)) 1.0))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.8e-208) || !(t <= 2e-132)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x * (((y - z) / (z - a)) + 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 ((t <= (-3.8d-208)) .or. (.not. (t <= 2d-132))) then
tmp = x + (t * ((y - z) / (a - z)))
else
tmp = x * (((y - z) / (z - a)) + 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 ((t <= -3.8e-208) || !(t <= 2e-132)) {
tmp = x + (t * ((y - z) / (a - z)));
} else {
tmp = x * (((y - z) / (z - a)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.8e-208) or not (t <= 2e-132): tmp = x + (t * ((y - z) / (a - z))) else: tmp = x * (((y - z) / (z - a)) + 1.0) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.8e-208) || !(t <= 2e-132)) tmp = Float64(x + Float64(t * Float64(Float64(y - z) / Float64(a - z)))); else tmp = Float64(x * Float64(Float64(Float64(y - z) / Float64(z - a)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.8e-208) || ~((t <= 2e-132))) tmp = x + (t * ((y - z) / (a - z))); else tmp = x * (((y - z) / (z - a)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.8e-208], N[Not[LessEqual[t, 2e-132]], $MachinePrecision]], N[(x + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{-208} \lor \neg \left(t \leq 2 \cdot 10^{-132}\right):\\
\;\;\;\;x + t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\
\end{array}
\end{array}
if t < -3.80000000000000011e-208 or 2e-132 < t Initial program 84.7%
Taylor expanded in t around inf 67.2%
associate-/l*78.6%
Simplified78.6%
if -3.80000000000000011e-208 < t < 2e-132Initial program 65.6%
+-commutative65.6%
remove-double-neg65.6%
unsub-neg65.6%
*-commutative65.6%
associate-*l/64.9%
associate-/l*67.9%
fma-neg67.9%
remove-double-neg67.9%
Simplified67.9%
Taylor expanded in t around 0 57.9%
mul-1-neg57.9%
*-rgt-identity57.9%
associate-/l*62.1%
distribute-rgt-neg-in62.1%
mul-1-neg62.1%
distribute-lft-in62.1%
mul-1-neg62.1%
unsub-neg62.1%
Simplified62.1%
Final simplification74.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -20000.0) t (if (<= z 5e-128) x (if (<= z 2.7e+234) (+ x t) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -20000.0) {
tmp = t;
} else if (z <= 5e-128) {
tmp = x;
} else if (z <= 2.7e+234) {
tmp = x + t;
} else {
tmp = 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 <= (-20000.0d0)) then
tmp = t
else if (z <= 5d-128) then
tmp = x
else if (z <= 2.7d+234) then
tmp = x + t
else
tmp = 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 <= -20000.0) {
tmp = t;
} else if (z <= 5e-128) {
tmp = x;
} else if (z <= 2.7e+234) {
tmp = x + t;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -20000.0: tmp = t elif z <= 5e-128: tmp = x elif z <= 2.7e+234: tmp = x + t else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -20000.0) tmp = t; elseif (z <= 5e-128) tmp = x; elseif (z <= 2.7e+234) tmp = Float64(x + t); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -20000.0) tmp = t; elseif (z <= 5e-128) tmp = x; elseif (z <= 2.7e+234) tmp = x + t; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -20000.0], t, If[LessEqual[z, 5e-128], x, If[LessEqual[z, 2.7e+234], N[(x + t), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -20000:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-128}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+234}:\\
\;\;\;\;x + t\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2e4 or 2.7000000000000002e234 < z Initial program 52.8%
Taylor expanded in y around 0 41.1%
+-commutative41.1%
div-sub41.1%
mul-1-neg41.1%
associate-/l*52.8%
distribute-lft-neg-out52.8%
distribute-rgt-out52.8%
sub-neg52.8%
associate-/r/62.4%
Simplified62.4%
Taylor expanded in z around inf 54.9%
if -2e4 < z < 5.0000000000000001e-128Initial program 91.4%
+-commutative91.4%
remove-double-neg91.4%
unsub-neg91.4%
*-commutative91.4%
associate-*l/89.4%
associate-/l*92.7%
fma-neg92.7%
remove-double-neg92.7%
Simplified92.7%
Taylor expanded in a around inf 40.4%
if 5.0000000000000001e-128 < z < 2.7000000000000002e234Initial program 87.0%
Taylor expanded in t around inf 67.1%
Taylor expanded in z around inf 43.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -8e+36) (not (<= z 2.1e-10))) (* t (- 1.0 (/ y z))) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8e+36) || !(z <= 2.1e-10)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (t * (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 <= (-8d+36)) .or. (.not. (z <= 2.1d-10))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x + (t * (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 <= -8e+36) || !(z <= 2.1e-10)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8e+36) or not (z <= 2.1e-10): tmp = t * (1.0 - (y / z)) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8e+36) || !(z <= 2.1e-10)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -8e+36) || ~((z <= 2.1e-10))) tmp = t * (1.0 - (y / z)); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -8e+36], N[Not[LessEqual[z, 2.1e-10]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+36} \lor \neg \left(z \leq 2.1 \cdot 10^{-10}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -8.00000000000000034e36 or 2.1e-10 < z Initial program 66.3%
+-commutative66.3%
remove-double-neg66.3%
unsub-neg66.3%
*-commutative66.3%
associate-*l/54.3%
associate-/l*74.5%
fma-neg74.4%
remove-double-neg74.4%
Simplified74.4%
Taylor expanded in a around 0 41.2%
mul-1-neg41.2%
unsub-neg41.2%
associate-/l*55.1%
div-sub55.1%
sub-neg55.1%
*-inverses55.1%
metadata-eval55.1%
Simplified55.1%
Taylor expanded in t around inf 54.3%
if -8.00000000000000034e36 < z < 2.1e-10Initial program 92.2%
Taylor expanded in y around 0 92.1%
+-commutative92.1%
div-sub92.2%
mul-1-neg92.2%
associate-/l*86.9%
distribute-lft-neg-out86.9%
distribute-rgt-out92.2%
sub-neg92.2%
associate-/r/91.9%
Simplified91.9%
Taylor expanded in t around inf 74.4%
Taylor expanded in z around 0 55.2%
associate-/l*58.0%
Simplified58.0%
Final simplification56.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.7e+38) (not (<= z 3.5e-20))) (* t (- 1.0 (/ y z))) (* x (- 1.0 (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.7e+38) || !(z <= 3.5e-20)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x * (1.0 - (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.7d+38)) .or. (.not. (z <= 3.5d-20))) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x * (1.0d0 - (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.7e+38) || !(z <= 3.5e-20)) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.7e+38) or not (z <= 3.5e-20): tmp = t * (1.0 - (y / z)) else: tmp = x * (1.0 - (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.7e+38) || !(z <= 3.5e-20)) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = Float64(x * Float64(1.0 - Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.7e+38) || ~((z <= 3.5e-20))) tmp = t * (1.0 - (y / z)); else tmp = x * (1.0 - (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.7e+38], N[Not[LessEqual[z, 3.5e-20]], $MachinePrecision]], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+38} \lor \neg \left(z \leq 3.5 \cdot 10^{-20}\right):\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if z < -1.69999999999999998e38 or 3.50000000000000003e-20 < z Initial program 66.3%
+-commutative66.3%
remove-double-neg66.3%
unsub-neg66.3%
*-commutative66.3%
associate-*l/54.3%
associate-/l*74.5%
fma-neg74.4%
remove-double-neg74.4%
Simplified74.4%
Taylor expanded in a around 0 41.3%
mul-1-neg41.3%
unsub-neg41.3%
associate-/l*55.2%
div-sub55.2%
sub-neg55.2%
*-inverses55.2%
metadata-eval55.2%
Simplified55.2%
Taylor expanded in t around inf 54.4%
if -1.69999999999999998e38 < z < 3.50000000000000003e-20Initial program 92.2%
+-commutative92.2%
remove-double-neg92.2%
unsub-neg92.2%
*-commutative92.2%
associate-*l/89.1%
associate-/l*93.0%
fma-neg93.0%
remove-double-neg93.0%
Simplified93.0%
Taylor expanded in t around 0 55.7%
mul-1-neg55.7%
*-rgt-identity55.7%
associate-/l*61.9%
distribute-rgt-neg-in61.9%
mul-1-neg61.9%
distribute-lft-in61.9%
mul-1-neg61.9%
unsub-neg61.9%
Simplified61.9%
Taylor expanded in z around 0 55.5%
Final simplification55.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -2e+64) x (if (<= a 170000000.0) (* t (- 1.0 (/ y z))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e+64) {
tmp = x;
} else if (a <= 170000000.0) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2d+64)) then
tmp = x
else if (a <= 170000000.0d0) then
tmp = t * (1.0d0 - (y / z))
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e+64) {
tmp = x;
} else if (a <= 170000000.0) {
tmp = t * (1.0 - (y / z));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2e+64: tmp = x elif a <= 170000000.0: tmp = t * (1.0 - (y / z)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2e+64) tmp = x; elseif (a <= 170000000.0) tmp = Float64(t * Float64(1.0 - Float64(y / z))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2e+64) tmp = x; elseif (a <= 170000000.0) tmp = t * (1.0 - (y / z)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2e+64], x, If[LessEqual[a, 170000000.0], N[(t * N[(1.0 - N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{+64}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 170000000:\\
\;\;\;\;t \cdot \left(1 - \frac{y}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.00000000000000004e64 or 1.7e8 < a Initial program 88.0%
+-commutative88.0%
remove-double-neg88.0%
unsub-neg88.0%
*-commutative88.0%
associate-*l/72.8%
associate-/l*88.6%
fma-neg88.6%
remove-double-neg88.6%
Simplified88.6%
Taylor expanded in a around inf 48.8%
if -2.00000000000000004e64 < a < 1.7e8Initial program 74.0%
+-commutative74.0%
remove-double-neg74.0%
unsub-neg74.0%
*-commutative74.0%
associate-*l/72.1%
associate-/l*80.9%
fma-neg80.9%
remove-double-neg80.9%
Simplified80.9%
Taylor expanded in a around 0 50.8%
mul-1-neg50.8%
unsub-neg50.8%
associate-/l*60.2%
div-sub60.2%
sub-neg60.2%
*-inverses60.2%
metadata-eval60.2%
Simplified60.2%
Taylor expanded in t around inf 53.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.5e+60) (not (<= y 7.5e+55))) (* x (/ y z)) (+ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.5e+60) || !(y <= 7.5e+55)) {
tmp = x * (y / z);
} else {
tmp = x + 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 ((y <= (-1.5d+60)) .or. (.not. (y <= 7.5d+55))) then
tmp = x * (y / z)
else
tmp = x + t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.5e+60) || !(y <= 7.5e+55)) {
tmp = x * (y / z);
} else {
tmp = x + t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.5e+60) or not (y <= 7.5e+55): tmp = x * (y / z) else: tmp = x + t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.5e+60) || !(y <= 7.5e+55)) tmp = Float64(x * Float64(y / z)); else tmp = Float64(x + t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.5e+60) || ~((y <= 7.5e+55))) tmp = x * (y / z); else tmp = x + t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.5e+60], N[Not[LessEqual[y, 7.5e+55]], $MachinePrecision]], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(x + t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.5 \cdot 10^{+60} \lor \neg \left(y \leq 7.5 \cdot 10^{+55}\right):\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + t\\
\end{array}
\end{array}
if y < -1.4999999999999999e60 or 7.50000000000000014e55 < y Initial program 85.6%
+-commutative85.6%
remove-double-neg85.6%
unsub-neg85.6%
*-commutative85.6%
associate-*l/76.1%
associate-/l*90.4%
fma-neg90.4%
remove-double-neg90.4%
Simplified90.4%
Taylor expanded in t around 0 45.7%
mul-1-neg45.7%
*-rgt-identity45.7%
associate-/l*54.9%
distribute-rgt-neg-in54.9%
mul-1-neg54.9%
distribute-lft-in54.9%
mul-1-neg54.9%
unsub-neg54.9%
Simplified54.9%
Taylor expanded in a around 0 42.3%
if -1.4999999999999999e60 < y < 7.50000000000000014e55Initial program 76.5%
Taylor expanded in t around inf 74.0%
Taylor expanded in z around inf 50.9%
Final simplification47.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -20500.0) t (if (<= z 5e-28) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -20500.0) {
tmp = t;
} else if (z <= 5e-28) {
tmp = x;
} else {
tmp = 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 <= (-20500.0d0)) then
tmp = t
else if (z <= 5d-28) then
tmp = x
else
tmp = 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 <= -20500.0) {
tmp = t;
} else if (z <= 5e-28) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -20500.0: tmp = t elif z <= 5e-28: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -20500.0) tmp = t; elseif (z <= 5e-28) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -20500.0) tmp = t; elseif (z <= 5e-28) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -20500.0], t, If[LessEqual[z, 5e-28], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -20500:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-28}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -20500 or 5.0000000000000002e-28 < z Initial program 67.6%
Taylor expanded in y around 0 52.9%
+-commutative52.9%
div-sub52.9%
mul-1-neg52.9%
associate-/l*67.6%
distribute-lft-neg-out67.6%
distribute-rgt-out67.6%
sub-neg67.6%
associate-/r/74.6%
Simplified74.6%
Taylor expanded in z around inf 45.9%
if -20500 < z < 5.0000000000000002e-28Initial program 92.0%
+-commutative92.0%
remove-double-neg92.0%
unsub-neg92.0%
*-commutative92.0%
associate-*l/89.4%
associate-/l*93.0%
fma-neg93.0%
remove-double-neg93.0%
Simplified93.0%
Taylor expanded in a around inf 40.9%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return 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 = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 79.8%
Taylor expanded in y around 0 72.4%
+-commutative72.4%
div-sub72.5%
mul-1-neg72.5%
associate-/l*77.0%
distribute-lft-neg-out77.0%
distribute-rgt-out79.8%
sub-neg79.8%
associate-/r/83.5%
Simplified83.5%
Taylor expanded in z around inf 27.3%
herbie shell --seed 2024145
(FPCore (x y z t a)
:name "Numeric.Signal:interpolate from hsignal-0.2.7.1"
:precision binary64
(+ x (* (- y z) (/ (- t x) (- a z)))))