
(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 22 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (<= t_1 -1e-290)
(fma (- t x) (/ (- y z) (- a z)) x)
(if (<= t_1 0.0)
(+ t (* (/ (- t x) z) (- a y)))
(+ x (/ (- t x) (/ (- a z) (- y z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * ((t - x) / (a - z)));
double tmp;
if (t_1 <= -1e-290) {
tmp = fma((t - x), ((y - z) / (a - z)), x);
} else if (t_1 <= 0.0) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = x + ((t - x) / ((a - z) / (y - z)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) tmp = 0.0 if (t_1 <= -1e-290) tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x); elseif (t_1 <= 0.0) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); else tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-290], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-290}:\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.0000000000000001e-290Initial program 90.9%
+-commutative90.9%
remove-double-neg90.9%
unsub-neg90.9%
*-commutative90.9%
associate-*l/77.9%
associate-/l*92.6%
fma-neg92.5%
remove-double-neg92.5%
Simplified92.5%
if -1.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.8%
Taylor expanded in z around inf 90.4%
associate--l+90.4%
distribute-lft-out--90.4%
div-sub90.4%
mul-1-neg90.4%
unsub-neg90.4%
div-sub90.4%
associate-/l*96.7%
associate-/l*99.9%
distribute-rgt-out--99.9%
Simplified99.9%
if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 94.4%
*-commutative94.4%
associate-*l/77.4%
associate-*r/95.3%
clear-num95.3%
un-div-inv96.5%
Applied egg-rr96.5%
Final simplification95.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -1e-290) (not (<= t_1 0.0)))
t_1
(+ t (* (/ (- 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 <= -1e-290) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((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 <= (-1d-290)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = t_1
else
tmp = t + (((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 <= -1e-290) || !(t_1 <= 0.0)) {
tmp = t_1;
} else {
tmp = t + (((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 <= -1e-290) or not (t_1 <= 0.0): tmp = t_1 else: tmp = t + (((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 <= -1e-290) || !(t_1 <= 0.0)) tmp = t_1; else tmp = Float64(t + Float64(Float64(Float64(t - x) / 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 <= -1e-290) || ~((t_1 <= 0.0))) tmp = t_1; else tmp = t + (((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, -1e-290], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $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 -1 \cdot 10^{-290} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.0000000000000001e-290 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.6%
if -1.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.8%
Taylor expanded in z around inf 90.4%
associate--l+90.4%
distribute-lft-out--90.4%
div-sub90.4%
mul-1-neg90.4%
unsub-neg90.4%
div-sub90.4%
associate-/l*96.7%
associate-/l*99.9%
distribute-rgt-out--99.9%
Simplified99.9%
Final simplification93.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
(if (or (<= t_1 -1e-290) (not (<= t_1 0.0)))
(+ x (/ (- t x) (/ (- a z) (- y z))))
(+ t (* (/ (- 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 <= -1e-290) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((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 <= (-1d-290)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + ((t - x) / ((a - z) / (y - z)))
else
tmp = t + (((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 <= -1e-290) || !(t_1 <= 0.0)) {
tmp = x + ((t - x) / ((a - z) / (y - z)));
} else {
tmp = t + (((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 <= -1e-290) or not (t_1 <= 0.0): tmp = x + ((t - x) / ((a - z) / (y - z))) else: tmp = t + (((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 <= -1e-290) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(Float64(t - x) / Float64(Float64(a - z) / Float64(y - z)))); else tmp = Float64(t + Float64(Float64(Float64(t - x) / 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 <= -1e-290) || ~((t_1 <= 0.0))) tmp = x + ((t - x) / ((a - z) / (y - z))); else tmp = t + (((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, -1e-290], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $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 -1 \cdot 10^{-290} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a - z}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.0000000000000001e-290 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 92.6%
*-commutative92.6%
associate-*l/77.7%
associate-*r/93.9%
clear-num93.9%
un-div-inv94.5%
Applied egg-rr94.5%
if -1.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.8%
Taylor expanded in z around inf 90.4%
associate--l+90.4%
distribute-lft-out--90.4%
div-sub90.4%
mul-1-neg90.4%
unsub-neg90.4%
div-sub90.4%
associate-/l*96.7%
associate-/l*99.9%
distribute-rgt-out--99.9%
Simplified99.9%
Final simplification95.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- t x) (/ a y)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= z -2.85e-82)
t_2
(if (<= z 3.7e-189)
t_1
(if (<= z 1.25e-42)
(* y (/ (- t x) (- a z)))
(if (<= z 4.7e+38)
t_1
(if (or (<= z 7.8e+59) (not (<= z 2.15e+73)))
t_2
(* x (- 1.0 (/ y a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) / (a / y));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2.85e-82) {
tmp = t_2;
} else if (z <= 3.7e-189) {
tmp = t_1;
} else if (z <= 1.25e-42) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 4.7e+38) {
tmp = t_1;
} else if ((z <= 7.8e+59) || !(z <= 2.15e+73)) {
tmp = t_2;
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((t - x) / (a / y))
t_2 = t * ((y - z) / (a - z))
if (z <= (-2.85d-82)) then
tmp = t_2
else if (z <= 3.7d-189) then
tmp = t_1
else if (z <= 1.25d-42) then
tmp = y * ((t - x) / (a - z))
else if (z <= 4.7d+38) then
tmp = t_1
else if ((z <= 7.8d+59) .or. (.not. (z <= 2.15d+73))) then
tmp = t_2
else
tmp = x * (1.0d0 - (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) / (a / y));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2.85e-82) {
tmp = t_2;
} else if (z <= 3.7e-189) {
tmp = t_1;
} else if (z <= 1.25e-42) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 4.7e+38) {
tmp = t_1;
} else if ((z <= 7.8e+59) || !(z <= 2.15e+73)) {
tmp = t_2;
} else {
tmp = x * (1.0 - (y / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) / (a / y)) t_2 = t * ((y - z) / (a - z)) tmp = 0 if z <= -2.85e-82: tmp = t_2 elif z <= 3.7e-189: tmp = t_1 elif z <= 1.25e-42: tmp = y * ((t - x) / (a - z)) elif z <= 4.7e+38: tmp = t_1 elif (z <= 7.8e+59) or not (z <= 2.15e+73): tmp = t_2 else: tmp = x * (1.0 - (y / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) / Float64(a / y))) t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -2.85e-82) tmp = t_2; elseif (z <= 3.7e-189) tmp = t_1; elseif (z <= 1.25e-42) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (z <= 4.7e+38) tmp = t_1; elseif ((z <= 7.8e+59) || !(z <= 2.15e+73)) tmp = t_2; else tmp = Float64(x * Float64(1.0 - Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) / (a / y)); t_2 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -2.85e-82) tmp = t_2; elseif (z <= 3.7e-189) tmp = t_1; elseif (z <= 1.25e-42) tmp = y * ((t - x) / (a - z)); elseif (z <= 4.7e+38) tmp = t_1; elseif ((z <= 7.8e+59) || ~((z <= 2.15e+73))) tmp = t_2; else tmp = x * (1.0 - (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.85e-82], t$95$2, If[LessEqual[z, 3.7e-189], t$95$1, If[LessEqual[z, 1.25e-42], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e+38], t$95$1, If[Or[LessEqual[z, 7.8e+59], N[Not[LessEqual[z, 2.15e+73]], $MachinePrecision]], t$95$2, N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t - x}{\frac{a}{y}}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -2.85 \cdot 10^{-82}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-189}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{-42}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7.8 \cdot 10^{+59} \lor \neg \left(z \leq 2.15 \cdot 10^{+73}\right):\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\end{array}
\end{array}
if z < -2.85000000000000001e-82 or 4.6999999999999999e38 < z < 7.80000000000000043e59 or 2.15000000000000007e73 < z Initial program 69.8%
Taylor expanded in x around 0 49.0%
associate-/l*67.6%
Simplified67.6%
if -2.85000000000000001e-82 < z < 3.70000000000000019e-189 or 1.25000000000000001e-42 < z < 4.6999999999999999e38Initial program 95.2%
*-commutative95.2%
associate-*l/85.4%
associate-*r/95.2%
clear-num95.2%
un-div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in z around 0 87.9%
if 3.70000000000000019e-189 < z < 1.25000000000000001e-42Initial program 86.9%
Taylor expanded in y around inf 73.8%
div-sub78.3%
Simplified78.3%
if 7.80000000000000043e59 < z < 2.15000000000000007e73Initial program 99.8%
Taylor expanded in z around 0 59.6%
Taylor expanded in x around inf 88.1%
mul-1-neg88.1%
sub-neg88.1%
Simplified88.1%
Final simplification77.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (- t x) (/ a y)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= z -2.85e-82)
t_2
(if (<= z 9.8e-192)
t_1
(if (<= z 1.85e-41)
(* y (/ (- t x) (- a z)))
(if (<= z 3.25e+39)
t_1
(if (<= z 1.05e+60)
(/ t (/ (- a z) (- y z)))
(if (<= z 3.1e+76) (* x (- 1.0 (/ y a))) t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) / (a / y));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2.85e-82) {
tmp = t_2;
} else if (z <= 9.8e-192) {
tmp = t_1;
} else if (z <= 1.85e-41) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 3.25e+39) {
tmp = t_1;
} else if (z <= 1.05e+60) {
tmp = t / ((a - z) / (y - z));
} else if (z <= 3.1e+76) {
tmp = x * (1.0 - (y / a));
} 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 + ((t - x) / (a / y))
t_2 = t * ((y - z) / (a - z))
if (z <= (-2.85d-82)) then
tmp = t_2
else if (z <= 9.8d-192) then
tmp = t_1
else if (z <= 1.85d-41) then
tmp = y * ((t - x) / (a - z))
else if (z <= 3.25d+39) then
tmp = t_1
else if (z <= 1.05d+60) then
tmp = t / ((a - z) / (y - z))
else if (z <= 3.1d+76) then
tmp = x * (1.0d0 - (y / a))
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 + ((t - x) / (a / y));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2.85e-82) {
tmp = t_2;
} else if (z <= 9.8e-192) {
tmp = t_1;
} else if (z <= 1.85e-41) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 3.25e+39) {
tmp = t_1;
} else if (z <= 1.05e+60) {
tmp = t / ((a - z) / (y - z));
} else if (z <= 3.1e+76) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) / (a / y)) t_2 = t * ((y - z) / (a - z)) tmp = 0 if z <= -2.85e-82: tmp = t_2 elif z <= 9.8e-192: tmp = t_1 elif z <= 1.85e-41: tmp = y * ((t - x) / (a - z)) elif z <= 3.25e+39: tmp = t_1 elif z <= 1.05e+60: tmp = t / ((a - z) / (y - z)) elif z <= 3.1e+76: tmp = x * (1.0 - (y / a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) / Float64(a / y))) t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -2.85e-82) tmp = t_2; elseif (z <= 9.8e-192) tmp = t_1; elseif (z <= 1.85e-41) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (z <= 3.25e+39) tmp = t_1; elseif (z <= 1.05e+60) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); elseif (z <= 3.1e+76) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) / (a / y)); t_2 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -2.85e-82) tmp = t_2; elseif (z <= 9.8e-192) tmp = t_1; elseif (z <= 1.85e-41) tmp = y * ((t - x) / (a - z)); elseif (z <= 3.25e+39) tmp = t_1; elseif (z <= 1.05e+60) tmp = t / ((a - z) / (y - z)); elseif (z <= 3.1e+76) tmp = x * (1.0 - (y / a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.85e-82], t$95$2, If[LessEqual[z, 9.8e-192], t$95$1, If[LessEqual[z, 1.85e-41], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.25e+39], t$95$1, If[LessEqual[z, 1.05e+60], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e+76], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{t - x}{\frac{a}{y}}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -2.85 \cdot 10^{-82}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 9.8 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-41}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;z \leq 3.25 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+60}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+76}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.85000000000000001e-82 or 3.10000000000000011e76 < z Initial program 69.7%
Taylor expanded in x around 0 47.9%
associate-/l*68.1%
Simplified68.1%
if -2.85000000000000001e-82 < z < 9.7999999999999999e-192 or 1.8500000000000001e-41 < z < 3.2500000000000001e39Initial program 95.2%
*-commutative95.2%
associate-*l/85.4%
associate-*r/95.2%
clear-num95.2%
un-div-inv96.5%
Applied egg-rr96.5%
Taylor expanded in z around 0 87.9%
if 9.7999999999999999e-192 < z < 1.8500000000000001e-41Initial program 86.9%
Taylor expanded in y around inf 73.8%
div-sub78.3%
Simplified78.3%
if 3.2500000000000001e39 < z < 1.0500000000000001e60Initial program 71.0%
Taylor expanded in x around 0 61.6%
associate-/l*61.4%
Simplified61.4%
clear-num61.4%
div-inv61.6%
Applied egg-rr61.6%
if 1.0500000000000001e60 < z < 3.10000000000000011e76Initial program 99.8%
Taylor expanded in z around 0 59.6%
Taylor expanded in x around inf 88.1%
mul-1-neg88.1%
sub-neg88.1%
Simplified88.1%
Final simplification77.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= z -8.6e+20)
t
(if (<= z -4.15e-82)
(* t (/ (- y z) a))
(if (<= z 7e-168)
t_1
(if (<= z 5.1e-54) (* t (/ y (- a z))) (if (<= z 1.4e+86) t_1 t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -8.6e+20) {
tmp = t;
} else if (z <= -4.15e-82) {
tmp = t * ((y - z) / a);
} else if (z <= 7e-168) {
tmp = t_1;
} else if (z <= 5.1e-54) {
tmp = t * (y / (a - z));
} else if (z <= 1.4e+86) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (z <= (-8.6d+20)) then
tmp = t
else if (z <= (-4.15d-82)) then
tmp = t * ((y - z) / a)
else if (z <= 7d-168) then
tmp = t_1
else if (z <= 5.1d-54) then
tmp = t * (y / (a - z))
else if (z <= 1.4d+86) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -8.6e+20) {
tmp = t;
} else if (z <= -4.15e-82) {
tmp = t * ((y - z) / a);
} else if (z <= 7e-168) {
tmp = t_1;
} else if (z <= 5.1e-54) {
tmp = t * (y / (a - z));
} else if (z <= 1.4e+86) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if z <= -8.6e+20: tmp = t elif z <= -4.15e-82: tmp = t * ((y - z) / a) elif z <= 7e-168: tmp = t_1 elif z <= 5.1e-54: tmp = t * (y / (a - z)) elif z <= 1.4e+86: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (z <= -8.6e+20) tmp = t; elseif (z <= -4.15e-82) tmp = Float64(t * Float64(Float64(y - z) / a)); elseif (z <= 7e-168) tmp = t_1; elseif (z <= 5.1e-54) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (z <= 1.4e+86) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (z <= -8.6e+20) tmp = t; elseif (z <= -4.15e-82) tmp = t * ((y - z) / a); elseif (z <= 7e-168) tmp = t_1; elseif (z <= 5.1e-54) tmp = t * (y / (a - z)); elseif (z <= 1.4e+86) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.6e+20], t, If[LessEqual[z, -4.15e-82], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e-168], t$95$1, If[LessEqual[z, 5.1e-54], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+86], t$95$1, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;z \leq -8.6 \cdot 10^{+20}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -4.15 \cdot 10^{-82}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-168}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{-54}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -8.6e20 or 1.40000000000000002e86 < z Initial program 66.3%
Taylor expanded in z around inf 54.3%
if -8.6e20 < z < -4.14999999999999972e-82Initial program 80.0%
Taylor expanded in x around 0 59.3%
associate-/l*69.1%
Simplified69.1%
Taylor expanded in a around inf 38.2%
associate-/l*48.0%
Simplified48.0%
if -4.14999999999999972e-82 < z < 6.99999999999999964e-168 or 5.1000000000000001e-54 < z < 1.40000000000000002e86Initial program 93.9%
Taylor expanded in z around 0 67.2%
Taylor expanded in x around inf 59.6%
mul-1-neg59.6%
sub-neg59.6%
Simplified59.6%
if 6.99999999999999964e-168 < z < 5.1000000000000001e-54Initial program 83.1%
Taylor expanded in x around 0 60.3%
associate-/l*60.7%
Simplified60.7%
Taylor expanded in y around inf 48.9%
associate-/l*49.2%
Simplified49.2%
Final simplification56.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= z -6.5e+21)
t
(if (<= z -4.5e-82)
(* t (/ (- y z) a))
(if (<= z -5.5e-226)
t_1
(if (<= z 1.2e-43) (+ x (/ (* y t) a)) (if (<= z 7.6e+85) t_1 t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -6.5e+21) {
tmp = t;
} else if (z <= -4.5e-82) {
tmp = t * ((y - z) / a);
} else if (z <= -5.5e-226) {
tmp = t_1;
} else if (z <= 1.2e-43) {
tmp = x + ((y * t) / a);
} else if (z <= 7.6e+85) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (y / a))
if (z <= (-6.5d+21)) then
tmp = t
else if (z <= (-4.5d-82)) then
tmp = t * ((y - z) / a)
else if (z <= (-5.5d-226)) then
tmp = t_1
else if (z <= 1.2d-43) then
tmp = x + ((y * t) / a)
else if (z <= 7.6d+85) then
tmp = t_1
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double tmp;
if (z <= -6.5e+21) {
tmp = t;
} else if (z <= -4.5e-82) {
tmp = t * ((y - z) / a);
} else if (z <= -5.5e-226) {
tmp = t_1;
} else if (z <= 1.2e-43) {
tmp = x + ((y * t) / a);
} else if (z <= 7.6e+85) {
tmp = t_1;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) tmp = 0 if z <= -6.5e+21: tmp = t elif z <= -4.5e-82: tmp = t * ((y - z) / a) elif z <= -5.5e-226: tmp = t_1 elif z <= 1.2e-43: tmp = x + ((y * t) / a) elif z <= 7.6e+85: tmp = t_1 else: tmp = t return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (z <= -6.5e+21) tmp = t; elseif (z <= -4.5e-82) tmp = Float64(t * Float64(Float64(y - z) / a)); elseif (z <= -5.5e-226) tmp = t_1; elseif (z <= 1.2e-43) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 7.6e+85) tmp = t_1; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); tmp = 0.0; if (z <= -6.5e+21) tmp = t; elseif (z <= -4.5e-82) tmp = t * ((y - z) / a); elseif (z <= -5.5e-226) tmp = t_1; elseif (z <= 1.2e-43) tmp = x + ((y * t) / a); elseif (z <= 7.6e+85) tmp = t_1; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.5e+21], t, If[LessEqual[z, -4.5e-82], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.5e-226], t$95$1, If[LessEqual[z, 1.2e-43], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e+85], t$95$1, t]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+21}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -4.5 \cdot 10^{-82}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-43}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -6.5e21 or 7.59999999999999984e85 < z Initial program 66.3%
Taylor expanded in z around inf 54.3%
if -6.5e21 < z < -4.4999999999999998e-82Initial program 80.0%
Taylor expanded in x around 0 59.3%
associate-/l*69.1%
Simplified69.1%
Taylor expanded in a around inf 38.2%
associate-/l*48.0%
Simplified48.0%
if -4.4999999999999998e-82 < z < -5.5e-226 or 1.2000000000000001e-43 < z < 7.59999999999999984e85Initial program 90.7%
Taylor expanded in z around 0 57.5%
Taylor expanded in x around inf 60.0%
mul-1-neg60.0%
sub-neg60.0%
Simplified60.0%
if -5.5e-226 < z < 1.2000000000000001e-43Initial program 94.6%
Taylor expanded in z around 0 69.7%
Taylor expanded in t around inf 59.4%
Final simplification56.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (- t (* t (/ y z)))))
(if (<= z -7.5e+20)
t_2
(if (<= z -6.2e-82)
(* t (/ (- y z) a))
(if (<= z -6.1e-226)
t_1
(if (<= z 6.2e-44)
(+ x (/ (* y t) a))
(if (<= z 6.5e+84) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double t_2 = t - (t * (y / z));
double tmp;
if (z <= -7.5e+20) {
tmp = t_2;
} else if (z <= -6.2e-82) {
tmp = t * ((y - z) / a);
} else if (z <= -6.1e-226) {
tmp = t_1;
} else if (z <= 6.2e-44) {
tmp = x + ((y * t) / a);
} else if (z <= 6.5e+84) {
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 * (1.0d0 - (y / a))
t_2 = t - (t * (y / z))
if (z <= (-7.5d+20)) then
tmp = t_2
else if (z <= (-6.2d-82)) then
tmp = t * ((y - z) / a)
else if (z <= (-6.1d-226)) then
tmp = t_1
else if (z <= 6.2d-44) then
tmp = x + ((y * t) / a)
else if (z <= 6.5d+84) 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 * (1.0 - (y / a));
double t_2 = t - (t * (y / z));
double tmp;
if (z <= -7.5e+20) {
tmp = t_2;
} else if (z <= -6.2e-82) {
tmp = t * ((y - z) / a);
} else if (z <= -6.1e-226) {
tmp = t_1;
} else if (z <= 6.2e-44) {
tmp = x + ((y * t) / a);
} else if (z <= 6.5e+84) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) t_2 = t - (t * (y / z)) tmp = 0 if z <= -7.5e+20: tmp = t_2 elif z <= -6.2e-82: tmp = t * ((y - z) / a) elif z <= -6.1e-226: tmp = t_1 elif z <= 6.2e-44: tmp = x + ((y * t) / a) elif z <= 6.5e+84: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) t_2 = Float64(t - Float64(t * Float64(y / z))) tmp = 0.0 if (z <= -7.5e+20) tmp = t_2; elseif (z <= -6.2e-82) tmp = Float64(t * Float64(Float64(y - z) / a)); elseif (z <= -6.1e-226) tmp = t_1; elseif (z <= 6.2e-44) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 6.5e+84) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); t_2 = t - (t * (y / z)); tmp = 0.0; if (z <= -7.5e+20) tmp = t_2; elseif (z <= -6.2e-82) tmp = t * ((y - z) / a); elseif (z <= -6.1e-226) tmp = t_1; elseif (z <= 6.2e-44) tmp = x + ((y * t) / a); elseif (z <= 6.5e+84) 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[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+20], t$95$2, If[LessEqual[z, -6.2e-82], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.1e-226], t$95$1, If[LessEqual[z, 6.2e-44], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e+84], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
t_2 := t - t \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-82}:\\
\;\;\;\;t \cdot \frac{y - z}{a}\\
\mathbf{elif}\;z \leq -6.1 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-44}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.5e20 or 6.50000000000000027e84 < z Initial program 66.3%
Taylor expanded in x around 0 46.2%
associate-/l*69.5%
Simplified69.5%
Taylor expanded in a around 0 43.9%
mul-1-neg43.9%
associate-/l*62.5%
distribute-lft-neg-in62.5%
div-sub62.6%
*-inverses62.6%
Simplified62.6%
Taylor expanded in y around 0 56.5%
mul-1-neg56.5%
unsub-neg56.5%
associate-*r/62.6%
Simplified62.6%
if -7.5e20 < z < -6.19999999999999999e-82Initial program 80.0%
Taylor expanded in x around 0 59.3%
associate-/l*69.1%
Simplified69.1%
Taylor expanded in a around inf 38.2%
associate-/l*48.0%
Simplified48.0%
if -6.19999999999999999e-82 < z < -6.0999999999999998e-226 or 6.19999999999999968e-44 < z < 6.50000000000000027e84Initial program 90.7%
Taylor expanded in z around 0 57.5%
Taylor expanded in x around inf 60.0%
mul-1-neg60.0%
sub-neg60.0%
Simplified60.0%
if -6.0999999999999998e-226 < z < 6.19999999999999968e-44Initial program 94.6%
Taylor expanded in z around 0 69.7%
Taylor expanded in t around inf 59.4%
Final simplification59.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (- t (* t (/ y z)))))
(if (<= z -3.3e+20)
t_2
(if (<= z -6.4e-82)
(/ t (/ a (- y z)))
(if (<= z -5.2e-226)
t_1
(if (<= z 1.02e-47)
(+ x (/ (* y t) a))
(if (<= z 1.5e+85) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (y / a));
double t_2 = t - (t * (y / z));
double tmp;
if (z <= -3.3e+20) {
tmp = t_2;
} else if (z <= -6.4e-82) {
tmp = t / (a / (y - z));
} else if (z <= -5.2e-226) {
tmp = t_1;
} else if (z <= 1.02e-47) {
tmp = x + ((y * t) / a);
} else if (z <= 1.5e+85) {
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 * (1.0d0 - (y / a))
t_2 = t - (t * (y / z))
if (z <= (-3.3d+20)) then
tmp = t_2
else if (z <= (-6.4d-82)) then
tmp = t / (a / (y - z))
else if (z <= (-5.2d-226)) then
tmp = t_1
else if (z <= 1.02d-47) then
tmp = x + ((y * t) / a)
else if (z <= 1.5d+85) 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 * (1.0 - (y / a));
double t_2 = t - (t * (y / z));
double tmp;
if (z <= -3.3e+20) {
tmp = t_2;
} else if (z <= -6.4e-82) {
tmp = t / (a / (y - z));
} else if (z <= -5.2e-226) {
tmp = t_1;
} else if (z <= 1.02e-47) {
tmp = x + ((y * t) / a);
} else if (z <= 1.5e+85) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (y / a)) t_2 = t - (t * (y / z)) tmp = 0 if z <= -3.3e+20: tmp = t_2 elif z <= -6.4e-82: tmp = t / (a / (y - z)) elif z <= -5.2e-226: tmp = t_1 elif z <= 1.02e-47: tmp = x + ((y * t) / a) elif z <= 1.5e+85: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(y / a))) t_2 = Float64(t - Float64(t * Float64(y / z))) tmp = 0.0 if (z <= -3.3e+20) tmp = t_2; elseif (z <= -6.4e-82) tmp = Float64(t / Float64(a / Float64(y - z))); elseif (z <= -5.2e-226) tmp = t_1; elseif (z <= 1.02e-47) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 1.5e+85) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (y / a)); t_2 = t - (t * (y / z)); tmp = 0.0; if (z <= -3.3e+20) tmp = t_2; elseif (z <= -6.4e-82) tmp = t / (a / (y - z)); elseif (z <= -5.2e-226) tmp = t_1; elseif (z <= 1.02e-47) tmp = x + ((y * t) / a); elseif (z <= 1.5e+85) 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[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+20], t$95$2, If[LessEqual[z, -6.4e-82], N[(t / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.2e-226], t$95$1, If[LessEqual[z, 1.02e-47], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+85], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
t_2 := t - t \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -3.3 \cdot 10^{+20}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -6.4 \cdot 10^{-82}:\\
\;\;\;\;\frac{t}{\frac{a}{y - z}}\\
\mathbf{elif}\;z \leq -5.2 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.02 \cdot 10^{-47}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+85}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.3e20 or 1.5e85 < z Initial program 66.3%
Taylor expanded in x around 0 46.2%
associate-/l*69.5%
Simplified69.5%
Taylor expanded in a around 0 43.9%
mul-1-neg43.9%
associate-/l*62.5%
distribute-lft-neg-in62.5%
div-sub62.6%
*-inverses62.6%
Simplified62.6%
Taylor expanded in y around 0 56.5%
mul-1-neg56.5%
unsub-neg56.5%
associate-*r/62.6%
Simplified62.6%
if -3.3e20 < z < -6.4000000000000002e-82Initial program 80.0%
Taylor expanded in x around 0 59.3%
associate-/l*69.1%
Simplified69.1%
Taylor expanded in a around inf 38.2%
associate-/l*48.0%
Simplified48.0%
clear-num47.9%
un-div-inv48.1%
Applied egg-rr48.1%
if -6.4000000000000002e-82 < z < -5.1999999999999997e-226 or 1.02000000000000002e-47 < z < 1.5e85Initial program 90.7%
Taylor expanded in z around 0 57.5%
Taylor expanded in x around inf 60.0%
mul-1-neg60.0%
sub-neg60.0%
Simplified60.0%
if -5.1999999999999997e-226 < z < 1.02000000000000002e-47Initial program 94.6%
Taylor expanded in z around 0 69.7%
Taylor expanded in t around inf 59.4%
Final simplification59.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* y t) a))) (t_2 (- t (* t (/ y z)))))
(if (<= z -6.4e-82)
(* t (/ z (- z a)))
(if (<= z 6.6e-157)
t_1
(if (<= z 1.35e-70)
t_2
(if (<= z 6.8e-51)
t_1
(if (<= z 1.8e+85) (* x (- 1.0 (/ y a))) t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * t) / a);
double t_2 = t - (t * (y / z));
double tmp;
if (z <= -6.4e-82) {
tmp = t * (z / (z - a));
} else if (z <= 6.6e-157) {
tmp = t_1;
} else if (z <= 1.35e-70) {
tmp = t_2;
} else if (z <= 6.8e-51) {
tmp = t_1;
} else if (z <= 1.8e+85) {
tmp = x * (1.0 - (y / a));
} 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 * t) / a)
t_2 = t - (t * (y / z))
if (z <= (-6.4d-82)) then
tmp = t * (z / (z - a))
else if (z <= 6.6d-157) then
tmp = t_1
else if (z <= 1.35d-70) then
tmp = t_2
else if (z <= 6.8d-51) then
tmp = t_1
else if (z <= 1.8d+85) then
tmp = x * (1.0d0 - (y / a))
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 * t) / a);
double t_2 = t - (t * (y / z));
double tmp;
if (z <= -6.4e-82) {
tmp = t * (z / (z - a));
} else if (z <= 6.6e-157) {
tmp = t_1;
} else if (z <= 1.35e-70) {
tmp = t_2;
} else if (z <= 6.8e-51) {
tmp = t_1;
} else if (z <= 1.8e+85) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y * t) / a) t_2 = t - (t * (y / z)) tmp = 0 if z <= -6.4e-82: tmp = t * (z / (z - a)) elif z <= 6.6e-157: tmp = t_1 elif z <= 1.35e-70: tmp = t_2 elif z <= 6.8e-51: tmp = t_1 elif z <= 1.8e+85: tmp = x * (1.0 - (y / a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * t) / a)) t_2 = Float64(t - Float64(t * Float64(y / z))) tmp = 0.0 if (z <= -6.4e-82) tmp = Float64(t * Float64(z / Float64(z - a))); elseif (z <= 6.6e-157) tmp = t_1; elseif (z <= 1.35e-70) tmp = t_2; elseif (z <= 6.8e-51) tmp = t_1; elseif (z <= 1.8e+85) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y * t) / a); t_2 = t - (t * (y / z)); tmp = 0.0; if (z <= -6.4e-82) tmp = t * (z / (z - a)); elseif (z <= 6.6e-157) tmp = t_1; elseif (z <= 1.35e-70) tmp = t_2; elseif (z <= 6.8e-51) tmp = t_1; elseif (z <= 1.8e+85) tmp = x * (1.0 - (y / a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.4e-82], N[(t * N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.6e-157], t$95$1, If[LessEqual[z, 1.35e-70], t$95$2, If[LessEqual[z, 6.8e-51], t$95$1, If[LessEqual[z, 1.8e+85], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot t}{a}\\
t_2 := t - t \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -6.4 \cdot 10^{-82}:\\
\;\;\;\;t \cdot \frac{z}{z - a}\\
\mathbf{elif}\;z \leq 6.6 \cdot 10^{-157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-70}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{+85}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.4000000000000002e-82Initial program 70.6%
Taylor expanded in x around 0 50.2%
associate-/l*69.9%
Simplified69.9%
Taylor expanded in y around 0 44.1%
mul-1-neg44.1%
associate-/l*55.2%
distribute-rgt-neg-in55.2%
mul-1-neg55.2%
associate-*r/55.2%
neg-mul-155.2%
Simplified55.2%
if -6.4000000000000002e-82 < z < 6.59999999999999998e-157 or 1.3500000000000001e-70 < z < 6.80000000000000005e-51Initial program 92.9%
Taylor expanded in z around 0 77.6%
Taylor expanded in t around inf 64.5%
if 6.59999999999999998e-157 < z < 1.3500000000000001e-70 or 1.7999999999999999e85 < z Initial program 70.1%
Taylor expanded in x around 0 50.6%
associate-/l*71.0%
Simplified71.0%
Taylor expanded in a around 0 50.5%
mul-1-neg50.5%
associate-/l*66.2%
distribute-lft-neg-in66.2%
div-sub66.2%
*-inverses66.2%
Simplified66.2%
Taylor expanded in y around 0 62.5%
mul-1-neg62.5%
unsub-neg62.5%
associate-*r/66.2%
Simplified66.2%
if 6.80000000000000005e-51 < z < 1.7999999999999999e85Initial program 92.8%
Taylor expanded in z around 0 44.1%
Taylor expanded in x around inf 53.5%
mul-1-neg53.5%
sub-neg53.5%
Simplified53.5%
Final simplification60.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* y t) a))) (t_2 (- t (* t (/ y z)))))
(if (<= z -6.4e-82)
(/ t (- 1.0 (/ a z)))
(if (<= z 6.5e-157)
t_1
(if (<= z 3.2e-68)
t_2
(if (<= z 6.9e-47)
t_1
(if (<= z 7e+84) (* x (- 1.0 (/ y a))) t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * t) / a);
double t_2 = t - (t * (y / z));
double tmp;
if (z <= -6.4e-82) {
tmp = t / (1.0 - (a / z));
} else if (z <= 6.5e-157) {
tmp = t_1;
} else if (z <= 3.2e-68) {
tmp = t_2;
} else if (z <= 6.9e-47) {
tmp = t_1;
} else if (z <= 7e+84) {
tmp = x * (1.0 - (y / a));
} 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 * t) / a)
t_2 = t - (t * (y / z))
if (z <= (-6.4d-82)) then
tmp = t / (1.0d0 - (a / z))
else if (z <= 6.5d-157) then
tmp = t_1
else if (z <= 3.2d-68) then
tmp = t_2
else if (z <= 6.9d-47) then
tmp = t_1
else if (z <= 7d+84) then
tmp = x * (1.0d0 - (y / a))
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 * t) / a);
double t_2 = t - (t * (y / z));
double tmp;
if (z <= -6.4e-82) {
tmp = t / (1.0 - (a / z));
} else if (z <= 6.5e-157) {
tmp = t_1;
} else if (z <= 3.2e-68) {
tmp = t_2;
} else if (z <= 6.9e-47) {
tmp = t_1;
} else if (z <= 7e+84) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y * t) / a) t_2 = t - (t * (y / z)) tmp = 0 if z <= -6.4e-82: tmp = t / (1.0 - (a / z)) elif z <= 6.5e-157: tmp = t_1 elif z <= 3.2e-68: tmp = t_2 elif z <= 6.9e-47: tmp = t_1 elif z <= 7e+84: tmp = x * (1.0 - (y / a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * t) / a)) t_2 = Float64(t - Float64(t * Float64(y / z))) tmp = 0.0 if (z <= -6.4e-82) tmp = Float64(t / Float64(1.0 - Float64(a / z))); elseif (z <= 6.5e-157) tmp = t_1; elseif (z <= 3.2e-68) tmp = t_2; elseif (z <= 6.9e-47) tmp = t_1; elseif (z <= 7e+84) tmp = Float64(x * Float64(1.0 - Float64(y / a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y * t) / a); t_2 = t - (t * (y / z)); tmp = 0.0; if (z <= -6.4e-82) tmp = t / (1.0 - (a / z)); elseif (z <= 6.5e-157) tmp = t_1; elseif (z <= 3.2e-68) tmp = t_2; elseif (z <= 6.9e-47) tmp = t_1; elseif (z <= 7e+84) tmp = x * (1.0 - (y / a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(t * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.4e-82], N[(t / N[(1.0 - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.5e-157], t$95$1, If[LessEqual[z, 3.2e-68], t$95$2, If[LessEqual[z, 6.9e-47], t$95$1, If[LessEqual[z, 7e+84], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot t}{a}\\
t_2 := t - t \cdot \frac{y}{z}\\
\mathbf{if}\;z \leq -6.4 \cdot 10^{-82}:\\
\;\;\;\;\frac{t}{1 - \frac{a}{z}}\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-157}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-68}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 6.9 \cdot 10^{-47}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+84}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.4000000000000002e-82Initial program 70.6%
Taylor expanded in x around 0 50.2%
associate-/l*69.9%
Simplified69.9%
clear-num69.8%
div-inv69.9%
Applied egg-rr69.9%
Taylor expanded in y around 0 55.2%
mul-1-neg55.2%
div-sub55.3%
sub-neg55.3%
*-inverses55.3%
metadata-eval55.3%
Simplified55.3%
if -6.4000000000000002e-82 < z < 6.5000000000000002e-157 or 3.1999999999999999e-68 < z < 6.89999999999999994e-47Initial program 92.9%
Taylor expanded in z around 0 77.6%
Taylor expanded in t around inf 64.5%
if 6.5000000000000002e-157 < z < 3.1999999999999999e-68 or 6.9999999999999998e84 < z Initial program 70.1%
Taylor expanded in x around 0 50.6%
associate-/l*71.0%
Simplified71.0%
Taylor expanded in a around 0 50.5%
mul-1-neg50.5%
associate-/l*66.2%
distribute-lft-neg-in66.2%
div-sub66.2%
*-inverses66.2%
Simplified66.2%
Taylor expanded in y around 0 62.5%
mul-1-neg62.5%
unsub-neg62.5%
associate-*r/66.2%
Simplified66.2%
if 6.89999999999999994e-47 < z < 6.9999999999999998e84Initial program 92.8%
Taylor expanded in z around 0 44.1%
Taylor expanded in x around inf 53.5%
mul-1-neg53.5%
sub-neg53.5%
Simplified53.5%
Final simplification60.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))))
(if (<= z -4.7e-82)
t_1
(if (<= z 8.4e-190)
(+ x (/ (- t x) (/ a y)))
(if (<= z 2.2e-39)
(* y (/ (- t x) (- a z)))
(if (<= z 8e+86) (* x (+ (/ (- y z) (- z a)) 1.0)) 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 <= -4.7e-82) {
tmp = t_1;
} else if (z <= 8.4e-190) {
tmp = x + ((t - x) / (a / y));
} else if (z <= 2.2e-39) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 8e+86) {
tmp = x * (((y - z) / (z - a)) + 1.0);
} 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 <= (-4.7d-82)) then
tmp = t_1
else if (z <= 8.4d-190) then
tmp = x + ((t - x) / (a / y))
else if (z <= 2.2d-39) then
tmp = y * ((t - x) / (a - z))
else if (z <= 8d+86) then
tmp = x * (((y - z) / (z - a)) + 1.0d0)
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 <= -4.7e-82) {
tmp = t_1;
} else if (z <= 8.4e-190) {
tmp = x + ((t - x) / (a / y));
} else if (z <= 2.2e-39) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 8e+86) {
tmp = x * (((y - z) / (z - a)) + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) tmp = 0 if z <= -4.7e-82: tmp = t_1 elif z <= 8.4e-190: tmp = x + ((t - x) / (a / y)) elif z <= 2.2e-39: tmp = y * ((t - x) / (a - z)) elif z <= 8e+86: tmp = x * (((y - z) / (z - a)) + 1.0) 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 <= -4.7e-82) tmp = t_1; elseif (z <= 8.4e-190) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / y))); elseif (z <= 2.2e-39) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (z <= 8e+86) tmp = Float64(x * Float64(Float64(Float64(y - z) / Float64(z - a)) + 1.0)); 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 <= -4.7e-82) tmp = t_1; elseif (z <= 8.4e-190) tmp = x + ((t - x) / (a / y)); elseif (z <= 2.2e-39) tmp = y * ((t - x) / (a - z)); elseif (z <= 8e+86) tmp = x * (((y - z) / (z - a)) + 1.0); 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, -4.7e-82], t$95$1, If[LessEqual[z, 8.4e-190], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e-39], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+86], N[(x * N[(N[(N[(y - z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -4.7 \cdot 10^{-82}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.4 \cdot 10^{-190}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-39}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+86}:\\
\;\;\;\;x \cdot \left(\frac{y - z}{z - a} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.7000000000000001e-82 or 8.0000000000000001e86 < z Initial program 69.2%
Taylor expanded in x around 0 48.9%
associate-/l*70.0%
Simplified70.0%
if -4.7000000000000001e-82 < z < 8.39999999999999966e-190Initial program 94.2%
*-commutative94.2%
associate-*l/85.8%
associate-*r/94.2%
clear-num94.2%
un-div-inv95.7%
Applied egg-rr95.7%
Taylor expanded in z around 0 90.0%
if 8.39999999999999966e-190 < z < 2.20000000000000001e-39Initial program 86.9%
Taylor expanded in y around inf 73.8%
div-sub78.3%
Simplified78.3%
if 2.20000000000000001e-39 < z < 8.0000000000000001e86Initial program 90.3%
Taylor expanded in x around inf 62.6%
mul-1-neg62.6%
unsub-neg62.6%
Simplified62.6%
Final simplification76.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ (- y z) a)))))
(if (<= a -8.8e+133)
t_1
(if (<= a -1.3e-221)
(* t (/ (- y z) (- a z)))
(if (<= a 8.2e-89)
(* y (/ (- t x) (- a z)))
(if (<= a 1.7e-32) (/ (* (- y z) t) (- a z)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * ((y - z) / a));
double tmp;
if (a <= -8.8e+133) {
tmp = t_1;
} else if (a <= -1.3e-221) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 8.2e-89) {
tmp = y * ((t - x) / (a - z));
} else if (a <= 1.7e-32) {
tmp = ((y - z) * t) / (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 = x + ((t - x) * ((y - z) / a))
if (a <= (-8.8d+133)) then
tmp = t_1
else if (a <= (-1.3d-221)) then
tmp = t * ((y - z) / (a - z))
else if (a <= 8.2d-89) then
tmp = y * ((t - x) / (a - z))
else if (a <= 1.7d-32) then
tmp = ((y - z) * t) / (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 = x + ((t - x) * ((y - z) / a));
double tmp;
if (a <= -8.8e+133) {
tmp = t_1;
} else if (a <= -1.3e-221) {
tmp = t * ((y - z) / (a - z));
} else if (a <= 8.2e-89) {
tmp = y * ((t - x) / (a - z));
} else if (a <= 1.7e-32) {
tmp = ((y - z) * t) / (a - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * ((y - z) / a)) tmp = 0 if a <= -8.8e+133: tmp = t_1 elif a <= -1.3e-221: tmp = t * ((y - z) / (a - z)) elif a <= 8.2e-89: tmp = y * ((t - x) / (a - z)) elif a <= 1.7e-32: tmp = ((y - z) * t) / (a - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a))) tmp = 0.0 if (a <= -8.8e+133) tmp = t_1; elseif (a <= -1.3e-221) tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); elseif (a <= 8.2e-89) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (a <= 1.7e-32) tmp = Float64(Float64(Float64(y - z) * t) / Float64(a - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * ((y - z) / a)); tmp = 0.0; if (a <= -8.8e+133) tmp = t_1; elseif (a <= -1.3e-221) tmp = t * ((y - z) / (a - z)); elseif (a <= 8.2e-89) tmp = y * ((t - x) / (a - z)); elseif (a <= 1.7e-32) tmp = ((y - z) * t) / (a - 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[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.8e+133], t$95$1, If[LessEqual[a, -1.3e-221], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.2e-89], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.7e-32], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y - z}{a}\\
\mathbf{if}\;a \leq -8.8 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.3 \cdot 10^{-221}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{-89}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-32}:\\
\;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.8e133 or 1.69999999999999989e-32 < a Initial program 94.8%
Taylor expanded in a around inf 68.3%
associate-/l*83.8%
Simplified83.8%
if -8.8e133 < a < -1.3000000000000001e-221Initial program 74.3%
Taylor expanded in x around 0 53.4%
associate-/l*67.2%
Simplified67.2%
if -1.3000000000000001e-221 < a < 8.1999999999999997e-89Initial program 72.6%
Taylor expanded in y around inf 67.9%
div-sub72.6%
Simplified72.6%
if 8.1999999999999997e-89 < a < 1.69999999999999989e-32Initial program 67.8%
Taylor expanded in x around 0 83.4%
Final simplification76.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- t x) (/ (- y z) a)))))
(if (<= a -8.8e+133)
t_1
(if (<= a -5.8e+52)
(/ t (/ (- a z) (- y z)))
(if (<= a -8.5e-5)
(- x (* y (/ (- x t) a)))
(if (<= a 3.8e-31) (+ t (* (/ (- t x) z) (- a y))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((t - x) * ((y - z) / a));
double tmp;
if (a <= -8.8e+133) {
tmp = t_1;
} else if (a <= -5.8e+52) {
tmp = t / ((a - z) / (y - z));
} else if (a <= -8.5e-5) {
tmp = x - (y * ((x - t) / a));
} else if (a <= 3.8e-31) {
tmp = t + (((t - x) / z) * (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 = x + ((t - x) * ((y - z) / a))
if (a <= (-8.8d+133)) then
tmp = t_1
else if (a <= (-5.8d+52)) then
tmp = t / ((a - z) / (y - z))
else if (a <= (-8.5d-5)) then
tmp = x - (y * ((x - t) / a))
else if (a <= 3.8d-31) then
tmp = t + (((t - x) / z) * (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 = x + ((t - x) * ((y - z) / a));
double tmp;
if (a <= -8.8e+133) {
tmp = t_1;
} else if (a <= -5.8e+52) {
tmp = t / ((a - z) / (y - z));
} else if (a <= -8.5e-5) {
tmp = x - (y * ((x - t) / a));
} else if (a <= 3.8e-31) {
tmp = t + (((t - x) / z) * (a - y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((t - x) * ((y - z) / a)) tmp = 0 if a <= -8.8e+133: tmp = t_1 elif a <= -5.8e+52: tmp = t / ((a - z) / (y - z)) elif a <= -8.5e-5: tmp = x - (y * ((x - t) / a)) elif a <= 3.8e-31: tmp = t + (((t - x) / z) * (a - y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(t - x) * Float64(Float64(y - z) / a))) tmp = 0.0 if (a <= -8.8e+133) tmp = t_1; elseif (a <= -5.8e+52) tmp = Float64(t / Float64(Float64(a - z) / Float64(y - z))); elseif (a <= -8.5e-5) tmp = Float64(x - Float64(y * Float64(Float64(x - t) / a))); elseif (a <= 3.8e-31) tmp = Float64(t + Float64(Float64(Float64(t - x) / z) * Float64(a - y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((t - x) * ((y - z) / a)); tmp = 0.0; if (a <= -8.8e+133) tmp = t_1; elseif (a <= -5.8e+52) tmp = t / ((a - z) / (y - z)); elseif (a <= -8.5e-5) tmp = x - (y * ((x - t) / a)); elseif (a <= 3.8e-31) tmp = t + (((t - x) / z) * (a - y)); 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[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.8e+133], t$95$1, If[LessEqual[a, -5.8e+52], N[(t / N[(N[(a - z), $MachinePrecision] / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8.5e-5], N[(x - N[(y * N[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.8e-31], N[(t + N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t - x\right) \cdot \frac{y - z}{a}\\
\mathbf{if}\;a \leq -8.8 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{+52}:\\
\;\;\;\;\frac{t}{\frac{a - z}{y - z}}\\
\mathbf{elif}\;a \leq -8.5 \cdot 10^{-5}:\\
\;\;\;\;x - y \cdot \frac{x - t}{a}\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{-31}:\\
\;\;\;\;t + \frac{t - x}{z} \cdot \left(a - y\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -8.8e133 or 3.8e-31 < a Initial program 94.8%
Taylor expanded in a around inf 68.3%
associate-/l*83.8%
Simplified83.8%
if -8.8e133 < a < -5.8e52Initial program 84.8%
Taylor expanded in x around 0 56.3%
associate-/l*79.8%
Simplified79.8%
clear-num79.9%
div-inv80.2%
Applied egg-rr80.2%
if -5.8e52 < a < -8.500000000000001e-5Initial program 75.9%
Taylor expanded in z around 0 65.1%
associate-/l*76.0%
Simplified76.0%
if -8.500000000000001e-5 < a < 3.8e-31Initial program 71.0%
Taylor expanded in z around inf 80.0%
associate--l+80.0%
distribute-lft-out--80.0%
div-sub80.0%
mul-1-neg80.0%
unsub-neg80.0%
div-sub80.0%
associate-/l*83.9%
associate-/l*78.9%
distribute-rgt-out--84.0%
Simplified84.0%
Final simplification83.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (* x (- 1.0 (/ y a)))))
(if (<= x -6e+74)
t_2
(if (<= x 2.1e+22)
t_1
(if (<= x 1.08e+71)
t_2
(if (<= x 2.9e+216) t_1 (* x (/ (- y a) z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x * (1.0 - (y / a));
double tmp;
if (x <= -6e+74) {
tmp = t_2;
} else if (x <= 2.1e+22) {
tmp = t_1;
} else if (x <= 1.08e+71) {
tmp = t_2;
} else if (x <= 2.9e+216) {
tmp = t_1;
} else {
tmp = x * ((y - a) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = x * (1.0d0 - (y / a))
if (x <= (-6d+74)) then
tmp = t_2
else if (x <= 2.1d+22) then
tmp = t_1
else if (x <= 1.08d+71) then
tmp = t_2
else if (x <= 2.9d+216) then
tmp = t_1
else
tmp = x * ((y - a) / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = x * (1.0 - (y / a));
double tmp;
if (x <= -6e+74) {
tmp = t_2;
} else if (x <= 2.1e+22) {
tmp = t_1;
} else if (x <= 1.08e+71) {
tmp = t_2;
} else if (x <= 2.9e+216) {
tmp = t_1;
} else {
tmp = x * ((y - a) / z);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = x * (1.0 - (y / a)) tmp = 0 if x <= -6e+74: tmp = t_2 elif x <= 2.1e+22: tmp = t_1 elif x <= 1.08e+71: tmp = t_2 elif x <= 2.9e+216: tmp = t_1 else: tmp = x * ((y - a) / z) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(x * Float64(1.0 - Float64(y / a))) tmp = 0.0 if (x <= -6e+74) tmp = t_2; elseif (x <= 2.1e+22) tmp = t_1; elseif (x <= 1.08e+71) tmp = t_2; elseif (x <= 2.9e+216) tmp = t_1; else tmp = Float64(x * Float64(Float64(y - a) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = x * (1.0 - (y / a)); tmp = 0.0; if (x <= -6e+74) tmp = t_2; elseif (x <= 2.1e+22) tmp = t_1; elseif (x <= 1.08e+71) tmp = t_2; elseif (x <= 2.9e+216) tmp = t_1; else tmp = x * ((y - a) / z); 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]}, Block[{t$95$2 = N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6e+74], t$95$2, If[LessEqual[x, 2.1e+22], t$95$1, If[LessEqual[x, 1.08e+71], t$95$2, If[LessEqual[x, 2.9e+216], t$95$1, N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -6 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{+22}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.08 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+216}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\end{array}
\end{array}
if x < -6e74 or 2.0999999999999998e22 < x < 1.08e71Initial program 86.5%
Taylor expanded in z around 0 57.2%
Taylor expanded in x around inf 68.9%
mul-1-neg68.9%
sub-neg68.9%
Simplified68.9%
if -6e74 < x < 2.0999999999999998e22 or 1.08e71 < x < 2.9000000000000001e216Initial program 82.8%
Taylor expanded in x around 0 53.1%
associate-/l*67.9%
Simplified67.9%
if 2.9000000000000001e216 < x Initial program 67.6%
Taylor expanded in x around inf 63.3%
mul-1-neg63.3%
unsub-neg63.3%
Simplified63.3%
Taylor expanded in z around inf 74.7%
neg-mul-174.7%
sub-neg74.7%
mul-1-neg74.7%
Simplified74.7%
Final simplification68.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y z) (- a z)))) (t_2 (* y (/ (- t x) (- a z)))))
(if (<= y -8.5e+90)
t_2
(if (<= y -3e-209)
t_1
(if (<= y -3.2e-293)
(+ x (/ (* y t) a))
(if (<= y 7.7e+25) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = y * ((t - x) / (a - z));
double tmp;
if (y <= -8.5e+90) {
tmp = t_2;
} else if (y <= -3e-209) {
tmp = t_1;
} else if (y <= -3.2e-293) {
tmp = x + ((y * t) / a);
} else if (y <= 7.7e+25) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * ((y - z) / (a - z))
t_2 = y * ((t - x) / (a - z))
if (y <= (-8.5d+90)) then
tmp = t_2
else if (y <= (-3d-209)) then
tmp = t_1
else if (y <= (-3.2d-293)) then
tmp = x + ((y * t) / a)
else if (y <= 7.7d+25) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * ((y - z) / (a - z));
double t_2 = y * ((t - x) / (a - z));
double tmp;
if (y <= -8.5e+90) {
tmp = t_2;
} else if (y <= -3e-209) {
tmp = t_1;
} else if (y <= -3.2e-293) {
tmp = x + ((y * t) / a);
} else if (y <= 7.7e+25) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * ((y - z) / (a - z)) t_2 = y * ((t - x) / (a - z)) tmp = 0 if y <= -8.5e+90: tmp = t_2 elif y <= -3e-209: tmp = t_1 elif y <= -3.2e-293: tmp = x + ((y * t) / a) elif y <= 7.7e+25: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) t_2 = Float64(y * Float64(Float64(t - x) / Float64(a - z))) tmp = 0.0 if (y <= -8.5e+90) tmp = t_2; elseif (y <= -3e-209) tmp = t_1; elseif (y <= -3.2e-293) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (y <= 7.7e+25) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * ((y - z) / (a - z)); t_2 = y * ((t - x) / (a - z)); tmp = 0.0; if (y <= -8.5e+90) tmp = t_2; elseif (y <= -3e-209) tmp = t_1; elseif (y <= -3.2e-293) tmp = x + ((y * t) / a); elseif (y <= 7.7e+25) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8.5e+90], t$95$2, If[LessEqual[y, -3e-209], t$95$1, If[LessEqual[y, -3.2e-293], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.7e+25], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y - z}{a - z}\\
t_2 := y \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;y \leq -8.5 \cdot 10^{+90}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3 \cdot 10^{-209}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-293}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;y \leq 7.7 \cdot 10^{+25}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -8.5000000000000002e90 or 7.70000000000000025e25 < y Initial program 93.1%
Taylor expanded in y around inf 77.9%
div-sub79.6%
Simplified79.6%
if -8.5000000000000002e90 < y < -2.9999999999999999e-209 or -3.20000000000000005e-293 < y < 7.70000000000000025e25Initial program 72.2%
Taylor expanded in x around 0 49.3%
associate-/l*63.2%
Simplified63.2%
if -2.9999999999999999e-209 < y < -3.20000000000000005e-293Initial program 78.7%
Taylor expanded in z around 0 59.6%
Taylor expanded in t around inf 59.6%
Final simplification70.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ (- x t) a)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= z -2.85e-82)
t_2
(if (<= z 2.4e-194)
t_1
(if (<= z 6e-42)
(* y (/ (- t x) (- a z)))
(if (<= z 3.8e+38) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * ((x - t) / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2.85e-82) {
tmp = t_2;
} else if (z <= 2.4e-194) {
tmp = t_1;
} else if (z <= 6e-42) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 3.8e+38) {
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 * ((x - t) / a))
t_2 = t * ((y - z) / (a - z))
if (z <= (-2.85d-82)) then
tmp = t_2
else if (z <= 2.4d-194) then
tmp = t_1
else if (z <= 6d-42) then
tmp = y * ((t - x) / (a - z))
else if (z <= 3.8d+38) 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 * ((x - t) / a));
double t_2 = t * ((y - z) / (a - z));
double tmp;
if (z <= -2.85e-82) {
tmp = t_2;
} else if (z <= 2.4e-194) {
tmp = t_1;
} else if (z <= 6e-42) {
tmp = y * ((t - x) / (a - z));
} else if (z <= 3.8e+38) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * ((x - t) / a)) t_2 = t * ((y - z) / (a - z)) tmp = 0 if z <= -2.85e-82: tmp = t_2 elif z <= 2.4e-194: tmp = t_1 elif z <= 6e-42: tmp = y * ((t - x) / (a - z)) elif z <= 3.8e+38: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(Float64(x - t) / a))) t_2 = Float64(t * Float64(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (z <= -2.85e-82) tmp = t_2; elseif (z <= 2.4e-194) tmp = t_1; elseif (z <= 6e-42) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (z <= 3.8e+38) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * ((x - t) / a)); t_2 = t * ((y - z) / (a - z)); tmp = 0.0; if (z <= -2.85e-82) tmp = t_2; elseif (z <= 2.4e-194) tmp = t_1; elseif (z <= 6e-42) tmp = y * ((t - x) / (a - z)); elseif (z <= 3.8e+38) 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[(N[(x - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.85e-82], t$95$2, If[LessEqual[z, 2.4e-194], t$95$1, If[LessEqual[z, 6e-42], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+38], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{x - t}{a}\\
t_2 := t \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;z \leq -2.85 \cdot 10^{-82}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-194}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-42}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -2.85000000000000001e-82 or 3.7999999999999998e38 < z Initial program 71.4%
Taylor expanded in x around 0 47.4%
associate-/l*65.0%
Simplified65.0%
if -2.85000000000000001e-82 < z < 2.4e-194 or 6.00000000000000054e-42 < z < 3.7999999999999998e38Initial program 95.2%
Taylor expanded in z around 0 75.6%
associate-/l*87.2%
Simplified87.2%
if 2.4e-194 < z < 6.00000000000000054e-42Initial program 86.9%
Taylor expanded in y around inf 73.8%
div-sub78.3%
Simplified78.3%
Final simplification75.0%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.35e+44)
(* t (/ y a))
(if (<= y -1.06e-207)
t
(if (<= y -3.1e-294) x (if (<= y 7.2e+14) t (* x (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.35e+44) {
tmp = t * (y / a);
} else if (y <= -1.06e-207) {
tmp = t;
} else if (y <= -3.1e-294) {
tmp = x;
} else if (y <= 7.2e+14) {
tmp = t;
} else {
tmp = x * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.35d+44)) then
tmp = t * (y / a)
else if (y <= (-1.06d-207)) then
tmp = t
else if (y <= (-3.1d-294)) then
tmp = x
else if (y <= 7.2d+14) then
tmp = t
else
tmp = x * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.35e+44) {
tmp = t * (y / a);
} else if (y <= -1.06e-207) {
tmp = t;
} else if (y <= -3.1e-294) {
tmp = x;
} else if (y <= 7.2e+14) {
tmp = t;
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.35e+44: tmp = t * (y / a) elif y <= -1.06e-207: tmp = t elif y <= -3.1e-294: tmp = x elif y <= 7.2e+14: tmp = t else: tmp = x * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.35e+44) tmp = Float64(t * Float64(y / a)); elseif (y <= -1.06e-207) tmp = t; elseif (y <= -3.1e-294) tmp = x; elseif (y <= 7.2e+14) tmp = t; else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.35e+44) tmp = t * (y / a); elseif (y <= -1.06e-207) tmp = t; elseif (y <= -3.1e-294) tmp = x; elseif (y <= 7.2e+14) tmp = t; else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.35e+44], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.06e-207], t, If[LessEqual[y, -3.1e-294], x, If[LessEqual[y, 7.2e+14], t, N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{+44}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq -1.06 \cdot 10^{-207}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-294}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+14}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -1.35e44Initial program 92.4%
Taylor expanded in x around 0 45.3%
associate-/l*59.1%
Simplified59.1%
Taylor expanded in z around 0 28.9%
associate-/l*42.8%
Simplified42.8%
if -1.35e44 < y < -1.05999999999999997e-207 or -3.10000000000000003e-294 < y < 7.2e14Initial program 69.7%
Taylor expanded in z around inf 45.3%
if -1.05999999999999997e-207 < y < -3.10000000000000003e-294Initial program 78.7%
Taylor expanded in a around inf 55.0%
if 7.2e14 < y Initial program 93.4%
Taylor expanded in x around inf 58.5%
mul-1-neg58.5%
unsub-neg58.5%
Simplified58.5%
Taylor expanded in a around 0 39.8%
Final simplification43.9%
(FPCore (x y z t a)
:precision binary64
(if (<= y -7.6e+43)
(* t (/ y (- a z)))
(if (<= y -6.2e-209)
t
(if (<= y -2.3e-293) x (if (<= y 7.5e+14) t (* x (/ y z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7.6e+43) {
tmp = t * (y / (a - z));
} else if (y <= -6.2e-209) {
tmp = t;
} else if (y <= -2.3e-293) {
tmp = x;
} else if (y <= 7.5e+14) {
tmp = t;
} else {
tmp = x * (y / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-7.6d+43)) then
tmp = t * (y / (a - z))
else if (y <= (-6.2d-209)) then
tmp = t
else if (y <= (-2.3d-293)) then
tmp = x
else if (y <= 7.5d+14) then
tmp = t
else
tmp = x * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7.6e+43) {
tmp = t * (y / (a - z));
} else if (y <= -6.2e-209) {
tmp = t;
} else if (y <= -2.3e-293) {
tmp = x;
} else if (y <= 7.5e+14) {
tmp = t;
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -7.6e+43: tmp = t * (y / (a - z)) elif y <= -6.2e-209: tmp = t elif y <= -2.3e-293: tmp = x elif y <= 7.5e+14: tmp = t else: tmp = x * (y / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -7.6e+43) tmp = Float64(t * Float64(y / Float64(a - z))); elseif (y <= -6.2e-209) tmp = t; elseif (y <= -2.3e-293) tmp = x; elseif (y <= 7.5e+14) tmp = t; else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -7.6e+43) tmp = t * (y / (a - z)); elseif (y <= -6.2e-209) tmp = t; elseif (y <= -2.3e-293) tmp = x; elseif (y <= 7.5e+14) tmp = t; else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7.6e+43], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6.2e-209], t, If[LessEqual[y, -2.3e-293], x, If[LessEqual[y, 7.5e+14], t, N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+43}:\\
\;\;\;\;t \cdot \frac{y}{a - z}\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{-209}:\\
\;\;\;\;t\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-293}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+14}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if y < -7.60000000000000016e43Initial program 92.4%
Taylor expanded in x around 0 45.3%
associate-/l*59.1%
Simplified59.1%
Taylor expanded in y around inf 39.3%
associate-/l*51.1%
Simplified51.1%
if -7.60000000000000016e43 < y < -6.2e-209 or -2.29999999999999995e-293 < y < 7.5e14Initial program 69.7%
Taylor expanded in z around inf 45.3%
if -6.2e-209 < y < -2.29999999999999995e-293Initial program 78.7%
Taylor expanded in a around inf 55.0%
if 7.5e14 < y Initial program 93.4%
Taylor expanded in x around inf 58.5%
mul-1-neg58.5%
unsub-neg58.5%
Simplified58.5%
Taylor expanded in a around 0 39.8%
Final simplification45.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.08e+21) t (if (<= z 7e-40) (* t (/ y a)) (if (<= z 1.3e+87) x t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.08e+21) {
tmp = t;
} else if (z <= 7e-40) {
tmp = t * (y / a);
} else if (z <= 1.3e+87) {
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 <= (-1.08d+21)) then
tmp = t
else if (z <= 7d-40) then
tmp = t * (y / a)
else if (z <= 1.3d+87) 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 <= -1.08e+21) {
tmp = t;
} else if (z <= 7e-40) {
tmp = t * (y / a);
} else if (z <= 1.3e+87) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.08e+21: tmp = t elif z <= 7e-40: tmp = t * (y / a) elif z <= 1.3e+87: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.08e+21) tmp = t; elseif (z <= 7e-40) tmp = Float64(t * Float64(y / a)); elseif (z <= 1.3e+87) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.08e+21) tmp = t; elseif (z <= 7e-40) tmp = t * (y / a); elseif (z <= 1.3e+87) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.08e+21], t, If[LessEqual[z, 7e-40], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+87], x, t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.08 \cdot 10^{+21}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-40}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+87}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.08e21 or 1.29999999999999999e87 < z Initial program 67.0%
Taylor expanded in z around inf 54.9%
if -1.08e21 < z < 7.0000000000000003e-40Initial program 90.8%
Taylor expanded in x around 0 41.5%
associate-/l*48.0%
Simplified48.0%
Taylor expanded in z around 0 27.6%
associate-/l*34.9%
Simplified34.9%
if 7.0000000000000003e-40 < z < 1.29999999999999999e87Initial program 90.3%
Taylor expanded in a around inf 36.0%
Final simplification42.2%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.28e-82) t (if (<= z 5.2e+87) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.28e-82) {
tmp = t;
} else if (z <= 5.2e+87) {
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 <= (-1.28d-82)) then
tmp = t
else if (z <= 5.2d+87) 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 <= -1.28e-82) {
tmp = t;
} else if (z <= 5.2e+87) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.28e-82: tmp = t elif z <= 5.2e+87: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.28e-82) tmp = t; elseif (z <= 5.2e+87) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.28e-82) tmp = t; elseif (z <= 5.2e+87) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.28e-82], t, If[LessEqual[z, 5.2e+87], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.28 \cdot 10^{-82}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+87}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.28e-82 or 5.19999999999999997e87 < z Initial program 69.5%
Taylor expanded in z around inf 48.5%
if -1.28e-82 < z < 5.19999999999999997e87Initial program 92.0%
Taylor expanded in a around inf 33.0%
Final simplification39.7%
(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 82.2%
Taylor expanded in z around inf 25.4%
Final simplification25.4%
herbie shell --seed 2024075
(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)))))