
(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 (/ (- t x) (- a z))) (t_2 (+ x (* (- y z) t_1))))
(if (<= t_2 -5e-228)
t_2
(if (<= t_2 1e-256)
(+ t (/ (- x t) (/ z (- y a))))
(fma (- y z) t_1 x)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (t - x) / (a - z);
double t_2 = x + ((y - z) * t_1);
double tmp;
if (t_2 <= -5e-228) {
tmp = t_2;
} else if (t_2 <= 1e-256) {
tmp = t + ((x - t) / (z / (y - a)));
} else {
tmp = fma((y - z), t_1, x);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(Float64(t - x) / Float64(a - z)) t_2 = Float64(x + Float64(Float64(y - z) * t_1)) tmp = 0.0 if (t_2 <= -5e-228) tmp = t_2; elseif (t_2 <= 1e-256) tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); else tmp = fma(Float64(y - z), t_1, x); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e-228], t$95$2, If[LessEqual[t$95$2, 1e-256], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - z), $MachinePrecision] * t$95$1 + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - x}{a - z}\\
t_2 := x + \left(y - z\right) \cdot t_1\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{-228}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 10^{-256}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - z, t_1, x\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999972e-228Initial program 88.4%
if -4.99999999999999972e-228 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999977e-257Initial program 6.2%
Taylor expanded in z around -inf 88.3%
mul-1-neg88.3%
sub-neg88.3%
mul-1-neg88.3%
+-commutative88.3%
+-commutative88.3%
mul-1-neg88.3%
sub-neg88.3%
distribute-rgt-out--88.4%
associate-/l*97.6%
Simplified97.6%
if 9.99999999999999977e-257 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.6%
+-commutative90.6%
fma-def90.6%
Simplified90.6%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-228) (not (<= t_1 1e-256)))
t_1
(+ t (/ (- x t) (/ z (- y a)))))))
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 <= -5e-228) || !(t_1 <= 1e-256)) {
tmp = t_1;
} else {
tmp = t + ((x - t) / (z / (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) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-5d-228)) .or. (.not. (t_1 <= 1d-256))) then
tmp = t_1
else
tmp = t + ((x - t) / (z / (y - a)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if ((t_1 <= -5e-228) || !(t_1 <= 1e-256)) {
tmp = t_1;
} else {
tmp = t + ((x - t) / (z / (y - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -5e-228) or not (t_1 <= 1e-256): tmp = t_1 else: tmp = t + ((x - t) / (z / (y - a))) 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 <= -5e-228) || !(t_1 <= 1e-256)) tmp = t_1; else tmp = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))); 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 <= -5e-228) || ~((t_1 <= 1e-256))) tmp = t_1; else tmp = t + ((x - t) / (z / (y - a))); 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, -5e-228], N[Not[LessEqual[t$95$1, 1e-256]], $MachinePrecision]], t$95$1, N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $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 -5 \cdot 10^{-228} \lor \neg \left(t_1 \leq 10^{-256}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y - a}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999972e-228 or 9.99999999999999977e-257 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 89.6%
if -4.99999999999999972e-228 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999977e-257Initial program 6.2%
Taylor expanded in z around -inf 88.3%
mul-1-neg88.3%
sub-neg88.3%
mul-1-neg88.3%
+-commutative88.3%
+-commutative88.3%
mul-1-neg88.3%
sub-neg88.3%
distribute-rgt-out--88.4%
associate-/l*97.6%
Simplified97.6%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ t (- a z)))))
(if (<= z -9.6e+109)
t
(if (<= z -2e+56)
(/ (* t (- y)) z)
(if (<= z -5.5e+39)
t
(if (<= z -3.65e-16)
x
(if (<= z -1.62e-96)
t_1
(if (<= z -1.5e-142)
x
(if (<= z 6.5e-300) t_1 (if (<= z 5.1e+81) x t))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / (a - z));
double tmp;
if (z <= -9.6e+109) {
tmp = t;
} else if (z <= -2e+56) {
tmp = (t * -y) / z;
} else if (z <= -5.5e+39) {
tmp = t;
} else if (z <= -3.65e-16) {
tmp = x;
} else if (z <= -1.62e-96) {
tmp = t_1;
} else if (z <= -1.5e-142) {
tmp = x;
} else if (z <= 6.5e-300) {
tmp = t_1;
} else if (z <= 5.1e+81) {
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) :: t_1
real(8) :: tmp
t_1 = y * (t / (a - z))
if (z <= (-9.6d+109)) then
tmp = t
else if (z <= (-2d+56)) then
tmp = (t * -y) / z
else if (z <= (-5.5d+39)) then
tmp = t
else if (z <= (-3.65d-16)) then
tmp = x
else if (z <= (-1.62d-96)) then
tmp = t_1
else if (z <= (-1.5d-142)) then
tmp = x
else if (z <= 6.5d-300) then
tmp = t_1
else if (z <= 5.1d+81) 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 t_1 = y * (t / (a - z));
double tmp;
if (z <= -9.6e+109) {
tmp = t;
} else if (z <= -2e+56) {
tmp = (t * -y) / z;
} else if (z <= -5.5e+39) {
tmp = t;
} else if (z <= -3.65e-16) {
tmp = x;
} else if (z <= -1.62e-96) {
tmp = t_1;
} else if (z <= -1.5e-142) {
tmp = x;
} else if (z <= 6.5e-300) {
tmp = t_1;
} else if (z <= 5.1e+81) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / (a - z)) tmp = 0 if z <= -9.6e+109: tmp = t elif z <= -2e+56: tmp = (t * -y) / z elif z <= -5.5e+39: tmp = t elif z <= -3.65e-16: tmp = x elif z <= -1.62e-96: tmp = t_1 elif z <= -1.5e-142: tmp = x elif z <= 6.5e-300: tmp = t_1 elif z <= 5.1e+81: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / Float64(a - z))) tmp = 0.0 if (z <= -9.6e+109) tmp = t; elseif (z <= -2e+56) tmp = Float64(Float64(t * Float64(-y)) / z); elseif (z <= -5.5e+39) tmp = t; elseif (z <= -3.65e-16) tmp = x; elseif (z <= -1.62e-96) tmp = t_1; elseif (z <= -1.5e-142) tmp = x; elseif (z <= 6.5e-300) tmp = t_1; elseif (z <= 5.1e+81) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / (a - z)); tmp = 0.0; if (z <= -9.6e+109) tmp = t; elseif (z <= -2e+56) tmp = (t * -y) / z; elseif (z <= -5.5e+39) tmp = t; elseif (z <= -3.65e-16) tmp = x; elseif (z <= -1.62e-96) tmp = t_1; elseif (z <= -1.5e-142) tmp = x; elseif (z <= 6.5e-300) tmp = t_1; elseif (z <= 5.1e+81) tmp = x; else tmp = t; 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[z, -9.6e+109], t, If[LessEqual[z, -2e+56], N[(N[(t * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -5.5e+39], t, If[LessEqual[z, -3.65e-16], x, If[LessEqual[z, -1.62e-96], t$95$1, If[LessEqual[z, -1.5e-142], x, If[LessEqual[z, 6.5e-300], t$95$1, If[LessEqual[z, 5.1e+81], x, t]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a - z}\\
\mathbf{if}\;z \leq -9.6 \cdot 10^{+109}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2 \cdot 10^{+56}:\\
\;\;\;\;\frac{t \cdot \left(-y\right)}{z}\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{+39}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.65 \cdot 10^{-16}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.62 \cdot 10^{-96}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{-142}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-300}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.59999999999999949e109 or -2.00000000000000018e56 < z < -5.4999999999999997e39 or 5.1000000000000003e81 < z Initial program 51.6%
Taylor expanded in z around inf 58.8%
if -9.59999999999999949e109 < z < -2.00000000000000018e56Initial program 89.9%
Taylor expanded in x around 0 70.3%
associate-/l*70.0%
Simplified70.0%
associate-/r/70.1%
Applied egg-rr70.1%
Taylor expanded in y around inf 60.6%
*-commutative60.6%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in a around 0 61.0%
associate-*r/61.0%
neg-mul-161.0%
distribute-lft-neg-in61.0%
*-commutative61.0%
Simplified61.0%
if -5.4999999999999997e39 < z < -3.6500000000000001e-16 or -1.62000000000000001e-96 < z < -1.5000000000000001e-142 or 6.4999999999999997e-300 < z < 5.1000000000000003e81Initial program 87.5%
Taylor expanded in a around inf 42.9%
if -3.6500000000000001e-16 < z < -1.62000000000000001e-96 or -1.5000000000000001e-142 < z < 6.4999999999999997e-300Initial program 94.6%
Taylor expanded in x around 0 52.4%
associate-/l*56.6%
Simplified56.6%
associate-/r/58.6%
Applied egg-rr58.6%
Taylor expanded in y around inf 46.1%
*-commutative46.1%
associate-*r/52.4%
Simplified52.4%
Final simplification51.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a (- t x))))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= z -2.8e+40)
t_2
(if (<= z -1.15e-66)
t_1
(if (<= z -3.7e-91)
(* y (/ (- t x) (- a z)))
(if (<= z -1.42e-105)
(+ x (/ (* (- y z) t) a))
(if (<= z 7.2e+66) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / (t - x)));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2.8e+40) {
tmp = t_2;
} else if (z <= -1.15e-66) {
tmp = t_1;
} else if (z <= -3.7e-91) {
tmp = y * ((t - x) / (a - z));
} else if (z <= -1.42e-105) {
tmp = x + (((y - z) * t) / a);
} else if (z <= 7.2e+66) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y / (a / (t - x)))
t_2 = t * ((y - z) / (a - z))
if (z <= (-2.8d+40)) then
tmp = t_2
else if (z <= (-1.15d-66)) then
tmp = t_1
else if (z <= (-3.7d-91)) then
tmp = y * ((t - x) / (a - z))
else if (z <= (-1.42d-105)) then
tmp = x + (((y - z) * t) / a)
else if (z <= 7.2d+66) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / (t - x)));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2.8e+40) {
tmp = t_2;
} else if (z <= -1.15e-66) {
tmp = t_1;
} else if (z <= -3.7e-91) {
tmp = y * ((t - x) / (a - z));
} else if (z <= -1.42e-105) {
tmp = x + (((y - z) * t) / a);
} else if (z <= 7.2e+66) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / (t - x))) t_2 = t * ((y - z) / (a - z)) tmp = 0 if z <= -2.8e+40: tmp = t_2 elif z <= -1.15e-66: tmp = t_1 elif z <= -3.7e-91: tmp = y * ((t - x) / (a - z)) elif z <= -1.42e-105: tmp = x + (((y - z) * t) / a) elif z <= 7.2e+66: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / Float64(t - x)))) t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -2.8e+40) tmp = t_2; elseif (z <= -1.15e-66) tmp = t_1; elseif (z <= -3.7e-91) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (z <= -1.42e-105) tmp = Float64(x + Float64(Float64(Float64(y - z) * t) / a)); elseif (z <= 7.2e+66) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / (t - x))); t_2 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -2.8e+40) tmp = t_2; elseif (z <= -1.15e-66) tmp = t_1; elseif (z <= -3.7e-91) tmp = y * ((t - x) / (a - z)); elseif (z <= -1.42e-105) tmp = x + (((y - z) * t) / a); elseif (z <= 7.2e+66) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e+40], t$95$2, If[LessEqual[z, -1.15e-66], t$95$1, If[LessEqual[z, -3.7e-91], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.42e-105], N[(x + N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+66], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{t - x}}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -2.8 \cdot 10^{+40}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{-66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-91}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;z \leq -1.42 \cdot 10^{-105}:\\
\;\;\;\;x + \frac{\left(y - z\right) \cdot t}{a}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -2.8000000000000001e40 or 7.2e66 < z Initial program 56.1%
Taylor expanded in x around 0 45.9%
associate-/l*67.6%
Simplified67.6%
div-inv67.6%
*-commutative67.6%
clear-num67.6%
Applied egg-rr67.6%
if -2.8000000000000001e40 < z < -1.14999999999999996e-66 or -1.4199999999999999e-105 < z < 7.2e66Initial program 89.0%
Taylor expanded in z around 0 72.9%
associate-/l*78.9%
Simplified78.9%
if -1.14999999999999996e-66 < z < -3.7000000000000002e-91Initial program 100.0%
Taylor expanded in y around inf 87.7%
div-sub87.7%
Simplified87.7%
if -3.7000000000000002e-91 < z < -1.4199999999999999e-105Initial program 100.0%
Taylor expanded in t around inf 80.8%
Taylor expanded in a around inf 81.3%
Final simplification74.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) (- a z))))
(t_2 (/ t (/ (- z a) z)))
(t_3 (+ x (/ (* y t) a))))
(if (<= z -1.4e+119)
t_2
(if (<= z -9.8e-98)
t_1
(if (<= z 4.7e-184)
t_3
(if (<= z 1.76e-159) t_1 (if (<= z 3.8e+64) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double t_2 = t / ((z - a) / z);
double t_3 = x + ((y * t) / a);
double tmp;
if (z <= -1.4e+119) {
tmp = t_2;
} else if (z <= -9.8e-98) {
tmp = t_1;
} else if (z <= 4.7e-184) {
tmp = t_3;
} else if (z <= 1.76e-159) {
tmp = t_1;
} else if (z <= 3.8e+64) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y * ((t - x) / (a - z))
t_2 = t / ((z - a) / z)
t_3 = x + ((y * t) / a)
if (z <= (-1.4d+119)) then
tmp = t_2
else if (z <= (-9.8d-98)) then
tmp = t_1
else if (z <= 4.7d-184) then
tmp = t_3
else if (z <= 1.76d-159) then
tmp = t_1
else if (z <= 3.8d+64) then
tmp = t_3
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 = y * ((t - x) / (a - z));
double t_2 = t / ((z - a) / z);
double t_3 = x + ((y * t) / a);
double tmp;
if (z <= -1.4e+119) {
tmp = t_2;
} else if (z <= -9.8e-98) {
tmp = t_1;
} else if (z <= 4.7e-184) {
tmp = t_3;
} else if (z <= 1.76e-159) {
tmp = t_1;
} else if (z <= 3.8e+64) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / (a - z)) t_2 = t / ((z - a) / z) t_3 = x + ((y * t) / a) tmp = 0 if z <= -1.4e+119: tmp = t_2 elif z <= -9.8e-98: tmp = t_1 elif z <= 4.7e-184: tmp = t_3 elif z <= 1.76e-159: tmp = t_1 elif z <= 3.8e+64: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z))) t_2 = Float64(t / Float64(Float64(z - a) / z)) t_3 = Float64(x + Float64(Float64(y * t) / a)) tmp = 0.0 if (z <= -1.4e+119) tmp = t_2; elseif (z <= -9.8e-98) tmp = t_1; elseif (z <= 4.7e-184) tmp = t_3; elseif (z <= 1.76e-159) tmp = t_1; elseif (z <= 3.8e+64) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / (a - z)); t_2 = t / ((z - a) / z); t_3 = x + ((y * t) / a); tmp = 0.0; if (z <= -1.4e+119) tmp = t_2; elseif (z <= -9.8e-98) tmp = t_1; elseif (z <= 4.7e-184) tmp = t_3; elseif (z <= 1.76e-159) tmp = t_1; elseif (z <= 3.8e+64) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+119], t$95$2, If[LessEqual[z, -9.8e-98], t$95$1, If[LessEqual[z, 4.7e-184], t$95$3, If[LessEqual[z, 1.76e-159], t$95$1, If[LessEqual[z, 3.8e+64], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a - z}\\
t_2 := \frac{t}{\frac{z - a}{z}}\\
t_3 := x + \frac{y \cdot t}{a}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+119}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -9.8 \cdot 10^{-98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-184}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;z \leq 1.76 \cdot 10^{-159}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+64}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -1.40000000000000007e119 or 3.8000000000000001e64 < z Initial program 51.6%
Taylor expanded in x around 0 43.0%
associate-/l*67.0%
Simplified67.0%
Taylor expanded in y around 0 65.8%
associate-*r/65.8%
neg-mul-165.8%
neg-sub065.8%
associate--r-65.8%
neg-sub065.8%
Simplified65.8%
if -1.40000000000000007e119 < z < -9.80000000000000028e-98 or 4.70000000000000019e-184 < z < 1.76e-159Initial program 89.5%
Taylor expanded in y around inf 61.5%
div-sub61.5%
Simplified61.5%
if -9.80000000000000028e-98 < z < 4.70000000000000019e-184 or 1.76e-159 < z < 3.8000000000000001e64Initial program 89.6%
Taylor expanded in t around inf 73.4%
Taylor expanded in z around 0 61.6%
Final simplification63.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -1.28e+150)
t_1
(if (<= z -1.65e-304)
(- x (* (/ t (- a z)) (- z y)))
(if (<= z 3.5e+80) (+ x (/ (- t x) (/ a (- y z)))) 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 (z <= -1.28e+150) {
tmp = t_1;
} else if (z <= -1.65e-304) {
tmp = x - ((t / (a - z)) * (z - y));
} else if (z <= 3.5e+80) {
tmp = x + ((t - x) / (a / (y - 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 * ((y - z) / (a - z))
if (z <= (-1.28d+150)) then
tmp = t_1
else if (z <= (-1.65d-304)) then
tmp = x - ((t / (a - z)) * (z - y))
else if (z <= 3.5d+80) then
tmp = x + ((t - x) / (a / (y - 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 * ((y - z) / (a - z));
double tmp;
if (z <= -1.28e+150) {
tmp = t_1;
} else if (z <= -1.65e-304) {
tmp = x - ((t / (a - z)) * (z - y));
} else if (z <= 3.5e+80) {
tmp = x + ((t - x) / (a / (y - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -1.28e+150: tmp = t_1 elif z <= -1.65e-304: tmp = x - ((t / (a - z)) * (z - y)) elif z <= 3.5e+80: tmp = x + ((t - x) / (a / (y - z))) 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 (z <= -1.28e+150) tmp = t_1; elseif (z <= -1.65e-304) tmp = Float64(x - Float64(Float64(t / Float64(a - z)) * Float64(z - y))); elseif (z <= 3.5e+80) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z)))); 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 (z <= -1.28e+150) tmp = t_1; elseif (z <= -1.65e-304) tmp = x - ((t / (a - z)) * (z - y)); elseif (z <= 3.5e+80) tmp = x + ((t - x) / (a / (y - z))); 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[z, -1.28e+150], t$95$1, If[LessEqual[z, -1.65e-304], N[(x - N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e+80], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -1.28 \cdot 10^{+150}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-304}:\\
\;\;\;\;x - \frac{t}{a - z} \cdot \left(z - y\right)\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+80}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.2800000000000001e150 or 3.49999999999999994e80 < z Initial program 49.3%
Taylor expanded in x around 0 43.2%
associate-/l*68.4%
Simplified68.4%
div-inv68.4%
*-commutative68.4%
clear-num68.4%
Applied egg-rr68.4%
if -1.2800000000000001e150 < z < -1.65000000000000006e-304Initial program 89.0%
Taylor expanded in t around inf 76.4%
if -1.65000000000000006e-304 < z < 3.49999999999999994e80Initial program 88.9%
Taylor expanded in a around inf 79.0%
associate-/l*83.3%
Simplified83.3%
Final simplification76.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ t (/ (- x t) (/ z (- y a))))))
(if (<= z -4.1e+76)
t_1
(if (<= z -1.65e-304)
(- x (* (/ t (- a z)) (- z y)))
(if (<= z 8.5e+42) (+ x (/ (- t x) (/ a (- y z)))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t + ((x - t) / (z / (y - a)));
double tmp;
if (z <= -4.1e+76) {
tmp = t_1;
} else if (z <= -1.65e-304) {
tmp = x - ((t / (a - z)) * (z - y));
} else if (z <= 8.5e+42) {
tmp = x + ((t - x) / (a / (y - 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 + ((x - t) / (z / (y - a)))
if (z <= (-4.1d+76)) then
tmp = t_1
else if (z <= (-1.65d-304)) then
tmp = x - ((t / (a - z)) * (z - y))
else if (z <= 8.5d+42) then
tmp = x + ((t - x) / (a / (y - 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 + ((x - t) / (z / (y - a)));
double tmp;
if (z <= -4.1e+76) {
tmp = t_1;
} else if (z <= -1.65e-304) {
tmp = x - ((t / (a - z)) * (z - y));
} else if (z <= 8.5e+42) {
tmp = x + ((t - x) / (a / (y - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t + ((x - t) / (z / (y - a))) tmp = 0 if z <= -4.1e+76: tmp = t_1 elif z <= -1.65e-304: tmp = x - ((t / (a - z)) * (z - y)) elif z <= 8.5e+42: tmp = x + ((t - x) / (a / (y - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t + Float64(Float64(x - t) / Float64(z / Float64(y - a)))) tmp = 0.0 if (z <= -4.1e+76) tmp = t_1; elseif (z <= -1.65e-304) tmp = Float64(x - Float64(Float64(t / Float64(a - z)) * Float64(z - y))); elseif (z <= 8.5e+42) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t + ((x - t) / (z / (y - a))); tmp = 0.0; if (z <= -4.1e+76) tmp = t_1; elseif (z <= -1.65e-304) tmp = x - ((t / (a - z)) * (z - y)); elseif (z <= 8.5e+42) tmp = x + ((t - x) / (a / (y - z))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e+76], t$95$1, If[LessEqual[z, -1.65e-304], N[(x - N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e+42], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \frac{x - t}{\frac{z}{y - a}}\\
\mathbf{if}\;z \leq -4.1 \cdot 10^{+76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-304}:\\
\;\;\;\;x - \frac{t}{a - z} \cdot \left(z - y\right)\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+42}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -4.0999999999999998e76 or 8.5000000000000003e42 < z Initial program 53.0%
Taylor expanded in z around -inf 62.2%
mul-1-neg62.2%
sub-neg62.2%
mul-1-neg62.2%
+-commutative62.2%
+-commutative62.2%
mul-1-neg62.2%
sub-neg62.2%
distribute-rgt-out--62.4%
associate-/l*83.8%
Simplified83.8%
if -4.0999999999999998e76 < z < -1.65000000000000006e-304Initial program 91.3%
Taylor expanded in t around inf 79.2%
if -1.65000000000000006e-304 < z < 8.5000000000000003e42Initial program 91.5%
Taylor expanded in a around inf 82.0%
associate-/l*86.7%
Simplified86.7%
Final simplification83.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9.5e+109)
t
(if (<= z -2.5e+54)
(* (- y) (/ t z))
(if (<= z -2.4e+37)
t
(if (<= z -9.5e-143)
x
(if (<= z 1.2e-305) (* y (/ t a)) (if (<= z 8.8e+80) x t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9.5e+109) {
tmp = t;
} else if (z <= -2.5e+54) {
tmp = -y * (t / z);
} else if (z <= -2.4e+37) {
tmp = t;
} else if (z <= -9.5e-143) {
tmp = x;
} else if (z <= 1.2e-305) {
tmp = y * (t / a);
} else if (z <= 8.8e+80) {
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 <= (-9.5d+109)) then
tmp = t
else if (z <= (-2.5d+54)) then
tmp = -y * (t / z)
else if (z <= (-2.4d+37)) then
tmp = t
else if (z <= (-9.5d-143)) then
tmp = x
else if (z <= 1.2d-305) then
tmp = y * (t / a)
else if (z <= 8.8d+80) 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 <= -9.5e+109) {
tmp = t;
} else if (z <= -2.5e+54) {
tmp = -y * (t / z);
} else if (z <= -2.4e+37) {
tmp = t;
} else if (z <= -9.5e-143) {
tmp = x;
} else if (z <= 1.2e-305) {
tmp = y * (t / a);
} else if (z <= 8.8e+80) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9.5e+109: tmp = t elif z <= -2.5e+54: tmp = -y * (t / z) elif z <= -2.4e+37: tmp = t elif z <= -9.5e-143: tmp = x elif z <= 1.2e-305: tmp = y * (t / a) elif z <= 8.8e+80: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9.5e+109) tmp = t; elseif (z <= -2.5e+54) tmp = Float64(Float64(-y) * Float64(t / z)); elseif (z <= -2.4e+37) tmp = t; elseif (z <= -9.5e-143) tmp = x; elseif (z <= 1.2e-305) tmp = Float64(y * Float64(t / a)); elseif (z <= 8.8e+80) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9.5e+109) tmp = t; elseif (z <= -2.5e+54) tmp = -y * (t / z); elseif (z <= -2.4e+37) tmp = t; elseif (z <= -9.5e-143) tmp = x; elseif (z <= 1.2e-305) tmp = y * (t / a); elseif (z <= 8.8e+80) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.5e+109], t, If[LessEqual[z, -2.5e+54], N[((-y) * N[(t / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.4e+37], t, If[LessEqual[z, -9.5e-143], x, If[LessEqual[z, 1.2e-305], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e+80], x, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+109}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{+54}:\\
\;\;\;\;\left(-y\right) \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{+37}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -9.5 \cdot 10^{-143}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-305}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+80}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -9.49999999999999972e109 or -2.50000000000000003e54 < z < -2.4e37 or 8.80000000000000011e80 < z Initial program 51.6%
Taylor expanded in z around inf 58.8%
if -9.49999999999999972e109 < z < -2.50000000000000003e54Initial program 89.9%
Taylor expanded in x around 0 70.3%
associate-/l*70.0%
Simplified70.0%
associate-/r/70.1%
Applied egg-rr70.1%
Taylor expanded in y around inf 60.6%
*-commutative60.6%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in a around 0 60.8%
associate-*r/60.8%
neg-mul-160.8%
Simplified60.8%
if -2.4e37 < z < -9.4999999999999993e-143 or 1.2000000000000001e-305 < z < 8.80000000000000011e80Initial program 88.2%
Taylor expanded in a around inf 38.8%
if -9.4999999999999993e-143 < z < 1.2000000000000001e-305Initial program 96.1%
Taylor expanded in x around 0 49.5%
associate-/l*56.3%
Simplified56.3%
Taylor expanded in z around 0 56.4%
associate-/r/63.3%
Applied egg-rr63.3%
Final simplification49.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -9e+109)
t
(if (<= z -2.7e+54)
(/ (* t (- y)) z)
(if (<= z -3.8e+36)
t
(if (<= z -3.1e-142)
x
(if (<= z 2e-306) (* y (/ t a)) (if (<= z 2.9e+81) x t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+109) {
tmp = t;
} else if (z <= -2.7e+54) {
tmp = (t * -y) / z;
} else if (z <= -3.8e+36) {
tmp = t;
} else if (z <= -3.1e-142) {
tmp = x;
} else if (z <= 2e-306) {
tmp = y * (t / a);
} else if (z <= 2.9e+81) {
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 <= (-9d+109)) then
tmp = t
else if (z <= (-2.7d+54)) then
tmp = (t * -y) / z
else if (z <= (-3.8d+36)) then
tmp = t
else if (z <= (-3.1d-142)) then
tmp = x
else if (z <= 2d-306) then
tmp = y * (t / a)
else if (z <= 2.9d+81) 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 <= -9e+109) {
tmp = t;
} else if (z <= -2.7e+54) {
tmp = (t * -y) / z;
} else if (z <= -3.8e+36) {
tmp = t;
} else if (z <= -3.1e-142) {
tmp = x;
} else if (z <= 2e-306) {
tmp = y * (t / a);
} else if (z <= 2.9e+81) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9e+109: tmp = t elif z <= -2.7e+54: tmp = (t * -y) / z elif z <= -3.8e+36: tmp = t elif z <= -3.1e-142: tmp = x elif z <= 2e-306: tmp = y * (t / a) elif z <= 2.9e+81: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e+109) tmp = t; elseif (z <= -2.7e+54) tmp = Float64(Float64(t * Float64(-y)) / z); elseif (z <= -3.8e+36) tmp = t; elseif (z <= -3.1e-142) tmp = x; elseif (z <= 2e-306) tmp = Float64(y * Float64(t / a)); elseif (z <= 2.9e+81) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9e+109) tmp = t; elseif (z <= -2.7e+54) tmp = (t * -y) / z; elseif (z <= -3.8e+36) tmp = t; elseif (z <= -3.1e-142) tmp = x; elseif (z <= 2e-306) tmp = y * (t / a); elseif (z <= 2.9e+81) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+109], t, If[LessEqual[z, -2.7e+54], N[(N[(t * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -3.8e+36], t, If[LessEqual[z, -3.1e-142], x, If[LessEqual[z, 2e-306], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e+81], x, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+109}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{+54}:\\
\;\;\;\;\frac{t \cdot \left(-y\right)}{z}\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{+36}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{-142}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-306}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -8.9999999999999992e109 or -2.70000000000000011e54 < z < -3.80000000000000025e36 or 2.9e81 < z Initial program 51.6%
Taylor expanded in z around inf 58.8%
if -8.9999999999999992e109 < z < -2.70000000000000011e54Initial program 89.9%
Taylor expanded in x around 0 70.3%
associate-/l*70.0%
Simplified70.0%
associate-/r/70.1%
Applied egg-rr70.1%
Taylor expanded in y around inf 60.6%
*-commutative60.6%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in a around 0 61.0%
associate-*r/61.0%
neg-mul-161.0%
distribute-lft-neg-in61.0%
*-commutative61.0%
Simplified61.0%
if -3.80000000000000025e36 < z < -3.1e-142 or 2.00000000000000006e-306 < z < 2.9e81Initial program 88.2%
Taylor expanded in a around inf 38.8%
if -3.1e-142 < z < 2.00000000000000006e-306Initial program 96.1%
Taylor expanded in x around 0 49.5%
associate-/l*56.3%
Simplified56.3%
Taylor expanded in z around 0 56.4%
associate-/r/63.3%
Applied egg-rr63.3%
Final simplification49.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4e+111)
t
(if (<= z -1.1e+56)
(/ (* t (- y)) z)
(if (<= z -3.5e+36) t (if (<= z 1.8e+81) (+ x (/ (* y t) a)) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4e+111) {
tmp = t;
} else if (z <= -1.1e+56) {
tmp = (t * -y) / z;
} else if (z <= -3.5e+36) {
tmp = t;
} else if (z <= 1.8e+81) {
tmp = x + ((y * t) / a);
} 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 <= (-4d+111)) then
tmp = t
else if (z <= (-1.1d+56)) then
tmp = (t * -y) / z
else if (z <= (-3.5d+36)) then
tmp = t
else if (z <= 1.8d+81) then
tmp = x + ((y * t) / a)
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 <= -4e+111) {
tmp = t;
} else if (z <= -1.1e+56) {
tmp = (t * -y) / z;
} else if (z <= -3.5e+36) {
tmp = t;
} else if (z <= 1.8e+81) {
tmp = x + ((y * t) / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4e+111: tmp = t elif z <= -1.1e+56: tmp = (t * -y) / z elif z <= -3.5e+36: tmp = t elif z <= 1.8e+81: tmp = x + ((y * t) / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4e+111) tmp = t; elseif (z <= -1.1e+56) tmp = Float64(Float64(t * Float64(-y)) / z); elseif (z <= -3.5e+36) tmp = t; elseif (z <= 1.8e+81) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4e+111) tmp = t; elseif (z <= -1.1e+56) tmp = (t * -y) / z; elseif (z <= -3.5e+36) tmp = t; elseif (z <= 1.8e+81) tmp = x + ((y * t) / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4e+111], t, If[LessEqual[z, -1.1e+56], N[(N[(t * (-y)), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, -3.5e+36], t, If[LessEqual[z, 1.8e+81], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{+111}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.1 \cdot 10^{+56}:\\
\;\;\;\;\frac{t \cdot \left(-y\right)}{z}\\
\mathbf{elif}\;z \leq -3.5 \cdot 10^{+36}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+81}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.99999999999999983e111 or -1.10000000000000008e56 < z < -3.4999999999999998e36 or 1.80000000000000003e81 < z Initial program 51.6%
Taylor expanded in z around inf 58.8%
if -3.99999999999999983e111 < z < -1.10000000000000008e56Initial program 89.9%
Taylor expanded in x around 0 70.3%
associate-/l*70.0%
Simplified70.0%
associate-/r/70.1%
Applied egg-rr70.1%
Taylor expanded in y around inf 60.6%
*-commutative60.6%
associate-*r/60.5%
Simplified60.5%
Taylor expanded in a around 0 61.0%
associate-*r/61.0%
neg-mul-161.0%
distribute-lft-neg-in61.0%
*-commutative61.0%
Simplified61.0%
if -3.4999999999999998e36 < z < 1.80000000000000003e81Initial program 89.6%
Taylor expanded in t around inf 69.8%
Taylor expanded in z around 0 54.9%
Final simplification56.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- t x) (- a z)))))
(if (<= x -2.8e+161)
t_1
(if (<= x -0.0034)
(+ x (/ (* y t) a))
(if (<= x 2.05e+69) (* t (/ (- y z) (- a z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((t - x) / (a - z));
double tmp;
if (x <= -2.8e+161) {
tmp = t_1;
} else if (x <= -0.0034) {
tmp = x + ((y * t) / a);
} else if (x <= 2.05e+69) {
tmp = t * ((y - z) / (a - 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 = y * ((t - x) / (a - z))
if (x <= (-2.8d+161)) then
tmp = t_1
else if (x <= (-0.0034d0)) then
tmp = x + ((y * t) / a)
else if (x <= 2.05d+69) then
tmp = t * ((y - z) / (a - 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 = y * ((t - x) / (a - z));
double tmp;
if (x <= -2.8e+161) {
tmp = t_1;
} else if (x <= -0.0034) {
tmp = x + ((y * t) / a);
} else if (x <= 2.05e+69) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((t - x) / (a - z)) tmp = 0 if x <= -2.8e+161: tmp = t_1 elif x <= -0.0034: tmp = x + ((y * t) / a) elif x <= 2.05e+69: tmp = t * ((y - z) / (a - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(t - x) / Float64(a - z))) tmp = 0.0 if (x <= -2.8e+161) tmp = t_1; elseif (x <= -0.0034) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (x <= 2.05e+69) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((t - x) / (a - z)); tmp = 0.0; if (x <= -2.8e+161) tmp = t_1; elseif (x <= -0.0034) tmp = x + ((y * t) / a); elseif (x <= 2.05e+69) tmp = t * ((y - z) / (a - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.8e+161], t$95$1, If[LessEqual[x, -0.0034], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.05e+69], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;x \leq -2.8 \cdot 10^{+161}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -0.0034:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;x \leq 2.05 \cdot 10^{+69}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -2.80000000000000021e161 or 2.05e69 < x Initial program 70.2%
Taylor expanded in y around inf 57.1%
div-sub57.1%
Simplified57.1%
if -2.80000000000000021e161 < x < -0.00339999999999999981Initial program 82.2%
Taylor expanded in t around inf 75.7%
Taylor expanded in z around 0 66.3%
if -0.00339999999999999981 < x < 2.05e69Initial program 77.9%
Taylor expanded in x around 0 51.8%
associate-/l*65.8%
Simplified65.8%
div-inv65.8%
*-commutative65.8%
clear-num66.4%
Applied egg-rr66.4%
Final simplification63.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -6.2e+148)
t_1
(if (<= z -1.65e-304)
(- x (* (/ t (- a z)) (- z y)))
(if (<= z 1e+66) (+ x (/ (- t x) (/ a y))) 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 (z <= -6.2e+148) {
tmp = t_1;
} else if (z <= -1.65e-304) {
tmp = x - ((t / (a - z)) * (z - y));
} else if (z <= 1e+66) {
tmp = x + ((t - x) / (a / 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 * ((y - z) / (a - z))
if (z <= (-6.2d+148)) then
tmp = t_1
else if (z <= (-1.65d-304)) then
tmp = x - ((t / (a - z)) * (z - y))
else if (z <= 1d+66) then
tmp = x + ((t - x) / (a / 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 * ((y - z) / (a - z));
double tmp;
if (z <= -6.2e+148) {
tmp = t_1;
} else if (z <= -1.65e-304) {
tmp = x - ((t / (a - z)) * (z - y));
} else if (z <= 1e+66) {
tmp = x + ((t - x) / (a / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -6.2e+148: tmp = t_1 elif z <= -1.65e-304: tmp = x - ((t / (a - z)) * (z - y)) elif z <= 1e+66: tmp = x + ((t - x) / (a / y)) 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 (z <= -6.2e+148) tmp = t_1; elseif (z <= -1.65e-304) tmp = Float64(x - Float64(Float64(t / Float64(a - z)) * Float64(z - y))); elseif (z <= 1e+66) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); 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 (z <= -6.2e+148) tmp = t_1; elseif (z <= -1.65e-304) tmp = x - ((t / (a - z)) * (z - y)); elseif (z <= 1e+66) tmp = x + ((t - x) / (a / y)); 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[z, -6.2e+148], t$95$1, If[LessEqual[z, -1.65e-304], N[(x - N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e+66], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+148}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.65 \cdot 10^{-304}:\\
\;\;\;\;x - \frac{t}{a - z} \cdot \left(z - y\right)\\
\mathbf{elif}\;z \leq 10^{+66}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.19999999999999951e148 or 9.99999999999999945e65 < z Initial program 51.0%
Taylor expanded in x around 0 44.0%
associate-/l*68.3%
Simplified68.3%
div-inv68.3%
*-commutative68.3%
clear-num68.3%
Applied egg-rr68.3%
if -6.19999999999999951e148 < z < -1.65000000000000006e-304Initial program 89.0%
Taylor expanded in t around inf 76.4%
if -1.65000000000000006e-304 < z < 9.99999999999999945e65Initial program 88.5%
Taylor expanded in a around inf 79.3%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in y around inf 80.6%
Final simplification75.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.45e+112)
t
(if (<= z -600000000.0)
(* y (/ (- x t) z))
(if (<= z 4.1e+81) (+ x (/ (* y t) a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.45e+112) {
tmp = t;
} else if (z <= -600000000.0) {
tmp = y * ((x - t) / z);
} else if (z <= 4.1e+81) {
tmp = x + ((y * t) / a);
} 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 <= (-2.45d+112)) then
tmp = t
else if (z <= (-600000000.0d0)) then
tmp = y * ((x - t) / z)
else if (z <= 4.1d+81) then
tmp = x + ((y * t) / a)
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 <= -2.45e+112) {
tmp = t;
} else if (z <= -600000000.0) {
tmp = y * ((x - t) / z);
} else if (z <= 4.1e+81) {
tmp = x + ((y * t) / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.45e+112: tmp = t elif z <= -600000000.0: tmp = y * ((x - t) / z) elif z <= 4.1e+81: tmp = x + ((y * t) / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.45e+112) tmp = t; elseif (z <= -600000000.0) tmp = Float64(y * Float64(Float64(x - t) / z)); elseif (z <= 4.1e+81) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.45e+112) tmp = t; elseif (z <= -600000000.0) tmp = y * ((x - t) / z); elseif (z <= 4.1e+81) tmp = x + ((y * t) / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.45e+112], t, If[LessEqual[z, -600000000.0], N[(y * N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e+81], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+112}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -600000000:\\
\;\;\;\;y \cdot \frac{x - t}{z}\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{+81}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.45000000000000002e112 or 4.10000000000000012e81 < z Initial program 51.0%
Taylor expanded in z around inf 58.5%
if -2.45000000000000002e112 < z < -6e8Initial program 81.8%
Taylor expanded in z around -inf 62.0%
mul-1-neg62.0%
sub-neg62.0%
mul-1-neg62.0%
+-commutative62.0%
+-commutative62.0%
mul-1-neg62.0%
sub-neg62.0%
distribute-rgt-out--62.0%
associate-/l*70.0%
Simplified70.0%
Taylor expanded in y around -inf 44.9%
mul-1-neg44.9%
associate-*r/53.1%
Simplified53.1%
if -6e8 < z < 4.10000000000000012e81Initial program 90.3%
Taylor expanded in t around inf 70.9%
Taylor expanded in z around 0 56.4%
Final simplification56.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -4.1e+184)
t
(if (<= z -1e+38)
(* (/ t z) (- z y))
(if (<= z 4.2e+81) (+ x (/ (* y t) a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.1e+184) {
tmp = t;
} else if (z <= -1e+38) {
tmp = (t / z) * (z - y);
} else if (z <= 4.2e+81) {
tmp = x + ((y * t) / a);
} 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 <= (-4.1d+184)) then
tmp = t
else if (z <= (-1d+38)) then
tmp = (t / z) * (z - y)
else if (z <= 4.2d+81) then
tmp = x + ((y * t) / a)
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 <= -4.1e+184) {
tmp = t;
} else if (z <= -1e+38) {
tmp = (t / z) * (z - y);
} else if (z <= 4.2e+81) {
tmp = x + ((y * t) / a);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.1e+184: tmp = t elif z <= -1e+38: tmp = (t / z) * (z - y) elif z <= 4.2e+81: tmp = x + ((y * t) / a) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.1e+184) tmp = t; elseif (z <= -1e+38) tmp = Float64(Float64(t / z) * Float64(z - y)); elseif (z <= 4.2e+81) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.1e+184) tmp = t; elseif (z <= -1e+38) tmp = (t / z) * (z - y); elseif (z <= 4.2e+81) tmp = x + ((y * t) / a); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.1e+184], t, If[LessEqual[z, -1e+38], N[(N[(t / z), $MachinePrecision] * N[(z - y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+81], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+184}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1 \cdot 10^{+38}:\\
\;\;\;\;\frac{t}{z} \cdot \left(z - y\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+81}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.0999999999999997e184 or 4.1999999999999997e81 < z Initial program 47.8%
Taylor expanded in z around inf 61.4%
if -4.0999999999999997e184 < z < -9.99999999999999977e37Initial program 77.4%
Taylor expanded in x around 0 48.0%
associate-/l*62.2%
Simplified62.2%
associate-/r/59.2%
Applied egg-rr59.2%
Taylor expanded in a around 0 55.6%
associate-*r/25.5%
neg-mul-125.5%
Simplified55.6%
if -9.99999999999999977e37 < z < 4.1999999999999997e81Initial program 89.6%
Taylor expanded in t around inf 69.8%
Taylor expanded in z around 0 54.9%
Final simplification56.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.9e+39) (not (<= z 9.2e+67))) (* t (/ (- y z) (- a z))) (+ x (/ y (/ a (- t x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e+39) || !(z <= 9.2e+67)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.9d+39)) .or. (.not. (z <= 9.2d+67))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y / (a / (t - x)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.9e+39) || !(z <= 9.2e+67)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / (t - x)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.9e+39) or not (z <= 9.2e+67): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y / (a / (t - x))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.9e+39) || !(z <= 9.2e+67)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.9e+39) || ~((z <= 9.2e+67))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y / (a / (t - x))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.9e+39], N[Not[LessEqual[z, 9.2e+67]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+39} \lor \neg \left(z \leq 9.2 \cdot 10^{+67}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\end{array}
\end{array}
if z < -1.8999999999999999e39 or 9.1999999999999994e67 < z Initial program 56.1%
Taylor expanded in x around 0 45.9%
associate-/l*67.6%
Simplified67.6%
div-inv67.6%
*-commutative67.6%
clear-num67.6%
Applied egg-rr67.6%
if -1.8999999999999999e39 < z < 9.1999999999999994e67Initial program 89.9%
Taylor expanded in z around 0 70.8%
associate-/l*76.3%
Simplified76.3%
Final simplification72.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.05e+38) (not (<= z 8.2e+65))) (* t (/ (- y z) (- a z))) (+ x (/ (- t x) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.05e+38) || !(z <= 8.2e+65)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.05d+38)) .or. (.not. (z <= 8.2d+65))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.05e+38) || !(z <= 8.2e+65)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.05e+38) or not (z <= 8.2e+65): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.05e+38) || !(z <= 8.2e+65)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.05e+38) || ~((z <= 8.2e+65))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.05e+38], N[Not[LessEqual[z, 8.2e+65]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+38} \lor \neg \left(z \leq 8.2 \cdot 10^{+65}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < -2.0500000000000002e38 or 8.2000000000000003e65 < z Initial program 56.1%
Taylor expanded in x around 0 45.9%
associate-/l*67.6%
Simplified67.6%
div-inv67.6%
*-commutative67.6%
clear-num67.6%
Applied egg-rr67.6%
if -2.0500000000000002e38 < z < 8.2000000000000003e65Initial program 89.9%
Taylor expanded in a around inf 73.7%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in y around inf 76.3%
Final simplification72.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.8e+36) (not (<= z 1.5e+81))) (/ t (/ (- z) (- y z))) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.8e+36) || !(z <= 1.5e+81)) {
tmp = t / (-z / (y - z));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.8d+36)) .or. (.not. (z <= 1.5d+81))) then
tmp = t / (-z / (y - z))
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.8e+36) || !(z <= 1.5e+81)) {
tmp = t / (-z / (y - z));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.8e+36) or not (z <= 1.5e+81): tmp = t / (-z / (y - z)) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.8e+36) || !(z <= 1.5e+81)) tmp = Float64(t / Float64(Float64(-z) / Float64(y - z))); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.8e+36) || ~((z <= 1.5e+81))) tmp = t / (-z / (y - z)); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.8e+36], N[Not[LessEqual[z, 1.5e+81]], $MachinePrecision]], N[(t / N[((-z) / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+36} \lor \neg \left(z \leq 1.5 \cdot 10^{+81}\right):\\
\;\;\;\;\frac{t}{\frac{-z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -2.8000000000000001e36 or 1.49999999999999999e81 < z Initial program 55.3%
Taylor expanded in x around 0 45.7%
associate-/l*68.2%
Simplified68.2%
Taylor expanded in a around 0 60.8%
mul-1-neg60.8%
distribute-neg-frac60.8%
Simplified60.8%
if -2.8000000000000001e36 < z < 1.49999999999999999e81Initial program 89.6%
Taylor expanded in t around inf 69.8%
Taylor expanded in z around 0 54.9%
Final simplification57.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.25e+37)
t
(if (<= z -2.3e-135)
x
(if (<= z 2.15e-303) (* y (/ t a)) (if (<= z 3.45e+81) x t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.25e+37) {
tmp = t;
} else if (z <= -2.3e-135) {
tmp = x;
} else if (z <= 2.15e-303) {
tmp = y * (t / a);
} else if (z <= 3.45e+81) {
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 <= (-2.25d+37)) then
tmp = t
else if (z <= (-2.3d-135)) then
tmp = x
else if (z <= 2.15d-303) then
tmp = y * (t / a)
else if (z <= 3.45d+81) 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 <= -2.25e+37) {
tmp = t;
} else if (z <= -2.3e-135) {
tmp = x;
} else if (z <= 2.15e-303) {
tmp = y * (t / a);
} else if (z <= 3.45e+81) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.25e+37: tmp = t elif z <= -2.3e-135: tmp = x elif z <= 2.15e-303: tmp = y * (t / a) elif z <= 3.45e+81: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.25e+37) tmp = t; elseif (z <= -2.3e-135) tmp = x; elseif (z <= 2.15e-303) tmp = Float64(y * Float64(t / a)); elseif (z <= 3.45e+81) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.25e+37) tmp = t; elseif (z <= -2.3e-135) tmp = x; elseif (z <= 2.15e-303) tmp = y * (t / a); elseif (z <= 3.45e+81) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.25e+37], t, If[LessEqual[z, -2.3e-135], x, If[LessEqual[z, 2.15e-303], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.45e+81], x, t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.25 \cdot 10^{+37}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-135}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-303}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 3.45 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.24999999999999981e37 or 3.4499999999999998e81 < z Initial program 55.3%
Taylor expanded in z around inf 54.3%
if -2.24999999999999981e37 < z < -2.2999999999999999e-135 or 2.14999999999999991e-303 < z < 3.4499999999999998e81Initial program 88.2%
Taylor expanded in a around inf 38.8%
if -2.2999999999999999e-135 < z < 2.14999999999999991e-303Initial program 96.1%
Taylor expanded in x around 0 49.5%
associate-/l*56.3%
Simplified56.3%
Taylor expanded in z around 0 56.4%
associate-/r/63.3%
Applied egg-rr63.3%
Final simplification47.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.15e+38) (/ t (/ (- z) (- y z))) (if (<= z 1.45e+68) (+ x (/ (* y t) a)) (/ t (/ (- z a) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.15e+38) {
tmp = t / (-z / (y - z));
} else if (z <= 1.45e+68) {
tmp = x + ((y * t) / a);
} else {
tmp = t / ((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 (z <= (-3.15d+38)) then
tmp = t / (-z / (y - z))
else if (z <= 1.45d+68) then
tmp = x + ((y * t) / a)
else
tmp = t / ((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 (z <= -3.15e+38) {
tmp = t / (-z / (y - z));
} else if (z <= 1.45e+68) {
tmp = x + ((y * t) / a);
} else {
tmp = t / ((z - a) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.15e+38: tmp = t / (-z / (y - z)) elif z <= 1.45e+68: tmp = x + ((y * t) / a) else: tmp = t / ((z - a) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.15e+38) tmp = Float64(t / Float64(Float64(-z) / Float64(y - z))); elseif (z <= 1.45e+68) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = Float64(t / Float64(Float64(z - a) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.15e+38) tmp = t / (-z / (y - z)); elseif (z <= 1.45e+68) tmp = x + ((y * t) / a); else tmp = t / ((z - a) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.15e+38], N[(t / N[((-z) / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+68], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(t / N[(N[(z - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.15 \cdot 10^{+38}:\\
\;\;\;\;\frac{t}{\frac{-z}{y - z}}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+68}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{z - a}{z}}\\
\end{array}
\end{array}
if z < -3.15000000000000001e38Initial program 62.8%
Taylor expanded in x around 0 47.2%
associate-/l*72.1%
Simplified72.1%
Taylor expanded in a around 0 66.6%
mul-1-neg66.6%
distribute-neg-frac66.6%
Simplified66.6%
if -3.15000000000000001e38 < z < 1.45000000000000006e68Initial program 89.9%
Taylor expanded in t around inf 69.6%
Taylor expanded in z around 0 55.6%
if 1.45000000000000006e68 < z Initial program 50.3%
Taylor expanded in x around 0 44.8%
associate-/l*63.8%
Simplified63.8%
Taylor expanded in y around 0 62.2%
associate-*r/62.2%
neg-mul-162.2%
neg-sub062.2%
associate--r-62.2%
neg-sub062.2%
Simplified62.2%
Final simplification59.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -6.6e+39) t (if (<= z 3.5e+81) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6.6e+39) {
tmp = t;
} else if (z <= 3.5e+81) {
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 <= (-6.6d+39)) then
tmp = t
else if (z <= 3.5d+81) 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 <= -6.6e+39) {
tmp = t;
} else if (z <= 3.5e+81) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6.6e+39: tmp = t elif z <= 3.5e+81: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6.6e+39) tmp = t; elseif (z <= 3.5e+81) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6.6e+39) tmp = t; elseif (z <= 3.5e+81) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.6e+39], t, If[LessEqual[z, 3.5e+81], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{+39}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{+81}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.60000000000000042e39 or 3.5e81 < z Initial program 55.3%
Taylor expanded in z around inf 54.3%
if -6.60000000000000042e39 < z < 3.5e81Initial program 89.6%
Taylor expanded in a around inf 37.5%
Final simplification44.2%
(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 75.9%
Taylor expanded in z around inf 26.8%
Final simplification26.8%
herbie shell --seed 2023301
(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)))))