
(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 20 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 (* (- z y) (/ (- x t) (- a z))))) (t_2 (/ z (- t x))))
(if (or (<= t_1 -5e-294) (not (<= t_1 0.0)))
(fma (- t x) (/ (- y z) (- a z)) x)
(+ (- t (/ y t_2)) (/ a t_2)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - y) * ((x - t) / (a - z)));
double t_2 = z / (t - x);
double tmp;
if ((t_1 <= -5e-294) || !(t_1 <= 0.0)) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else {
tmp = (t - (y / t_2)) + (a / t_2);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(a - z)))) t_2 = Float64(z / Float64(t - x)) tmp = 0.0 if ((t_1 <= -5e-294) || !(t_1 <= 0.0)) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); else tmp = Float64(Float64(t - Float64(y / t_2)) + Float64(a / t_2)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-294], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(N[(t - N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\
t_2 := \frac{z}{t - x}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{-294} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -5.0000000000000003e-294 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.9%
+-commutative89.9%
associate-*r/79.5%
*-commutative79.5%
associate-*r/96.5%
fma-def96.4%
Simplified96.4%
if -5.0000000000000003e-294 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.4%
clear-num3.3%
associate-/r/3.1%
Applied egg-rr3.1%
Taylor expanded in z around inf 86.4%
sub-neg86.4%
+-commutative86.4%
mul-1-neg86.4%
unsub-neg86.4%
associate-/l*91.9%
mul-1-neg91.9%
remove-double-neg91.9%
associate-/l*99.9%
Simplified99.9%
Final simplification96.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- z y) (/ (- x t) (- a z))))) (t_2 (/ z (- t x))))
(if (or (<= t_1 -1e-222) (not (<= t_1 0.0)))
t_1
(+ (- t (/ y t_2)) (/ a t_2)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - y) * ((x - t) / (a - z)));
double t_2 = z / (t - x);
double tmp;
if ((t_1 <= -1e-222) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = (t - (y / t_2)) + (a / t_2);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((z - y) * ((x - t) / (a - z)))
t_2 = z / (t - x)
if ((t_1 <= (-1d-222)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = (t - (y / t_2)) + (a / t_2)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - y) * ((x - t) / (a - z)));
double t_2 = z / (t - x);
double tmp;
if ((t_1 <= -1e-222) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = (t - (y / t_2)) + (a / t_2);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - y) * ((x - t) / (a - z))) t_2 = z / (t - x) tmp = 0 if (t_1 <= -1e-222) or not (t_1 <= 0.0): tmp = t_1 else: tmp = (t - (y / t_2)) + (a / t_2) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(a - z)))) t_2 = Float64(z / Float64(t - x)) tmp = 0.0 if ((t_1 <= -1e-222) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(Float64(t - Float64(y / t_2)) + Float64(a / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - y) * ((x - t) / (a - z))); t_2 = z / (t - x); tmp = 0.0; if ((t_1 <= -1e-222) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = (t - (y / t_2)) + (a / t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z / N[(t - x), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-222], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(N[(t - N[(y / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\
t_2 := \frac{z}{t - x}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-222} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(t - \frac{y}{t_2}\right) + \frac{a}{t_2}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000005e-222 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.0%
if -1.00000000000000005e-222 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 6.1%
clear-num5.9%
associate-/r/5.8%
Applied egg-rr5.8%
Taylor expanded in z around inf 85.4%
sub-neg85.4%
+-commutative85.4%
mul-1-neg85.4%
unsub-neg85.4%
associate-/l*90.3%
mul-1-neg90.3%
remove-double-neg90.3%
associate-/l*97.4%
Simplified97.4%
Final simplification92.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- z y) (/ (- x t) (- a z))))))
(if (or (<= t_1 -1e-222) (not (<= t_1 0.0)))
t_1
(+ t (/ (* (- t x) (- a y)) z)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - y) * ((x - t) / (a - z)));
double tmp;
if ((t_1 <= -1e-222) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((z - y) * ((x - t) / (a - z)))
if ((t_1 <= (-1d-222)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = t + (((t - x) * (a - y)) / 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 + ((z - y) * ((x - t) / (a - z)));
double tmp;
if ((t_1 <= -1e-222) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((t - x) * (a - y)) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - y) * ((x - t) / (a - z))) tmp = 0 if (t_1 <= -1e-222) or not (t_1 <= 0.0): tmp = t_1 else: tmp = t + (((t - x) * (a - y)) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -1e-222) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - y) * ((x - t) / (a - z))); tmp = 0.0; if ((t_1 <= -1e-222) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = t + (((t - x) * (a - y)) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-222], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-222} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000005e-222 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.0%
if -1.00000000000000005e-222 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 6.1%
Taylor expanded in z around inf 85.4%
+-commutative85.4%
associate--l+85.4%
associate-*r/85.4%
associate-*r/85.4%
div-sub85.4%
distribute-lft-out--85.4%
mul-1-neg85.4%
distribute-neg-frac85.4%
unsub-neg85.4%
distribute-rgt-out--85.5%
Simplified85.5%
Final simplification90.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (/ y z) (- x t))))
(t_2 (+ x (/ (- x t) (+ (/ a z) -1.0)))))
(if (<= z -1.9e+200)
t_1
(if (<= z -1.1e+41)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= z -1.95e-40)
t_2
(if (<= z -7.5e-158)
(/ y (/ (- a z) (- t x)))
(if (<= z 4.5e-54)
(+ x (/ (* y (- t x)) a))
(if (<= z 4.3e+73) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((y / z) * (x - t));
double t_2 = x + ((x - t) / ((a / z) + -1.0));
double tmp;
if (z <= -1.9e+200) {
tmp = t_1;
} else if (z <= -1.1e+41) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= -1.95e-40) {
tmp = t_2;
} else if (z <= -7.5e-158) {
tmp = y / ((a - z) / (t - x));
} else if (z <= 4.5e-54) {
tmp = x + ((y * (t - x)) / a);
} else if (z <= 4.3e+73) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = t + ((y / z) * (x - t))
t_2 = x + ((x - t) / ((a / z) + (-1.0d0)))
if (z <= (-1.9d+200)) then
tmp = t_1
else if (z <= (-1.1d+41)) then
tmp = t + (((t - x) * (a - y)) / z)
else if (z <= (-1.95d-40)) then
tmp = t_2
else if (z <= (-7.5d-158)) then
tmp = y / ((a - z) / (t - x))
else if (z <= 4.5d-54) then
tmp = x + ((y * (t - x)) / a)
else if (z <= 4.3d+73) then
tmp = t_2
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 + ((y / z) * (x - t));
double t_2 = x + ((x - t) / ((a / z) + -1.0));
double tmp;
if (z <= -1.9e+200) {
tmp = t_1;
} else if (z <= -1.1e+41) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= -1.95e-40) {
tmp = t_2;
} else if (z <= -7.5e-158) {
tmp = y / ((a - z) / (t - x));
} else if (z <= 4.5e-54) {
tmp = x + ((y * (t - x)) / a);
} else if (z <= 4.3e+73) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((y / z) * (x - t)) t_2 = x + ((x - t) / ((a / z) + -1.0)) tmp = 0 if z <= -1.9e+200: tmp = t_1 elif z <= -1.1e+41: tmp = t + (((t - x) * (a - y)) / z) elif z <= -1.95e-40: tmp = t_2 elif z <= -7.5e-158: tmp = y / ((a - z) / (t - x)) elif z <= 4.5e-54: tmp = x + ((y * (t - x)) / a) elif z <= 4.3e+73: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(y / z) * Float64(x - t))) t_2 = Float64(x + Float64(Float64(x - t) / Float64(Float64(a / z) + -1.0))) tmp = 0.0 if (z <= -1.9e+200) tmp = t_1; elseif (z <= -1.1e+41) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (z <= -1.95e-40) tmp = t_2; elseif (z <= -7.5e-158) tmp = Float64(y / Float64(Float64(a - z) / Float64(t - x))); elseif (z <= 4.5e-54) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); elseif (z <= 4.3e+73) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((y / z) * (x - t)); t_2 = x + ((x - t) / ((a / z) + -1.0)); tmp = 0.0; if (z <= -1.9e+200) tmp = t_1; elseif (z <= -1.1e+41) tmp = t + (((t - x) * (a - y)) / z); elseif (z <= -1.95e-40) tmp = t_2; elseif (z <= -7.5e-158) tmp = y / ((a - z) / (t - x)); elseif (z <= 4.5e-54) tmp = x + ((y * (t - x)) / a); elseif (z <= 4.3e+73) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(x - t), $MachinePrecision] / N[(N[(a / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+200], t$95$1, If[LessEqual[z, -1.1e+41], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.95e-40], t$95$2, If[LessEqual[z, -7.5e-158], N[(y / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e-54], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.3e+73], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{y}{z} \cdot \left(x - t\right)\\
t_2 := x + \frac{x - t}{\frac{a}{z} + -1}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+200}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{+41}:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-40}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-158}:\\
\;\;\;\;\frac{y}{\frac{a - z}{t - x}}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-54}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{+73}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.89999999999999991e200 or 4.30000000000000013e73 < z Initial program 51.9%
+-commutative51.9%
fma-def52.0%
Simplified52.0%
Taylor expanded in z around inf 57.1%
associate-/l*61.6%
unpow261.6%
unpow261.6%
fma-def61.6%
associate-/l*70.2%
associate-/l*69.5%
mul-1-neg69.5%
associate-*r*69.4%
unpow269.4%
Simplified69.4%
Taylor expanded in a around 0 64.6%
+-commutative64.6%
mul-1-neg64.6%
unsub-neg64.6%
associate-*l/83.2%
*-commutative83.2%
Simplified83.2%
if -1.89999999999999991e200 < z < -1.09999999999999995e41Initial program 65.5%
Taylor expanded in z around inf 65.1%
+-commutative65.1%
associate--l+65.1%
associate-*r/65.1%
associate-*r/65.1%
div-sub65.1%
distribute-lft-out--65.1%
mul-1-neg65.1%
distribute-neg-frac65.1%
unsub-neg65.1%
distribute-rgt-out--67.7%
Simplified67.7%
if -1.09999999999999995e41 < z < -1.9499999999999999e-40 or 4.4999999999999998e-54 < z < 4.30000000000000013e73Initial program 88.2%
Taylor expanded in y around 0 64.8%
mul-1-neg64.8%
unsub-neg64.8%
*-commutative64.8%
associate-/l*72.6%
div-sub72.6%
*-inverses72.6%
Simplified72.6%
if -1.9499999999999999e-40 < z < -7.5e-158Initial program 95.7%
Taylor expanded in y around inf 67.4%
div-sub67.8%
*-commutative67.8%
associate-*r/63.4%
associate-/l*67.7%
Simplified67.7%
if -7.5e-158 < z < 4.4999999999999998e-54Initial program 93.7%
Taylor expanded in z around 0 84.4%
Final simplification78.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- t) (/ (- a z) z))))
(if (<= y -8.2e+247)
(* (/ y z) (- x t))
(if (<= y -0.00172)
(* y (/ t (- a z)))
(if (<= y -6.5e-289)
t_1
(if (<= y 8.5e-86)
x
(if (<= y 2e+94)
t_1
(if (<= y 7e+205)
(/ (- y) (/ (- a z) x))
(* t (/ (- y z) a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -t / ((a - z) / z);
double tmp;
if (y <= -8.2e+247) {
tmp = (y / z) * (x - t);
} else if (y <= -0.00172) {
tmp = y * (t / (a - z));
} else if (y <= -6.5e-289) {
tmp = t_1;
} else if (y <= 8.5e-86) {
tmp = x;
} else if (y <= 2e+94) {
tmp = t_1;
} else if (y <= 7e+205) {
tmp = -y / ((a - z) / x);
} else {
tmp = t * ((y - 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) :: t_1
real(8) :: tmp
t_1 = -t / ((a - z) / z)
if (y <= (-8.2d+247)) then
tmp = (y / z) * (x - t)
else if (y <= (-0.00172d0)) then
tmp = y * (t / (a - z))
else if (y <= (-6.5d-289)) then
tmp = t_1
else if (y <= 8.5d-86) then
tmp = x
else if (y <= 2d+94) then
tmp = t_1
else if (y <= 7d+205) then
tmp = -y / ((a - z) / x)
else
tmp = t * ((y - z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -t / ((a - z) / z);
double tmp;
if (y <= -8.2e+247) {
tmp = (y / z) * (x - t);
} else if (y <= -0.00172) {
tmp = y * (t / (a - z));
} else if (y <= -6.5e-289) {
tmp = t_1;
} else if (y <= 8.5e-86) {
tmp = x;
} else if (y <= 2e+94) {
tmp = t_1;
} else if (y <= 7e+205) {
tmp = -y / ((a - z) / x);
} else {
tmp = t * ((y - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -t / ((a - z) / z) tmp = 0 if y <= -8.2e+247: tmp = (y / z) * (x - t) elif y <= -0.00172: tmp = y * (t / (a - z)) elif y <= -6.5e-289: tmp = t_1 elif y <= 8.5e-86: tmp = x elif y <= 2e+94: tmp = t_1 elif y <= 7e+205: tmp = -y / ((a - z) / x) else: tmp = t * ((y - z) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-t) / Float64(Float64(a - z) / z)) tmp = 0.0 if (y <= -8.2e+247) tmp = Float64(Float64(y / z) * Float64(x - t)); elseif (y <= -0.00172) tmp = Float64(y * Float64(t / Float64(a - z))); elseif (y <= -6.5e-289) tmp = t_1; elseif (y <= 8.5e-86) tmp = x; elseif (y <= 2e+94) tmp = t_1; elseif (y <= 7e+205) tmp = Float64(Float64(-y) / Float64(Float64(a - z) / x)); else tmp = Float64(t * Float64(Float64(y - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -t / ((a - z) / z); tmp = 0.0; if (y <= -8.2e+247) tmp = (y / z) * (x - t); elseif (y <= -0.00172) tmp = y * (t / (a - z)); elseif (y <= -6.5e-289) tmp = t_1; elseif (y <= 8.5e-86) tmp = x; elseif (y <= 2e+94) tmp = t_1; elseif (y <= 7e+205) tmp = -y / ((a - z) / x); else tmp = t * ((y - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) / N[(N[(a - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.2e+247], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.00172], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.5e-289], t$95$1, If[LessEqual[y, 8.5e-86], x, If[LessEqual[y, 2e+94], t$95$1, If[LessEqual[y, 7e+205], N[((-y) / N[(N[(a - z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-t}{\frac{a - z}{z}}\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{+247}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{elif}\;y \leq -0.00172:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;y \leq -6.5 \cdot 10^{-289}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-86}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+94}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+205}:\\
\;\;\;\;\frac{-y}{\frac{a - z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\end{array}
\end{array}
if y < -8.2000000000000004e247Initial program 85.1%
Taylor expanded in y around inf 84.0%
div-sub84.0%
*-commutative84.0%
associate-*r/92.1%
associate-/l*84.0%
Simplified84.0%
Taylor expanded in a around 0 83.7%
mul-1-neg83.7%
associate-*l/91.7%
distribute-rgt-neg-in91.7%
Simplified91.7%
if -8.2000000000000004e247 < y < -0.00171999999999999996Initial program 97.6%
Taylor expanded in y around inf 61.2%
div-sub63.2%
*-commutative63.2%
associate-*r/55.8%
associate-/l*63.1%
Simplified63.1%
Taylor expanded in t around inf 42.8%
associate-/l*48.3%
Simplified48.3%
Taylor expanded in y around 0 42.8%
associate-*r/48.3%
Simplified48.3%
if -0.00171999999999999996 < y < -6.49999999999999974e-289 or 8.499999999999999e-86 < y < 2e94Initial program 70.7%
Taylor expanded in t around inf 61.1%
div-sub61.1%
Simplified61.1%
Taylor expanded in y around 0 35.2%
mul-1-neg35.2%
associate-/l*47.1%
distribute-neg-frac47.1%
Simplified47.1%
if -6.49999999999999974e-289 < y < 8.499999999999999e-86Initial program 64.1%
Taylor expanded in a around inf 52.6%
if 2e94 < y < 6.9999999999999996e205Initial program 79.0%
Taylor expanded in y around inf 78.1%
div-sub78.1%
*-commutative78.1%
associate-*r/58.3%
associate-/l*78.0%
Simplified78.0%
Taylor expanded in t around 0 43.8%
mul-1-neg43.8%
associate-/l*55.3%
distribute-neg-frac55.3%
Simplified55.3%
if 6.9999999999999996e205 < y Initial program 92.3%
Taylor expanded in t around inf 74.1%
div-sub74.1%
Simplified74.1%
Taylor expanded in a around inf 74.8%
Final simplification53.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ t (- a z)))))
(if (<= y -2.7e+249)
(* x (/ y z))
(if (<= y -6.3e-7)
t_1
(if (<= y -3.3e-289)
t
(if (<= y 9.8e-43)
x
(if (<= y 2.6e+164)
t_1
(if (<= y 2.5e+205) (/ y (/ z x)) (* t (/ (- y z) a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / (a - z));
double tmp;
if (y <= -2.7e+249) {
tmp = x * (y / z);
} else if (y <= -6.3e-7) {
tmp = t_1;
} else if (y <= -3.3e-289) {
tmp = t;
} else if (y <= 9.8e-43) {
tmp = x;
} else if (y <= 2.6e+164) {
tmp = t_1;
} else if (y <= 2.5e+205) {
tmp = y / (z / x);
} else {
tmp = t * ((y - 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) :: t_1
real(8) :: tmp
t_1 = y * (t / (a - z))
if (y <= (-2.7d+249)) then
tmp = x * (y / z)
else if (y <= (-6.3d-7)) then
tmp = t_1
else if (y <= (-3.3d-289)) then
tmp = t
else if (y <= 9.8d-43) then
tmp = x
else if (y <= 2.6d+164) then
tmp = t_1
else if (y <= 2.5d+205) then
tmp = y / (z / x)
else
tmp = t * ((y - z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / (a - z));
double tmp;
if (y <= -2.7e+249) {
tmp = x * (y / z);
} else if (y <= -6.3e-7) {
tmp = t_1;
} else if (y <= -3.3e-289) {
tmp = t;
} else if (y <= 9.8e-43) {
tmp = x;
} else if (y <= 2.6e+164) {
tmp = t_1;
} else if (y <= 2.5e+205) {
tmp = y / (z / x);
} else {
tmp = t * ((y - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / (a - z)) tmp = 0 if y <= -2.7e+249: tmp = x * (y / z) elif y <= -6.3e-7: tmp = t_1 elif y <= -3.3e-289: tmp = t elif y <= 9.8e-43: tmp = x elif y <= 2.6e+164: tmp = t_1 elif y <= 2.5e+205: tmp = y / (z / x) else: tmp = t * ((y - z) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / Float64(a - z))) tmp = 0.0 if (y <= -2.7e+249) tmp = Float64(x * Float64(y / z)); elseif (y <= -6.3e-7) tmp = t_1; elseif (y <= -3.3e-289) tmp = t; elseif (y <= 9.8e-43) tmp = x; elseif (y <= 2.6e+164) tmp = t_1; elseif (y <= 2.5e+205) tmp = Float64(y / Float64(z / x)); else tmp = Float64(t * Float64(Float64(y - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / (a - z)); tmp = 0.0; if (y <= -2.7e+249) tmp = x * (y / z); elseif (y <= -6.3e-7) tmp = t_1; elseif (y <= -3.3e-289) tmp = t; elseif (y <= 9.8e-43) tmp = x; elseif (y <= 2.6e+164) tmp = t_1; elseif (y <= 2.5e+205) tmp = y / (z / x); else tmp = t * ((y - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e+249], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.3e-7], t$95$1, If[LessEqual[y, -3.3e-289], t, If[LessEqual[y, 9.8e-43], x, If[LessEqual[y, 2.6e+164], t$95$1, If[LessEqual[y, 2.5e+205], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a - z}\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+249}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -6.3 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -3.3 \cdot 10^{-289}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{-43}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+164}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{+205}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\end{array}
\end{array}
if y < -2.70000000000000018e249Initial program 85.1%
Taylor expanded in a around 0 76.8%
associate-*r/76.8%
neg-mul-176.8%
Simplified76.8%
Taylor expanded in x around inf 75.4%
associate-/l*67.3%
Simplified67.3%
associate-/r/83.3%
Applied egg-rr83.3%
if -2.70000000000000018e249 < y < -6.30000000000000003e-7 or 9.79999999999999976e-43 < y < 2.5999999999999999e164Initial program 86.0%
Taylor expanded in y around inf 55.2%
div-sub56.3%
*-commutative56.3%
associate-*r/48.9%
associate-/l*56.3%
Simplified56.3%
Taylor expanded in t around inf 36.7%
associate-/l*41.9%
Simplified41.9%
Taylor expanded in y around 0 36.7%
associate-*r/41.9%
Simplified41.9%
if -6.30000000000000003e-7 < y < -3.29999999999999997e-289Initial program 74.1%
Taylor expanded in z around inf 46.7%
if -3.29999999999999997e-289 < y < 9.79999999999999976e-43Initial program 64.8%
Taylor expanded in a around inf 47.0%
if 2.5999999999999999e164 < y < 2.5000000000000001e205Initial program 73.4%
Taylor expanded in a around 0 28.2%
associate-*r/28.2%
neg-mul-128.2%
Simplified28.2%
Taylor expanded in x around inf 37.3%
associate-/l*52.9%
Simplified52.9%
if 2.5000000000000001e205 < y Initial program 92.3%
Taylor expanded in t around inf 74.1%
div-sub74.1%
Simplified74.1%
Taylor expanded in a around inf 74.8%
Final simplification49.2%
(FPCore (x y z t a)
:precision binary64
(if (<= y -8e+248)
(* x (/ y z))
(if (<= y -1.3e-5)
(* y (/ t (- a z)))
(if (<= y -1.9e-289)
t
(if (<= y 1.8e-90)
x
(if (<= y 4.3e+91)
t
(if (<= y 3.2e+205) (* y (/ (- x t) z)) (* t (/ (- y z) a)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -8e+248) {
tmp = x * (y / z);
} else if (y <= -1.3e-5) {
tmp = y * (t / (a - z));
} else if (y <= -1.9e-289) {
tmp = t;
} else if (y <= 1.8e-90) {
tmp = x;
} else if (y <= 4.3e+91) {
tmp = t;
} else if (y <= 3.2e+205) {
tmp = y * ((x - t) / z);
} else {
tmp = t * ((y - 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 (y <= (-8d+248)) then
tmp = x * (y / z)
else if (y <= (-1.3d-5)) then
tmp = y * (t / (a - z))
else if (y <= (-1.9d-289)) then
tmp = t
else if (y <= 1.8d-90) then
tmp = x
else if (y <= 4.3d+91) then
tmp = t
else if (y <= 3.2d+205) then
tmp = y * ((x - t) / z)
else
tmp = t * ((y - 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 (y <= -8e+248) {
tmp = x * (y / z);
} else if (y <= -1.3e-5) {
tmp = y * (t / (a - z));
} else if (y <= -1.9e-289) {
tmp = t;
} else if (y <= 1.8e-90) {
tmp = x;
} else if (y <= 4.3e+91) {
tmp = t;
} else if (y <= 3.2e+205) {
tmp = y * ((x - t) / z);
} else {
tmp = t * ((y - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -8e+248: tmp = x * (y / z) elif y <= -1.3e-5: tmp = y * (t / (a - z)) elif y <= -1.9e-289: tmp = t elif y <= 1.8e-90: tmp = x elif y <= 4.3e+91: tmp = t elif y <= 3.2e+205: tmp = y * ((x - t) / z) else: tmp = t * ((y - z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -8e+248) tmp = Float64(x * Float64(y / z)); elseif (y <= -1.3e-5) tmp = Float64(y * Float64(t / Float64(a - z))); elseif (y <= -1.9e-289) tmp = t; elseif (y <= 1.8e-90) tmp = x; elseif (y <= 4.3e+91) tmp = t; elseif (y <= 3.2e+205) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = Float64(t * Float64(Float64(y - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -8e+248) tmp = x * (y / z); elseif (y <= -1.3e-5) tmp = y * (t / (a - z)); elseif (y <= -1.9e-289) tmp = t; elseif (y <= 1.8e-90) tmp = x; elseif (y <= 4.3e+91) tmp = t; elseif (y <= 3.2e+205) tmp = y * ((x - t) / z); else tmp = t * ((y - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -8e+248], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.3e-5], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.9e-289], t, If[LessEqual[y, 1.8e-90], x, If[LessEqual[y, 4.3e+91], t, If[LessEqual[y, 3.2e+205], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{+248}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-5}:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-289}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-90}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+91}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+205}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\end{array}
\end{array}
if y < -8.00000000000000036e248Initial program 85.1%
Taylor expanded in a around 0 76.8%
associate-*r/76.8%
neg-mul-176.8%
Simplified76.8%
Taylor expanded in x around inf 75.4%
associate-/l*67.3%
Simplified67.3%
associate-/r/83.3%
Applied egg-rr83.3%
if -8.00000000000000036e248 < y < -1.29999999999999992e-5Initial program 97.6%
Taylor expanded in y around inf 61.2%
div-sub63.2%
*-commutative63.2%
associate-*r/55.8%
associate-/l*63.1%
Simplified63.1%
Taylor expanded in t around inf 42.8%
associate-/l*48.3%
Simplified48.3%
Taylor expanded in y around 0 42.8%
associate-*r/48.3%
Simplified48.3%
if -1.29999999999999992e-5 < y < -1.90000000000000005e-289 or 1.7999999999999999e-90 < y < 4.3000000000000001e91Initial program 70.7%
Taylor expanded in z around inf 42.0%
if -1.90000000000000005e-289 < y < 1.7999999999999999e-90Initial program 64.1%
Taylor expanded in a around inf 52.6%
if 4.3000000000000001e91 < y < 3.19999999999999996e205Initial program 79.0%
Taylor expanded in a around 0 36.4%
associate-*r/36.4%
neg-mul-136.4%
Simplified36.4%
Taylor expanded in y around inf 52.1%
div-sub52.1%
Simplified52.1%
if 3.19999999999999996e205 < y Initial program 92.3%
Taylor expanded in t around inf 74.1%
div-sub74.1%
Simplified74.1%
Taylor expanded in a around inf 74.8%
Final simplification50.5%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.05e+242)
(* (/ y z) (- x t))
(if (<= y -0.00172)
(* y (/ t (- a z)))
(if (<= y -3.9e-289)
t
(if (<= y 3e-90)
x
(if (<= y 3.2e+88)
t
(if (<= y 7.8e+205) (* y (/ (- x t) z)) (* t (/ (- y z) a)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.05e+242) {
tmp = (y / z) * (x - t);
} else if (y <= -0.00172) {
tmp = y * (t / (a - z));
} else if (y <= -3.9e-289) {
tmp = t;
} else if (y <= 3e-90) {
tmp = x;
} else if (y <= 3.2e+88) {
tmp = t;
} else if (y <= 7.8e+205) {
tmp = y * ((x - t) / z);
} else {
tmp = t * ((y - 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 (y <= (-1.05d+242)) then
tmp = (y / z) * (x - t)
else if (y <= (-0.00172d0)) then
tmp = y * (t / (a - z))
else if (y <= (-3.9d-289)) then
tmp = t
else if (y <= 3d-90) then
tmp = x
else if (y <= 3.2d+88) then
tmp = t
else if (y <= 7.8d+205) then
tmp = y * ((x - t) / z)
else
tmp = t * ((y - 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 (y <= -1.05e+242) {
tmp = (y / z) * (x - t);
} else if (y <= -0.00172) {
tmp = y * (t / (a - z));
} else if (y <= -3.9e-289) {
tmp = t;
} else if (y <= 3e-90) {
tmp = x;
} else if (y <= 3.2e+88) {
tmp = t;
} else if (y <= 7.8e+205) {
tmp = y * ((x - t) / z);
} else {
tmp = t * ((y - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.05e+242: tmp = (y / z) * (x - t) elif y <= -0.00172: tmp = y * (t / (a - z)) elif y <= -3.9e-289: tmp = t elif y <= 3e-90: tmp = x elif y <= 3.2e+88: tmp = t elif y <= 7.8e+205: tmp = y * ((x - t) / z) else: tmp = t * ((y - z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.05e+242) tmp = Float64(Float64(y / z) * Float64(x - t)); elseif (y <= -0.00172) tmp = Float64(y * Float64(t / Float64(a - z))); elseif (y <= -3.9e-289) tmp = t; elseif (y <= 3e-90) tmp = x; elseif (y <= 3.2e+88) tmp = t; elseif (y <= 7.8e+205) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = Float64(t * Float64(Float64(y - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.05e+242) tmp = (y / z) * (x - t); elseif (y <= -0.00172) tmp = y * (t / (a - z)); elseif (y <= -3.9e-289) tmp = t; elseif (y <= 3e-90) tmp = x; elseif (y <= 3.2e+88) tmp = t; elseif (y <= 7.8e+205) tmp = y * ((x - t) / z); else tmp = t * ((y - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.05e+242], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.00172], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.9e-289], t, If[LessEqual[y, 3e-90], x, If[LessEqual[y, 3.2e+88], t, If[LessEqual[y, 7.8e+205], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+242}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{elif}\;y \leq -0.00172:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;y \leq -3.9 \cdot 10^{-289}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-90}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.2 \cdot 10^{+88}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+205}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\end{array}
\end{array}
if y < -1.05e242Initial program 85.1%
Taylor expanded in y around inf 84.0%
div-sub84.0%
*-commutative84.0%
associate-*r/92.1%
associate-/l*84.0%
Simplified84.0%
Taylor expanded in a around 0 83.7%
mul-1-neg83.7%
associate-*l/91.7%
distribute-rgt-neg-in91.7%
Simplified91.7%
if -1.05e242 < y < -0.00171999999999999996Initial program 97.6%
Taylor expanded in y around inf 61.2%
div-sub63.2%
*-commutative63.2%
associate-*r/55.8%
associate-/l*63.1%
Simplified63.1%
Taylor expanded in t around inf 42.8%
associate-/l*48.3%
Simplified48.3%
Taylor expanded in y around 0 42.8%
associate-*r/48.3%
Simplified48.3%
if -0.00171999999999999996 < y < -3.8999999999999998e-289 or 3.0000000000000002e-90 < y < 3.1999999999999999e88Initial program 70.7%
Taylor expanded in z around inf 42.0%
if -3.8999999999999998e-289 < y < 3.0000000000000002e-90Initial program 64.1%
Taylor expanded in a around inf 52.6%
if 3.1999999999999999e88 < y < 7.7999999999999997e205Initial program 79.0%
Taylor expanded in a around 0 36.4%
associate-*r/36.4%
neg-mul-136.4%
Simplified36.4%
Taylor expanded in y around inf 52.1%
div-sub52.1%
Simplified52.1%
if 7.7999999999999997e205 < y Initial program 92.3%
Taylor expanded in t around inf 74.1%
div-sub74.1%
Simplified74.1%
Taylor expanded in a around inf 74.8%
Final simplification50.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- t) (/ (- a z) z))))
(if (<= y -1.25e+249)
(* (/ y z) (- x t))
(if (<= y -0.0067)
(* y (/ t (- a z)))
(if (<= y -1.95e-289)
t_1
(if (<= y 9.5e-93)
x
(if (<= y 6.8e+89)
t_1
(if (<= y 1.02e+206)
(* y (/ (- x t) z))
(* t (/ (- y z) a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -t / ((a - z) / z);
double tmp;
if (y <= -1.25e+249) {
tmp = (y / z) * (x - t);
} else if (y <= -0.0067) {
tmp = y * (t / (a - z));
} else if (y <= -1.95e-289) {
tmp = t_1;
} else if (y <= 9.5e-93) {
tmp = x;
} else if (y <= 6.8e+89) {
tmp = t_1;
} else if (y <= 1.02e+206) {
tmp = y * ((x - t) / z);
} else {
tmp = t * ((y - 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) :: t_1
real(8) :: tmp
t_1 = -t / ((a - z) / z)
if (y <= (-1.25d+249)) then
tmp = (y / z) * (x - t)
else if (y <= (-0.0067d0)) then
tmp = y * (t / (a - z))
else if (y <= (-1.95d-289)) then
tmp = t_1
else if (y <= 9.5d-93) then
tmp = x
else if (y <= 6.8d+89) then
tmp = t_1
else if (y <= 1.02d+206) then
tmp = y * ((x - t) / z)
else
tmp = t * ((y - z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = -t / ((a - z) / z);
double tmp;
if (y <= -1.25e+249) {
tmp = (y / z) * (x - t);
} else if (y <= -0.0067) {
tmp = y * (t / (a - z));
} else if (y <= -1.95e-289) {
tmp = t_1;
} else if (y <= 9.5e-93) {
tmp = x;
} else if (y <= 6.8e+89) {
tmp = t_1;
} else if (y <= 1.02e+206) {
tmp = y * ((x - t) / z);
} else {
tmp = t * ((y - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -t / ((a - z) / z) tmp = 0 if y <= -1.25e+249: tmp = (y / z) * (x - t) elif y <= -0.0067: tmp = y * (t / (a - z)) elif y <= -1.95e-289: tmp = t_1 elif y <= 9.5e-93: tmp = x elif y <= 6.8e+89: tmp = t_1 elif y <= 1.02e+206: tmp = y * ((x - t) / z) else: tmp = t * ((y - z) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-t) / Float64(Float64(a - z) / z)) tmp = 0.0 if (y <= -1.25e+249) tmp = Float64(Float64(y / z) * Float64(x - t)); elseif (y <= -0.0067) tmp = Float64(y * Float64(t / Float64(a - z))); elseif (y <= -1.95e-289) tmp = t_1; elseif (y <= 9.5e-93) tmp = x; elseif (y <= 6.8e+89) tmp = t_1; elseif (y <= 1.02e+206) tmp = Float64(y * Float64(Float64(x - t) / z)); else tmp = Float64(t * Float64(Float64(y - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -t / ((a - z) / z); tmp = 0.0; if (y <= -1.25e+249) tmp = (y / z) * (x - t); elseif (y <= -0.0067) tmp = y * (t / (a - z)); elseif (y <= -1.95e-289) tmp = t_1; elseif (y <= 9.5e-93) tmp = x; elseif (y <= 6.8e+89) tmp = t_1; elseif (y <= 1.02e+206) tmp = y * ((x - t) / z); else tmp = t * ((y - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-t) / N[(N[(a - z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.25e+249], N[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.0067], N[(y * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.95e-289], t$95$1, If[LessEqual[y, 9.5e-93], x, If[LessEqual[y, 6.8e+89], t$95$1, If[LessEqual[y, 1.02e+206], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-t}{\frac{a - z}{z}}\\
\mathbf{if}\;y \leq -1.25 \cdot 10^{+249}:\\
\;\;\;\;\frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{elif}\;y \leq -0.0067:\\
\;\;\;\;y \cdot \frac{t}{a - z}\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{-289}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-93}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{+89}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+206}:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\end{array}
\end{array}
if y < -1.2499999999999999e249Initial program 85.1%
Taylor expanded in y around inf 84.0%
div-sub84.0%
*-commutative84.0%
associate-*r/92.1%
associate-/l*84.0%
Simplified84.0%
Taylor expanded in a around 0 83.7%
mul-1-neg83.7%
associate-*l/91.7%
distribute-rgt-neg-in91.7%
Simplified91.7%
if -1.2499999999999999e249 < y < -0.00670000000000000023Initial program 97.6%
Taylor expanded in y around inf 61.2%
div-sub63.2%
*-commutative63.2%
associate-*r/55.8%
associate-/l*63.1%
Simplified63.1%
Taylor expanded in t around inf 42.8%
associate-/l*48.3%
Simplified48.3%
Taylor expanded in y around 0 42.8%
associate-*r/48.3%
Simplified48.3%
if -0.00670000000000000023 < y < -1.9499999999999999e-289 or 9.5000000000000001e-93 < y < 6.8000000000000004e89Initial program 70.7%
Taylor expanded in t around inf 61.1%
div-sub61.1%
Simplified61.1%
Taylor expanded in y around 0 35.2%
mul-1-neg35.2%
associate-/l*47.1%
distribute-neg-frac47.1%
Simplified47.1%
if -1.9499999999999999e-289 < y < 9.5000000000000001e-93Initial program 64.1%
Taylor expanded in a around inf 52.6%
if 6.8000000000000004e89 < y < 1.02e206Initial program 79.0%
Taylor expanded in a around 0 36.4%
associate-*r/36.4%
neg-mul-136.4%
Simplified36.4%
Taylor expanded in y around inf 52.1%
div-sub52.1%
Simplified52.1%
if 1.02e206 < y Initial program 92.3%
Taylor expanded in t around inf 74.1%
div-sub74.1%
Simplified74.1%
Taylor expanded in a around inf 74.8%
Final simplification52.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -1.9e+182)
t_1
(if (<= z -8.8e+95)
(- t (/ (* a (- x t)) z))
(if (or (<= z -31000000.0) (not (<= z 5.1e-24)))
t_1
(+ x (/ (* y (- t x)) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.9e+182) {
tmp = t_1;
} else if (z <= -8.8e+95) {
tmp = t - ((a * (x - t)) / z);
} else if ((z <= -31000000.0) || !(z <= 5.1e-24)) {
tmp = t_1;
} else {
tmp = x + ((y * (t - 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 = t * ((y - z) / (a - z))
if (z <= (-1.9d+182)) then
tmp = t_1
else if (z <= (-8.8d+95)) then
tmp = t - ((a * (x - t)) / z)
else if ((z <= (-31000000.0d0)) .or. (.not. (z <= 5.1d-24))) then
tmp = t_1
else
tmp = x + ((y * (t - 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 = t * ((y - z) / (a - z));
double tmp;
if (z <= -1.9e+182) {
tmp = t_1;
} else if (z <= -8.8e+95) {
tmp = t - ((a * (x - t)) / z);
} else if ((z <= -31000000.0) || !(z <= 5.1e-24)) {
tmp = t_1;
} else {
tmp = x + ((y * (t - x)) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -1.9e+182: tmp = t_1 elif z <= -8.8e+95: tmp = t - ((a * (x - t)) / z) elif (z <= -31000000.0) or not (z <= 5.1e-24): tmp = t_1 else: tmp = x + ((y * (t - x)) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -1.9e+182) tmp = t_1; elseif (z <= -8.8e+95) tmp = Float64(t - Float64(Float64(a * Float64(x - t)) / z)); elseif ((z <= -31000000.0) || !(z <= 5.1e-24)) tmp = t_1; else tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -1.9e+182) tmp = t_1; elseif (z <= -8.8e+95) tmp = t - ((a * (x - t)) / z); elseif ((z <= -31000000.0) || ~((z <= 5.1e-24))) tmp = t_1; else tmp = x + ((y * (t - x)) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.9e+182], t$95$1, If[LessEqual[z, -8.8e+95], N[(t - N[(N[(a * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -31000000.0], N[Not[LessEqual[z, 5.1e-24]], $MachinePrecision]], t$95$1, N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.9 \cdot 10^{+182}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.8 \cdot 10^{+95}:\\
\;\;\;\;t - \frac{a \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;z \leq -31000000 \lor \neg \left(z \leq 5.1 \cdot 10^{-24}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\end{array}
\end{array}
if z < -1.90000000000000006e182 or -8.7999999999999996e95 < z < -3.1e7 or 5.10000000000000025e-24 < z Initial program 63.2%
Taylor expanded in t around inf 64.9%
div-sub64.9%
Simplified64.9%
if -1.90000000000000006e182 < z < -8.7999999999999996e95Initial program 56.6%
clear-num56.4%
associate-/r/56.1%
Applied egg-rr56.1%
Taylor expanded in z around inf 75.7%
sub-neg75.7%
+-commutative75.7%
mul-1-neg75.7%
unsub-neg75.7%
associate-/l*80.4%
mul-1-neg80.4%
remove-double-neg80.4%
associate-/l*85.4%
Simplified85.4%
Taylor expanded in y around 0 71.1%
if -3.1e7 < z < 5.10000000000000025e-24Initial program 94.1%
Taylor expanded in z around 0 75.6%
Final simplification70.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (/ y z) (- x t)))))
(if (<= z -2.2e+210)
t_1
(if (<= z -1.05e+96)
(- t (/ (* a (- x t)) z))
(if (<= z -1350000.0)
(* t (/ (- y z) (- a z)))
(if (<= z 8.5e-29) (+ x (/ (* y (- t x)) a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((y / z) * (x - t));
double tmp;
if (z <= -2.2e+210) {
tmp = t_1;
} else if (z <= -1.05e+96) {
tmp = t - ((a * (x - t)) / z);
} else if (z <= -1350000.0) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 8.5e-29) {
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 + ((y / z) * (x - t))
if (z <= (-2.2d+210)) then
tmp = t_1
else if (z <= (-1.05d+96)) then
tmp = t - ((a * (x - t)) / z)
else if (z <= (-1350000.0d0)) then
tmp = t * ((y - z) / (a - z))
else if (z <= 8.5d-29) 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 + ((y / z) * (x - t));
double tmp;
if (z <= -2.2e+210) {
tmp = t_1;
} else if (z <= -1.05e+96) {
tmp = t - ((a * (x - t)) / z);
} else if (z <= -1350000.0) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 8.5e-29) {
tmp = x + ((y * (t - x)) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((y / z) * (x - t)) tmp = 0 if z <= -2.2e+210: tmp = t_1 elif z <= -1.05e+96: tmp = t - ((a * (x - t)) / z) elif z <= -1350000.0: tmp = t * ((y - z) / (a - z)) elif z <= 8.5e-29: tmp = x + ((y * (t - x)) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(y / z) * Float64(x - t))) tmp = 0.0 if (z <= -2.2e+210) tmp = t_1; elseif (z <= -1.05e+96) tmp = Float64(t - Float64(Float64(a * Float64(x - t)) / z)); elseif (z <= -1350000.0) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= 8.5e-29) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((y / z) * (x - t)); tmp = 0.0; if (z <= -2.2e+210) tmp = t_1; elseif (z <= -1.05e+96) tmp = t - ((a * (x - t)) / z); elseif (z <= -1350000.0) tmp = t * ((y - z) / (a - z)); elseif (z <= 8.5e-29) 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[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+210], t$95$1, If[LessEqual[z, -1.05e+96], N[(t - N[(N[(a * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1350000.0], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e-29], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+210}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.05 \cdot 10^{+96}:\\
\;\;\;\;t - \frac{a \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;z \leq -1350000:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-29}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.19999999999999987e210 or 8.5000000000000001e-29 < z Initial program 58.0%
+-commutative58.0%
fma-def58.2%
Simplified58.2%
Taylor expanded in z around inf 52.9%
associate-/l*56.4%
unpow256.4%
unpow256.4%
fma-def56.4%
associate-/l*61.9%
associate-/l*61.4%
mul-1-neg61.4%
associate-*r*62.4%
unpow262.4%
Simplified62.4%
Taylor expanded in a around 0 59.1%
+-commutative59.1%
mul-1-neg59.1%
unsub-neg59.1%
associate-*l/72.4%
*-commutative72.4%
Simplified72.4%
if -2.19999999999999987e210 < z < -1.0500000000000001e96Initial program 53.8%
clear-num53.7%
associate-/r/53.4%
Applied egg-rr53.4%
Taylor expanded in z around inf 71.2%
sub-neg71.2%
+-commutative71.2%
mul-1-neg71.2%
unsub-neg71.2%
associate-/l*78.4%
mul-1-neg78.4%
remove-double-neg78.4%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in y around 0 71.3%
if -1.0500000000000001e96 < z < -1.35e6Initial program 90.7%
Taylor expanded in t around inf 55.5%
div-sub55.5%
Simplified55.5%
if -1.35e6 < z < 8.5000000000000001e-29Initial program 94.7%
Taylor expanded in z around 0 76.6%
Final simplification72.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (/ y z) (- x t)))))
(if (<= z -9e+209)
t_1
(if (<= z -1.15e+96)
(- t (/ (* a (- x t)) z))
(if (<= z -5800.0)
(/ t (/ (- a z) (- y z)))
(if (<= z 9.8e-32) (+ x (/ (* y (- t x)) a)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((y / z) * (x - t));
double tmp;
if (z <= -9e+209) {
tmp = t_1;
} else if (z <= -1.15e+96) {
tmp = t - ((a * (x - t)) / z);
} else if (z <= -5800.0) {
tmp = t / ((a - z) / (y - z));
} else if (z <= 9.8e-32) {
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 + ((y / z) * (x - t))
if (z <= (-9d+209)) then
tmp = t_1
else if (z <= (-1.15d+96)) then
tmp = t - ((a * (x - t)) / z)
else if (z <= (-5800.0d0)) then
tmp = t / ((a - z) / (y - z))
else if (z <= 9.8d-32) 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 + ((y / z) * (x - t));
double tmp;
if (z <= -9e+209) {
tmp = t_1;
} else if (z <= -1.15e+96) {
tmp = t - ((a * (x - t)) / z);
} else if (z <= -5800.0) {
tmp = t / ((a - z) / (y - z));
} else if (z <= 9.8e-32) {
tmp = x + ((y * (t - x)) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((y / z) * (x - t)) tmp = 0 if z <= -9e+209: tmp = t_1 elif z <= -1.15e+96: tmp = t - ((a * (x - t)) / z) elif z <= -5800.0: tmp = t / ((a - z) / (y - z)) elif z <= 9.8e-32: tmp = x + ((y * (t - x)) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(y / z) * Float64(x - t))) tmp = 0.0 if (z <= -9e+209) tmp = t_1; elseif (z <= -1.15e+96) tmp = Float64(t - Float64(Float64(a * Float64(x - t)) / z)); elseif (z <= -5800.0) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); elseif (z <= 9.8e-32) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((y / z) * (x - t)); tmp = 0.0; if (z <= -9e+209) tmp = t_1; elseif (z <= -1.15e+96) tmp = t - ((a * (x - t)) / z); elseif (z <= -5800.0) tmp = t / ((a - z) / (y - z)); elseif (z <= 9.8e-32) 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[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e+209], t$95$1, If[LessEqual[z, -1.15e+96], N[(t - N[(N[(a * N[(x - t), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5800.0], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e-32], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{+209}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{+96}:\\
\;\;\;\;t - \frac{a \cdot \left(x - t\right)}{z}\\
\mathbf{elif}\;z \leq -5800:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-32}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -9.0000000000000007e209 or 9.7999999999999996e-32 < z Initial program 58.0%
+-commutative58.0%
fma-def58.2%
Simplified58.2%
Taylor expanded in z around inf 52.9%
associate-/l*56.4%
unpow256.4%
unpow256.4%
fma-def56.4%
associate-/l*61.9%
associate-/l*61.4%
mul-1-neg61.4%
associate-*r*62.4%
unpow262.4%
Simplified62.4%
Taylor expanded in a around 0 59.1%
+-commutative59.1%
mul-1-neg59.1%
unsub-neg59.1%
associate-*l/72.4%
*-commutative72.4%
Simplified72.4%
if -9.0000000000000007e209 < z < -1.15000000000000008e96Initial program 53.8%
clear-num53.7%
associate-/r/53.4%
Applied egg-rr53.4%
Taylor expanded in z around inf 71.2%
sub-neg71.2%
+-commutative71.2%
mul-1-neg71.2%
unsub-neg71.2%
associate-/l*78.4%
mul-1-neg78.4%
remove-double-neg78.4%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in y around 0 71.3%
if -1.15000000000000008e96 < z < -5800Initial program 90.7%
Taylor expanded in x around 0 47.0%
associate-/l*55.5%
Simplified55.5%
if -5800 < z < 9.7999999999999996e-32Initial program 94.7%
Taylor expanded in z around 0 76.6%
Final simplification72.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) a))))
(if (<= z -1500.0)
t
(if (<= z 1.7e-169) t_1 (if (<= z 1.1e-158) x (if (<= z 3e+31) t_1 t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / a);
double tmp;
if (z <= -1500.0) {
tmp = t;
} else if (z <= 1.7e-169) {
tmp = t_1;
} else if (z <= 1.1e-158) {
tmp = x;
} else if (z <= 3e+31) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * ((y - z) / a)
if (z <= (-1500.0d0)) then
tmp = t
else if (z <= 1.7d-169) then
tmp = t_1
else if (z <= 1.1d-158) then
tmp = x
else if (z <= 3d+31) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / a);
double tmp;
if (z <= -1500.0) {
tmp = t;
} else if (z <= 1.7e-169) {
tmp = t_1;
} else if (z <= 1.1e-158) {
tmp = x;
} else if (z <= 3e+31) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / a) tmp = 0 if z <= -1500.0: tmp = t elif z <= 1.7e-169: tmp = t_1 elif z <= 1.1e-158: tmp = x elif z <= 3e+31: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / a)) tmp = 0.0 if (z <= -1500.0) tmp = t; elseif (z <= 1.7e-169) tmp = t_1; elseif (z <= 1.1e-158) tmp = x; elseif (z <= 3e+31) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / a); tmp = 0.0; if (z <= -1500.0) tmp = t; elseif (z <= 1.7e-169) tmp = t_1; elseif (z <= 1.1e-158) tmp = x; elseif (z <= 3e+31) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1500.0], t, If[LessEqual[z, 1.7e-169], t$95$1, If[LessEqual[z, 1.1e-158], x, If[LessEqual[z, 3e+31], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a}\\
\mathbf{if}\;z \leq -1500:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-169}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{-158}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1500 or 2.99999999999999989e31 < z Initial program 60.4%
Taylor expanded in z around inf 48.8%
if -1500 < z < 1.7e-169 or 1.1000000000000001e-158 < z < 2.99999999999999989e31Initial program 92.4%
Taylor expanded in t around inf 50.4%
div-sub50.4%
Simplified50.4%
Taylor expanded in a around inf 42.1%
if 1.7e-169 < z < 1.1000000000000001e-158Initial program 97.2%
Taylor expanded in a around inf 97.2%
Final simplification46.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= t -2.2e-167)
t_1
(if (<= t -7.1e-205)
(/ (* x (- y)) (- a z))
(if (<= t 1.16e-119) x t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double tmp;
if (t <= -2.2e-167) {
tmp = t_1;
} else if (t <= -7.1e-205) {
tmp = (x * -y) / (a - z);
} else if (t <= 1.16e-119) {
tmp = 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 * ((y - z) / (a - z))
if (t <= (-2.2d-167)) then
tmp = t_1
else if (t <= (-7.1d-205)) then
tmp = (x * -y) / (a - z)
else if (t <= 1.16d-119) then
tmp = 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 * ((y - z) / (a - z));
double tmp;
if (t <= -2.2e-167) {
tmp = t_1;
} else if (t <= -7.1e-205) {
tmp = (x * -y) / (a - z);
} else if (t <= 1.16e-119) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if t <= -2.2e-167: tmp = t_1 elif t <= -7.1e-205: tmp = (x * -y) / (a - z) elif t <= 1.16e-119: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (t <= -2.2e-167) tmp = t_1; elseif (t <= -7.1e-205) tmp = Float64(Float64(x * Float64(-y)) / Float64(a - z)); elseif (t <= 1.16e-119) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); tmp = 0.0; if (t <= -2.2e-167) tmp = t_1; elseif (t <= -7.1e-205) tmp = (x * -y) / (a - z); elseif (t <= 1.16e-119) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.2e-167], t$95$1, If[LessEqual[t, -7.1e-205], N[(N[(x * (-y)), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.16e-119], x, t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;t \leq -2.2 \cdot 10^{-167}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7.1 \cdot 10^{-205}:\\
\;\;\;\;\frac{x \cdot \left(-y\right)}{a - z}\\
\mathbf{elif}\;t \leq 1.16 \cdot 10^{-119}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.2e-167 or 1.16e-119 < t Initial program 82.7%
Taylor expanded in t around inf 67.9%
div-sub67.9%
Simplified67.9%
if -2.2e-167 < t < -7.1000000000000003e-205Initial program 78.4%
+-commutative78.4%
associate-*r/92.6%
add-cube-cbrt91.6%
times-frac91.4%
fma-def91.5%
pow291.5%
Applied egg-rr91.5%
Taylor expanded in y around inf 77.8%
pow-base-177.8%
associate-*r/77.8%
*-lft-identity77.8%
*-commutative77.8%
Simplified77.8%
Taylor expanded in t around 0 63.7%
associate-*r/63.7%
mul-1-neg63.7%
distribute-rgt-neg-out63.7%
Simplified63.7%
if -7.1000000000000003e-205 < t < 1.16e-119Initial program 63.1%
Taylor expanded in a around inf 48.1%
Final simplification62.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (* (/ y z) (- x t)))))
(if (<= z -2.2e+200)
t_1
(if (<= z -450000.0)
(+ t (/ (* (- t x) (- a y)) z))
(if (<= z 5.8e-29) (+ x (/ (* y (- t x)) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((y / z) * (x - t));
double tmp;
if (z <= -2.2e+200) {
tmp = t_1;
} else if (z <= -450000.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= 5.8e-29) {
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 + ((y / z) * (x - t))
if (z <= (-2.2d+200)) then
tmp = t_1
else if (z <= (-450000.0d0)) then
tmp = t + (((t - x) * (a - y)) / z)
else if (z <= 5.8d-29) 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 + ((y / z) * (x - t));
double tmp;
if (z <= -2.2e+200) {
tmp = t_1;
} else if (z <= -450000.0) {
tmp = t + (((t - x) * (a - y)) / z);
} else if (z <= 5.8e-29) {
tmp = x + ((y * (t - x)) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((y / z) * (x - t)) tmp = 0 if z <= -2.2e+200: tmp = t_1 elif z <= -450000.0: tmp = t + (((t - x) * (a - y)) / z) elif z <= 5.8e-29: tmp = x + ((y * (t - x)) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(y / z) * Float64(x - t))) tmp = 0.0 if (z <= -2.2e+200) tmp = t_1; elseif (z <= -450000.0) tmp = Float64(t + Float64(Float64(Float64(t - x) * Float64(a - y)) / z)); elseif (z <= 5.8e-29) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((y / z) * (x - t)); tmp = 0.0; if (z <= -2.2e+200) tmp = t_1; elseif (z <= -450000.0) tmp = t + (((t - x) * (a - y)) / z); elseif (z <= 5.8e-29) 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[(N[(y / z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+200], t$95$1, If[LessEqual[z, -450000.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-29], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{y}{z} \cdot \left(x - t\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+200}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -450000:\\
\;\;\;\;t + \frac{\left(t - x\right) \cdot \left(a - y\right)}{z}\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-29}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -2.2e200 or 5.80000000000000048e-29 < z Initial program 58.4%
+-commutative58.4%
fma-def58.5%
Simplified58.5%
Taylor expanded in z around inf 53.4%
associate-/l*56.7%
unpow256.7%
unpow256.7%
fma-def56.7%
associate-/l*63.2%
associate-/l*62.7%
mul-1-neg62.7%
associate-*r*63.7%
unpow263.7%
Simplified63.7%
Taylor expanded in a around 0 59.3%
+-commutative59.3%
mul-1-neg59.3%
unsub-neg59.3%
associate-*l/73.3%
*-commutative73.3%
Simplified73.3%
if -2.2e200 < z < -4.5e5Initial program 70.1%
Taylor expanded in z around inf 65.5%
+-commutative65.5%
associate--l+65.5%
associate-*r/65.5%
associate-*r/65.5%
div-sub65.5%
distribute-lft-out--65.5%
mul-1-neg65.5%
distribute-neg-frac65.5%
unsub-neg65.5%
distribute-rgt-out--67.7%
Simplified67.7%
if -4.5e5 < z < 5.80000000000000048e-29Initial program 94.7%
Taylor expanded in z around 0 76.6%
Final simplification73.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -1.26e+172) (not (<= x 7500000.0))) (* (- y a) (/ (- x t) z)) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -1.26e+172) || !(x <= 7500000.0)) {
tmp = (y - a) * ((x - t) / z);
} else {
tmp = 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 ((x <= (-1.26d+172)) .or. (.not. (x <= 7500000.0d0))) then
tmp = (y - a) * ((x - t) / z)
else
tmp = 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 ((x <= -1.26e+172) || !(x <= 7500000.0)) {
tmp = (y - a) * ((x - t) / z);
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -1.26e+172) or not (x <= 7500000.0): tmp = (y - a) * ((x - t) / z) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -1.26e+172) || !(x <= 7500000.0)) tmp = Float64(Float64(y - a) * Float64(Float64(x - t) / z)); else tmp = 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 ((x <= -1.26e+172) || ~((x <= 7500000.0))) tmp = (y - a) * ((x - t) / z); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.26e+172], N[Not[LessEqual[x, 7500000.0]], $MachinePrecision]], N[(N[(y - a), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.26 \cdot 10^{+172} \lor \neg \left(x \leq 7500000\right):\\
\;\;\;\;\left(y - a\right) \cdot \frac{x - t}{z}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if x < -1.2600000000000001e172 or 7.5e6 < x Initial program 67.2%
clear-num67.1%
associate-/r/67.2%
Applied egg-rr67.2%
Taylor expanded in z around inf 47.6%
sub-neg47.6%
+-commutative47.6%
mul-1-neg47.6%
unsub-neg47.6%
associate-/l*55.0%
mul-1-neg55.0%
remove-double-neg55.0%
associate-/l*58.0%
Simplified58.0%
Taylor expanded in z around 0 40.5%
div-sub40.3%
associate-*r/42.4%
associate-*r/49.4%
distribute-rgt-out--50.8%
Simplified50.8%
if -1.2600000000000001e172 < x < 7.5e6Initial program 83.6%
Taylor expanded in t around inf 70.2%
div-sub70.2%
Simplified70.2%
Final simplification63.3%
(FPCore (x y z t a)
:precision binary64
(if (<= a -13200000000.0)
x
(if (<= a 2.3e-153)
t
(if (<= a 3.45e-133) (* x (/ y z)) (if (<= a 1.15e+98) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -13200000000.0) {
tmp = x;
} else if (a <= 2.3e-153) {
tmp = t;
} else if (a <= 3.45e-133) {
tmp = x * (y / z);
} else if (a <= 1.15e+98) {
tmp = t;
} 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 <= (-13200000000.0d0)) then
tmp = x
else if (a <= 2.3d-153) then
tmp = t
else if (a <= 3.45d-133) then
tmp = x * (y / z)
else if (a <= 1.15d+98) then
tmp = t
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 <= -13200000000.0) {
tmp = x;
} else if (a <= 2.3e-153) {
tmp = t;
} else if (a <= 3.45e-133) {
tmp = x * (y / z);
} else if (a <= 1.15e+98) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -13200000000.0: tmp = x elif a <= 2.3e-153: tmp = t elif a <= 3.45e-133: tmp = x * (y / z) elif a <= 1.15e+98: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -13200000000.0) tmp = x; elseif (a <= 2.3e-153) tmp = t; elseif (a <= 3.45e-133) tmp = Float64(x * Float64(y / z)); elseif (a <= 1.15e+98) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -13200000000.0) tmp = x; elseif (a <= 2.3e-153) tmp = t; elseif (a <= 3.45e-133) tmp = x * (y / z); elseif (a <= 1.15e+98) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -13200000000.0], x, If[LessEqual[a, 2.3e-153], t, If[LessEqual[a, 3.45e-133], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.15e+98], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -13200000000:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{-153}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 3.45 \cdot 10^{-133}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{+98}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.32e10 or 1.15000000000000007e98 < a Initial program 84.6%
Taylor expanded in a around inf 49.1%
if -1.32e10 < a < 2.29999999999999997e-153 or 3.45e-133 < a < 1.15000000000000007e98Initial program 73.5%
Taylor expanded in z around inf 39.8%
if 2.29999999999999997e-153 < a < 3.45e-133Initial program 58.9%
Taylor expanded in a around 0 60.1%
associate-*r/60.1%
neg-mul-160.1%
Simplified60.1%
Taylor expanded in x around inf 57.5%
associate-/l*69.4%
Simplified69.4%
associate-/r/69.2%
Applied egg-rr69.2%
Final simplification44.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -12000000000.0)
x
(if (<= a 2.2e-153)
t
(if (<= a 3.15e-127) (/ y (/ z x)) (if (<= a 5.3e+98) t x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -12000000000.0) {
tmp = x;
} else if (a <= 2.2e-153) {
tmp = t;
} else if (a <= 3.15e-127) {
tmp = y / (z / x);
} else if (a <= 5.3e+98) {
tmp = t;
} 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 <= (-12000000000.0d0)) then
tmp = x
else if (a <= 2.2d-153) then
tmp = t
else if (a <= 3.15d-127) then
tmp = y / (z / x)
else if (a <= 5.3d+98) then
tmp = t
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 <= -12000000000.0) {
tmp = x;
} else if (a <= 2.2e-153) {
tmp = t;
} else if (a <= 3.15e-127) {
tmp = y / (z / x);
} else if (a <= 5.3e+98) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -12000000000.0: tmp = x elif a <= 2.2e-153: tmp = t elif a <= 3.15e-127: tmp = y / (z / x) elif a <= 5.3e+98: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -12000000000.0) tmp = x; elseif (a <= 2.2e-153) tmp = t; elseif (a <= 3.15e-127) tmp = Float64(y / Float64(z / x)); elseif (a <= 5.3e+98) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -12000000000.0) tmp = x; elseif (a <= 2.2e-153) tmp = t; elseif (a <= 3.15e-127) tmp = y / (z / x); elseif (a <= 5.3e+98) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -12000000000.0], x, If[LessEqual[a, 2.2e-153], t, If[LessEqual[a, 3.15e-127], N[(y / N[(z / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.3e+98], t, x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -12000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-153}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 3.15 \cdot 10^{-127}:\\
\;\;\;\;\frac{y}{\frac{z}{x}}\\
\mathbf{elif}\;a \leq 5.3 \cdot 10^{+98}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.2e10 or 5.29999999999999997e98 < a Initial program 84.6%
Taylor expanded in a around inf 49.1%
if -1.2e10 < a < 2.20000000000000001e-153 or 3.1499999999999999e-127 < a < 5.29999999999999997e98Initial program 73.5%
Taylor expanded in z around inf 39.8%
if 2.20000000000000001e-153 < a < 3.1499999999999999e-127Initial program 58.9%
Taylor expanded in a around 0 60.1%
associate-*r/60.1%
neg-mul-160.1%
Simplified60.1%
Taylor expanded in x around inf 57.5%
associate-/l*69.4%
Simplified69.4%
Final simplification44.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -12000000000.0) x (if (<= a 1.9e+98) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -12000000000.0) {
tmp = x;
} else if (a <= 1.9e+98) {
tmp = t;
} 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 <= (-12000000000.0d0)) then
tmp = x
else if (a <= 1.9d+98) then
tmp = t
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 <= -12000000000.0) {
tmp = x;
} else if (a <= 1.9e+98) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -12000000000.0: tmp = x elif a <= 1.9e+98: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -12000000000.0) tmp = x; elseif (a <= 1.9e+98) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -12000000000.0) tmp = x; elseif (a <= 1.9e+98) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -12000000000.0], x, If[LessEqual[a, 1.9e+98], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -12000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{+98}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.2e10 or 1.89999999999999995e98 < a Initial program 84.6%
Taylor expanded in a around inf 49.1%
if -1.2e10 < a < 1.89999999999999995e98Initial program 72.7%
Taylor expanded in z around inf 38.4%
Final simplification43.0%
(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 77.8%
Taylor expanded in z around inf 26.9%
Final simplification26.9%
herbie shell --seed 2023173
(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)))))