
(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 (/ (- t x) (- a z))) (t_2 (+ x (* (- y z) t_1))))
(if (or (<= t_2 -5e-241) (not (<= t_2 5e-214)))
(fma (- y z) t_1 x)
(- t (/ x (/ z (- a y)))))))
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-241) || !(t_2 <= 5e-214)) {
tmp = fma((y - z), t_1, x);
} else {
tmp = t - (x / (z / (a - y)));
}
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-241) || !(t_2 <= 5e-214)) tmp = fma(Float64(y - z), t_1, x); else tmp = Float64(t - Float64(x / Float64(z / Float64(a - y)))); 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[Or[LessEqual[t$95$2, -5e-241], N[Not[LessEqual[t$95$2, 5e-214]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t$95$1 + x), $MachinePrecision], N[(t - N[(x / N[(z / N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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^{-241} \lor \neg \left(t_2 \leq 5 \cdot 10^{-214}\right):\\
\;\;\;\;\mathsf{fma}\left(y - z, t_1, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - \frac{x}{\frac{z}{a - y}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.9999999999999998e-241 or 4.9999999999999998e-214 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.7%
+-commutative92.7%
fma-def92.7%
Simplified92.7%
if -4.9999999999999998e-241 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999998e-214Initial program 9.6%
Taylor expanded in z around inf 76.6%
associate--l+76.6%
distribute-lft-out--76.6%
div-sub76.6%
mul-1-neg76.6%
unsub-neg76.6%
distribute-rgt-out--76.6%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in t around 0 76.6%
mul-1-neg76.6%
associate-/l*92.0%
associate-/r/86.9%
distribute-rgt-neg-in86.9%
sub-neg86.9%
distribute-neg-out86.9%
mul-1-neg86.9%
remove-double-neg86.9%
+-commutative86.9%
mul-1-neg86.9%
sub-neg86.9%
Simplified86.9%
associate-*l/76.6%
associate-/l*92.0%
Applied egg-rr92.0%
Final simplification92.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -5e-241) (not (<= t_1 5e-214)))
t_1
(- t (/ x (/ z (- a y)))))))
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-241) || !(t_1 <= 5e-214)) {
tmp = t_1;
} else {
tmp = t - (x / (z / (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) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * ((t - x) / (a - z)))
if ((t_1 <= (-5d-241)) .or. (.not. (t_1 <= 5d-214))) then
tmp = t_1
else
tmp = t - (x / (z / (a - y)))
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-241) || !(t_1 <= 5e-214)) {
tmp = t_1;
} else {
tmp = t - (x / (z / (a - y)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / (a - z))) tmp = 0 if (t_1 <= -5e-241) or not (t_1 <= 5e-214): tmp = t_1 else: tmp = t - (x / (z / (a - y))) 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-241) || !(t_1 <= 5e-214)) tmp = t_1; else tmp = Float64(t - Float64(x / Float64(z / Float64(a - y)))); 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-241) || ~((t_1 <= 5e-214))) tmp = t_1; else tmp = t - (x / (z / (a - y))); 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-241], N[Not[LessEqual[t$95$1, 5e-214]], $MachinePrecision]], t$95$1, N[(t - N[(x / N[(z / N[(a - y), $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^{-241} \lor \neg \left(t_1 \leq 5 \cdot 10^{-214}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t - \frac{x}{\frac{z}{a - y}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.9999999999999998e-241 or 4.9999999999999998e-214 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.7%
if -4.9999999999999998e-241 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999998e-214Initial program 9.6%
Taylor expanded in z around inf 76.6%
associate--l+76.6%
distribute-lft-out--76.6%
div-sub76.6%
mul-1-neg76.6%
unsub-neg76.6%
distribute-rgt-out--76.6%
associate-/l*91.9%
Simplified91.9%
Taylor expanded in t around 0 76.6%
mul-1-neg76.6%
associate-/l*92.0%
associate-/r/86.9%
distribute-rgt-neg-in86.9%
sub-neg86.9%
distribute-neg-out86.9%
mul-1-neg86.9%
remove-double-neg86.9%
+-commutative86.9%
mul-1-neg86.9%
sub-neg86.9%
Simplified86.9%
associate-*l/76.6%
associate-/l*92.0%
Applied egg-rr92.0%
Final simplification92.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (/ (- t x) (/ z (- y a)))))
(t_2 (+ x (* (- y z) (/ (- t x) a)))))
(if (<= a -5.4e+134)
t_2
(if (<= a -280.0)
t_1
(if (<= a -2.75e-30)
(+ x (/ y (/ a (- t x))))
(if (<= a 8.5e-110)
t_1
(if (<= a 3e+54) (/ t (/ (- a z) (- y z))) t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((t - x) / (z / (y - a)));
double t_2 = x + ((y - z) * ((t - x) / a));
double tmp;
if (a <= -5.4e+134) {
tmp = t_2;
} else if (a <= -280.0) {
tmp = t_1;
} else if (a <= -2.75e-30) {
tmp = x + (y / (a / (t - x)));
} else if (a <= 8.5e-110) {
tmp = t_1;
} else if (a <= 3e+54) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t - ((t - x) / (z / (y - a)))
t_2 = x + ((y - z) * ((t - x) / a))
if (a <= (-5.4d+134)) then
tmp = t_2
else if (a <= (-280.0d0)) then
tmp = t_1
else if (a <= (-2.75d-30)) then
tmp = x + (y / (a / (t - x)))
else if (a <= 8.5d-110) then
tmp = t_1
else if (a <= 3d+54) then
tmp = t / ((a - z) / (y - z))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((t - x) / (z / (y - a)));
double t_2 = x + ((y - z) * ((t - x) / a));
double tmp;
if (a <= -5.4e+134) {
tmp = t_2;
} else if (a <= -280.0) {
tmp = t_1;
} else if (a <= -2.75e-30) {
tmp = x + (y / (a / (t - x)));
} else if (a <= 8.5e-110) {
tmp = t_1;
} else if (a <= 3e+54) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((t - x) / (z / (y - a))) t_2 = x + ((y - z) * ((t - x) / a)) tmp = 0 if a <= -5.4e+134: tmp = t_2 elif a <= -280.0: tmp = t_1 elif a <= -2.75e-30: tmp = x + (y / (a / (t - x))) elif a <= 8.5e-110: tmp = t_1 elif a <= 3e+54: tmp = t / ((a - z) / (y - z)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(t - x) / Float64(z / Float64(y - a)))) t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a))) tmp = 0.0 if (a <= -5.4e+134) tmp = t_2; elseif (a <= -280.0) tmp = t_1; elseif (a <= -2.75e-30) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (a <= 8.5e-110) tmp = t_1; elseif (a <= 3e+54) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((t - x) / (z / (y - a))); t_2 = x + ((y - z) * ((t - x) / a)); tmp = 0.0; if (a <= -5.4e+134) tmp = t_2; elseif (a <= -280.0) tmp = t_1; elseif (a <= -2.75e-30) tmp = x + (y / (a / (t - x))); elseif (a <= 8.5e-110) tmp = t_1; elseif (a <= 3e+54) tmp = t / ((a - z) / (y - z)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.4e+134], t$95$2, If[LessEqual[a, -280.0], t$95$1, If[LessEqual[a, -2.75e-30], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.5e-110], t$95$1, If[LessEqual[a, 3e+54], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{t - x}{\frac{z}{y - a}}\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -5.4 \cdot 10^{+134}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -280:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.75 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{-110}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3 \cdot 10^{+54}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -5.4e134 or 2.9999999999999999e54 < a Initial program 89.5%
Taylor expanded in a around inf 68.3%
associate-/l*83.2%
associate-/r/80.4%
Simplified80.4%
if -5.4e134 < a < -280 or -2.74999999999999988e-30 < a < 8.50000000000000029e-110Initial program 72.1%
Taylor expanded in z around inf 70.9%
associate--l+70.9%
distribute-lft-out--70.9%
div-sub70.9%
mul-1-neg70.9%
unsub-neg70.9%
distribute-rgt-out--70.9%
associate-/l*80.0%
Simplified80.0%
if -280 < a < -2.74999999999999988e-30Initial program 99.8%
Taylor expanded in z around 0 87.4%
associate-/l*87.5%
Simplified87.5%
if 8.50000000000000029e-110 < a < 2.9999999999999999e54Initial program 84.5%
Taylor expanded in x around 0 68.1%
associate-/l*82.8%
Simplified82.8%
Final simplification80.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (- t x) (/ z (- a z))))))
(if (<= a -1.15e+136)
(+ x (* (- y z) (/ (- t x) a)))
(if (<= a -2800.0)
t_1
(if (<= a -2.85e-30)
(+ x (/ y (/ a (- t x))))
(if (<= a 1.32e-106)
(- t (/ (- t x) (/ z (- y a))))
(if (<= a 5.5e+54) (/ t (/ (- a z) (- y z))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((t - x) * (z / (a - z)));
double tmp;
if (a <= -1.15e+136) {
tmp = x + ((y - z) * ((t - x) / a));
} else if (a <= -2800.0) {
tmp = t_1;
} else if (a <= -2.85e-30) {
tmp = x + (y / (a / (t - x)));
} else if (a <= 1.32e-106) {
tmp = t - ((t - x) / (z / (y - a)));
} else if (a <= 5.5e+54) {
tmp = t / ((a - z) / (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 = x - ((t - x) * (z / (a - z)))
if (a <= (-1.15d+136)) then
tmp = x + ((y - z) * ((t - x) / a))
else if (a <= (-2800.0d0)) then
tmp = t_1
else if (a <= (-2.85d-30)) then
tmp = x + (y / (a / (t - x)))
else if (a <= 1.32d-106) then
tmp = t - ((t - x) / (z / (y - a)))
else if (a <= 5.5d+54) then
tmp = t / ((a - z) / (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 = x - ((t - x) * (z / (a - z)));
double tmp;
if (a <= -1.15e+136) {
tmp = x + ((y - z) * ((t - x) / a));
} else if (a <= -2800.0) {
tmp = t_1;
} else if (a <= -2.85e-30) {
tmp = x + (y / (a / (t - x)));
} else if (a <= 1.32e-106) {
tmp = t - ((t - x) / (z / (y - a)));
} else if (a <= 5.5e+54) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((t - x) * (z / (a - z))) tmp = 0 if a <= -1.15e+136: tmp = x + ((y - z) * ((t - x) / a)) elif a <= -2800.0: tmp = t_1 elif a <= -2.85e-30: tmp = x + (y / (a / (t - x))) elif a <= 1.32e-106: tmp = t - ((t - x) / (z / (y - a))) elif a <= 5.5e+54: tmp = t / ((a - z) / (y - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(t - x) * Float64(z / Float64(a - z)))) tmp = 0.0 if (a <= -1.15e+136) tmp = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a))); elseif (a <= -2800.0) tmp = t_1; elseif (a <= -2.85e-30) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); elseif (a <= 1.32e-106) tmp = Float64(t - Float64(Float64(t - x) / Float64(z / Float64(y - a)))); elseif (a <= 5.5e+54) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((t - x) * (z / (a - z))); tmp = 0.0; if (a <= -1.15e+136) tmp = x + ((y - z) * ((t - x) / a)); elseif (a <= -2800.0) tmp = t_1; elseif (a <= -2.85e-30) tmp = x + (y / (a / (t - x))); elseif (a <= 1.32e-106) tmp = t - ((t - x) / (z / (y - a))); elseif (a <= 5.5e+54) tmp = t / ((a - z) / (y - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(t - x), $MachinePrecision] * N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.15e+136], N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2800.0], t$95$1, If[LessEqual[a, -2.85e-30], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.32e-106], N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e+54], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \left(t - x\right) \cdot \frac{z}{a - z}\\
\mathbf{if}\;a \leq -1.15 \cdot 10^{+136}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a}\\
\mathbf{elif}\;a \leq -2800:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.85 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{elif}\;a \leq 1.32 \cdot 10^{-106}:\\
\;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{+54}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1.15e136Initial program 91.9%
Taylor expanded in a around inf 63.1%
associate-/l*85.0%
associate-/r/81.8%
Simplified81.8%
if -1.15e136 < a < -2800 or 5.50000000000000026e54 < a Initial program 82.3%
Taylor expanded in y around 0 64.8%
mul-1-neg64.8%
unsub-neg64.8%
associate-/l*73.0%
associate-/r/77.7%
Simplified77.7%
if -2800 < a < -2.84999999999999989e-30Initial program 99.8%
Taylor expanded in z around 0 87.4%
associate-/l*87.5%
Simplified87.5%
if -2.84999999999999989e-30 < a < 1.32000000000000001e-106Initial program 72.4%
Taylor expanded in z around inf 77.6%
associate--l+77.6%
distribute-lft-out--77.6%
div-sub77.6%
mul-1-neg77.6%
unsub-neg77.6%
distribute-rgt-out--77.6%
associate-/l*84.2%
Simplified84.2%
if 1.32000000000000001e-106 < a < 5.50000000000000026e54Initial program 84.5%
Taylor expanded in x around 0 68.1%
associate-/l*82.8%
Simplified82.8%
Final simplification81.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y z) (/ t (- a z)))))
(if (<= z -3.6e+231)
(/ (- t) (+ (/ a z) -1.0))
(if (<= z -2e-8)
t_1
(if (<= z 5.5e-46)
(+ x (/ y (/ a t)))
(if (<= z 1.7e+99) t_1 (- t (/ a (/ z x)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) * (t / (a - z));
double tmp;
if (z <= -3.6e+231) {
tmp = -t / ((a / z) + -1.0);
} else if (z <= -2e-8) {
tmp = t_1;
} else if (z <= 5.5e-46) {
tmp = x + (y / (a / t));
} else if (z <= 1.7e+99) {
tmp = t_1;
} else {
tmp = t - (a / (z / 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) :: t_1
real(8) :: tmp
t_1 = (y - z) * (t / (a - z))
if (z <= (-3.6d+231)) then
tmp = -t / ((a / z) + (-1.0d0))
else if (z <= (-2d-8)) then
tmp = t_1
else if (z <= 5.5d-46) then
tmp = x + (y / (a / t))
else if (z <= 1.7d+99) then
tmp = t_1
else
tmp = t - (a / (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y - z) * (t / (a - z));
double tmp;
if (z <= -3.6e+231) {
tmp = -t / ((a / z) + -1.0);
} else if (z <= -2e-8) {
tmp = t_1;
} else if (z <= 5.5e-46) {
tmp = x + (y / (a / t));
} else if (z <= 1.7e+99) {
tmp = t_1;
} else {
tmp = t - (a / (z / x));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - z) * (t / (a - z)) tmp = 0 if z <= -3.6e+231: tmp = -t / ((a / z) + -1.0) elif z <= -2e-8: tmp = t_1 elif z <= 5.5e-46: tmp = x + (y / (a / t)) elif z <= 1.7e+99: tmp = t_1 else: tmp = t - (a / (z / x)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - z) * Float64(t / Float64(a - z))) tmp = 0.0 if (z <= -3.6e+231) tmp = Float64(Float64(-t) / Float64(Float64(a / z) + -1.0)); elseif (z <= -2e-8) tmp = t_1; elseif (z <= 5.5e-46) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 1.7e+99) tmp = t_1; else tmp = Float64(t - Float64(a / Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - z) * (t / (a - z)); tmp = 0.0; if (z <= -3.6e+231) tmp = -t / ((a / z) + -1.0); elseif (z <= -2e-8) tmp = t_1; elseif (z <= 5.5e-46) tmp = x + (y / (a / t)); elseif (z <= 1.7e+99) tmp = t_1; else tmp = t - (a / (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e+231], N[((-t) / N[(N[(a / z), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2e-8], t$95$1, If[LessEqual[z, 5.5e-46], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e+99], t$95$1, N[(t - N[(a / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{if}\;z \leq -3.6 \cdot 10^{+231}:\\
\;\;\;\;\frac{-t}{\frac{a}{z} + -1}\\
\mathbf{elif}\;z \leq -2 \cdot 10^{-8}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-46}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+99}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t - \frac{a}{\frac{z}{x}}\\
\end{array}
\end{array}
if z < -3.5999999999999999e231Initial program 51.3%
Taylor expanded in x around 0 39.9%
associate-/l*82.7%
Simplified82.7%
Taylor expanded in y around 0 39.9%
mul-1-neg39.9%
associate-/l*82.7%
distribute-neg-frac82.7%
div-sub82.8%
sub-neg82.8%
*-inverses82.8%
metadata-eval82.8%
Simplified82.8%
if -3.5999999999999999e231 < z < -2e-8 or 5.49999999999999983e-46 < z < 1.69999999999999992e99Initial program 84.6%
Taylor expanded in x around 0 45.1%
associate-/l*62.7%
associate-/r/61.5%
Simplified61.5%
if -2e-8 < z < 5.49999999999999983e-46Initial program 90.7%
Taylor expanded in z around 0 78.7%
associate-/l*79.5%
Simplified79.5%
Taylor expanded in t around inf 66.8%
if 1.69999999999999992e99 < z Initial program 58.1%
Taylor expanded in z around inf 63.0%
associate--l+63.0%
distribute-lft-out--63.0%
div-sub63.0%
mul-1-neg63.0%
unsub-neg63.0%
distribute-rgt-out--63.0%
associate-/l*77.2%
Simplified77.2%
Taylor expanded in t around 0 63.4%
mul-1-neg63.4%
associate-/l*74.7%
associate-/r/71.8%
distribute-rgt-neg-in71.8%
sub-neg71.8%
distribute-neg-out71.8%
mul-1-neg71.8%
remove-double-neg71.8%
+-commutative71.8%
mul-1-neg71.8%
sub-neg71.8%
Simplified71.8%
Taylor expanded in a around inf 56.5%
associate-/l*64.9%
Simplified64.9%
Final simplification65.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) a)))))
(if (<= a -2.85e-30)
t_1
(if (<= a 2.16e-119)
(+ t (/ (- x t) (/ z y)))
(if (<= a 3.3e+54) (/ t (/ (- a z) (- y z))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / a));
double tmp;
if (a <= -2.85e-30) {
tmp = t_1;
} else if (a <= 2.16e-119) {
tmp = t + ((x - t) / (z / y));
} else if (a <= 3.3e+54) {
tmp = t / ((a - z) / (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 = x + ((y - z) * ((t - x) / a))
if (a <= (-2.85d-30)) then
tmp = t_1
else if (a <= 2.16d-119) then
tmp = t + ((x - t) / (z / y))
else if (a <= 3.3d+54) then
tmp = t / ((a - z) / (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 = x + ((y - z) * ((t - x) / a));
double tmp;
if (a <= -2.85e-30) {
tmp = t_1;
} else if (a <= 2.16e-119) {
tmp = t + ((x - t) / (z / y));
} else if (a <= 3.3e+54) {
tmp = t / ((a - z) / (y - z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * ((t - x) / a)) tmp = 0 if a <= -2.85e-30: tmp = t_1 elif a <= 2.16e-119: tmp = t + ((x - t) / (z / y)) elif a <= 3.3e+54: tmp = t / ((a - z) / (y - z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / a))) tmp = 0.0 if (a <= -2.85e-30) tmp = t_1; elseif (a <= 2.16e-119) tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y))); elseif (a <= 3.3e+54) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * ((t - x) / a)); tmp = 0.0; if (a <= -2.85e-30) tmp = t_1; elseif (a <= 2.16e-119) tmp = t + ((x - t) / (z / y)); elseif (a <= 3.3e+54) tmp = t / ((a - z) / (y - z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.85e-30], t$95$1, If[LessEqual[a, 2.16e-119], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.3e+54], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a}\\
\mathbf{if}\;a \leq -2.85 \cdot 10^{-30}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.16 \cdot 10^{-119}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{+54}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -2.84999999999999989e-30 or 3.3e54 < a Initial program 86.4%
Taylor expanded in a around inf 63.6%
associate-/l*74.4%
associate-/r/72.4%
Simplified72.4%
if -2.84999999999999989e-30 < a < 2.1599999999999999e-119Initial program 72.8%
Taylor expanded in z around inf 77.1%
associate--l+77.1%
distribute-lft-out--77.1%
div-sub77.1%
mul-1-neg77.1%
unsub-neg77.1%
distribute-rgt-out--77.1%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in y around inf 76.4%
*-commutative76.4%
associate-/l*83.1%
Simplified83.1%
if 2.1599999999999999e-119 < a < 3.3e54Initial program 82.9%
Taylor expanded in x around 0 67.4%
associate-/l*81.4%
Simplified81.4%
Final simplification77.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (/ y z))))
(if (<= a -2.85e-30)
x
(if (<= a -1.8e-99)
t
(if (<= a -4.5e-173)
t_1
(if (<= a -1.85e-239)
t
(if (<= a 1.55e-266) t_1 (if (<= a 4e+54) t x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (y / z);
double tmp;
if (a <= -2.85e-30) {
tmp = x;
} else if (a <= -1.8e-99) {
tmp = t;
} else if (a <= -4.5e-173) {
tmp = t_1;
} else if (a <= -1.85e-239) {
tmp = t;
} else if (a <= 1.55e-266) {
tmp = t_1;
} else if (a <= 4e+54) {
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) :: t_1
real(8) :: tmp
t_1 = x * (y / z)
if (a <= (-2.85d-30)) then
tmp = x
else if (a <= (-1.8d-99)) then
tmp = t
else if (a <= (-4.5d-173)) then
tmp = t_1
else if (a <= (-1.85d-239)) then
tmp = t
else if (a <= 1.55d-266) then
tmp = t_1
else if (a <= 4d+54) 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 t_1 = x * (y / z);
double tmp;
if (a <= -2.85e-30) {
tmp = x;
} else if (a <= -1.8e-99) {
tmp = t;
} else if (a <= -4.5e-173) {
tmp = t_1;
} else if (a <= -1.85e-239) {
tmp = t;
} else if (a <= 1.55e-266) {
tmp = t_1;
} else if (a <= 4e+54) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (y / z) tmp = 0 if a <= -2.85e-30: tmp = x elif a <= -1.8e-99: tmp = t elif a <= -4.5e-173: tmp = t_1 elif a <= -1.85e-239: tmp = t elif a <= 1.55e-266: tmp = t_1 elif a <= 4e+54: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(y / z)) tmp = 0.0 if (a <= -2.85e-30) tmp = x; elseif (a <= -1.8e-99) tmp = t; elseif (a <= -4.5e-173) tmp = t_1; elseif (a <= -1.85e-239) tmp = t; elseif (a <= 1.55e-266) tmp = t_1; elseif (a <= 4e+54) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (y / z); tmp = 0.0; if (a <= -2.85e-30) tmp = x; elseif (a <= -1.8e-99) tmp = t; elseif (a <= -4.5e-173) tmp = t_1; elseif (a <= -1.85e-239) tmp = t; elseif (a <= 1.55e-266) tmp = t_1; elseif (a <= 4e+54) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.85e-30], x, If[LessEqual[a, -1.8e-99], t, If[LessEqual[a, -4.5e-173], t$95$1, If[LessEqual[a, -1.85e-239], t, If[LessEqual[a, 1.55e-266], t$95$1, If[LessEqual[a, 4e+54], t, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \frac{y}{z}\\
\mathbf{if}\;a \leq -2.85 \cdot 10^{-30}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{-99}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq -4.5 \cdot 10^{-173}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.85 \cdot 10^{-239}:\\
\;\;\;\;t\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-266}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4 \cdot 10^{+54}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.84999999999999989e-30 or 4.0000000000000003e54 < a Initial program 86.4%
Taylor expanded in a around inf 50.2%
if -2.84999999999999989e-30 < a < -1.8e-99 or -4.50000000000000018e-173 < a < -1.85000000000000008e-239 or 1.54999999999999998e-266 < a < 4.0000000000000003e54Initial program 75.3%
Taylor expanded in z around inf 47.4%
if -1.8e-99 < a < -4.50000000000000018e-173 or -1.85000000000000008e-239 < a < 1.54999999999999998e-266Initial program 77.1%
Taylor expanded in x around inf 41.1%
mul-1-neg41.1%
unsub-neg41.1%
Simplified41.1%
Taylor expanded in a around 0 51.9%
Final simplification49.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a t)))) (t_2 (- t (* y (/ t z)))))
(if (<= z -3.2e-7)
t_2
(if (<= z 2.85e-39)
t_1
(if (<= z 1.1e+27) (* t (/ (- y z) a)) (if (<= z 1.05e+47) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / t));
double t_2 = t - (y * (t / z));
double tmp;
if (z <= -3.2e-7) {
tmp = t_2;
} else if (z <= 2.85e-39) {
tmp = t_1;
} else if (z <= 1.1e+27) {
tmp = t * ((y - z) / a);
} else if (z <= 1.05e+47) {
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))
t_2 = t - (y * (t / z))
if (z <= (-3.2d-7)) then
tmp = t_2
else if (z <= 2.85d-39) then
tmp = t_1
else if (z <= 1.1d+27) then
tmp = t * ((y - z) / a)
else if (z <= 1.05d+47) 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));
double t_2 = t - (y * (t / z));
double tmp;
if (z <= -3.2e-7) {
tmp = t_2;
} else if (z <= 2.85e-39) {
tmp = t_1;
} else if (z <= 1.1e+27) {
tmp = t * ((y - z) / a);
} else if (z <= 1.05e+47) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / t)) t_2 = t - (y * (t / z)) tmp = 0 if z <= -3.2e-7: tmp = t_2 elif z <= 2.85e-39: tmp = t_1 elif z <= 1.1e+27: tmp = t * ((y - z) / a) elif z <= 1.05e+47: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / t))) t_2 = Float64(t - Float64(y * Float64(t / z))) tmp = 0.0 if (z <= -3.2e-7) tmp = t_2; elseif (z <= 2.85e-39) tmp = t_1; elseif (z <= 1.1e+27) tmp = Float64(t * Float64(Float64(y - z) / a)); elseif (z <= 1.05e+47) 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)); t_2 = t - (y * (t / z)); tmp = 0.0; if (z <= -3.2e-7) tmp = t_2; elseif (z <= 2.85e-39) tmp = t_1; elseif (z <= 1.1e+27) tmp = t * ((y - z) / a); elseif (z <= 1.05e+47) 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 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.2e-7], t$95$2, If[LessEqual[z, 2.85e-39], t$95$1, If[LessEqual[z, 1.1e+27], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+47], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{t}}\\
t_2 := t - y \cdot \frac{t}{z}\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-7}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 2.85 \cdot 10^{-39}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.1 \cdot 10^{+27}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -3.2000000000000001e-7 or 1.05e47 < z Initial program 71.5%
Taylor expanded in x around 0 42.6%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in a around 0 38.2%
mul-1-neg38.2%
associate-/l*59.4%
distribute-neg-frac59.4%
Simplified59.4%
Taylor expanded in z around 0 54.9%
mul-1-neg54.9%
unsub-neg54.9%
associate-*l/59.4%
*-commutative59.4%
Simplified59.4%
if -3.2000000000000001e-7 < z < 2.8499999999999998e-39 or 1.0999999999999999e27 < z < 1.05e47Initial program 90.2%
Taylor expanded in z around 0 77.0%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in t around inf 65.8%
if 2.8499999999999998e-39 < z < 1.0999999999999999e27Initial program 89.1%
Taylor expanded in x around 0 62.4%
associate-/l*67.7%
Simplified67.7%
clear-num67.5%
associate-/r/67.7%
clear-num67.6%
Applied egg-rr67.6%
Taylor expanded in a around inf 42.8%
Final simplification61.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.5e-6)
(- t (* y (/ t z)))
(if (<= z 2.85e-39)
(+ x (/ y (/ a t)))
(if (<= z 4.5e+27)
(* t (/ (- y z) a))
(if (<= z 2.5e+51) (* x (/ y z)) (- t (/ a (/ z x))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.5e-6) {
tmp = t - (y * (t / z));
} else if (z <= 2.85e-39) {
tmp = x + (y / (a / t));
} else if (z <= 4.5e+27) {
tmp = t * ((y - z) / a);
} else if (z <= 2.5e+51) {
tmp = x * (y / z);
} else {
tmp = t - (a / (z / 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 <= (-2.5d-6)) then
tmp = t - (y * (t / z))
else if (z <= 2.85d-39) then
tmp = x + (y / (a / t))
else if (z <= 4.5d+27) then
tmp = t * ((y - z) / a)
else if (z <= 2.5d+51) then
tmp = x * (y / z)
else
tmp = t - (a / (z / 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 <= -2.5e-6) {
tmp = t - (y * (t / z));
} else if (z <= 2.85e-39) {
tmp = x + (y / (a / t));
} else if (z <= 4.5e+27) {
tmp = t * ((y - z) / a);
} else if (z <= 2.5e+51) {
tmp = x * (y / z);
} else {
tmp = t - (a / (z / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.5e-6: tmp = t - (y * (t / z)) elif z <= 2.85e-39: tmp = x + (y / (a / t)) elif z <= 4.5e+27: tmp = t * ((y - z) / a) elif z <= 2.5e+51: tmp = x * (y / z) else: tmp = t - (a / (z / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.5e-6) tmp = Float64(t - Float64(y * Float64(t / z))); elseif (z <= 2.85e-39) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 4.5e+27) tmp = Float64(t * Float64(Float64(y - z) / a)); elseif (z <= 2.5e+51) tmp = Float64(x * Float64(y / z)); else tmp = Float64(t - Float64(a / Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.5e-6) tmp = t - (y * (t / z)); elseif (z <= 2.85e-39) tmp = x + (y / (a / t)); elseif (z <= 4.5e+27) tmp = t * ((y - z) / a); elseif (z <= 2.5e+51) tmp = x * (y / z); else tmp = t - (a / (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.5e-6], N[(t - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.85e-39], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+27], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+51], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(t - N[(a / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-6}:\\
\;\;\;\;t - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 2.85 \cdot 10^{-39}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+27}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+51}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{a}{\frac{z}{x}}\\
\end{array}
\end{array}
if z < -2.5000000000000002e-6Initial program 73.7%
Taylor expanded in x around 0 41.3%
associate-/l*70.2%
Simplified70.2%
Taylor expanded in a around 0 37.8%
mul-1-neg37.8%
associate-/l*60.8%
distribute-neg-frac60.8%
Simplified60.8%
Taylor expanded in z around 0 54.5%
mul-1-neg54.5%
unsub-neg54.5%
associate-*l/60.8%
*-commutative60.8%
Simplified60.8%
if -2.5000000000000002e-6 < z < 2.8499999999999998e-39Initial program 89.9%
Taylor expanded in z around 0 78.0%
associate-/l*78.8%
Simplified78.8%
Taylor expanded in t around inf 66.2%
if 2.8499999999999998e-39 < z < 4.4999999999999999e27Initial program 89.1%
Taylor expanded in x around 0 62.4%
associate-/l*67.7%
Simplified67.7%
clear-num67.5%
associate-/r/67.7%
clear-num67.6%
Applied egg-rr67.6%
Taylor expanded in a around inf 42.8%
if 4.4999999999999999e27 < z < 2.5e51Initial program 85.9%
Taylor expanded in x around inf 58.8%
mul-1-neg58.8%
unsub-neg58.8%
Simplified58.8%
Taylor expanded in a around 0 45.6%
if 2.5e51 < z Initial program 68.1%
Taylor expanded in z around inf 61.9%
associate--l+61.9%
distribute-lft-out--61.9%
div-sub61.9%
mul-1-neg61.9%
unsub-neg61.9%
distribute-rgt-out--61.9%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in t around 0 58.2%
mul-1-neg58.2%
associate-/l*70.0%
associate-/r/67.9%
distribute-rgt-neg-in67.9%
sub-neg67.9%
distribute-neg-out67.9%
mul-1-neg67.9%
remove-double-neg67.9%
+-commutative67.9%
mul-1-neg67.9%
sub-neg67.9%
Simplified67.9%
Taylor expanded in a around inf 51.2%
associate-/l*59.1%
Simplified59.1%
Final simplification61.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5e-7)
(* t (/ (- z y) z))
(if (<= z 2.35e-39)
(+ x (/ y (/ a t)))
(if (<= z 2.2e+27)
(* t (/ (- y z) a))
(if (<= z 9.8e+51) (* x (/ y z)) (- t (/ a (/ z x))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-7) {
tmp = t * ((z - y) / z);
} else if (z <= 2.35e-39) {
tmp = x + (y / (a / t));
} else if (z <= 2.2e+27) {
tmp = t * ((y - z) / a);
} else if (z <= 9.8e+51) {
tmp = x * (y / z);
} else {
tmp = t - (a / (z / 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 <= (-5d-7)) then
tmp = t * ((z - y) / z)
else if (z <= 2.35d-39) then
tmp = x + (y / (a / t))
else if (z <= 2.2d+27) then
tmp = t * ((y - z) / a)
else if (z <= 9.8d+51) then
tmp = x * (y / z)
else
tmp = t - (a / (z / 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 <= -5e-7) {
tmp = t * ((z - y) / z);
} else if (z <= 2.35e-39) {
tmp = x + (y / (a / t));
} else if (z <= 2.2e+27) {
tmp = t * ((y - z) / a);
} else if (z <= 9.8e+51) {
tmp = x * (y / z);
} else {
tmp = t - (a / (z / x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e-7: tmp = t * ((z - y) / z) elif z <= 2.35e-39: tmp = x + (y / (a / t)) elif z <= 2.2e+27: tmp = t * ((y - z) / a) elif z <= 9.8e+51: tmp = x * (y / z) else: tmp = t - (a / (z / x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e-7) tmp = Float64(t * Float64(Float64(z - y) / z)); elseif (z <= 2.35e-39) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 2.2e+27) tmp = Float64(t * Float64(Float64(y - z) / a)); elseif (z <= 9.8e+51) tmp = Float64(x * Float64(y / z)); else tmp = Float64(t - Float64(a / Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e-7) tmp = t * ((z - y) / z); elseif (z <= 2.35e-39) tmp = x + (y / (a / t)); elseif (z <= 2.2e+27) tmp = t * ((y - z) / a); elseif (z <= 9.8e+51) tmp = x * (y / z); else tmp = t - (a / (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e-7], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.35e-39], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+27], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.8e+51], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(t - N[(a / N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-7}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\
\mathbf{elif}\;z \leq 2.35 \cdot 10^{-39}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+27}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{+51}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{a}{\frac{z}{x}}\\
\end{array}
\end{array}
if z < -4.99999999999999977e-7Initial program 73.7%
Taylor expanded in x around 0 41.3%
associate-/l*70.2%
Simplified70.2%
clear-num70.1%
associate-/r/70.2%
clear-num70.3%
Applied egg-rr70.3%
Taylor expanded in a around 0 60.8%
mul-1-neg60.8%
Simplified60.8%
if -4.99999999999999977e-7 < z < 2.3500000000000001e-39Initial program 89.9%
Taylor expanded in z around 0 78.0%
associate-/l*78.8%
Simplified78.8%
Taylor expanded in t around inf 66.2%
if 2.3500000000000001e-39 < z < 2.1999999999999999e27Initial program 89.1%
Taylor expanded in x around 0 62.4%
associate-/l*67.7%
Simplified67.7%
clear-num67.5%
associate-/r/67.7%
clear-num67.6%
Applied egg-rr67.6%
Taylor expanded in a around inf 42.8%
if 2.1999999999999999e27 < z < 9.79999999999999967e51Initial program 85.9%
Taylor expanded in x around inf 58.8%
mul-1-neg58.8%
unsub-neg58.8%
Simplified58.8%
Taylor expanded in a around 0 45.6%
if 9.79999999999999967e51 < z Initial program 68.1%
Taylor expanded in z around inf 61.9%
associate--l+61.9%
distribute-lft-out--61.9%
div-sub61.9%
mul-1-neg61.9%
unsub-neg61.9%
distribute-rgt-out--61.9%
associate-/l*77.8%
Simplified77.8%
Taylor expanded in t around 0 58.2%
mul-1-neg58.2%
associate-/l*70.0%
associate-/r/67.9%
distribute-rgt-neg-in67.9%
sub-neg67.9%
distribute-neg-out67.9%
mul-1-neg67.9%
remove-double-neg67.9%
+-commutative67.9%
mul-1-neg67.9%
sub-neg67.9%
Simplified67.9%
Taylor expanded in a around inf 51.2%
associate-/l*59.1%
Simplified59.1%
Final simplification61.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.75e-6)
t
(if (<= z 2.85e-39)
(+ x (/ y (/ a t)))
(if (<= z 1.65e+27)
(* t (/ (- y z) a))
(if (<= z 2.5e+51) (* x (/ y z)) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e-6) {
tmp = t;
} else if (z <= 2.85e-39) {
tmp = x + (y / (a / t));
} else if (z <= 1.65e+27) {
tmp = t * ((y - z) / a);
} else if (z <= 2.5e+51) {
tmp = x * (y / z);
} 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 <= (-1.75d-6)) then
tmp = t
else if (z <= 2.85d-39) then
tmp = x + (y / (a / t))
else if (z <= 1.65d+27) then
tmp = t * ((y - z) / a)
else if (z <= 2.5d+51) then
tmp = x * (y / z)
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 <= -1.75e-6) {
tmp = t;
} else if (z <= 2.85e-39) {
tmp = x + (y / (a / t));
} else if (z <= 1.65e+27) {
tmp = t * ((y - z) / a);
} else if (z <= 2.5e+51) {
tmp = x * (y / z);
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.75e-6: tmp = t elif z <= 2.85e-39: tmp = x + (y / (a / t)) elif z <= 1.65e+27: tmp = t * ((y - z) / a) elif z <= 2.5e+51: tmp = x * (y / z) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e-6) tmp = t; elseif (z <= 2.85e-39) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= 1.65e+27) tmp = Float64(t * Float64(Float64(y - z) / a)); elseif (z <= 2.5e+51) tmp = Float64(x * Float64(y / z)); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.75e-6) tmp = t; elseif (z <= 2.85e-39) tmp = x + (y / (a / t)); elseif (z <= 1.65e+27) tmp = t * ((y - z) / a); elseif (z <= 2.5e+51) tmp = x * (y / z); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e-6], t, If[LessEqual[z, 2.85e-39], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e+27], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e+51], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], t]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{-6}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.85 \cdot 10^{-39}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{+27}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+51}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.74999999999999997e-6 or 2.5e51 < z Initial program 71.6%
Taylor expanded in z around inf 49.0%
if -1.74999999999999997e-6 < z < 2.8499999999999998e-39Initial program 89.9%
Taylor expanded in z around 0 78.0%
associate-/l*78.8%
Simplified78.8%
Taylor expanded in t around inf 66.2%
if 2.8499999999999998e-39 < z < 1.6499999999999999e27Initial program 89.1%
Taylor expanded in x around 0 62.4%
associate-/l*67.7%
Simplified67.7%
clear-num67.5%
associate-/r/67.7%
clear-num67.6%
Applied egg-rr67.6%
Taylor expanded in a around inf 42.8%
if 1.6499999999999999e27 < z < 2.5e51Initial program 85.9%
Taylor expanded in x around inf 58.8%
mul-1-neg58.8%
unsub-neg58.8%
Simplified58.8%
Taylor expanded in a around 0 45.6%
Final simplification55.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -5.2e-8) (not (<= z 5.5e-46))) (* t (/ (- y z) (- a z))) (+ x (/ y (/ a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -5.2e-8) || !(z <= 5.5e-46)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / 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 <= (-5.2d-8)) .or. (.not. (z <= 5.5d-46))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + (y / (a / 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 <= -5.2e-8) || !(z <= 5.5e-46)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -5.2e-8) or not (z <= 5.5e-46): tmp = t * ((y - z) / (a - z)) else: tmp = x + (y / (a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -5.2e-8) || !(z <= 5.5e-46)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -5.2e-8) || ~((z <= 5.5e-46))) tmp = t * ((y - z) / (a - z)); else tmp = x + (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -5.2e-8], N[Not[LessEqual[z, 5.5e-46]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.2 \cdot 10^{-8} \lor \neg \left(z \leq 5.5 \cdot 10^{-46}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if z < -5.2000000000000002e-8 or 5.49999999999999983e-46 < z Initial program 73.9%
Taylor expanded in x around 0 44.3%
associate-/l*66.0%
Simplified66.0%
clear-num65.9%
associate-/r/66.0%
clear-num66.1%
Applied egg-rr66.1%
if -5.2000000000000002e-8 < z < 5.49999999999999983e-46Initial program 90.7%
Taylor expanded in z around 0 78.7%
associate-/l*79.5%
Simplified79.5%
Taylor expanded in t around inf 66.8%
Final simplification66.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.15e-7) (not (<= z 5.5e-46))) (* t (/ (- y z) (- a z))) (+ x (* (- t x) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.15e-7) || !(z <= 5.5e-46)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.15d-7)) .or. (.not. (z <= 5.5d-46))) then
tmp = t * ((y - z) / (a - z))
else
tmp = x + ((t - x) * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.15e-7) || !(z <= 5.5e-46)) {
tmp = t * ((y - z) / (a - z));
} else {
tmp = x + ((t - x) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.15e-7) or not (z <= 5.5e-46): tmp = t * ((y - z) / (a - z)) else: tmp = x + ((t - x) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.15e-7) || !(z <= 5.5e-46)) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); else tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.15e-7) || ~((z <= 5.5e-46))) tmp = t * ((y - z) / (a - z)); else tmp = x + ((t - x) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.15e-7], N[Not[LessEqual[z, 5.5e-46]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.15 \cdot 10^{-7} \lor \neg \left(z \leq 5.5 \cdot 10^{-46}\right):\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{else}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.14999999999999997e-7 or 5.49999999999999983e-46 < z Initial program 73.9%
Taylor expanded in x around 0 44.3%
associate-/l*66.0%
Simplified66.0%
clear-num65.9%
associate-/r/66.0%
clear-num66.1%
Applied egg-rr66.1%
if -1.14999999999999997e-7 < z < 5.49999999999999983e-46Initial program 90.7%
Taylor expanded in z around 0 78.7%
associate-/l*79.5%
associate-/r/79.8%
Simplified79.8%
Final simplification71.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -5e-7) (* t (/ (- y z) (- a z))) (if (<= z 2.1e-14) (+ x (* (- t x) (/ y a))) (+ t (* (/ x z) (- y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-7) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 2.1e-14) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t + ((x / 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) :: tmp
if (z <= (-5d-7)) then
tmp = t * ((y - z) / (a - z))
else if (z <= 2.1d-14) then
tmp = x + ((t - x) * (y / a))
else
tmp = t + ((x / z) * (y - a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5e-7) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 2.1e-14) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t + ((x / z) * (y - a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5e-7: tmp = t * ((y - z) / (a - z)) elif z <= 2.1e-14: tmp = x + ((t - x) * (y / a)) else: tmp = t + ((x / z) * (y - a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5e-7) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= 2.1e-14) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); else tmp = Float64(t + Float64(Float64(x / z) * Float64(y - a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5e-7) tmp = t * ((y - z) / (a - z)); elseif (z <= 2.1e-14) tmp = x + ((t - x) * (y / a)); else tmp = t + ((x / z) * (y - a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5e-7], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-14], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x / z), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-7}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-14}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x}{z} \cdot \left(y - a\right)\\
\end{array}
\end{array}
if z < -4.99999999999999977e-7Initial program 73.7%
Taylor expanded in x around 0 41.3%
associate-/l*70.2%
Simplified70.2%
clear-num70.1%
associate-/r/70.2%
clear-num70.3%
Applied egg-rr70.3%
if -4.99999999999999977e-7 < z < 2.0999999999999999e-14Initial program 88.9%
Taylor expanded in z around 0 75.3%
associate-/l*76.9%
associate-/r/78.0%
Simplified78.0%
if 2.0999999999999999e-14 < z Initial program 74.9%
Taylor expanded in z around inf 59.7%
associate--l+59.7%
distribute-lft-out--59.7%
div-sub59.7%
mul-1-neg59.7%
unsub-neg59.7%
distribute-rgt-out--59.7%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in t around 0 55.5%
mul-1-neg55.5%
associate-/l*64.3%
associate-/r/62.8%
distribute-rgt-neg-in62.8%
sub-neg62.8%
distribute-neg-out62.8%
mul-1-neg62.8%
remove-double-neg62.8%
+-commutative62.8%
mul-1-neg62.8%
sub-neg62.8%
Simplified62.8%
Final simplification71.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.75e-6) (* t (/ (- y z) (- a z))) (if (<= z 4.2e-14) (+ x (* (- t x) (/ y a))) (- t (/ x (/ z (- a y)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e-6) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 4.2e-14) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t - (x / (z / (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 <= (-1.75d-6)) then
tmp = t * ((y - z) / (a - z))
else if (z <= 4.2d-14) then
tmp = x + ((t - x) * (y / a))
else
tmp = t - (x / (z / (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 <= -1.75e-6) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 4.2e-14) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t - (x / (z / (a - y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.75e-6: tmp = t * ((y - z) / (a - z)) elif z <= 4.2e-14: tmp = x + ((t - x) * (y / a)) else: tmp = t - (x / (z / (a - y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e-6) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= 4.2e-14) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); else tmp = Float64(t - Float64(x / Float64(z / Float64(a - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.75e-6) tmp = t * ((y - z) / (a - z)); elseif (z <= 4.2e-14) tmp = x + ((t - x) * (y / a)); else tmp = t - (x / (z / (a - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e-6], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-14], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t - N[(x / N[(z / N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{-6}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-14}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t - \frac{x}{\frac{z}{a - y}}\\
\end{array}
\end{array}
if z < -1.74999999999999997e-6Initial program 73.7%
Taylor expanded in x around 0 41.3%
associate-/l*70.2%
Simplified70.2%
clear-num70.1%
associate-/r/70.2%
clear-num70.3%
Applied egg-rr70.3%
if -1.74999999999999997e-6 < z < 4.1999999999999998e-14Initial program 88.9%
Taylor expanded in z around 0 75.3%
associate-/l*76.9%
associate-/r/78.0%
Simplified78.0%
if 4.1999999999999998e-14 < z Initial program 74.9%
Taylor expanded in z around inf 59.7%
associate--l+59.7%
distribute-lft-out--59.7%
div-sub59.7%
mul-1-neg59.7%
unsub-neg59.7%
distribute-rgt-out--59.7%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in t around 0 55.5%
mul-1-neg55.5%
associate-/l*64.3%
associate-/r/62.8%
distribute-rgt-neg-in62.8%
sub-neg62.8%
distribute-neg-out62.8%
mul-1-neg62.8%
remove-double-neg62.8%
+-commutative62.8%
mul-1-neg62.8%
sub-neg62.8%
Simplified62.8%
associate-*l/55.5%
associate-/l*64.3%
Applied egg-rr64.3%
Final simplification72.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.75e-6) (* t (/ (- y z) (- a z))) (if (<= z 1.36e-14) (+ x (* (- t x) (/ y a))) (+ t (/ (- x t) (/ z y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e-6) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 1.36e-14) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t + ((x - t) / (z / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.75d-6)) then
tmp = t * ((y - z) / (a - z))
else if (z <= 1.36d-14) then
tmp = x + ((t - x) * (y / a))
else
tmp = t + ((x - t) / (z / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e-6) {
tmp = t * ((y - z) / (a - z));
} else if (z <= 1.36e-14) {
tmp = x + ((t - x) * (y / a));
} else {
tmp = t + ((x - t) / (z / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.75e-6: tmp = t * ((y - z) / (a - z)) elif z <= 1.36e-14: tmp = x + ((t - x) * (y / a)) else: tmp = t + ((x - t) / (z / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e-6) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (z <= 1.36e-14) tmp = Float64(x + Float64(Float64(t - x) * Float64(y / a))); else tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.75e-6) tmp = t * ((y - z) / (a - z)); elseif (z <= 1.36e-14) tmp = x + ((t - x) * (y / a)); else tmp = t + ((x - t) / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e-6], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.36e-14], N[(x + N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{-6}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;z \leq 1.36 \cdot 10^{-14}:\\
\;\;\;\;x + \left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\
\end{array}
\end{array}
if z < -1.74999999999999997e-6Initial program 73.7%
Taylor expanded in x around 0 41.3%
associate-/l*70.2%
Simplified70.2%
clear-num70.1%
associate-/r/70.2%
clear-num70.3%
Applied egg-rr70.3%
if -1.74999999999999997e-6 < z < 1.36e-14Initial program 88.9%
Taylor expanded in z around 0 75.3%
associate-/l*76.9%
associate-/r/78.0%
Simplified78.0%
if 1.36e-14 < z Initial program 74.9%
Taylor expanded in z around inf 59.7%
associate--l+59.7%
distribute-lft-out--59.7%
div-sub59.7%
mul-1-neg59.7%
unsub-neg59.7%
distribute-rgt-out--59.7%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in y around inf 61.4%
*-commutative61.4%
associate-/l*65.8%
Simplified65.8%
Final simplification72.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.7e+62) t (if (<= z 3.6e+37) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.7e+62) {
tmp = t;
} else if (z <= 3.6e+37) {
tmp = x * (1.0 - (y / 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.7d+62)) then
tmp = t
else if (z <= 3.6d+37) then
tmp = x * (1.0d0 - (y / 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.7e+62) {
tmp = t;
} else if (z <= 3.6e+37) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.7e+62: tmp = t elif z <= 3.6e+37: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.7e+62) tmp = t; elseif (z <= 3.6e+37) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.7e+62) tmp = t; elseif (z <= 3.6e+37) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.7e+62], t, If[LessEqual[z, 3.6e+37], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+62}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+37}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -4.7000000000000003e62 or 3.59999999999999998e37 < z Initial program 68.5%
Taylor expanded in z around inf 49.5%
if -4.7000000000000003e62 < z < 3.59999999999999998e37Initial program 90.4%
Taylor expanded in z around 0 65.5%
associate-/l*68.1%
Simplified68.1%
Taylor expanded in x around inf 52.5%
mul-1-neg52.5%
sub-neg52.5%
Simplified52.5%
Final simplification51.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -3e-8) (* t (/ (- z y) z)) (if (<= z 2.1e-15) (+ x (/ y (/ a t))) (+ t (* y (/ x z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3e-8) {
tmp = t * ((z - y) / z);
} else if (z <= 2.1e-15) {
tmp = x + (y / (a / t));
} else {
tmp = t + (y * (x / 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 <= (-3d-8)) then
tmp = t * ((z - y) / z)
else if (z <= 2.1d-15) then
tmp = x + (y / (a / t))
else
tmp = t + (y * (x / 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 <= -3e-8) {
tmp = t * ((z - y) / z);
} else if (z <= 2.1e-15) {
tmp = x + (y / (a / t));
} else {
tmp = t + (y * (x / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3e-8: tmp = t * ((z - y) / z) elif z <= 2.1e-15: tmp = x + (y / (a / t)) else: tmp = t + (y * (x / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3e-8) tmp = Float64(t * Float64(Float64(z - y) / z)); elseif (z <= 2.1e-15) tmp = Float64(x + Float64(y / Float64(a / t))); else tmp = Float64(t + Float64(y * Float64(x / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3e-8) tmp = t * ((z - y) / z); elseif (z <= 2.1e-15) tmp = x + (y / (a / t)); else tmp = t + (y * (x / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3e-8], N[(t * N[(N[(z - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-15], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{-8}:\\
\;\;\;\;t \cdot \frac{z - y}{z}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-15}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;t + y \cdot \frac{x}{z}\\
\end{array}
\end{array}
if z < -2.99999999999999973e-8Initial program 73.7%
Taylor expanded in x around 0 41.3%
associate-/l*70.2%
Simplified70.2%
clear-num70.1%
associate-/r/70.2%
clear-num70.3%
Applied egg-rr70.3%
Taylor expanded in a around 0 60.8%
mul-1-neg60.8%
Simplified60.8%
if -2.99999999999999973e-8 < z < 2.09999999999999981e-15Initial program 88.8%
Taylor expanded in z around 0 75.9%
associate-/l*76.7%
Simplified76.7%
Taylor expanded in t around inf 64.1%
if 2.09999999999999981e-15 < z Initial program 75.3%
Taylor expanded in z around inf 58.8%
associate--l+58.8%
distribute-lft-out--58.8%
div-sub58.8%
mul-1-neg58.8%
unsub-neg58.8%
distribute-rgt-out--58.9%
associate-/l*70.4%
Simplified70.4%
Taylor expanded in t around 0 54.8%
mul-1-neg54.8%
associate-/l*63.5%
associate-/r/61.9%
distribute-rgt-neg-in61.9%
sub-neg61.9%
distribute-neg-out61.9%
mul-1-neg61.9%
remove-double-neg61.9%
+-commutative61.9%
mul-1-neg61.9%
sub-neg61.9%
Simplified61.9%
Taylor expanded in a around 0 54.7%
*-commutative54.7%
associate-*r/56.1%
associate-*l*56.1%
neg-mul-156.1%
Simplified56.1%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.85e-30) x (if (<= a 2.9e+54) t x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.85e-30) {
tmp = x;
} else if (a <= 2.9e+54) {
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 <= (-2.85d-30)) then
tmp = x
else if (a <= 2.9d+54) 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 <= -2.85e-30) {
tmp = x;
} else if (a <= 2.9e+54) {
tmp = t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.85e-30: tmp = x elif a <= 2.9e+54: tmp = t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.85e-30) tmp = x; elseif (a <= 2.9e+54) tmp = t; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.85e-30) tmp = x; elseif (a <= 2.9e+54) tmp = t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.85e-30], x, If[LessEqual[a, 2.9e+54], t, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.85 \cdot 10^{-30}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+54}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.84999999999999989e-30 or 2.8999999999999999e54 < a Initial program 86.4%
Taylor expanded in a around inf 50.2%
if -2.84999999999999989e-30 < a < 2.8999999999999999e54Initial program 75.8%
Taylor expanded in z around inf 40.4%
Final simplification44.9%
(FPCore (x y z t a) :precision binary64 t)
double code(double x, double y, double z, double t, double a) {
return t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = t
end function
public static double code(double x, double y, double z, double t, double a) {
return t;
}
def code(x, y, z, t, a): return t
function code(x, y, z, t, a) return t end
function tmp = code(x, y, z, t, a) tmp = t; end
code[x_, y_, z_, t_, a_] := t
\begin{array}{l}
\\
t
\end{array}
Initial program 80.7%
Taylor expanded in z around inf 29.2%
Final simplification29.2%
herbie shell --seed 2023318
(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)))))