
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* (- y x) (- z t)) (- a t))))
double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - 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 = x + (((y - x) * (z - t)) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (((y - x) * (z - t)) / (a - t));
}
def code(x, y, z, t, a): return x + (((y - x) * (z - t)) / (a - t))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = x + (((y - x) * (z - t)) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (or (<= t_1 -5e-260) (not (<= t_1 0.0)))
(fma (- y x) (/ (- z t) (- a t)) x)
(- y (/ (* (- y x) (- z a)) t)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if ((t_1 <= -5e-260) || !(t_1 <= 0.0)) {
tmp = fma((y - x), ((z - t) / (a - t)), x);
} else {
tmp = y - (((y - x) * (z - a)) / t);
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if ((t_1 <= -5e-260) || !(t_1 <= 0.0)) tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); else tmp = Float64(y - Float64(Float64(Float64(y - x) * Float64(z - a)) / t)); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-260], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(y - N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-260} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.0000000000000003e-260 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 69.6%
+-commutative69.6%
associate-/l*90.6%
fma-define90.6%
Simplified90.6%
if -5.0000000000000003e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 9.5%
+-commutative9.5%
associate-/l*9.4%
fma-define9.5%
Simplified9.5%
clear-num9.5%
inv-pow9.5%
Applied egg-rr9.5%
unpow-19.5%
Simplified9.5%
Taylor expanded in t around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.9%
mul-1-neg99.9%
distribute-lft-out--99.9%
associate-*r/99.9%
mul-1-neg99.9%
distribute-rgt-out--100.0%
Simplified100.0%
Final simplification91.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* (- z a) (/ (- x y) t))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -5e-260)
t_2
(if (<= t_2 0.0)
(- y (/ (* (- y x) (- z a)) t))
(if (<= t_2 4e+295)
(+ x (/ -1.0 (/ (- a t) (* (- y x) (- t z)))))
t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + ((z - a) * ((x - y) / t));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -5e-260) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y - (((y - x) * (z - a)) / t);
} else if (t_2 <= 4e+295) {
tmp = x + (-1.0 / ((a - t) / ((y - x) * (t - z))));
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y + ((z - a) * ((x - y) / t));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -5e-260) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y - (((y - x) * (z - a)) / t);
} else if (t_2 <= 4e+295) {
tmp = x + (-1.0 / ((a - t) / ((y - x) * (t - z))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + ((z - a) * ((x - y) / t)) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -5e-260: tmp = t_2 elif t_2 <= 0.0: tmp = y - (((y - x) * (z - a)) / t) elif t_2 <= 4e+295: tmp = x + (-1.0 / ((a - t) / ((y - x) * (t - z)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -5e-260) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y - Float64(Float64(Float64(y - x) * Float64(z - a)) / t)); elseif (t_2 <= 4e+295) tmp = Float64(x + Float64(-1.0 / Float64(Float64(a - t) / Float64(Float64(y - x) * Float64(t - z))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + ((z - a) * ((x - y) / t)); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -5e-260) tmp = t_2; elseif (t_2 <= 0.0) tmp = y - (((y - x) * (z - a)) / t); elseif (t_2 <= 4e+295) tmp = x + (-1.0 / ((a - t) / ((y - x) * (t - z)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-260], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y - N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+295], N[(x + N[(-1.0 / N[(N[(a - t), $MachinePrecision] / N[(N[(y - x), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(z - a\right) \cdot \frac{x - y}{t}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-260}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+295}:\\
\;\;\;\;x + \frac{-1}{\frac{a - t}{\left(y - x\right) \cdot \left(t - z\right)}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 3.9999999999999999e295 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 37.3%
Taylor expanded in t around inf 46.1%
associate--l+46.1%
distribute-lft-out--46.1%
div-sub50.8%
mul-1-neg50.8%
unsub-neg50.8%
div-sub46.1%
associate-/l*59.6%
associate-/l*60.6%
distribute-rgt-out--69.4%
Simplified69.4%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.0000000000000003e-260Initial program 95.9%
if -5.0000000000000003e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 9.5%
+-commutative9.5%
associate-/l*9.4%
fma-define9.5%
Simplified9.5%
clear-num9.5%
inv-pow9.5%
Applied egg-rr9.5%
unpow-19.5%
Simplified9.5%
Taylor expanded in t around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.9%
mul-1-neg99.9%
distribute-lft-out--99.9%
associate-*r/99.9%
mul-1-neg99.9%
distribute-rgt-out--100.0%
Simplified100.0%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 3.9999999999999999e295Initial program 94.4%
clear-num94.4%
inv-pow94.4%
*-commutative94.4%
associate-/r*93.5%
Applied egg-rr93.5%
unpow-193.5%
associate-/l/94.4%
*-commutative94.4%
Simplified94.4%
Final simplification84.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_1 (- INFINITY))
(+ x (* x (* (/ (- z t) (- a t)) (+ -1.0 (/ y x)))))
(if (<= t_1 -5e-260)
t_1
(if (<= t_1 0.0)
(- y (/ (* (- y x) (- z a)) t))
(if (<= t_1 4e+295)
(+ x (/ -1.0 (/ (- a t) (* (- y x) (- t z)))))
(+ y (* (- z a) (/ (- x y) t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x + (x * (((z - t) / (a - t)) * (-1.0 + (y / x))));
} else if (t_1 <= -5e-260) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = y - (((y - x) * (z - a)) / t);
} else if (t_1 <= 4e+295) {
tmp = x + (-1.0 / ((a - t) / ((y - x) * (t - z))));
} else {
tmp = y + ((z - a) * ((x - y) / t));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x + (x * (((z - t) / (a - t)) * (-1.0 + (y / x))));
} else if (t_1 <= -5e-260) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = y - (((y - x) * (z - a)) / t);
} else if (t_1 <= 4e+295) {
tmp = x + (-1.0 / ((a - t) / ((y - x) * (t - z))));
} else {
tmp = y + ((z - a) * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_1 <= -math.inf: tmp = x + (x * (((z - t) / (a - t)) * (-1.0 + (y / x)))) elif t_1 <= -5e-260: tmp = t_1 elif t_1 <= 0.0: tmp = y - (((y - x) * (z - a)) / t) elif t_1 <= 4e+295: tmp = x + (-1.0 / ((a - t) / ((y - x) * (t - z)))) else: tmp = y + ((z - a) * ((x - y) / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x + Float64(x * Float64(Float64(Float64(z - t) / Float64(a - t)) * Float64(-1.0 + Float64(y / x))))); elseif (t_1 <= -5e-260) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(y - Float64(Float64(Float64(y - x) * Float64(z - a)) / t)); elseif (t_1 <= 4e+295) tmp = Float64(x + Float64(-1.0 / Float64(Float64(a - t) / Float64(Float64(y - x) * Float64(t - z))))); else tmp = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_1 <= -Inf) tmp = x + (x * (((z - t) / (a - t)) * (-1.0 + (y / x)))); elseif (t_1 <= -5e-260) tmp = t_1; elseif (t_1 <= 0.0) tmp = y - (((y - x) * (z - a)) / t); elseif (t_1 <= 4e+295) tmp = x + (-1.0 / ((a - t) / ((y - x) * (t - z)))); else tmp = y + ((z - a) * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(x * N[(N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * N[(-1.0 + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-260], t$95$1, If[LessEqual[t$95$1, 0.0], N[(y - N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+295], N[(x + N[(-1.0 / N[(N[(a - t), $MachinePrecision] / N[(N[(y - x), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;x + x \cdot \left(\frac{z - t}{a - t} \cdot \left(-1 + \frac{y}{x}\right)\right)\\
\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-260}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\\
\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{+295}:\\
\;\;\;\;x + \frac{-1}{\frac{a - t}{\left(y - x\right) \cdot \left(t - z\right)}}\\
\mathbf{else}:\\
\;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0Initial program 37.7%
Taylor expanded in x around inf 41.0%
times-frac68.3%
distribute-rgt-out74.9%
Simplified74.9%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.0000000000000003e-260Initial program 95.9%
if -5.0000000000000003e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 9.5%
+-commutative9.5%
associate-/l*9.4%
fma-define9.5%
Simplified9.5%
clear-num9.5%
inv-pow9.5%
Applied egg-rr9.5%
unpow-19.5%
Simplified9.5%
Taylor expanded in t around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.9%
mul-1-neg99.9%
distribute-lft-out--99.9%
associate-*r/99.9%
mul-1-neg99.9%
distribute-rgt-out--100.0%
Simplified100.0%
if 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 3.9999999999999999e295Initial program 94.4%
clear-num94.4%
inv-pow94.4%
*-commutative94.4%
associate-/r*93.5%
Applied egg-rr93.5%
unpow-193.5%
associate-/l/94.4%
*-commutative94.4%
Simplified94.4%
if 3.9999999999999999e295 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 37.0%
Taylor expanded in t around inf 52.1%
associate--l+52.1%
distribute-lft-out--52.1%
div-sub55.5%
mul-1-neg55.5%
unsub-neg55.5%
div-sub52.1%
associate-/l*68.3%
associate-/l*68.2%
distribute-rgt-out--73.7%
Simplified73.7%
Final simplification86.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (* (- z a) (/ (- x y) t))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -5e-260)
t_2
(if (<= t_2 0.0)
(- y (/ (* (- y x) (- z a)) t))
(if (<= t_2 4e+295) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + ((z - a) * ((x - y) / t));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -5e-260) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y - (((y - x) * (z - a)) / t);
} else if (t_2 <= 4e+295) {
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 = y + ((z - a) * ((x - y) / t));
double t_2 = x + (((y - x) * (z - t)) / (a - t));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -5e-260) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y - (((y - x) * (z - a)) / t);
} else if (t_2 <= 4e+295) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + ((z - a) * ((x - y) / t)) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -5e-260: tmp = t_2 elif t_2 <= 0.0: tmp = y - (((y - x) * (z - a)) / t) elif t_2 <= 4e+295: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t))) t_2 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_1; elseif (t_2 <= -5e-260) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y - Float64(Float64(Float64(y - x) * Float64(z - a)) / t)); elseif (t_2 <= 4e+295) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + ((z - a) * ((x - y) / t)); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -5e-260) tmp = t_2; elseif (t_2 <= 0.0) tmp = y - (((y - x) * (z - a)) / t); elseif (t_2 <= 4e+295) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -5e-260], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y - N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e+295], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(z - a\right) \cdot \frac{x - y}{t}\\
t_2 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-260}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+295}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -inf.0 or 3.9999999999999999e295 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 37.3%
Taylor expanded in t around inf 46.1%
associate--l+46.1%
distribute-lft-out--46.1%
div-sub50.8%
mul-1-neg50.8%
unsub-neg50.8%
div-sub46.1%
associate-/l*59.6%
associate-/l*60.6%
distribute-rgt-out--69.4%
Simplified69.4%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -5.0000000000000003e-260 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 3.9999999999999999e295Initial program 95.0%
if -5.0000000000000003e-260 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 9.5%
+-commutative9.5%
associate-/l*9.4%
fma-define9.5%
Simplified9.5%
clear-num9.5%
inv-pow9.5%
Applied egg-rr9.5%
unpow-19.5%
Simplified9.5%
Taylor expanded in t around inf 99.8%
associate--l+99.8%
associate-*r/99.8%
associate-*r/99.8%
mul-1-neg99.8%
div-sub99.9%
mul-1-neg99.9%
distribute-lft-out--99.9%
associate-*r/99.9%
mul-1-neg99.9%
distribute-rgt-out--100.0%
Simplified100.0%
Final simplification84.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* t (/ y a)))))
(if (<= t -2.3e+153)
y
(if (<= t -8.6e+53)
t_1
(if (<= t -2.95e+51)
(+ x y)
(if (<= t -1.6e-187)
(+ x (* y (/ z a)))
(if (<= t -1.22e-299)
(* z (/ (- y x) a))
(if (<= t 1.66e+24)
(* x (- 1.0 (/ z a)))
(if (<= t 7.5e+113) t_1 y)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (t * (y / a));
double tmp;
if (t <= -2.3e+153) {
tmp = y;
} else if (t <= -8.6e+53) {
tmp = t_1;
} else if (t <= -2.95e+51) {
tmp = x + y;
} else if (t <= -1.6e-187) {
tmp = x + (y * (z / a));
} else if (t <= -1.22e-299) {
tmp = z * ((y - x) / a);
} else if (t <= 1.66e+24) {
tmp = x * (1.0 - (z / a));
} else if (t <= 7.5e+113) {
tmp = t_1;
} else {
tmp = 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 - (t * (y / a))
if (t <= (-2.3d+153)) then
tmp = y
else if (t <= (-8.6d+53)) then
tmp = t_1
else if (t <= (-2.95d+51)) then
tmp = x + y
else if (t <= (-1.6d-187)) then
tmp = x + (y * (z / a))
else if (t <= (-1.22d-299)) then
tmp = z * ((y - x) / a)
else if (t <= 1.66d+24) then
tmp = x * (1.0d0 - (z / a))
else if (t <= 7.5d+113) then
tmp = t_1
else
tmp = 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 - (t * (y / a));
double tmp;
if (t <= -2.3e+153) {
tmp = y;
} else if (t <= -8.6e+53) {
tmp = t_1;
} else if (t <= -2.95e+51) {
tmp = x + y;
} else if (t <= -1.6e-187) {
tmp = x + (y * (z / a));
} else if (t <= -1.22e-299) {
tmp = z * ((y - x) / a);
} else if (t <= 1.66e+24) {
tmp = x * (1.0 - (z / a));
} else if (t <= 7.5e+113) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (t * (y / a)) tmp = 0 if t <= -2.3e+153: tmp = y elif t <= -8.6e+53: tmp = t_1 elif t <= -2.95e+51: tmp = x + y elif t <= -1.6e-187: tmp = x + (y * (z / a)) elif t <= -1.22e-299: tmp = z * ((y - x) / a) elif t <= 1.66e+24: tmp = x * (1.0 - (z / a)) elif t <= 7.5e+113: tmp = t_1 else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(t * Float64(y / a))) tmp = 0.0 if (t <= -2.3e+153) tmp = y; elseif (t <= -8.6e+53) tmp = t_1; elseif (t <= -2.95e+51) tmp = Float64(x + y); elseif (t <= -1.6e-187) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= -1.22e-299) tmp = Float64(z * Float64(Float64(y - x) / a)); elseif (t <= 1.66e+24) tmp = Float64(x * Float64(1.0 - Float64(z / a))); elseif (t <= 7.5e+113) tmp = t_1; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (t * (y / a)); tmp = 0.0; if (t <= -2.3e+153) tmp = y; elseif (t <= -8.6e+53) tmp = t_1; elseif (t <= -2.95e+51) tmp = x + y; elseif (t <= -1.6e-187) tmp = x + (y * (z / a)); elseif (t <= -1.22e-299) tmp = z * ((y - x) / a); elseif (t <= 1.66e+24) tmp = x * (1.0 - (z / a)); elseif (t <= 7.5e+113) tmp = t_1; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.3e+153], y, If[LessEqual[t, -8.6e+53], t$95$1, If[LessEqual[t, -2.95e+51], N[(x + y), $MachinePrecision], If[LessEqual[t, -1.6e-187], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.22e-299], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.66e+24], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+113], t$95$1, y]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+153}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -8.6 \cdot 10^{+53}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.95 \cdot 10^{+51}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-187}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq -1.22 \cdot 10^{-299}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 1.66 \cdot 10^{+24}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+113}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -2.3000000000000001e153 or 7.5000000000000001e113 < t Initial program 34.8%
Taylor expanded in t around inf 62.2%
if -2.3000000000000001e153 < t < -8.5999999999999995e53 or 1.65999999999999991e24 < t < 7.5000000000000001e113Initial program 58.3%
Taylor expanded in z around 0 41.6%
mul-1-neg41.6%
unsub-neg41.6%
associate-/l*65.0%
Simplified65.0%
Taylor expanded in y around inf 45.0%
associate-/l*62.0%
Simplified62.0%
Taylor expanded in t around 0 37.5%
mul-1-neg37.5%
unsub-neg37.5%
associate-/l*49.7%
Simplified49.7%
if -8.5999999999999995e53 < t < -2.94999999999999991e51Initial program 100.0%
Taylor expanded in z around 0 100.0%
mul-1-neg100.0%
unsub-neg100.0%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in y around inf 100.0%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in t around inf 54.7%
sub-neg54.7%
mul-1-neg54.7%
remove-double-neg54.7%
+-commutative54.7%
Simplified54.7%
if -2.94999999999999991e51 < t < -1.5999999999999999e-187Initial program 83.0%
Taylor expanded in t around 0 64.8%
Taylor expanded in y around inf 62.0%
associate-/l*64.6%
Simplified64.6%
if -1.5999999999999999e-187 < t < -1.22e-299Initial program 91.4%
Taylor expanded in t around 0 87.0%
Taylor expanded in z around inf 72.6%
div-sub72.6%
Simplified72.6%
if -1.22e-299 < t < 1.65999999999999991e24Initial program 88.5%
Taylor expanded in t around 0 66.3%
associate-/l*70.4%
Simplified70.4%
Taylor expanded in x around inf 58.1%
mul-1-neg58.1%
unsub-neg58.1%
Simplified58.1%
Final simplification60.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ (- y x) a)))) (t_2 (* y (/ (- z t) (- a t)))))
(if (<= t -2.8e+39)
t_2
(if (<= t 1.95e-90)
t_1
(if (<= t 1.3e-54)
t_2
(if (<= t 1.22e-27)
t_1
(if (<= t 15000.0)
(* z (/ (- y x) (- a t)))
(if (<= t 3.6e+26) (* x (- 1.0 (/ z a))) t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * ((y - x) / a));
double t_2 = y * ((z - t) / (a - t));
double tmp;
if (t <= -2.8e+39) {
tmp = t_2;
} else if (t <= 1.95e-90) {
tmp = t_1;
} else if (t <= 1.3e-54) {
tmp = t_2;
} else if (t <= 1.22e-27) {
tmp = t_1;
} else if (t <= 15000.0) {
tmp = z * ((y - x) / (a - t));
} else if (t <= 3.6e+26) {
tmp = x * (1.0 - (z / 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 + (z * ((y - x) / a))
t_2 = y * ((z - t) / (a - t))
if (t <= (-2.8d+39)) then
tmp = t_2
else if (t <= 1.95d-90) then
tmp = t_1
else if (t <= 1.3d-54) then
tmp = t_2
else if (t <= 1.22d-27) then
tmp = t_1
else if (t <= 15000.0d0) then
tmp = z * ((y - x) / (a - t))
else if (t <= 3.6d+26) then
tmp = x * (1.0d0 - (z / 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 + (z * ((y - x) / a));
double t_2 = y * ((z - t) / (a - t));
double tmp;
if (t <= -2.8e+39) {
tmp = t_2;
} else if (t <= 1.95e-90) {
tmp = t_1;
} else if (t <= 1.3e-54) {
tmp = t_2;
} else if (t <= 1.22e-27) {
tmp = t_1;
} else if (t <= 15000.0) {
tmp = z * ((y - x) / (a - t));
} else if (t <= 3.6e+26) {
tmp = x * (1.0 - (z / a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * ((y - x) / a)) t_2 = y * ((z - t) / (a - t)) tmp = 0 if t <= -2.8e+39: tmp = t_2 elif t <= 1.95e-90: tmp = t_1 elif t <= 1.3e-54: tmp = t_2 elif t <= 1.22e-27: tmp = t_1 elif t <= 15000.0: tmp = z * ((y - x) / (a - t)) elif t <= 3.6e+26: tmp = x * (1.0 - (z / a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(Float64(y - x) / a))) t_2 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (t <= -2.8e+39) tmp = t_2; elseif (t <= 1.95e-90) tmp = t_1; elseif (t <= 1.3e-54) tmp = t_2; elseif (t <= 1.22e-27) tmp = t_1; elseif (t <= 15000.0) tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t))); elseif (t <= 3.6e+26) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * ((y - x) / a)); t_2 = y * ((z - t) / (a - t)); tmp = 0.0; if (t <= -2.8e+39) tmp = t_2; elseif (t <= 1.95e-90) tmp = t_1; elseif (t <= 1.3e-54) tmp = t_2; elseif (t <= 1.22e-27) tmp = t_1; elseif (t <= 15000.0) tmp = z * ((y - x) / (a - t)); elseif (t <= 3.6e+26) tmp = x * (1.0 - (z / a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e+39], t$95$2, If[LessEqual[t, 1.95e-90], t$95$1, If[LessEqual[t, 1.3e-54], t$95$2, If[LessEqual[t, 1.22e-27], t$95$1, If[LessEqual[t, 15000.0], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.6e+26], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y - x}{a}\\
t_2 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{+39}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-54}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.22 \cdot 10^{-27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 15000:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{+26}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.80000000000000001e39 or 1.95000000000000002e-90 < t < 1.30000000000000001e-54 or 3.60000000000000024e26 < t Initial program 44.5%
+-commutative44.5%
associate-/l*77.7%
fma-define77.7%
Simplified77.7%
clear-num77.7%
inv-pow77.7%
Applied egg-rr77.7%
unpow-177.7%
Simplified77.7%
Taylor expanded in y around inf 70.1%
div-sub70.1%
Simplified70.1%
if -2.80000000000000001e39 < t < 1.95000000000000002e-90 or 1.30000000000000001e-54 < t < 1.22e-27Initial program 90.9%
Taylor expanded in t around 0 79.6%
associate-/l*81.5%
Simplified81.5%
if 1.22e-27 < t < 15000Initial program 79.4%
+-commutative79.4%
associate-/l*79.4%
fma-define79.6%
Simplified79.6%
clear-num79.6%
inv-pow79.6%
Applied egg-rr79.6%
unpow-179.6%
Simplified79.6%
Taylor expanded in z around inf 74.0%
div-sub74.2%
Simplified74.2%
if 15000 < t < 3.60000000000000024e26Initial program 63.0%
Taylor expanded in t around 0 44.3%
associate-/l*81.0%
Simplified81.0%
Taylor expanded in x around inf 81.3%
mul-1-neg81.3%
unsub-neg81.3%
Simplified81.3%
Final simplification75.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ (- y x) a)))) (t_2 (* y (/ (- z t) (- a t)))))
(if (<= t -1.55e+39)
t_2
(if (<= t 1.3e-90)
t_1
(if (<= t 1.5e-54)
t_2
(if (<= t 4.6e-26)
t_1
(if (<= t 15500.0)
(/ (* (- y x) z) (- a t))
(if (<= t 3.4e+26) (* x (- 1.0 (/ z a))) t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * ((y - x) / a));
double t_2 = y * ((z - t) / (a - t));
double tmp;
if (t <= -1.55e+39) {
tmp = t_2;
} else if (t <= 1.3e-90) {
tmp = t_1;
} else if (t <= 1.5e-54) {
tmp = t_2;
} else if (t <= 4.6e-26) {
tmp = t_1;
} else if (t <= 15500.0) {
tmp = ((y - x) * z) / (a - t);
} else if (t <= 3.4e+26) {
tmp = x * (1.0 - (z / 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 + (z * ((y - x) / a))
t_2 = y * ((z - t) / (a - t))
if (t <= (-1.55d+39)) then
tmp = t_2
else if (t <= 1.3d-90) then
tmp = t_1
else if (t <= 1.5d-54) then
tmp = t_2
else if (t <= 4.6d-26) then
tmp = t_1
else if (t <= 15500.0d0) then
tmp = ((y - x) * z) / (a - t)
else if (t <= 3.4d+26) then
tmp = x * (1.0d0 - (z / 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 + (z * ((y - x) / a));
double t_2 = y * ((z - t) / (a - t));
double tmp;
if (t <= -1.55e+39) {
tmp = t_2;
} else if (t <= 1.3e-90) {
tmp = t_1;
} else if (t <= 1.5e-54) {
tmp = t_2;
} else if (t <= 4.6e-26) {
tmp = t_1;
} else if (t <= 15500.0) {
tmp = ((y - x) * z) / (a - t);
} else if (t <= 3.4e+26) {
tmp = x * (1.0 - (z / a));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * ((y - x) / a)) t_2 = y * ((z - t) / (a - t)) tmp = 0 if t <= -1.55e+39: tmp = t_2 elif t <= 1.3e-90: tmp = t_1 elif t <= 1.5e-54: tmp = t_2 elif t <= 4.6e-26: tmp = t_1 elif t <= 15500.0: tmp = ((y - x) * z) / (a - t) elif t <= 3.4e+26: tmp = x * (1.0 - (z / a)) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(Float64(y - x) / a))) t_2 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (t <= -1.55e+39) tmp = t_2; elseif (t <= 1.3e-90) tmp = t_1; elseif (t <= 1.5e-54) tmp = t_2; elseif (t <= 4.6e-26) tmp = t_1; elseif (t <= 15500.0) tmp = Float64(Float64(Float64(y - x) * z) / Float64(a - t)); elseif (t <= 3.4e+26) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * ((y - x) / a)); t_2 = y * ((z - t) / (a - t)); tmp = 0.0; if (t <= -1.55e+39) tmp = t_2; elseif (t <= 1.3e-90) tmp = t_1; elseif (t <= 1.5e-54) tmp = t_2; elseif (t <= 4.6e-26) tmp = t_1; elseif (t <= 15500.0) tmp = ((y - x) * z) / (a - t); elseif (t <= 3.4e+26) tmp = x * (1.0 - (z / a)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.55e+39], t$95$2, If[LessEqual[t, 1.3e-90], t$95$1, If[LessEqual[t, 1.5e-54], t$95$2, If[LessEqual[t, 4.6e-26], t$95$1, If[LessEqual[t, 15500.0], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.4e+26], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y - x}{a}\\
t_2 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -1.55 \cdot 10^{+39}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-54}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-26}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 15500:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a - t}\\
\mathbf{elif}\;t \leq 3.4 \cdot 10^{+26}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.5500000000000001e39 or 1.3e-90 < t < 1.50000000000000005e-54 or 3.4000000000000003e26 < t Initial program 44.5%
+-commutative44.5%
associate-/l*77.7%
fma-define77.7%
Simplified77.7%
clear-num77.7%
inv-pow77.7%
Applied egg-rr77.7%
unpow-177.7%
Simplified77.7%
Taylor expanded in y around inf 70.1%
div-sub70.1%
Simplified70.1%
if -1.5500000000000001e39 < t < 1.3e-90 or 1.50000000000000005e-54 < t < 4.60000000000000018e-26Initial program 90.9%
Taylor expanded in t around 0 79.6%
associate-/l*81.5%
Simplified81.5%
if 4.60000000000000018e-26 < t < 15500Initial program 79.4%
+-commutative79.4%
associate-/l*79.4%
fma-define79.6%
Simplified79.6%
clear-num79.6%
inv-pow79.6%
Applied egg-rr79.6%
unpow-179.6%
Simplified79.6%
Taylor expanded in z around -inf 74.4%
if 15500 < t < 3.4000000000000003e26Initial program 63.0%
Taylor expanded in t around 0 44.3%
associate-/l*81.0%
Simplified81.0%
Taylor expanded in x around inf 81.3%
mul-1-neg81.3%
unsub-neg81.3%
Simplified81.3%
Final simplification75.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y (- t a)))))
(if (<= t -1.9e+161)
y
(if (<= t -1.55e+52)
t_1
(if (<= t -1.6e-187)
(+ x (* y (/ z a)))
(if (<= t -8e-300)
(* z (/ (- y x) a))
(if (<= t 3.5e+26)
(* x (- 1.0 (/ z a)))
(if (<= t 1.65e+119) t_1 y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / (t - a));
double tmp;
if (t <= -1.9e+161) {
tmp = y;
} else if (t <= -1.55e+52) {
tmp = t_1;
} else if (t <= -1.6e-187) {
tmp = x + (y * (z / a));
} else if (t <= -8e-300) {
tmp = z * ((y - x) / a);
} else if (t <= 3.5e+26) {
tmp = x * (1.0 - (z / a));
} else if (t <= 1.65e+119) {
tmp = t_1;
} else {
tmp = 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 = t * (y / (t - a))
if (t <= (-1.9d+161)) then
tmp = y
else if (t <= (-1.55d+52)) then
tmp = t_1
else if (t <= (-1.6d-187)) then
tmp = x + (y * (z / a))
else if (t <= (-8d-300)) then
tmp = z * ((y - x) / a)
else if (t <= 3.5d+26) then
tmp = x * (1.0d0 - (z / a))
else if (t <= 1.65d+119) then
tmp = t_1
else
tmp = y
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 / (t - a));
double tmp;
if (t <= -1.9e+161) {
tmp = y;
} else if (t <= -1.55e+52) {
tmp = t_1;
} else if (t <= -1.6e-187) {
tmp = x + (y * (z / a));
} else if (t <= -8e-300) {
tmp = z * ((y - x) / a);
} else if (t <= 3.5e+26) {
tmp = x * (1.0 - (z / a));
} else if (t <= 1.65e+119) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / (t - a)) tmp = 0 if t <= -1.9e+161: tmp = y elif t <= -1.55e+52: tmp = t_1 elif t <= -1.6e-187: tmp = x + (y * (z / a)) elif t <= -8e-300: tmp = z * ((y - x) / a) elif t <= 3.5e+26: tmp = x * (1.0 - (z / a)) elif t <= 1.65e+119: tmp = t_1 else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / Float64(t - a))) tmp = 0.0 if (t <= -1.9e+161) tmp = y; elseif (t <= -1.55e+52) tmp = t_1; elseif (t <= -1.6e-187) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= -8e-300) tmp = Float64(z * Float64(Float64(y - x) / a)); elseif (t <= 3.5e+26) tmp = Float64(x * Float64(1.0 - Float64(z / a))); elseif (t <= 1.65e+119) tmp = t_1; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / (t - a)); tmp = 0.0; if (t <= -1.9e+161) tmp = y; elseif (t <= -1.55e+52) tmp = t_1; elseif (t <= -1.6e-187) tmp = x + (y * (z / a)); elseif (t <= -8e-300) tmp = z * ((y - x) / a); elseif (t <= 3.5e+26) tmp = x * (1.0 - (z / a)); elseif (t <= 1.65e+119) tmp = t_1; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.9e+161], y, If[LessEqual[t, -1.55e+52], t$95$1, If[LessEqual[t, -1.6e-187], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8e-300], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e+26], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e+119], t$95$1, y]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{t - a}\\
\mathbf{if}\;t \leq -1.9 \cdot 10^{+161}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -1.55 \cdot 10^{+52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-187}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-300}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+26}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.9000000000000001e161 or 1.6500000000000001e119 < t Initial program 34.3%
Taylor expanded in t around inf 61.8%
if -1.9000000000000001e161 < t < -1.55e52 or 3.4999999999999999e26 < t < 1.6500000000000001e119Initial program 57.5%
Taylor expanded in z around 0 40.8%
mul-1-neg40.8%
unsub-neg40.8%
associate-/l*64.2%
Simplified64.2%
Taylor expanded in x around 0 31.8%
mul-1-neg31.8%
associate-/l*55.4%
Simplified55.4%
if -1.55e52 < t < -1.5999999999999999e-187Initial program 83.0%
Taylor expanded in t around 0 64.8%
Taylor expanded in y around inf 62.0%
associate-/l*64.6%
Simplified64.6%
if -1.5999999999999999e-187 < t < -8.0000000000000002e-300Initial program 91.4%
Taylor expanded in t around 0 87.0%
Taylor expanded in z around inf 72.6%
div-sub72.6%
Simplified72.6%
if -8.0000000000000002e-300 < t < 3.4999999999999999e26Initial program 88.7%
Taylor expanded in t around 0 66.8%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in x around inf 58.7%
mul-1-neg58.7%
unsub-neg58.7%
Simplified58.7%
Final simplification61.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))))
(if (<= t -1.4e+39)
t_1
(if (<= t 2.2e-90)
(+ x (* z (/ (- y x) a)))
(if (or (<= t 3.1e-54) (not (<= t 3.8e+26)))
t_1
(* x (+ (/ (- z t) (- t a)) 1.0)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (t <= -1.4e+39) {
tmp = t_1;
} else if (t <= 2.2e-90) {
tmp = x + (z * ((y - x) / a));
} else if ((t <= 3.1e-54) || !(t <= 3.8e+26)) {
tmp = t_1;
} else {
tmp = x * (((z - t) / (t - a)) + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / (a - t))
if (t <= (-1.4d+39)) then
tmp = t_1
else if (t <= 2.2d-90) then
tmp = x + (z * ((y - x) / a))
else if ((t <= 3.1d-54) .or. (.not. (t <= 3.8d+26))) then
tmp = t_1
else
tmp = x * (((z - t) / (t - a)) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double tmp;
if (t <= -1.4e+39) {
tmp = t_1;
} else if (t <= 2.2e-90) {
tmp = x + (z * ((y - x) / a));
} else if ((t <= 3.1e-54) || !(t <= 3.8e+26)) {
tmp = t_1;
} else {
tmp = x * (((z - t) / (t - a)) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) tmp = 0 if t <= -1.4e+39: tmp = t_1 elif t <= 2.2e-90: tmp = x + (z * ((y - x) / a)) elif (t <= 3.1e-54) or not (t <= 3.8e+26): tmp = t_1 else: tmp = x * (((z - t) / (t - a)) + 1.0) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) tmp = 0.0 if (t <= -1.4e+39) tmp = t_1; elseif (t <= 2.2e-90) tmp = Float64(x + Float64(z * Float64(Float64(y - x) / a))); elseif ((t <= 3.1e-54) || !(t <= 3.8e+26)) tmp = t_1; else tmp = Float64(x * Float64(Float64(Float64(z - t) / Float64(t - a)) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); tmp = 0.0; if (t <= -1.4e+39) tmp = t_1; elseif (t <= 2.2e-90) tmp = x + (z * ((y - x) / a)); elseif ((t <= 3.1e-54) || ~((t <= 3.8e+26))) tmp = t_1; else tmp = x * (((z - t) / (t - a)) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.4e+39], t$95$1, If[LessEqual[t, 2.2e-90], N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 3.1e-54], N[Not[LessEqual[t, 3.8e+26]], $MachinePrecision]], t$95$1, N[(x * N[(N[(N[(z - t), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;t \leq -1.4 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-90}:\\
\;\;\;\;x + z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-54} \lor \neg \left(t \leq 3.8 \cdot 10^{+26}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\frac{z - t}{t - a} + 1\right)\\
\end{array}
\end{array}
if t < -1.40000000000000001e39 or 2.19999999999999986e-90 < t < 3.10000000000000004e-54 or 3.8000000000000002e26 < t Initial program 44.5%
+-commutative44.5%
associate-/l*77.7%
fma-define77.7%
Simplified77.7%
clear-num77.7%
inv-pow77.7%
Applied egg-rr77.7%
unpow-177.7%
Simplified77.7%
Taylor expanded in y around inf 70.1%
div-sub70.1%
Simplified70.1%
if -1.40000000000000001e39 < t < 2.19999999999999986e-90Initial program 92.1%
Taylor expanded in t around 0 81.8%
associate-/l*82.9%
Simplified82.9%
if 3.10000000000000004e-54 < t < 3.8000000000000002e26Initial program 74.2%
Taylor expanded in x around inf 67.2%
mul-1-neg67.2%
unsub-neg67.2%
Simplified67.2%
Final simplification74.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))) (t_2 (* z (/ (- y x) (- a t)))))
(if (<= z -6.1e+187)
t_2
(if (<= z -1.7e+143)
t_1
(if (<= z -1.96e+108)
(/ (* (- y x) z) (- a t))
(if (<= z 4.2e+79) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double t_2 = z * ((y - x) / (a - t));
double tmp;
if (z <= -6.1e+187) {
tmp = t_2;
} else if (z <= -1.7e+143) {
tmp = t_1;
} else if (z <= -1.96e+108) {
tmp = ((y - x) * z) / (a - t);
} else if (z <= 4.2e+79) {
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 - t)))
t_2 = z * ((y - x) / (a - t))
if (z <= (-6.1d+187)) then
tmp = t_2
else if (z <= (-1.7d+143)) then
tmp = t_1
else if (z <= (-1.96d+108)) then
tmp = ((y - x) * z) / (a - t)
else if (z <= 4.2d+79) 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 - t)));
double t_2 = z * ((y - x) / (a - t));
double tmp;
if (z <= -6.1e+187) {
tmp = t_2;
} else if (z <= -1.7e+143) {
tmp = t_1;
} else if (z <= -1.96e+108) {
tmp = ((y - x) * z) / (a - t);
} else if (z <= 4.2e+79) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) t_2 = z * ((y - x) / (a - t)) tmp = 0 if z <= -6.1e+187: tmp = t_2 elif z <= -1.7e+143: tmp = t_1 elif z <= -1.96e+108: tmp = ((y - x) * z) / (a - t) elif z <= 4.2e+79: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) t_2 = Float64(z * Float64(Float64(y - x) / Float64(a - t))) tmp = 0.0 if (z <= -6.1e+187) tmp = t_2; elseif (z <= -1.7e+143) tmp = t_1; elseif (z <= -1.96e+108) tmp = Float64(Float64(Float64(y - x) * z) / Float64(a - t)); elseif (z <= 4.2e+79) 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 - t))); t_2 = z * ((y - x) / (a - t)); tmp = 0.0; if (z <= -6.1e+187) tmp = t_2; elseif (z <= -1.7e+143) tmp = t_1; elseif (z <= -1.96e+108) tmp = ((y - x) * z) / (a - t); elseif (z <= 4.2e+79) 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[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.1e+187], t$95$2, If[LessEqual[z, -1.7e+143], t$95$1, If[LessEqual[z, -1.96e+108], N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e+79], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
t_2 := z \cdot \frac{y - x}{a - t}\\
\mathbf{if}\;z \leq -6.1 \cdot 10^{+187}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+143}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.96 \cdot 10^{+108}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{a - t}\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.0999999999999996e187 or 4.20000000000000016e79 < z Initial program 67.0%
+-commutative67.0%
associate-/l*94.3%
fma-define94.3%
Simplified94.3%
clear-num94.3%
inv-pow94.3%
Applied egg-rr94.3%
unpow-194.3%
Simplified94.3%
Taylor expanded in z around inf 80.3%
div-sub83.2%
Simplified83.2%
if -6.0999999999999996e187 < z < -1.69999999999999991e143 or -1.9600000000000001e108 < z < 4.20000000000000016e79Initial program 64.4%
Taylor expanded in y around inf 61.6%
associate-/l*75.4%
Simplified75.4%
if -1.69999999999999991e143 < z < -1.9600000000000001e108Initial program 71.3%
+-commutative71.3%
associate-/l*71.6%
fma-define71.6%
Simplified71.6%
clear-num71.4%
inv-pow71.4%
Applied egg-rr71.4%
unpow-171.4%
Simplified71.4%
Taylor expanded in z around -inf 89.8%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(if (or (<= x -4.5e+189)
(and (not (<= x 5.5e-44)) (or (<= x 1.08e+14) (not (<= x 2.05e+90)))))
(* x (- 1.0 (/ z a)))
(* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.5e+189) || (!(x <= 5.5e-44) && ((x <= 1.08e+14) || !(x <= 2.05e+90)))) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((x <= (-4.5d+189)) .or. (.not. (x <= 5.5d-44)) .and. (x <= 1.08d+14) .or. (.not. (x <= 2.05d+90))) then
tmp = x * (1.0d0 - (z / a))
else
tmp = y * ((z - t) / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -4.5e+189) || (!(x <= 5.5e-44) && ((x <= 1.08e+14) || !(x <= 2.05e+90)))) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y * ((z - t) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -4.5e+189) or (not (x <= 5.5e-44) and ((x <= 1.08e+14) or not (x <= 2.05e+90))): tmp = x * (1.0 - (z / a)) else: tmp = y * ((z - t) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -4.5e+189) || (!(x <= 5.5e-44) && ((x <= 1.08e+14) || !(x <= 2.05e+90)))) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -4.5e+189) || (~((x <= 5.5e-44)) && ((x <= 1.08e+14) || ~((x <= 2.05e+90))))) tmp = x * (1.0 - (z / a)); else tmp = y * ((z - t) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -4.5e+189], And[N[Not[LessEqual[x, 5.5e-44]], $MachinePrecision], Or[LessEqual[x, 1.08e+14], N[Not[LessEqual[x, 2.05e+90]], $MachinePrecision]]]], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{+189} \lor \neg \left(x \leq 5.5 \cdot 10^{-44}\right) \land \left(x \leq 1.08 \cdot 10^{+14} \lor \neg \left(x \leq 2.05 \cdot 10^{+90}\right)\right):\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\end{array}
\end{array}
if x < -4.49999999999999973e189 or 5.49999999999999993e-44 < x < 1.08e14 or 2.05000000000000021e90 < x Initial program 63.8%
Taylor expanded in t around 0 56.0%
associate-/l*60.8%
Simplified60.8%
Taylor expanded in x around inf 59.7%
mul-1-neg59.7%
unsub-neg59.7%
Simplified59.7%
if -4.49999999999999973e189 < x < 5.49999999999999993e-44 or 1.08e14 < x < 2.05000000000000021e90Initial program 66.0%
+-commutative66.0%
associate-/l*84.9%
fma-define85.0%
Simplified85.0%
clear-num84.9%
inv-pow84.9%
Applied egg-rr84.9%
unpow-184.9%
Simplified84.9%
Taylor expanded in y around inf 71.4%
div-sub71.4%
Simplified71.4%
Final simplification67.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (+ x (* y (/ (- z t) a)))))
(if (<= a -4.6e+104)
t_2
(if (<= a -7e-278)
t_1
(if (<= a 5.7e-269)
(* z (/ (- y x) (- a t)))
(if (<= a 1.4e+95) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / (a - t));
double t_2 = x + (y * ((z - t) / a));
double tmp;
if (a <= -4.6e+104) {
tmp = t_2;
} else if (a <= -7e-278) {
tmp = t_1;
} else if (a <= 5.7e-269) {
tmp = z * ((y - x) / (a - t));
} else if (a <= 1.4e+95) {
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 = y * ((z - t) / (a - t))
t_2 = x + (y * ((z - t) / a))
if (a <= (-4.6d+104)) then
tmp = t_2
else if (a <= (-7d-278)) then
tmp = t_1
else if (a <= 5.7d-269) then
tmp = z * ((y - x) / (a - t))
else if (a <= 1.4d+95) 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 = y * ((z - t) / (a - t));
double t_2 = x + (y * ((z - t) / a));
double tmp;
if (a <= -4.6e+104) {
tmp = t_2;
} else if (a <= -7e-278) {
tmp = t_1;
} else if (a <= 5.7e-269) {
tmp = z * ((y - x) / (a - t));
} else if (a <= 1.4e+95) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / (a - t)) t_2 = x + (y * ((z - t) / a)) tmp = 0 if a <= -4.6e+104: tmp = t_2 elif a <= -7e-278: tmp = t_1 elif a <= 5.7e-269: tmp = z * ((y - x) / (a - t)) elif a <= 1.4e+95: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / Float64(a - t))) t_2 = Float64(x + Float64(y * Float64(Float64(z - t) / a))) tmp = 0.0 if (a <= -4.6e+104) tmp = t_2; elseif (a <= -7e-278) tmp = t_1; elseif (a <= 5.7e-269) tmp = Float64(z * Float64(Float64(y - x) / Float64(a - t))); elseif (a <= 1.4e+95) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / (a - t)); t_2 = x + (y * ((z - t) / a)); tmp = 0.0; if (a <= -4.6e+104) tmp = t_2; elseif (a <= -7e-278) tmp = t_1; elseif (a <= 5.7e-269) tmp = z * ((y - x) / (a - t)); elseif (a <= 1.4e+95) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.6e+104], t$95$2, If[LessEqual[a, -7e-278], t$95$1, If[LessEqual[a, 5.7e-269], N[(z * N[(N[(y - x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.4e+95], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
t_2 := x + y \cdot \frac{z - t}{a}\\
\mathbf{if}\;a \leq -4.6 \cdot 10^{+104}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -7 \cdot 10^{-278}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.7 \cdot 10^{-269}:\\
\;\;\;\;z \cdot \frac{y - x}{a - t}\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -4.59999999999999969e104 or 1.3999999999999999e95 < a Initial program 72.8%
Taylor expanded in y around inf 73.7%
*-commutative73.7%
Simplified73.7%
Taylor expanded in a around inf 67.6%
associate-/l*81.0%
Simplified81.0%
if -4.59999999999999969e104 < a < -6.99999999999999941e-278 or 5.69999999999999969e-269 < a < 1.3999999999999999e95Initial program 61.4%
+-commutative61.4%
associate-/l*79.3%
fma-define79.3%
Simplified79.3%
clear-num79.3%
inv-pow79.3%
Applied egg-rr79.3%
unpow-179.3%
Simplified79.3%
Taylor expanded in y around inf 64.0%
div-sub64.0%
Simplified64.0%
if -6.99999999999999941e-278 < a < 5.69999999999999969e-269Initial program 74.2%
+-commutative74.2%
associate-/l*83.4%
fma-define83.7%
Simplified83.7%
clear-num83.7%
inv-pow83.7%
Applied egg-rr83.7%
unpow-183.7%
Simplified83.7%
Taylor expanded in z around inf 71.1%
div-sub71.1%
Simplified71.1%
Final simplification69.4%
(FPCore (x y z t a)
:precision binary64
(if (<= t -9.8e+51)
y
(if (<= t -2e-187)
(+ x (* y (/ z a)))
(if (<= t -2.4e-300)
(* z (/ (- y x) a))
(if (<= t 6.8e+26) (* x (- 1.0 (/ z a))) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.8e+51) {
tmp = y;
} else if (t <= -2e-187) {
tmp = x + (y * (z / a));
} else if (t <= -2.4e-300) {
tmp = z * ((y - x) / a);
} else if (t <= 6.8e+26) {
tmp = x * (1.0 - (z / a));
} else {
tmp = 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 (t <= (-9.8d+51)) then
tmp = y
else if (t <= (-2d-187)) then
tmp = x + (y * (z / a))
else if (t <= (-2.4d-300)) then
tmp = z * ((y - x) / a)
else if (t <= 6.8d+26) then
tmp = x * (1.0d0 - (z / a))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.8e+51) {
tmp = y;
} else if (t <= -2e-187) {
tmp = x + (y * (z / a));
} else if (t <= -2.4e-300) {
tmp = z * ((y - x) / a);
} else if (t <= 6.8e+26) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.8e+51: tmp = y elif t <= -2e-187: tmp = x + (y * (z / a)) elif t <= -2.4e-300: tmp = z * ((y - x) / a) elif t <= 6.8e+26: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.8e+51) tmp = y; elseif (t <= -2e-187) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= -2.4e-300) tmp = Float64(z * Float64(Float64(y - x) / a)); elseif (t <= 6.8e+26) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9.8e+51) tmp = y; elseif (t <= -2e-187) tmp = x + (y * (z / a)); elseif (t <= -2.4e-300) tmp = z * ((y - x) / a); elseif (t <= 6.8e+26) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.8e+51], y, If[LessEqual[t, -2e-187], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.4e-300], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e+26], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.8 \cdot 10^{+51}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -2 \cdot 10^{-187}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-300}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{+26}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -9.79999999999999967e51 or 6.8000000000000005e26 < t Initial program 42.6%
Taylor expanded in t around inf 51.9%
if -9.79999999999999967e51 < t < -2e-187Initial program 83.0%
Taylor expanded in t around 0 64.8%
Taylor expanded in y around inf 62.0%
associate-/l*64.6%
Simplified64.6%
if -2e-187 < t < -2.39999999999999999e-300Initial program 91.4%
Taylor expanded in t around 0 87.0%
Taylor expanded in z around inf 72.6%
div-sub72.6%
Simplified72.6%
if -2.39999999999999999e-300 < t < 6.8000000000000005e26Initial program 88.7%
Taylor expanded in t around 0 66.8%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in x around inf 58.7%
mul-1-neg58.7%
unsub-neg58.7%
Simplified58.7%
Final simplification57.5%
(FPCore (x y z t a)
:precision binary64
(if (<= t -7.6e+93)
y
(if (<= t -1.75e-300)
(* z (/ (- y x) a))
(if (<= t 6.5e+26) (* x (- 1.0 (/ z a))) y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.6e+93) {
tmp = y;
} else if (t <= -1.75e-300) {
tmp = z * ((y - x) / a);
} else if (t <= 6.5e+26) {
tmp = x * (1.0 - (z / a));
} else {
tmp = 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 (t <= (-7.6d+93)) then
tmp = y
else if (t <= (-1.75d-300)) then
tmp = z * ((y - x) / a)
else if (t <= 6.5d+26) then
tmp = x * (1.0d0 - (z / a))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.6e+93) {
tmp = y;
} else if (t <= -1.75e-300) {
tmp = z * ((y - x) / a);
} else if (t <= 6.5e+26) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7.6e+93: tmp = y elif t <= -1.75e-300: tmp = z * ((y - x) / a) elif t <= 6.5e+26: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7.6e+93) tmp = y; elseif (t <= -1.75e-300) tmp = Float64(z * Float64(Float64(y - x) / a)); elseif (t <= 6.5e+26) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7.6e+93) tmp = y; elseif (t <= -1.75e-300) tmp = z * ((y - x) / a); elseif (t <= 6.5e+26) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.6e+93], y, If[LessEqual[t, -1.75e-300], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.5e+26], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.6 \cdot 10^{+93}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-300}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 6.5 \cdot 10^{+26}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -7.5999999999999996e93 or 6.50000000000000022e26 < t Initial program 39.2%
Taylor expanded in t around inf 53.9%
if -7.5999999999999996e93 < t < -1.7500000000000001e-300Initial program 87.4%
Taylor expanded in t around 0 68.8%
Taylor expanded in z around inf 50.4%
div-sub51.9%
Simplified51.9%
if -1.7500000000000001e-300 < t < 6.50000000000000022e26Initial program 88.7%
Taylor expanded in t around 0 66.8%
associate-/l*70.8%
Simplified70.8%
Taylor expanded in x around inf 58.7%
mul-1-neg58.7%
unsub-neg58.7%
Simplified58.7%
Final simplification54.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.45e-149) (not (<= a 5.6e+66))) (+ x (* y (/ (- z t) (- a t)))) (+ y (* (- z a) (/ (- x y) t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.45e-149) || !(a <= 5.6e+66)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = y + ((z - a) * ((x - y) / 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 ((a <= (-1.45d-149)) .or. (.not. (a <= 5.6d+66))) then
tmp = x + (y * ((z - t) / (a - t)))
else
tmp = y + ((z - a) * ((x - y) / t))
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.45e-149) || !(a <= 5.6e+66)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = y + ((z - a) * ((x - y) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.45e-149) or not (a <= 5.6e+66): tmp = x + (y * ((z - t) / (a - t))) else: tmp = y + ((z - a) * ((x - y) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.45e-149) || !(a <= 5.6e+66)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = Float64(y + Float64(Float64(z - a) * Float64(Float64(x - y) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.45e-149) || ~((a <= 5.6e+66))) tmp = x + (y * ((z - t) / (a - t))); else tmp = y + ((z - a) * ((x - y) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.45e-149], N[Not[LessEqual[a, 5.6e+66]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(z - a), $MachinePrecision] * N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{-149} \lor \neg \left(a \leq 5.6 \cdot 10^{+66}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + \left(z - a\right) \cdot \frac{x - y}{t}\\
\end{array}
\end{array}
if a < -1.45e-149 or 5.6000000000000001e66 < a Initial program 71.1%
Taylor expanded in y around inf 67.4%
associate-/l*81.9%
Simplified81.9%
if -1.45e-149 < a < 5.6000000000000001e66Initial program 59.3%
Taylor expanded in t around inf 69.0%
associate--l+69.0%
distribute-lft-out--69.0%
div-sub72.2%
mul-1-neg72.2%
unsub-neg72.2%
div-sub69.0%
associate-/l*74.3%
associate-/l*72.6%
distribute-rgt-out--79.0%
Simplified79.0%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (<= t -8e+83) y (if (<= t 7e+26) (* x (- 1.0 (/ z a))) y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e+83) {
tmp = y;
} else if (t <= 7e+26) {
tmp = x * (1.0 - (z / a));
} else {
tmp = 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 (t <= (-8d+83)) then
tmp = y
else if (t <= 7d+26) then
tmp = x * (1.0d0 - (z / a))
else
tmp = y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8e+83) {
tmp = y;
} else if (t <= 7e+26) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8e+83: tmp = y elif t <= 7e+26: tmp = x * (1.0 - (z / a)) else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8e+83) tmp = y; elseif (t <= 7e+26) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8e+83) tmp = y; elseif (t <= 7e+26) tmp = x * (1.0 - (z / a)); else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8e+83], y, If[LessEqual[t, 7e+26], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8 \cdot 10^{+83}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+26}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -8.00000000000000025e83 or 6.9999999999999998e26 < t Initial program 39.7%
Taylor expanded in t around inf 53.5%
if -8.00000000000000025e83 < t < 6.9999999999999998e26Initial program 88.0%
Taylor expanded in t around 0 68.3%
associate-/l*71.8%
Simplified71.8%
Taylor expanded in x around inf 49.4%
mul-1-neg49.4%
unsub-neg49.4%
Simplified49.4%
Final simplification51.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.8e+105) x (if (<= a 3.6e+99) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.8e+105) {
tmp = x;
} else if (a <= 3.6e+99) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-6.8d+105)) then
tmp = x
else if (a <= 3.6d+99) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.8e+105) {
tmp = x;
} else if (a <= 3.6e+99) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.8e+105: tmp = x elif a <= 3.6e+99: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.8e+105) tmp = x; elseif (a <= 3.6e+99) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.8e+105) tmp = x; elseif (a <= 3.6e+99) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.8e+105], x, If[LessEqual[a, 3.6e+99], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{+105}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{+99}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.7999999999999999e105 or 3.6000000000000002e99 < a Initial program 72.4%
Taylor expanded in a around inf 48.4%
if -6.7999999999999999e105 < a < 3.6000000000000002e99Initial program 62.3%
Taylor expanded in t around inf 39.0%
Final simplification41.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.7e-93) (+ x y) (if (<= a 1.45e+100) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e-93) {
tmp = x + y;
} else if (a <= 1.45e+100) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.7d-93)) then
tmp = x + y
else if (a <= 1.45d+100) then
tmp = y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e-93) {
tmp = x + y;
} else if (a <= 1.45e+100) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.7e-93: tmp = x + y elif a <= 1.45e+100: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.7e-93) tmp = Float64(x + y); elseif (a <= 1.45e+100) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.7e-93) tmp = x + y; elseif (a <= 1.45e+100) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.7e-93], N[(x + y), $MachinePrecision], If[LessEqual[a, 1.45e+100], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{-93}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{+100}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.70000000000000001e-93Initial program 66.1%
Taylor expanded in z around 0 46.5%
mul-1-neg46.5%
unsub-neg46.5%
associate-/l*52.3%
Simplified52.3%
Taylor expanded in y around inf 46.3%
associate-/l*51.4%
Simplified51.4%
Taylor expanded in t around inf 40.1%
sub-neg40.1%
mul-1-neg40.1%
remove-double-neg40.1%
+-commutative40.1%
Simplified40.1%
if -1.70000000000000001e-93 < a < 1.45e100Initial program 62.2%
Taylor expanded in t around inf 41.7%
if 1.45e100 < a Initial program 74.7%
Taylor expanded in a around inf 52.6%
Final simplification42.9%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 65.3%
Taylor expanded in a around inf 21.3%
Final simplification21.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(if (< a -1.6153062845442575e-142)
t_1
(if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
if (a < (-1.6153062845442575d-142)) then
tmp = t_1
else if (a < 3.774403170083174d-182) then
tmp = y - ((z / t) * (y - x))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
double tmp;
if (a < -1.6153062845442575e-142) {
tmp = t_1;
} else if (a < 3.774403170083174e-182) {
tmp = y - ((z / t) * (y - x));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))) tmp = 0 if a < -1.6153062845442575e-142: tmp = t_1 elif a < 3.774403170083174e-182: tmp = y - ((z / t) * (y - x)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t))); tmp = 0.0; if (a < -1.6153062845442575e-142) tmp = t_1; elseif (a < 3.774403170083174e-182) tmp = y - ((z / t) * (y - x)); 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 - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
\;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024071
(FPCore (x y z t a)
:name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
:precision binary64
:alt
(if (< a -1.6153062845442575e-142) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t)))) (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
(+ x (/ (* (- y x) (- z t)) (- a t))))