
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a): return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y - z) * ((t - x) / (a - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \frac{t - x}{a - z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* (- y z) (- x t)) (- a z))))
(t_2 (+ x (* (- z y) (/ (- x t) (- a z))))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -4e-263)
t_2
(if (<= t_2 5e-285)
(- t (/ (- t x) (/ z (- y a))))
(if (<= t_2 1e+305) (fma (- y z) (/ (- t x) (- a z)) x) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((y - z) * (x - t)) / (a - z));
double t_2 = x + ((z - y) * ((x - t) / (a - z)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -4e-263) {
tmp = t_2;
} else if (t_2 <= 5e-285) {
tmp = t - ((t - x) / (z / (y - a)));
} else if (t_2 <= 1e+305) {
tmp = fma((y - z), ((t - x) / (a - z)), x);
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(y - z) * Float64(x - t)) / Float64(a - z))) t_2 = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(a - z)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -4e-263) tmp = t_2; elseif (t_2 <= 5e-285) tmp = Float64(t - Float64(Float64(t - x) / Float64(z / Float64(y - a)))); elseif (t_2 <= 1e+305) tmp = fma(Float64(y - z), Float64(Float64(t - x) / Float64(a - z)), x); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(y - z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -4e-263], t$95$2, If[LessEqual[t$95$2, 5e-285], N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+305], N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z}\\
t_2 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-263}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-285}:\\
\;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\
\mathbf{elif}\;t_2 \leq 10^{+305}:\\
\;\;\;\;\mathsf{fma}\left(y - z, \frac{t - x}{a - z}, x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -inf.0 or 9.9999999999999994e304 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 74.4%
associate-*r/100.0%
Simplified100.0%
if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4e-263Initial program 92.4%
if -4e-263 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.00000000000000018e-285Initial program 3.3%
Taylor expanded in z around inf 74.6%
associate--l+74.6%
associate-*r/74.6%
associate-*r/74.6%
div-sub74.6%
distribute-lft-out--74.6%
associate-*r/74.6%
mul-1-neg74.6%
unsub-neg74.6%
distribute-rgt-out--75.2%
associate-/l*96.4%
Simplified96.4%
if 5.00000000000000018e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.9999999999999994e304Initial program 97.5%
+-commutative97.5%
fma-def97.5%
Simplified97.5%
Final simplification95.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- z y) (/ (- x t) (- a z))))))
(if (or (<= t_1 -4e-263) (not (<= t_1 0.0)))
(fma (/ (- y z) (- a z)) (- t x) x)
(- t (/ (- t x) (/ z (- y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - y) * ((x - t) / (a - z)));
double tmp;
if ((t_1 <= -4e-263) || !(t_1 <= 0.0)) {
tmp = fma(((y - z) / (a - z)), (t - x), x);
} else {
tmp = t - ((t - x) / (z / (y - a)));
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -4e-263) || !(t_1 <= 0.0)) tmp = fma(Float64(Float64(y - z) / Float64(a - z)), Float64(t - x), x); else tmp = Float64(t - Float64(Float64(t - x) / Float64(z / Float64(y - a)))); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-263], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{-263} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t - x, x\right)\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4e-263 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 90.6%
+-commutative90.6%
remove-double-neg90.6%
unsub-neg90.6%
associate-*r/79.9%
associate-/l*91.4%
associate-/r/95.5%
fma-neg95.5%
remove-double-neg95.5%
Simplified95.5%
if -4e-263 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0Initial program 3.0%
Taylor expanded in z around inf 72.6%
associate--l+72.6%
associate-*r/72.6%
associate-*r/72.6%
div-sub72.6%
distribute-lft-out--72.6%
associate-*r/72.6%
mul-1-neg72.6%
unsub-neg72.6%
distribute-rgt-out--73.3%
associate-/l*96.1%
Simplified96.1%
Final simplification95.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ (* (- y z) (- x t)) (- a z))))
(t_2 (+ x (* (- z y) (/ (- x t) (- a z))))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -4e-263)
t_2
(if (<= t_2 5e-285)
(- t (/ (- t x) (/ z (- y a))))
(if (<= t_2 1e+305) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((y - z) * (x - t)) / (a - z));
double t_2 = x + ((z - y) * ((x - t) / (a - z)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -4e-263) {
tmp = t_2;
} else if (t_2 <= 5e-285) {
tmp = t - ((t - x) / (z / (y - a)));
} else if (t_2 <= 1e+305) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (((y - z) * (x - t)) / (a - z));
double t_2 = x + ((z - y) * ((x - t) / (a - z)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -4e-263) {
tmp = t_2;
} else if (t_2 <= 5e-285) {
tmp = t - ((t - x) / (z / (y - a)));
} else if (t_2 <= 1e+305) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (((y - z) * (x - t)) / (a - z)) t_2 = x + ((z - y) * ((x - t) / (a - z))) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -4e-263: tmp = t_2 elif t_2 <= 5e-285: tmp = t - ((t - x) / (z / (y - a))) elif t_2 <= 1e+305: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(Float64(y - z) * Float64(x - t)) / Float64(a - z))) t_2 = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(a - z)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -4e-263) tmp = t_2; elseif (t_2 <= 5e-285) tmp = Float64(t - Float64(Float64(t - x) / Float64(z / Float64(y - a)))); elseif (t_2 <= 1e+305) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (((y - z) * (x - t)) / (a - z)); t_2 = x + ((z - y) * ((x - t) / (a - z))); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -4e-263) tmp = t_2; elseif (t_2 <= 5e-285) tmp = t - ((t - x) / (z / (y - a))); elseif (t_2 <= 1e+305) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(y - z), $MachinePrecision] * N[(x - t), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -4e-263], t$95$2, If[LessEqual[t$95$2, 5e-285], N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+305], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{\left(y - z\right) \cdot \left(x - t\right)}{a - z}\\
t_2 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq -4 \cdot 10^{-263}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{-285}:\\
\;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\
\mathbf{elif}\;t_2 \leq 10^{+305}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -inf.0 or 9.9999999999999994e304 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 74.4%
associate-*r/100.0%
Simplified100.0%
if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4e-263 or 5.00000000000000018e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.9999999999999994e304Initial program 94.9%
if -4e-263 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.00000000000000018e-285Initial program 3.3%
Taylor expanded in z around inf 74.6%
associate--l+74.6%
associate-*r/74.6%
associate-*r/74.6%
div-sub74.6%
distribute-lft-out--74.6%
associate-*r/74.6%
mul-1-neg74.6%
unsub-neg74.6%
distribute-rgt-out--75.2%
associate-/l*96.4%
Simplified96.4%
Final simplification95.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- z y) (/ (- x t) (- a z))))))
(if (or (<= t_1 -4e-263) (not (<= t_1 5e-285)))
t_1
(- t (/ (- t x) (/ z (- y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z - y) * ((x - t) / (a - z)));
double tmp;
if ((t_1 <= -4e-263) || !(t_1 <= 5e-285)) {
tmp = t_1;
} else {
tmp = t - ((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) :: t_1
real(8) :: tmp
t_1 = x + ((z - y) * ((x - t) / (a - z)))
if ((t_1 <= (-4d-263)) .or. (.not. (t_1 <= 5d-285))) then
tmp = t_1
else
tmp = t - ((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 t_1 = x + ((z - y) * ((x - t) / (a - z)));
double tmp;
if ((t_1 <= -4e-263) || !(t_1 <= 5e-285)) {
tmp = t_1;
} else {
tmp = t - ((t - x) / (z / (y - a)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z - y) * ((x - t) / (a - z))) tmp = 0 if (t_1 <= -4e-263) or not (t_1 <= 5e-285): tmp = t_1 else: tmp = t - ((t - x) / (z / (y - a))) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z - y) * Float64(Float64(x - t) / Float64(a - z)))) tmp = 0.0 if ((t_1 <= -4e-263) || !(t_1 <= 5e-285)) tmp = t_1; else tmp = Float64(t - Float64(Float64(t - x) / Float64(z / Float64(y - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z - y) * ((x - t) / (a - z))); tmp = 0.0; if ((t_1 <= -4e-263) || ~((t_1 <= 5e-285))) tmp = t_1; else tmp = t - ((t - x) / (z / (y - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z - y), $MachinePrecision] * N[(N[(x - t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -4e-263], N[Not[LessEqual[t$95$1, 5e-285]], $MachinePrecision]], t$95$1, N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - y\right) \cdot \frac{x - t}{a - z}\\
\mathbf{if}\;t_1 \leq -4 \cdot 10^{-263} \lor \neg \left(t_1 \leq 5 \cdot 10^{-285}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t - \frac{t - x}{\frac{z}{y - a}}\\
\end{array}
\end{array}
if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4e-263 or 5.00000000000000018e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) Initial program 91.3%
if -4e-263 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.00000000000000018e-285Initial program 3.3%
Taylor expanded in z around inf 74.6%
associate--l+74.6%
associate-*r/74.6%
associate-*r/74.6%
div-sub74.6%
distribute-lft-out--74.6%
associate-*r/74.6%
mul-1-neg74.6%
unsub-neg74.6%
distribute-rgt-out--75.2%
associate-/l*96.4%
Simplified96.4%
Final simplification91.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= t -4.5e-11)
t_2
(if (<= t -5.8e-92)
t_1
(if (<= t -1.35e-153)
(* y (/ (- t x) (- a z)))
(if (<= t -8.2e-251)
t_1
(if (<= t -2.75e-283)
(* x (- (/ y z) (/ a z)))
(if (<= t 1.6e-60) 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 * ((y - z) / (a - z));
double tmp;
if (t <= -4.5e-11) {
tmp = t_2;
} else if (t <= -5.8e-92) {
tmp = t_1;
} else if (t <= -1.35e-153) {
tmp = y * ((t - x) / (a - z));
} else if (t <= -8.2e-251) {
tmp = t_1;
} else if (t <= -2.75e-283) {
tmp = x * ((y / z) - (a / z));
} else if (t <= 1.6e-60) {
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 * ((y - z) / (a - z))
if (t <= (-4.5d-11)) then
tmp = t_2
else if (t <= (-5.8d-92)) then
tmp = t_1
else if (t <= (-1.35d-153)) then
tmp = y * ((t - x) / (a - z))
else if (t <= (-8.2d-251)) then
tmp = t_1
else if (t <= (-2.75d-283)) then
tmp = x * ((y / z) - (a / z))
else if (t <= 1.6d-60) 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 * ((y - z) / (a - z));
double tmp;
if (t <= -4.5e-11) {
tmp = t_2;
} else if (t <= -5.8e-92) {
tmp = t_1;
} else if (t <= -1.35e-153) {
tmp = y * ((t - x) / (a - z));
} else if (t <= -8.2e-251) {
tmp = t_1;
} else if (t <= -2.75e-283) {
tmp = x * ((y / z) - (a / z));
} else if (t <= 1.6e-60) {
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 * ((y - z) / (a - z)) tmp = 0 if t <= -4.5e-11: tmp = t_2 elif t <= -5.8e-92: tmp = t_1 elif t <= -1.35e-153: tmp = y * ((t - x) / (a - z)) elif t <= -8.2e-251: tmp = t_1 elif t <= -2.75e-283: tmp = x * ((y / z) - (a / z)) elif t <= 1.6e-60: 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(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (t <= -4.5e-11) tmp = t_2; elseif (t <= -5.8e-92) tmp = t_1; elseif (t <= -1.35e-153) tmp = Float64(y * Float64(Float64(t - x) / Float64(a - z))); elseif (t <= -8.2e-251) tmp = t_1; elseif (t <= -2.75e-283) tmp = Float64(x * Float64(Float64(y / z) - Float64(a / z))); elseif (t <= 1.6e-60) 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 * ((y - z) / (a - z)); tmp = 0.0; if (t <= -4.5e-11) tmp = t_2; elseif (t <= -5.8e-92) tmp = t_1; elseif (t <= -1.35e-153) tmp = y * ((t - x) / (a - z)); elseif (t <= -8.2e-251) tmp = t_1; elseif (t <= -2.75e-283) tmp = x * ((y / z) - (a / z)); elseif (t <= 1.6e-60) 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[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.5e-11], t$95$2, If[LessEqual[t, -5.8e-92], t$95$1, If[LessEqual[t, -1.35e-153], N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8.2e-251], t$95$1, If[LessEqual[t, -2.75e-283], N[(x * N[(N[(y / z), $MachinePrecision] - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e-60], 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 \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{-11}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-153}:\\
\;\;\;\;y \cdot \frac{t - x}{a - z}\\
\mathbf{elif}\;t \leq -8.2 \cdot 10^{-251}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.75 \cdot 10^{-283}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - \frac{a}{z}\right)\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-60}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -4.5e-11 or 1.6000000000000001e-60 < t Initial program 85.7%
Taylor expanded in x around 0 47.1%
associate-*r/68.7%
Simplified68.7%
if -4.5e-11 < t < -5.79999999999999969e-92 or -1.35000000000000005e-153 < t < -8.1999999999999997e-251 or -2.74999999999999976e-283 < t < 1.6000000000000001e-60Initial program 79.2%
Taylor expanded in z around 0 71.0%
Taylor expanded in x around inf 71.2%
mul-1-neg71.2%
unsub-neg71.2%
Simplified71.2%
if -5.79999999999999969e-92 < t < -1.35000000000000005e-153Initial program 90.1%
Taylor expanded in y around inf 80.4%
div-sub80.4%
Simplified80.4%
if -8.1999999999999997e-251 < t < -2.74999999999999976e-283Initial program 17.7%
+-commutative17.7%
remove-double-neg17.7%
unsub-neg17.7%
associate-*r/18.7%
associate-/l*17.3%
associate-/r/18.7%
fma-neg18.7%
remove-double-neg18.7%
Simplified18.7%
Taylor expanded in z around -inf 86.0%
Taylor expanded in x around inf 73.3%
Final simplification70.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ t (- a z)))))
(t_2 (- t (/ (- t x) (/ z (- y a))))))
(if (<= z -4.2e+146)
t_2
(if (<= z -5.4e-210)
t_1
(if (<= z 2.45e-60)
(+ x (/ (- t x) (/ a (- y z))))
(if (<= z 3.7e+127) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (t / (a - z)));
double t_2 = t - ((t - x) / (z / (y - a)));
double tmp;
if (z <= -4.2e+146) {
tmp = t_2;
} else if (z <= -5.4e-210) {
tmp = t_1;
} else if (z <= 2.45e-60) {
tmp = x + ((t - x) / (a / (y - z)));
} else if (z <= 3.7e+127) {
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 - z) * (t / (a - z)))
t_2 = t - ((t - x) / (z / (y - a)))
if (z <= (-4.2d+146)) then
tmp = t_2
else if (z <= (-5.4d-210)) then
tmp = t_1
else if (z <= 2.45d-60) then
tmp = x + ((t - x) / (a / (y - z)))
else if (z <= 3.7d+127) 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 - z) * (t / (a - z)));
double t_2 = t - ((t - x) / (z / (y - a)));
double tmp;
if (z <= -4.2e+146) {
tmp = t_2;
} else if (z <= -5.4e-210) {
tmp = t_1;
} else if (z <= 2.45e-60) {
tmp = x + ((t - x) / (a / (y - z)));
} else if (z <= 3.7e+127) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * (t / (a - z))) t_2 = t - ((t - x) / (z / (y - a))) tmp = 0 if z <= -4.2e+146: tmp = t_2 elif z <= -5.4e-210: tmp = t_1 elif z <= 2.45e-60: tmp = x + ((t - x) / (a / (y - z))) elif z <= 3.7e+127: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))) t_2 = Float64(t - Float64(Float64(t - x) / Float64(z / Float64(y - a)))) tmp = 0.0 if (z <= -4.2e+146) tmp = t_2; elseif (z <= -5.4e-210) tmp = t_1; elseif (z <= 2.45e-60) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z)))); elseif (z <= 3.7e+127) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * (t / (a - z))); t_2 = t - ((t - x) / (z / (y - a))); tmp = 0.0; if (z <= -4.2e+146) tmp = t_2; elseif (z <= -5.4e-210) tmp = t_1; elseif (z <= 2.45e-60) tmp = x + ((t - x) / (a / (y - z))); elseif (z <= 3.7e+127) 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[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(N[(t - x), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e+146], t$95$2, If[LessEqual[z, -5.4e-210], t$95$1, If[LessEqual[z, 2.45e-60], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e+127], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t}{a - z}\\
t_2 := t - \frac{t - x}{\frac{z}{y - a}}\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{+146}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -5.4 \cdot 10^{-210}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-60}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+127}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if z < -4.2000000000000001e146 or 3.6999999999999998e127 < z Initial program 57.7%
Taylor expanded in z around inf 60.4%
associate--l+60.4%
associate-*r/60.4%
associate-*r/60.4%
div-sub60.4%
distribute-lft-out--60.4%
associate-*r/60.4%
mul-1-neg60.4%
unsub-neg60.4%
distribute-rgt-out--60.7%
associate-/l*87.0%
Simplified87.0%
if -4.2000000000000001e146 < z < -5.39999999999999983e-210 or 2.44999999999999994e-60 < z < 3.6999999999999998e127Initial program 90.6%
Taylor expanded in t around inf 80.5%
if -5.39999999999999983e-210 < z < 2.44999999999999994e-60Initial program 88.5%
Taylor expanded in a around inf 75.6%
associate-/l*84.9%
Simplified84.9%
Final simplification83.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (/ (- t x) (/ z (- y a))))))
(if (<= z -4e+146)
t_1
(if (<= z -8.8e-210)
(+ x (* (- y z) (* t (/ 1.0 (- a z)))))
(if (<= z 1e-57)
(+ x (/ (- t x) (/ a (- y z))))
(if (<= z 1.45e+129) (+ x (* (- y z) (/ t (- a z)))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - ((t - x) / (z / (y - a)));
double tmp;
if (z <= -4e+146) {
tmp = t_1;
} else if (z <= -8.8e-210) {
tmp = x + ((y - z) * (t * (1.0 / (a - z))));
} else if (z <= 1e-57) {
tmp = x + ((t - x) / (a / (y - z)));
} else if (z <= 1.45e+129) {
tmp = x + ((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 = t - ((t - x) / (z / (y - a)))
if (z <= (-4d+146)) then
tmp = t_1
else if (z <= (-8.8d-210)) then
tmp = x + ((y - z) * (t * (1.0d0 / (a - z))))
else if (z <= 1d-57) then
tmp = x + ((t - x) / (a / (y - z)))
else if (z <= 1.45d+129) then
tmp = x + ((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 = t - ((t - x) / (z / (y - a)));
double tmp;
if (z <= -4e+146) {
tmp = t_1;
} else if (z <= -8.8e-210) {
tmp = x + ((y - z) * (t * (1.0 / (a - z))));
} else if (z <= 1e-57) {
tmp = x + ((t - x) / (a / (y - z)));
} else if (z <= 1.45e+129) {
tmp = x + ((y - z) * (t / (a - z)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - ((t - x) / (z / (y - a))) tmp = 0 if z <= -4e+146: tmp = t_1 elif z <= -8.8e-210: tmp = x + ((y - z) * (t * (1.0 / (a - z)))) elif z <= 1e-57: tmp = x + ((t - x) / (a / (y - z))) elif z <= 1.45e+129: tmp = x + ((y - z) * (t / (a - z))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(Float64(t - x) / Float64(z / Float64(y - a)))) tmp = 0.0 if (z <= -4e+146) tmp = t_1; elseif (z <= -8.8e-210) tmp = Float64(x + Float64(Float64(y - z) * Float64(t * Float64(1.0 / Float64(a - z))))); elseif (z <= 1e-57) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z)))); elseif (z <= 1.45e+129) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - ((t - x) / (z / (y - a))); tmp = 0.0; if (z <= -4e+146) tmp = t_1; elseif (z <= -8.8e-210) tmp = x + ((y - z) * (t * (1.0 / (a - z)))); elseif (z <= 1e-57) tmp = x + ((t - x) / (a / (y - z))); elseif (z <= 1.45e+129) tmp = x + ((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[(t - N[(N[(t - x), $MachinePrecision] / N[(z / N[(y - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4e+146], t$95$1, If[LessEqual[z, -8.8e-210], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t * N[(1.0 / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-57], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+129], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - \frac{t - x}{\frac{z}{y - a}}\\
\mathbf{if}\;z \leq -4 \cdot 10^{+146}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -8.8 \cdot 10^{-210}:\\
\;\;\;\;x + \left(y - z\right) \cdot \left(t \cdot \frac{1}{a - z}\right)\\
\mathbf{elif}\;z \leq 10^{-57}:\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{+129}:\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -3.99999999999999973e146 or 1.45000000000000001e129 < z Initial program 57.7%
Taylor expanded in z around inf 60.4%
associate--l+60.4%
associate-*r/60.4%
associate-*r/60.4%
div-sub60.4%
distribute-lft-out--60.4%
associate-*r/60.4%
mul-1-neg60.4%
unsub-neg60.4%
distribute-rgt-out--60.7%
associate-/l*87.0%
Simplified87.0%
if -3.99999999999999973e146 < z < -8.79999999999999958e-210Initial program 93.0%
Taylor expanded in t around inf 83.8%
div-inv83.8%
Applied egg-rr83.8%
if -8.79999999999999958e-210 < z < 9.99999999999999955e-58Initial program 88.5%
Taylor expanded in a around inf 75.6%
associate-/l*84.9%
Simplified84.9%
if 9.99999999999999955e-58 < z < 1.45000000000000001e129Initial program 85.2%
Taylor expanded in t around inf 73.4%
Final simplification83.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= t -3.2e-12)
t_2
(if (<= t -1.28e-250)
t_1
(if (<= t -1.45e-283) (* x (/ (- y a) z)) (if (<= t 4e-63) 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 * ((y - z) / (a - z));
double tmp;
if (t <= -3.2e-12) {
tmp = t_2;
} else if (t <= -1.28e-250) {
tmp = t_1;
} else if (t <= -1.45e-283) {
tmp = x * ((y - a) / z);
} else if (t <= 4e-63) {
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 * ((y - z) / (a - z))
if (t <= (-3.2d-12)) then
tmp = t_2
else if (t <= (-1.28d-250)) then
tmp = t_1
else if (t <= (-1.45d-283)) then
tmp = x * ((y - a) / z)
else if (t <= 4d-63) 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 * ((y - z) / (a - z));
double tmp;
if (t <= -3.2e-12) {
tmp = t_2;
} else if (t <= -1.28e-250) {
tmp = t_1;
} else if (t <= -1.45e-283) {
tmp = x * ((y - a) / z);
} else if (t <= 4e-63) {
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 * ((y - z) / (a - z)) tmp = 0 if t <= -3.2e-12: tmp = t_2 elif t <= -1.28e-250: tmp = t_1 elif t <= -1.45e-283: tmp = x * ((y - a) / z) elif t <= 4e-63: 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(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (t <= -3.2e-12) tmp = t_2; elseif (t <= -1.28e-250) tmp = t_1; elseif (t <= -1.45e-283) tmp = Float64(x * Float64(Float64(y - a) / z)); elseif (t <= 4e-63) 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 * ((y - z) / (a - z)); tmp = 0.0; if (t <= -3.2e-12) tmp = t_2; elseif (t <= -1.28e-250) tmp = t_1; elseif (t <= -1.45e-283) tmp = x * ((y - a) / z); elseif (t <= 4e-63) 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[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.2e-12], t$95$2, If[LessEqual[t, -1.28e-250], t$95$1, If[LessEqual[t, -1.45e-283], N[(x * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4e-63], 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 \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{-12}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.28 \cdot 10^{-250}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-283}:\\
\;\;\;\;x \cdot \frac{y - a}{z}\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-63}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -3.2000000000000001e-12 or 4.00000000000000027e-63 < t Initial program 85.7%
Taylor expanded in x around 0 47.1%
associate-*r/68.7%
Simplified68.7%
if -3.2000000000000001e-12 < t < -1.27999999999999993e-250 or -1.44999999999999994e-283 < t < 4.00000000000000027e-63Initial program 81.3%
Taylor expanded in z around 0 66.5%
Taylor expanded in x around inf 66.5%
mul-1-neg66.5%
unsub-neg66.5%
Simplified66.5%
if -1.27999999999999993e-250 < t < -1.44999999999999994e-283Initial program 17.7%
+-commutative17.7%
remove-double-neg17.7%
unsub-neg17.7%
associate-*r/18.7%
associate-/l*17.3%
associate-/r/18.7%
fma-neg18.7%
remove-double-neg18.7%
Simplified18.7%
Taylor expanded in z around -inf 86.0%
Taylor expanded in x around inf 73.3%
div-sub73.1%
Simplified73.1%
Final simplification67.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))) (t_2 (* t (/ (- y z) (- a z)))))
(if (<= t -2e-15)
t_2
(if (<= t -3.8e-248)
t_1
(if (<= t -5.2e-283)
(* x (- (/ y z) (/ a z)))
(if (<= t 6e-64) 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 * ((y - z) / (a - z));
double tmp;
if (t <= -2e-15) {
tmp = t_2;
} else if (t <= -3.8e-248) {
tmp = t_1;
} else if (t <= -5.2e-283) {
tmp = x * ((y / z) - (a / z));
} else if (t <= 6e-64) {
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 * ((y - z) / (a - z))
if (t <= (-2d-15)) then
tmp = t_2
else if (t <= (-3.8d-248)) then
tmp = t_1
else if (t <= (-5.2d-283)) then
tmp = x * ((y / z) - (a / z))
else if (t <= 6d-64) 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 * ((y - z) / (a - z));
double tmp;
if (t <= -2e-15) {
tmp = t_2;
} else if (t <= -3.8e-248) {
tmp = t_1;
} else if (t <= -5.2e-283) {
tmp = x * ((y / z) - (a / z));
} else if (t <= 6e-64) {
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 * ((y - z) / (a - z)) tmp = 0 if t <= -2e-15: tmp = t_2 elif t <= -3.8e-248: tmp = t_1 elif t <= -5.2e-283: tmp = x * ((y / z) - (a / z)) elif t <= 6e-64: 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(Float64(y - z) / Float64(a - z))) tmp = 0.0 if (t <= -2e-15) tmp = t_2; elseif (t <= -3.8e-248) tmp = t_1; elseif (t <= -5.2e-283) tmp = Float64(x * Float64(Float64(y / z) - Float64(a / z))); elseif (t <= 6e-64) 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 * ((y - z) / (a - z)); tmp = 0.0; if (t <= -2e-15) tmp = t_2; elseif (t <= -3.8e-248) tmp = t_1; elseif (t <= -5.2e-283) tmp = x * ((y / z) - (a / z)); elseif (t <= 6e-64) 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[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-15], t$95$2, If[LessEqual[t, -3.8e-248], t$95$1, If[LessEqual[t, -5.2e-283], N[(x * N[(N[(y / z), $MachinePrecision] - N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-64], 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 \cdot \frac{y - z}{a - z}\\
\mathbf{if}\;t \leq -2 \cdot 10^{-15}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-248}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{-283}:\\
\;\;\;\;x \cdot \left(\frac{y}{z} - \frac{a}{z}\right)\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.0000000000000002e-15 or 6.0000000000000001e-64 < t Initial program 85.7%
Taylor expanded in x around 0 47.1%
associate-*r/68.7%
Simplified68.7%
if -2.0000000000000002e-15 < t < -3.7999999999999999e-248 or -5.2000000000000002e-283 < t < 6.0000000000000001e-64Initial program 81.3%
Taylor expanded in z around 0 66.5%
Taylor expanded in x around inf 66.5%
mul-1-neg66.5%
unsub-neg66.5%
Simplified66.5%
if -3.7999999999999999e-248 < t < -5.2000000000000002e-283Initial program 17.7%
+-commutative17.7%
remove-double-neg17.7%
unsub-neg17.7%
associate-*r/18.7%
associate-/l*17.3%
associate-/r/18.7%
fma-neg18.7%
remove-double-neg18.7%
Simplified18.7%
Taylor expanded in z around -inf 86.0%
Taylor expanded in x around inf 73.3%
Final simplification67.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (- y z) (/ t (- a z))))))
(if (<= a -10000.0)
t_1
(if (<= a -3.1e-131)
(+ x (/ (* y (- t x)) a))
(if (<= a 1.25e-33) (+ t (/ (- x t) (/ z y))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (t / (a - z)));
double tmp;
if (a <= -10000.0) {
tmp = t_1;
} else if (a <= -3.1e-131) {
tmp = x + ((y * (t - x)) / a);
} else if (a <= 1.25e-33) {
tmp = t + ((x - t) / (z / y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y - z) * (t / (a - z)))
if (a <= (-10000.0d0)) then
tmp = t_1
else if (a <= (-3.1d-131)) then
tmp = x + ((y * (t - x)) / a)
else if (a <= 1.25d-33) then
tmp = t + ((x - t) / (z / y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y - z) * (t / (a - z)));
double tmp;
if (a <= -10000.0) {
tmp = t_1;
} else if (a <= -3.1e-131) {
tmp = x + ((y * (t - x)) / a);
} else if (a <= 1.25e-33) {
tmp = t + ((x - t) / (z / y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y - z) * (t / (a - z))) tmp = 0 if a <= -10000.0: tmp = t_1 elif a <= -3.1e-131: tmp = x + ((y * (t - x)) / a) elif a <= 1.25e-33: tmp = t + ((x - t) / (z / y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y - z) * Float64(t / Float64(a - z)))) tmp = 0.0 if (a <= -10000.0) tmp = t_1; elseif (a <= -3.1e-131) tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / a)); elseif (a <= 1.25e-33) tmp = Float64(t + Float64(Float64(x - t) / Float64(z / y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y - z) * (t / (a - z))); tmp = 0.0; if (a <= -10000.0) tmp = t_1; elseif (a <= -3.1e-131) tmp = x + ((y * (t - x)) / a); elseif (a <= 1.25e-33) tmp = t + ((x - t) / (z / y)); 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[(t / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -10000.0], t$95$1, If[LessEqual[a, -3.1e-131], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-33], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - z\right) \cdot \frac{t}{a - z}\\
\mathbf{if}\;a \leq -10000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.1 \cdot 10^{-131}:\\
\;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-33}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -1e4 or 1.25000000000000007e-33 < a Initial program 90.5%
Taylor expanded in t around inf 78.4%
if -1e4 < a < -3.10000000000000021e-131Initial program 79.6%
Taylor expanded in z around 0 66.4%
if -3.10000000000000021e-131 < a < 1.25000000000000007e-33Initial program 69.4%
Taylor expanded in z around inf 73.3%
associate--l+73.3%
associate-*r/73.3%
associate-*r/73.3%
div-sub73.4%
distribute-lft-out--73.4%
associate-*r/73.4%
mul-1-neg73.4%
unsub-neg73.4%
distribute-rgt-out--73.4%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in y around inf 78.6%
Final simplification77.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ y a)))))
(if (<= z -3.9e+136)
t
(if (<= z -1.3e-192)
t_1
(if (<= z -4.9e-220) (* (- t x) (/ y a)) (if (<= z 3.2e+95) 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 <= -3.9e+136) {
tmp = t;
} else if (z <= -1.3e-192) {
tmp = t_1;
} else if (z <= -4.9e-220) {
tmp = (t - x) * (y / a);
} else if (z <= 3.2e+95) {
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 <= (-3.9d+136)) then
tmp = t
else if (z <= (-1.3d-192)) then
tmp = t_1
else if (z <= (-4.9d-220)) then
tmp = (t - x) * (y / a)
else if (z <= 3.2d+95) 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 <= -3.9e+136) {
tmp = t;
} else if (z <= -1.3e-192) {
tmp = t_1;
} else if (z <= -4.9e-220) {
tmp = (t - x) * (y / a);
} else if (z <= 3.2e+95) {
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 <= -3.9e+136: tmp = t elif z <= -1.3e-192: tmp = t_1 elif z <= -4.9e-220: tmp = (t - x) * (y / a) elif z <= 3.2e+95: 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 <= -3.9e+136) tmp = t; elseif (z <= -1.3e-192) tmp = t_1; elseif (z <= -4.9e-220) tmp = Float64(Float64(t - x) * Float64(y / a)); elseif (z <= 3.2e+95) 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 <= -3.9e+136) tmp = t; elseif (z <= -1.3e-192) tmp = t_1; elseif (z <= -4.9e-220) tmp = (t - x) * (y / a); elseif (z <= 3.2e+95) 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, -3.9e+136], t, If[LessEqual[z, -1.3e-192], t$95$1, If[LessEqual[z, -4.9e-220], N[(N[(t - x), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+95], t$95$1, t]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{if}\;z \leq -3.9 \cdot 10^{+136}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.3 \cdot 10^{-192}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.9 \cdot 10^{-220}:\\
\;\;\;\;\left(t - x\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+95}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.90000000000000019e136 or 3.2000000000000001e95 < z Initial program 60.0%
Taylor expanded in z around inf 48.9%
if -3.90000000000000019e136 < z < -1.3000000000000001e-192 or -4.9000000000000002e-220 < z < 3.2000000000000001e95Initial program 89.7%
Taylor expanded in z around 0 65.8%
Taylor expanded in x around inf 58.4%
mul-1-neg58.4%
unsub-neg58.4%
Simplified58.4%
if -1.3000000000000001e-192 < z < -4.9000000000000002e-220Initial program 91.3%
Taylor expanded in z around 0 57.2%
Taylor expanded in y around inf 65.7%
div-sub65.7%
associate-*r/57.2%
associate-/l*65.7%
associate-/r/65.7%
Simplified65.7%
Final simplification56.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.9e-131) (not (<= a 7.1e-34))) (+ x (/ (- t x) (/ a (- y z)))) (+ t (/ (- x t) (/ z y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.9e-131) || !(a <= 7.1e-34)) {
tmp = x + ((t - x) / (a / (y - z)));
} 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 ((a <= (-2.9d-131)) .or. (.not. (a <= 7.1d-34))) then
tmp = x + ((t - x) / (a / (y - z)))
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 ((a <= -2.9e-131) || !(a <= 7.1e-34)) {
tmp = x + ((t - x) / (a / (y - z)));
} else {
tmp = t + ((x - t) / (z / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.9e-131) or not (a <= 7.1e-34): tmp = x + ((t - x) / (a / (y - z))) else: tmp = t + ((x - t) / (z / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.9e-131) || !(a <= 7.1e-34)) tmp = Float64(x + Float64(Float64(t - x) / Float64(a / Float64(y - z)))); 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 ((a <= -2.9e-131) || ~((a <= 7.1e-34))) tmp = x + ((t - x) / (a / (y - z))); else tmp = t + ((x - t) / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.9e-131], N[Not[LessEqual[a, 7.1e-34]], $MachinePrecision]], N[(x + N[(N[(t - x), $MachinePrecision] / N[(a / N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{-131} \lor \neg \left(a \leq 7.1 \cdot 10^{-34}\right):\\
\;\;\;\;x + \frac{t - x}{\frac{a}{y - z}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\
\end{array}
\end{array}
if a < -2.9000000000000002e-131 or 7.10000000000000036e-34 < a Initial program 88.8%
Taylor expanded in a around inf 69.2%
associate-/l*80.2%
Simplified80.2%
if -2.9000000000000002e-131 < a < 7.10000000000000036e-34Initial program 69.4%
Taylor expanded in z around inf 73.3%
associate--l+73.3%
associate-*r/73.3%
associate-*r/73.3%
div-sub73.4%
distribute-lft-out--73.4%
associate-*r/73.4%
mul-1-neg73.4%
unsub-neg73.4%
distribute-rgt-out--73.4%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in y around inf 78.6%
Final simplification79.6%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.5e+141)
t
(if (<= z -1e-213)
(+ x (* y (/ t a)))
(if (<= z 2.05e+95) (* x (- 1.0 (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.5e+141) {
tmp = t;
} else if (z <= -1e-213) {
tmp = x + (y * (t / a));
} else if (z <= 2.05e+95) {
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 <= (-1.5d+141)) then
tmp = t
else if (z <= (-1d-213)) then
tmp = x + (y * (t / a))
else if (z <= 2.05d+95) 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 <= -1.5e+141) {
tmp = t;
} else if (z <= -1e-213) {
tmp = x + (y * (t / a));
} else if (z <= 2.05e+95) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.5e+141: tmp = t elif z <= -1e-213: tmp = x + (y * (t / a)) elif z <= 2.05e+95: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.5e+141) tmp = t; elseif (z <= -1e-213) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 2.05e+95) 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 <= -1.5e+141) tmp = t; elseif (z <= -1e-213) tmp = x + (y * (t / a)); elseif (z <= 2.05e+95) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.5e+141], t, If[LessEqual[z, -1e-213], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.05e+95], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+141}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1 \cdot 10^{-213}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 2.05 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.4999999999999999e141 or 2.04999999999999993e95 < z Initial program 60.0%
Taylor expanded in z around inf 48.9%
if -1.4999999999999999e141 < z < -9.9999999999999995e-214Initial program 93.1%
Taylor expanded in t around inf 84.0%
Taylor expanded in z around 0 59.0%
associate-/l*61.4%
Simplified61.4%
associate-/r/61.5%
Applied egg-rr61.5%
if -9.9999999999999995e-214 < z < 2.04999999999999993e95Initial program 87.8%
Taylor expanded in z around 0 66.6%
Taylor expanded in x around inf 58.8%
mul-1-neg58.8%
unsub-neg58.8%
Simplified58.8%
Final simplification57.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.1e+136)
t
(if (<= z -1.55e-302)
(+ x (/ t (/ a y)))
(if (<= z 4.5e+95) (* x (- 1.0 (/ y a))) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.1e+136) {
tmp = t;
} else if (z <= -1.55e-302) {
tmp = x + (t / (a / y));
} else if (z <= 4.5e+95) {
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 <= (-1.1d+136)) then
tmp = t
else if (z <= (-1.55d-302)) then
tmp = x + (t / (a / y))
else if (z <= 4.5d+95) 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 <= -1.1e+136) {
tmp = t;
} else if (z <= -1.55e-302) {
tmp = x + (t / (a / y));
} else if (z <= 4.5e+95) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.1e+136: tmp = t elif z <= -1.55e-302: tmp = x + (t / (a / y)) elif z <= 4.5e+95: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.1e+136) tmp = t; elseif (z <= -1.55e-302) tmp = Float64(x + Float64(t / Float64(a / y))); elseif (z <= 4.5e+95) 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 <= -1.1e+136) tmp = t; elseif (z <= -1.55e-302) tmp = x + (t / (a / y)); elseif (z <= 4.5e+95) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.1e+136], t, If[LessEqual[z, -1.55e-302], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.5e+95], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+136}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-302}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+95}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -1.1e136 or 4.50000000000000017e95 < z Initial program 60.0%
Taylor expanded in z around inf 48.9%
if -1.1e136 < z < -1.54999999999999992e-302Initial program 89.7%
Taylor expanded in t around inf 80.1%
Taylor expanded in z around 0 62.9%
associate-/l*65.7%
Simplified65.7%
if -1.54999999999999992e-302 < z < 4.50000000000000017e95Initial program 89.9%
Taylor expanded in z around 0 61.0%
Taylor expanded in x around inf 55.4%
mul-1-neg55.4%
unsub-neg55.4%
Simplified55.4%
Final simplification57.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3e+80) (not (<= a 1.08e-8))) (+ x (* (- y z) (/ t a))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e+80) || !(a <= 1.08e-8)) {
tmp = x + ((y - z) * (t / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3d+80)) .or. (.not. (a <= 1.08d-8))) then
tmp = x + ((y - z) * (t / a))
else
tmp = t * ((y - z) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e+80) || !(a <= 1.08e-8)) {
tmp = x + ((y - z) * (t / a));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3e+80) or not (a <= 1.08e-8): tmp = x + ((y - z) * (t / a)) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3e+80) || !(a <= 1.08e-8)) tmp = Float64(x + Float64(Float64(y - z) * Float64(t / a))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3e+80) || ~((a <= 1.08e-8))) tmp = x + ((y - z) * (t / a)); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3e+80], N[Not[LessEqual[a, 1.08e-8]], $MachinePrecision]], N[(x + N[(N[(y - z), $MachinePrecision] * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{+80} \lor \neg \left(a \leq 1.08 \cdot 10^{-8}\right):\\
\;\;\;\;x + \left(y - z\right) \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if a < -2.99999999999999987e80 or 1.0800000000000001e-8 < a Initial program 89.1%
Taylor expanded in t around inf 78.5%
Taylor expanded in a around inf 76.0%
if -2.99999999999999987e80 < a < 1.0800000000000001e-8Initial program 75.5%
Taylor expanded in x around 0 45.3%
associate-*r/60.8%
Simplified60.8%
Final simplification68.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.15e-83) (not (<= a 2e-54))) (+ x (/ y (/ a (- t x)))) (* t (/ (- y z) (- a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.15e-83) || !(a <= 2e-54)) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.15d-83)) .or. (.not. (a <= 2d-54))) then
tmp = x + (y / (a / (t - x)))
else
tmp = t * ((y - z) / (a - z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.15e-83) || !(a <= 2e-54)) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t * ((y - z) / (a - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.15e-83) or not (a <= 2e-54): tmp = x + (y / (a / (t - x))) else: tmp = t * ((y - z) / (a - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.15e-83) || !(a <= 2e-54)) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); else tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.15e-83) || ~((a <= 2e-54))) tmp = x + (y / (a / (t - x))); else tmp = t * ((y - z) / (a - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.15e-83], N[Not[LessEqual[a, 2e-54]], $MachinePrecision]], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.15 \cdot 10^{-83} \lor \neg \left(a \leq 2 \cdot 10^{-54}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y - z}{a - z}\\
\end{array}
\end{array}
if a < -1.14999999999999995e-83 or 2.0000000000000001e-54 < a Initial program 89.5%
Taylor expanded in z around 0 64.8%
associate-/l*73.0%
Simplified73.0%
if -1.14999999999999995e-83 < a < 2.0000000000000001e-54Initial program 69.1%
Taylor expanded in x around 0 50.3%
associate-*r/64.3%
Simplified64.3%
Final simplification69.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.1e-131) (not (<= a 7.7e-34))) (+ x (/ y (/ a (- t x)))) (+ t (/ (- x t) (/ z y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.1e-131) || !(a <= 7.7e-34)) {
tmp = x + (y / (a / (t - x)));
} 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 ((a <= (-3.1d-131)) .or. (.not. (a <= 7.7d-34))) then
tmp = x + (y / (a / (t - x)))
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 ((a <= -3.1e-131) || !(a <= 7.7e-34)) {
tmp = x + (y / (a / (t - x)));
} else {
tmp = t + ((x - t) / (z / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.1e-131) or not (a <= 7.7e-34): tmp = x + (y / (a / (t - x))) else: tmp = t + ((x - t) / (z / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.1e-131) || !(a <= 7.7e-34)) tmp = Float64(x + Float64(y / Float64(a / Float64(t - x)))); 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 ((a <= -3.1e-131) || ~((a <= 7.7e-34))) tmp = x + (y / (a / (t - x))); else tmp = t + ((x - t) / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.1e-131], N[Not[LessEqual[a, 7.7e-34]], $MachinePrecision]], N[(x + N[(y / N[(a / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(N[(x - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{-131} \lor \neg \left(a \leq 7.7 \cdot 10^{-34}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{t - x}}\\
\mathbf{else}:\\
\;\;\;\;t + \frac{x - t}{\frac{z}{y}}\\
\end{array}
\end{array}
if a < -3.10000000000000021e-131 or 7.7e-34 < a Initial program 88.8%
Taylor expanded in z around 0 64.6%
associate-/l*72.5%
Simplified72.5%
if -3.10000000000000021e-131 < a < 7.7e-34Initial program 69.4%
Taylor expanded in z around inf 73.3%
associate--l+73.3%
associate-*r/73.3%
associate-*r/73.3%
div-sub73.4%
distribute-lft-out--73.4%
associate-*r/73.4%
mul-1-neg73.4%
unsub-neg73.4%
distribute-rgt-out--73.4%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in y around inf 78.6%
Final simplification74.6%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.2e+138) t (if (<= z 1.7e+97) (* x (- 1.0 (/ y a))) t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+138) {
tmp = t;
} else if (z <= 1.7e+97) {
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 <= (-3.2d+138)) then
tmp = t
else if (z <= 1.7d+97) 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 <= -3.2e+138) {
tmp = t;
} else if (z <= 1.7e+97) {
tmp = x * (1.0 - (y / a));
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+138: tmp = t elif z <= 1.7e+97: tmp = x * (1.0 - (y / a)) else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+138) tmp = t; elseif (z <= 1.7e+97) 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 <= -3.2e+138) tmp = t; elseif (z <= 1.7e+97) tmp = x * (1.0 - (y / a)); else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+138], t, If[LessEqual[z, 1.7e+97], N[(x * N[(1.0 - N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+138}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{+97}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -3.2000000000000001e138 or 1.70000000000000005e97 < z Initial program 60.0%
Taylor expanded in z around inf 48.9%
if -3.2000000000000001e138 < z < 1.70000000000000005e97Initial program 89.8%
Taylor expanded in z around 0 65.3%
Taylor expanded in x around inf 56.7%
mul-1-neg56.7%
unsub-neg56.7%
Simplified56.7%
Final simplification54.7%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.6e+58) t (if (<= z 2.2e+96) x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+58) {
tmp = t;
} else if (z <= 2.2e+96) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.6d+58)) then
tmp = t
else if (z <= 2.2d+96) then
tmp = x
else
tmp = t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.6e+58) {
tmp = t;
} else if (z <= 2.2e+96) {
tmp = x;
} else {
tmp = t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.6e+58: tmp = t elif z <= 2.2e+96: tmp = x else: tmp = t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.6e+58) tmp = t; elseif (z <= 2.2e+96) tmp = x; else tmp = t; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.6e+58) tmp = t; elseif (z <= 2.2e+96) tmp = x; else tmp = t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.6e+58], t, If[LessEqual[z, 2.2e+96], x, t]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+58}:\\
\;\;\;\;t\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{+96}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\\
\end{array}
\end{array}
if z < -2.59999999999999988e58 or 2.1999999999999999e96 < z Initial program 64.5%
Taylor expanded in z around inf 45.8%
if -2.59999999999999988e58 < z < 2.1999999999999999e96Initial program 90.1%
Taylor expanded in a around inf 40.0%
Final simplification41.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 82.0%
Taylor expanded in z around inf 19.8%
Final simplification19.8%
herbie shell --seed 2023293
(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)))))