
(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 16 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-306) (not (<= t_1 0.0)))
(fma (- y x) (/ (- z t) (- a t)) x)
(+ 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-306) || !(t_1 <= 0.0)) {
tmp = fma((y - x), ((z - t) / (a - t)), x);
} else {
tmp = 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-306) || !(t_1 <= 0.0)) tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x); else tmp = Float64(y + Float64(Float64(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-306], 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[(x * 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^{-306} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999998e-306 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 74.8%
+-commutative74.8%
associate-/l*89.2%
fma-define89.2%
Simplified89.2%
if -4.99999999999999998e-306 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
Taylor expanded in t around inf 99.5%
associate--l+99.5%
associate-*r/99.5%
associate-*r/99.5%
mul-1-neg99.5%
div-sub99.5%
mul-1-neg99.5%
distribute-lft-out--99.5%
associate-*r/99.5%
mul-1-neg99.5%
unsub-neg99.5%
distribute-rgt-out--99.6%
Simplified99.6%
Taylor expanded in y around 0 99.6%
associate-*r/99.6%
associate-*r*99.6%
neg-mul-199.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
Final simplification90.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ (- x y) (- t a)))))
(t_2 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -5e-306)
t_2
(if (<= t_2 0.0)
(+ y (/ (* x (- z a)) t))
(if (<= t_2 5e+286) t_2 t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * ((x - y) / (t - a)));
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-306) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + ((x * (z - a)) / t);
} else if (t_2 <= 5e+286) {
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 + (z * ((x - y) / (t - a)));
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-306) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = y + ((x * (z - a)) / t);
} else if (t_2 <= 5e+286) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * ((x - y) / (t - a))) t_2 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if t_2 <= -math.inf: tmp = t_1 elif t_2 <= -5e-306: tmp = t_2 elif t_2 <= 0.0: tmp = y + ((x * (z - a)) / t) elif t_2 <= 5e+286: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(Float64(x - y) / Float64(t - a)))) 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-306) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(y + Float64(Float64(x * Float64(z - a)) / t)); elseif (t_2 <= 5e+286) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * ((x - y) / (t - a))); t_2 = x + (((y - x) * (z - t)) / (a - t)); tmp = 0.0; if (t_2 <= -Inf) tmp = t_1; elseif (t_2 <= -5e-306) tmp = t_2; elseif (t_2 <= 0.0) tmp = y + ((x * (z - a)) / t); elseif (t_2 <= 5e+286) 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[(z * N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $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-306], t$95$2, If[LessEqual[t$95$2, 0.0], N[(y + N[(N[(x * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+286], t$95$2, t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{x - y}{t - a}\\
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^{-306}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;y + \frac{x \cdot \left(z - a\right)}{t}\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+286}:\\
\;\;\;\;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 5.0000000000000004e286 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 42.6%
Taylor expanded in z around inf 42.1%
associate-/l*67.0%
Simplified67.0%
if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999998e-306 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 5.0000000000000004e286Initial program 96.1%
if -4.99999999999999998e-306 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
Taylor expanded in t around inf 99.5%
associate--l+99.5%
associate-*r/99.5%
associate-*r/99.5%
mul-1-neg99.5%
div-sub99.5%
mul-1-neg99.5%
distribute-lft-out--99.5%
associate-*r/99.5%
mul-1-neg99.5%
unsub-neg99.5%
distribute-rgt-out--99.6%
Simplified99.6%
Taylor expanded in y around 0 99.6%
associate-*r/99.6%
associate-*r*99.6%
neg-mul-199.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
Final simplification86.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
(if (or (<= t_1 -5e-306) (not (<= t_1 0.0)))
(+ x (/ 1.0 (/ (/ (- t a) (- z 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-306) || !(t_1 <= 0.0)) {
tmp = x + (1.0 / (((t - a) / (z - t)) / (x - y)));
} else {
tmp = y + ((x * (z - 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) :: t_1
real(8) :: tmp
t_1 = x + (((y - x) * (z - t)) / (a - t))
if ((t_1 <= (-5d-306)) .or. (.not. (t_1 <= 0.0d0))) then
tmp = x + (1.0d0 / (((t - a) / (z - t)) / (x - y)))
else
tmp = y + ((x * (z - a)) / 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 + (((y - x) * (z - t)) / (a - t));
double tmp;
if ((t_1 <= -5e-306) || !(t_1 <= 0.0)) {
tmp = x + (1.0 / (((t - a) / (z - t)) / (x - y)));
} else {
tmp = y + ((x * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (((y - x) * (z - t)) / (a - t)) tmp = 0 if (t_1 <= -5e-306) or not (t_1 <= 0.0): tmp = x + (1.0 / (((t - a) / (z - t)) / (x - y))) else: tmp = 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-306) || !(t_1 <= 0.0)) tmp = Float64(x + Float64(1.0 / Float64(Float64(Float64(t - a) / Float64(z - t)) / Float64(x - y)))); else tmp = Float64(y + Float64(Float64(x * Float64(z - a)) / 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 <= -5e-306) || ~((t_1 <= 0.0))) tmp = x + (1.0 / (((t - a) / (z - t)) / (x - y))); else tmp = y + ((x * (z - a)) / 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[Or[LessEqual[t$95$1, -5e-306], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(1.0 / N[(N[(N[(t - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(x * 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^{-306} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;x + \frac{1}{\frac{\frac{t - a}{z - t}}{x - y}}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{x \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < -4.99999999999999998e-306 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) Initial program 74.8%
clear-num74.5%
inv-pow74.5%
*-commutative74.5%
associate-/r*88.8%
Applied egg-rr88.8%
+-commutative88.8%
*-un-lft-identity88.8%
fma-define88.8%
unpow-188.8%
Applied egg-rr88.8%
fma-undefine88.8%
*-lft-identity88.8%
Simplified88.8%
if -4.99999999999999998e-306 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 0.0Initial program 4.7%
Taylor expanded in t around inf 99.5%
associate--l+99.5%
associate-*r/99.5%
associate-*r/99.5%
mul-1-neg99.5%
div-sub99.5%
mul-1-neg99.5%
distribute-lft-out--99.5%
associate-*r/99.5%
mul-1-neg99.5%
unsub-neg99.5%
distribute-rgt-out--99.6%
Simplified99.6%
Taylor expanded in y around 0 99.6%
associate-*r/99.6%
associate-*r*99.6%
neg-mul-199.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
Final simplification89.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ z a)))))
(if (<= t -4.8e+217)
y
(if (<= t -5.2e+171)
(* x (/ (- z a) t))
(if (<= t -9.6e+98)
y
(if (<= t -1.75e-263)
t_1
(if (<= t -3.2e-305) (* y (/ z a)) (if (<= t 1.3e+57) t_1 y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (z / a));
double tmp;
if (t <= -4.8e+217) {
tmp = y;
} else if (t <= -5.2e+171) {
tmp = x * ((z - a) / t);
} else if (t <= -9.6e+98) {
tmp = y;
} else if (t <= -1.75e-263) {
tmp = t_1;
} else if (t <= -3.2e-305) {
tmp = y * (z / a);
} else if (t <= 1.3e+57) {
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 * (1.0d0 - (z / a))
if (t <= (-4.8d+217)) then
tmp = y
else if (t <= (-5.2d+171)) then
tmp = x * ((z - a) / t)
else if (t <= (-9.6d+98)) then
tmp = y
else if (t <= (-1.75d-263)) then
tmp = t_1
else if (t <= (-3.2d-305)) then
tmp = y * (z / a)
else if (t <= 1.3d+57) 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 * (1.0 - (z / a));
double tmp;
if (t <= -4.8e+217) {
tmp = y;
} else if (t <= -5.2e+171) {
tmp = x * ((z - a) / t);
} else if (t <= -9.6e+98) {
tmp = y;
} else if (t <= -1.75e-263) {
tmp = t_1;
} else if (t <= -3.2e-305) {
tmp = y * (z / a);
} else if (t <= 1.3e+57) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (z / a)) tmp = 0 if t <= -4.8e+217: tmp = y elif t <= -5.2e+171: tmp = x * ((z - a) / t) elif t <= -9.6e+98: tmp = y elif t <= -1.75e-263: tmp = t_1 elif t <= -3.2e-305: tmp = y * (z / a) elif t <= 1.3e+57: tmp = t_1 else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (t <= -4.8e+217) tmp = y; elseif (t <= -5.2e+171) tmp = Float64(x * Float64(Float64(z - a) / t)); elseif (t <= -9.6e+98) tmp = y; elseif (t <= -1.75e-263) tmp = t_1; elseif (t <= -3.2e-305) tmp = Float64(y * Float64(z / a)); elseif (t <= 1.3e+57) tmp = t_1; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (z / a)); tmp = 0.0; if (t <= -4.8e+217) tmp = y; elseif (t <= -5.2e+171) tmp = x * ((z - a) / t); elseif (t <= -9.6e+98) tmp = y; elseif (t <= -1.75e-263) tmp = t_1; elseif (t <= -3.2e-305) tmp = y * (z / a); elseif (t <= 1.3e+57) tmp = t_1; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.8e+217], y, If[LessEqual[t, -5.2e+171], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.6e+98], y, If[LessEqual[t, -1.75e-263], t$95$1, If[LessEqual[t, -3.2e-305], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e+57], t$95$1, y]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{+217}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -5.2 \cdot 10^{+171}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\mathbf{elif}\;t \leq -9.6 \cdot 10^{+98}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-263}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.2 \cdot 10^{-305}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -4.7999999999999996e217 or -5.2e171 < t < -9.5999999999999995e98 or 1.3e57 < t Initial program 42.6%
Taylor expanded in t around inf 60.5%
if -4.7999999999999996e217 < t < -5.2e171Initial program 3.0%
Taylor expanded in t around inf 68.5%
associate--l+68.5%
associate-*r/68.5%
associate-*r/68.5%
mul-1-neg68.5%
div-sub68.5%
mul-1-neg68.5%
distribute-lft-out--68.5%
associate-*r/68.5%
mul-1-neg68.5%
unsub-neg68.5%
distribute-rgt-out--68.5%
Simplified68.5%
Taylor expanded in y around 0 68.5%
associate-*r/68.5%
associate-*r*68.5%
neg-mul-168.5%
Simplified68.5%
Taylor expanded in y around 0 68.5%
associate-*r/99.0%
Simplified99.0%
if -9.5999999999999995e98 < t < -1.74999999999999985e-263 or -3.20000000000000009e-305 < t < 1.3e57Initial program 82.2%
Taylor expanded in x around inf 59.9%
mul-1-neg59.9%
unsub-neg59.9%
Simplified59.9%
Taylor expanded in t around 0 51.3%
if -1.74999999999999985e-263 < t < -3.20000000000000009e-305Initial program 84.0%
clear-num84.2%
inv-pow84.2%
*-commutative84.2%
associate-/r*99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 83.2%
div-sub83.2%
Simplified83.2%
Taylor expanded in y around inf 83.2%
Taylor expanded in a around inf 67.7%
associate-/l*83.5%
Simplified83.5%
Final simplification56.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ z a)))))
(if (<= t -6.2e+217)
y
(if (<= t -5.5e+171)
(* x (/ (- z a) t))
(if (<= t -5.8e+93)
y
(if (<= t -4.5e-228)
t_1
(if (<= t -4.1e-305)
(* z (/ (- y x) a))
(if (<= t 2.6e+57) t_1 y))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (z / a));
double tmp;
if (t <= -6.2e+217) {
tmp = y;
} else if (t <= -5.5e+171) {
tmp = x * ((z - a) / t);
} else if (t <= -5.8e+93) {
tmp = y;
} else if (t <= -4.5e-228) {
tmp = t_1;
} else if (t <= -4.1e-305) {
tmp = z * ((y - x) / a);
} else if (t <= 2.6e+57) {
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 * (1.0d0 - (z / a))
if (t <= (-6.2d+217)) then
tmp = y
else if (t <= (-5.5d+171)) then
tmp = x * ((z - a) / t)
else if (t <= (-5.8d+93)) then
tmp = y
else if (t <= (-4.5d-228)) then
tmp = t_1
else if (t <= (-4.1d-305)) then
tmp = z * ((y - x) / a)
else if (t <= 2.6d+57) 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 * (1.0 - (z / a));
double tmp;
if (t <= -6.2e+217) {
tmp = y;
} else if (t <= -5.5e+171) {
tmp = x * ((z - a) / t);
} else if (t <= -5.8e+93) {
tmp = y;
} else if (t <= -4.5e-228) {
tmp = t_1;
} else if (t <= -4.1e-305) {
tmp = z * ((y - x) / a);
} else if (t <= 2.6e+57) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (z / a)) tmp = 0 if t <= -6.2e+217: tmp = y elif t <= -5.5e+171: tmp = x * ((z - a) / t) elif t <= -5.8e+93: tmp = y elif t <= -4.5e-228: tmp = t_1 elif t <= -4.1e-305: tmp = z * ((y - x) / a) elif t <= 2.6e+57: tmp = t_1 else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (t <= -6.2e+217) tmp = y; elseif (t <= -5.5e+171) tmp = Float64(x * Float64(Float64(z - a) / t)); elseif (t <= -5.8e+93) tmp = y; elseif (t <= -4.5e-228) tmp = t_1; elseif (t <= -4.1e-305) tmp = Float64(z * Float64(Float64(y - x) / a)); elseif (t <= 2.6e+57) tmp = t_1; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (z / a)); tmp = 0.0; if (t <= -6.2e+217) tmp = y; elseif (t <= -5.5e+171) tmp = x * ((z - a) / t); elseif (t <= -5.8e+93) tmp = y; elseif (t <= -4.5e-228) tmp = t_1; elseif (t <= -4.1e-305) tmp = z * ((y - x) / a); elseif (t <= 2.6e+57) tmp = t_1; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+217], y, If[LessEqual[t, -5.5e+171], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.8e+93], y, If[LessEqual[t, -4.5e-228], t$95$1, If[LessEqual[t, -4.1e-305], N[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e+57], t$95$1, y]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+217}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{+171}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{+93}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -4.5 \cdot 10^{-228}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -4.1 \cdot 10^{-305}:\\
\;\;\;\;z \cdot \frac{y - x}{a}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -6.2000000000000003e217 or -5.5000000000000003e171 < t < -5.7999999999999997e93 or 2.6e57 < t Initial program 42.6%
Taylor expanded in t around inf 60.5%
if -6.2000000000000003e217 < t < -5.5000000000000003e171Initial program 3.0%
Taylor expanded in t around inf 68.5%
associate--l+68.5%
associate-*r/68.5%
associate-*r/68.5%
mul-1-neg68.5%
div-sub68.5%
mul-1-neg68.5%
distribute-lft-out--68.5%
associate-*r/68.5%
mul-1-neg68.5%
unsub-neg68.5%
distribute-rgt-out--68.5%
Simplified68.5%
Taylor expanded in y around 0 68.5%
associate-*r/68.5%
associate-*r*68.5%
neg-mul-168.5%
Simplified68.5%
Taylor expanded in y around 0 68.5%
associate-*r/99.0%
Simplified99.0%
if -5.7999999999999997e93 < t < -4.4999999999999999e-228 or -4.1000000000000002e-305 < t < 2.6e57Initial program 83.6%
Taylor expanded in x around inf 60.5%
mul-1-neg60.5%
unsub-neg60.5%
Simplified60.5%
Taylor expanded in t around 0 51.6%
if -4.4999999999999999e-228 < t < -4.1000000000000002e-305Initial program 71.9%
clear-num72.0%
inv-pow72.0%
*-commutative72.0%
associate-/r*88.6%
Applied egg-rr88.6%
Taylor expanded in z around inf 82.2%
div-sub82.2%
Simplified82.2%
Taylor expanded in a around inf 77.0%
Final simplification57.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) (- a t)))) (t_2 (+ x (* z (/ (- y x) a)))))
(if (<= a -1.85e+141)
t_2
(if (<= a -1.65e-60)
t_1
(if (<= a -6.3e-87)
(* (- z a) (/ x t))
(if (<= a 2.4e-146)
(+ y (* x (/ z t)))
(if (<= a 3.9e+79) 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 + (z * ((y - x) / a));
double tmp;
if (a <= -1.85e+141) {
tmp = t_2;
} else if (a <= -1.65e-60) {
tmp = t_1;
} else if (a <= -6.3e-87) {
tmp = (z - a) * (x / t);
} else if (a <= 2.4e-146) {
tmp = y + (x * (z / t));
} else if (a <= 3.9e+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 = y * ((z - t) / (a - t))
t_2 = x + (z * ((y - x) / a))
if (a <= (-1.85d+141)) then
tmp = t_2
else if (a <= (-1.65d-60)) then
tmp = t_1
else if (a <= (-6.3d-87)) then
tmp = (z - a) * (x / t)
else if (a <= 2.4d-146) then
tmp = y + (x * (z / t))
else if (a <= 3.9d+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 = y * ((z - t) / (a - t));
double t_2 = x + (z * ((y - x) / a));
double tmp;
if (a <= -1.85e+141) {
tmp = t_2;
} else if (a <= -1.65e-60) {
tmp = t_1;
} else if (a <= -6.3e-87) {
tmp = (z - a) * (x / t);
} else if (a <= 2.4e-146) {
tmp = y + (x * (z / t));
} else if (a <= 3.9e+79) {
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 + (z * ((y - x) / a)) tmp = 0 if a <= -1.85e+141: tmp = t_2 elif a <= -1.65e-60: tmp = t_1 elif a <= -6.3e-87: tmp = (z - a) * (x / t) elif a <= 2.4e-146: tmp = y + (x * (z / t)) elif a <= 3.9e+79: 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(z * Float64(Float64(y - x) / a))) tmp = 0.0 if (a <= -1.85e+141) tmp = t_2; elseif (a <= -1.65e-60) tmp = t_1; elseif (a <= -6.3e-87) tmp = Float64(Float64(z - a) * Float64(x / t)); elseif (a <= 2.4e-146) tmp = Float64(y + Float64(x * Float64(z / t))); elseif (a <= 3.9e+79) 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 + (z * ((y - x) / a)); tmp = 0.0; if (a <= -1.85e+141) tmp = t_2; elseif (a <= -1.65e-60) tmp = t_1; elseif (a <= -6.3e-87) tmp = (z - a) * (x / t); elseif (a <= 2.4e-146) tmp = y + (x * (z / t)); elseif (a <= 3.9e+79) 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[(z * N[(N[(y - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.85e+141], t$95$2, If[LessEqual[a, -1.65e-60], t$95$1, If[LessEqual[a, -6.3e-87], N[(N[(z - a), $MachinePrecision] * N[(x / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.4e-146], N[(y + N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.9e+79], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a - t}\\
t_2 := x + z \cdot \frac{y - x}{a}\\
\mathbf{if}\;a \leq -1.85 \cdot 10^{+141}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.65 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -6.3 \cdot 10^{-87}:\\
\;\;\;\;\left(z - a\right) \cdot \frac{x}{t}\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{-146}:\\
\;\;\;\;y + x \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.8500000000000001e141 or 3.8999999999999997e79 < a Initial program 71.4%
Taylor expanded in t around 0 65.5%
associate-/l*81.0%
Simplified81.0%
if -1.8500000000000001e141 < a < -1.6499999999999999e-60 or 2.4000000000000002e-146 < a < 3.8999999999999997e79Initial program 70.4%
clear-num70.2%
inv-pow70.2%
*-commutative70.2%
associate-/r*84.3%
Applied egg-rr84.3%
Taylor expanded in y around inf 67.9%
div-sub67.9%
Simplified67.9%
if -1.6499999999999999e-60 < a < -6.29999999999999976e-87Initial program 44.6%
Taylor expanded in t around inf 99.6%
associate--l+99.6%
associate-*r/99.6%
associate-*r/99.6%
mul-1-neg99.6%
div-sub99.6%
mul-1-neg99.6%
distribute-lft-out--99.6%
associate-*r/99.6%
mul-1-neg99.6%
unsub-neg99.6%
distribute-rgt-out--99.8%
Simplified99.8%
Taylor expanded in y around 0 86.2%
*-commutative86.2%
*-un-lft-identity86.2%
times-frac86.4%
Applied egg-rr86.4%
if -6.29999999999999976e-87 < a < 2.4000000000000002e-146Initial program 61.7%
Taylor expanded in t around inf 76.7%
associate--l+76.7%
associate-*r/76.7%
associate-*r/76.7%
mul-1-neg76.7%
div-sub76.7%
mul-1-neg76.7%
distribute-lft-out--76.7%
associate-*r/76.7%
mul-1-neg76.7%
unsub-neg76.7%
distribute-rgt-out--76.7%
Simplified76.7%
Taylor expanded in y around 0 67.8%
associate-*r/67.8%
associate-*r*67.8%
neg-mul-167.8%
Simplified67.8%
Taylor expanded in a around 0 64.6%
sub-neg64.6%
mul-1-neg64.6%
remove-double-neg64.6%
associate-/l*70.6%
Simplified70.6%
Final simplification73.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ z a)))))
(if (<= x -3.4e+220)
t_1
(if (<= x -4.3e+129)
(+ y (* x (/ z t)))
(if (<= x -9.5e+96)
t_1
(if (<= x 3.8e+64)
(* y (/ (- z t) (- a t)))
(if (<= x 4.2e+199) t_1 (* x (/ (- z a) t)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (z / a));
double tmp;
if (x <= -3.4e+220) {
tmp = t_1;
} else if (x <= -4.3e+129) {
tmp = y + (x * (z / t));
} else if (x <= -9.5e+96) {
tmp = t_1;
} else if (x <= 3.8e+64) {
tmp = y * ((z - t) / (a - t));
} else if (x <= 4.2e+199) {
tmp = t_1;
} else {
tmp = x * ((z - 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) :: t_1
real(8) :: tmp
t_1 = x * (1.0d0 - (z / a))
if (x <= (-3.4d+220)) then
tmp = t_1
else if (x <= (-4.3d+129)) then
tmp = y + (x * (z / t))
else if (x <= (-9.5d+96)) then
tmp = t_1
else if (x <= 3.8d+64) then
tmp = y * ((z - t) / (a - t))
else if (x <= 4.2d+199) then
tmp = t_1
else
tmp = x * ((z - a) / 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 - (z / a));
double tmp;
if (x <= -3.4e+220) {
tmp = t_1;
} else if (x <= -4.3e+129) {
tmp = y + (x * (z / t));
} else if (x <= -9.5e+96) {
tmp = t_1;
} else if (x <= 3.8e+64) {
tmp = y * ((z - t) / (a - t));
} else if (x <= 4.2e+199) {
tmp = t_1;
} else {
tmp = x * ((z - a) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (z / a)) tmp = 0 if x <= -3.4e+220: tmp = t_1 elif x <= -4.3e+129: tmp = y + (x * (z / t)) elif x <= -9.5e+96: tmp = t_1 elif x <= 3.8e+64: tmp = y * ((z - t) / (a - t)) elif x <= 4.2e+199: tmp = t_1 else: tmp = x * ((z - a) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (x <= -3.4e+220) tmp = t_1; elseif (x <= -4.3e+129) tmp = Float64(y + Float64(x * Float64(z / t))); elseif (x <= -9.5e+96) tmp = t_1; elseif (x <= 3.8e+64) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); elseif (x <= 4.2e+199) tmp = t_1; else tmp = Float64(x * Float64(Float64(z - a) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (z / a)); tmp = 0.0; if (x <= -3.4e+220) tmp = t_1; elseif (x <= -4.3e+129) tmp = y + (x * (z / t)); elseif (x <= -9.5e+96) tmp = t_1; elseif (x <= 3.8e+64) tmp = y * ((z - t) / (a - t)); elseif (x <= 4.2e+199) tmp = t_1; else tmp = x * ((z - a) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.4e+220], t$95$1, If[LessEqual[x, -4.3e+129], N[(y + N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -9.5e+96], t$95$1, If[LessEqual[x, 3.8e+64], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.2e+199], t$95$1, N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;x \leq -3.4 \cdot 10^{+220}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -4.3 \cdot 10^{+129}:\\
\;\;\;\;y + x \cdot \frac{z}{t}\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{+96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+64}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{+199}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if x < -3.4e220 or -4.30000000000000021e129 < x < -9.50000000000000089e96 or 3.8000000000000001e64 < x < 4.1999999999999999e199Initial program 65.7%
Taylor expanded in x around inf 71.2%
mul-1-neg71.2%
unsub-neg71.2%
Simplified71.2%
Taylor expanded in t around 0 69.6%
if -3.4e220 < x < -4.30000000000000021e129Initial program 45.0%
Taylor expanded in t around inf 51.8%
associate--l+51.7%
associate-*r/51.7%
associate-*r/51.7%
mul-1-neg51.7%
div-sub51.8%
mul-1-neg51.8%
distribute-lft-out--51.8%
associate-*r/51.8%
mul-1-neg51.8%
unsub-neg51.8%
distribute-rgt-out--51.8%
Simplified51.8%
Taylor expanded in y around 0 59.3%
associate-*r/59.3%
associate-*r*59.3%
neg-mul-159.3%
Simplified59.3%
Taylor expanded in a around 0 52.6%
sub-neg52.6%
mul-1-neg52.6%
remove-double-neg52.6%
associate-/l*66.5%
Simplified66.5%
if -9.50000000000000089e96 < x < 3.8000000000000001e64Initial program 75.1%
clear-num74.5%
inv-pow74.5%
*-commutative74.5%
associate-/r*83.5%
Applied egg-rr83.5%
Taylor expanded in y around inf 70.9%
div-sub70.9%
Simplified70.9%
if 4.1999999999999999e199 < x Initial program 42.1%
Taylor expanded in t around inf 48.7%
associate--l+48.7%
associate-*r/48.7%
associate-*r/48.7%
mul-1-neg48.7%
div-sub49.1%
mul-1-neg49.1%
distribute-lft-out--49.1%
associate-*r/49.1%
mul-1-neg49.1%
unsub-neg49.1%
distribute-rgt-out--54.6%
Simplified54.6%
Taylor expanded in y around 0 54.6%
associate-*r/54.6%
associate-*r*54.6%
neg-mul-154.6%
Simplified54.6%
Taylor expanded in y around 0 54.5%
associate-*r/71.4%
Simplified71.4%
Final simplification70.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ (- y x) a)))))
(if (<= a -2.45e+71)
t_1
(if (<= a -1.05e-183)
(+ y (/ (* x (- z a)) t))
(if (<= a 1.05e+19)
(+ y (/ (* z (- x y)) t))
(if (<= a 7.5e+79) (* y (/ (- z t) (- a t))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * ((y - x) / a));
double tmp;
if (a <= -2.45e+71) {
tmp = t_1;
} else if (a <= -1.05e-183) {
tmp = y + ((x * (z - a)) / t);
} else if (a <= 1.05e+19) {
tmp = y + ((z * (x - y)) / t);
} else if (a <= 7.5e+79) {
tmp = y * ((z - t) / (a - t));
} 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 + (z * ((y - x) / a))
if (a <= (-2.45d+71)) then
tmp = t_1
else if (a <= (-1.05d-183)) then
tmp = y + ((x * (z - a)) / t)
else if (a <= 1.05d+19) then
tmp = y + ((z * (x - y)) / t)
else if (a <= 7.5d+79) then
tmp = y * ((z - t) / (a - t))
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 + (z * ((y - x) / a));
double tmp;
if (a <= -2.45e+71) {
tmp = t_1;
} else if (a <= -1.05e-183) {
tmp = y + ((x * (z - a)) / t);
} else if (a <= 1.05e+19) {
tmp = y + ((z * (x - y)) / t);
} else if (a <= 7.5e+79) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * ((y - x) / a)) tmp = 0 if a <= -2.45e+71: tmp = t_1 elif a <= -1.05e-183: tmp = y + ((x * (z - a)) / t) elif a <= 1.05e+19: tmp = y + ((z * (x - y)) / t) elif a <= 7.5e+79: tmp = y * ((z - t) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(Float64(y - x) / a))) tmp = 0.0 if (a <= -2.45e+71) tmp = t_1; elseif (a <= -1.05e-183) tmp = Float64(y + Float64(Float64(x * Float64(z - a)) / t)); elseif (a <= 1.05e+19) tmp = Float64(y + Float64(Float64(z * Float64(x - y)) / t)); elseif (a <= 7.5e+79) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * ((y - x) / a)); tmp = 0.0; if (a <= -2.45e+71) tmp = t_1; elseif (a <= -1.05e-183) tmp = y + ((x * (z - a)) / t); elseif (a <= 1.05e+19) tmp = y + ((z * (x - y)) / t); elseif (a <= 7.5e+79) tmp = y * ((z - t) / (a - t)); else tmp = t_1; 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]}, If[LessEqual[a, -2.45e+71], t$95$1, If[LessEqual[a, -1.05e-183], N[(y + N[(N[(x * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.05e+19], N[(y + N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e+79], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y - x}{a}\\
\mathbf{if}\;a \leq -2.45 \cdot 10^{+71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.05 \cdot 10^{-183}:\\
\;\;\;\;y + \frac{x \cdot \left(z - a\right)}{t}\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{+19}:\\
\;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{+79}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.4499999999999998e71 or 7.49999999999999967e79 < a Initial program 69.8%
Taylor expanded in t around 0 62.1%
associate-/l*75.7%
Simplified75.7%
if -2.4499999999999998e71 < a < -1.0500000000000001e-183Initial program 62.0%
Taylor expanded in t around inf 59.5%
associate--l+59.4%
associate-*r/59.4%
associate-*r/59.4%
mul-1-neg59.4%
div-sub64.0%
mul-1-neg64.0%
distribute-lft-out--64.0%
associate-*r/64.0%
mul-1-neg64.0%
unsub-neg64.0%
distribute-rgt-out--64.4%
Simplified64.4%
Taylor expanded in y around 0 65.0%
associate-*r/65.0%
associate-*r*65.0%
neg-mul-165.0%
Simplified65.0%
Taylor expanded in x around 0 65.0%
if -1.0500000000000001e-183 < a < 1.05e19Initial program 65.6%
Taylor expanded in t around inf 81.1%
associate--l+81.1%
associate-*r/81.1%
associate-*r/81.1%
mul-1-neg81.1%
div-sub81.1%
mul-1-neg81.1%
distribute-lft-out--81.1%
associate-*r/81.1%
mul-1-neg81.1%
unsub-neg81.1%
distribute-rgt-out--81.1%
Simplified81.1%
Taylor expanded in z around inf 77.2%
if 1.05e19 < a < 7.49999999999999967e79Initial program 76.0%
clear-num75.7%
inv-pow75.7%
*-commutative75.7%
associate-/r*85.3%
Applied egg-rr85.3%
Taylor expanded in y around inf 75.6%
div-sub75.6%
Simplified75.6%
Final simplification74.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* x (- 1.0 (/ z a)))))
(if (<= t -4.2e+97)
y
(if (<= t -5.6e-264)
t_1
(if (<= t -5.6e-305) (* y (/ z a)) (if (<= t 4.8e+57) t_1 y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x * (1.0 - (z / a));
double tmp;
if (t <= -4.2e+97) {
tmp = y;
} else if (t <= -5.6e-264) {
tmp = t_1;
} else if (t <= -5.6e-305) {
tmp = y * (z / a);
} else if (t <= 4.8e+57) {
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 * (1.0d0 - (z / a))
if (t <= (-4.2d+97)) then
tmp = y
else if (t <= (-5.6d-264)) then
tmp = t_1
else if (t <= (-5.6d-305)) then
tmp = y * (z / a)
else if (t <= 4.8d+57) 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 * (1.0 - (z / a));
double tmp;
if (t <= -4.2e+97) {
tmp = y;
} else if (t <= -5.6e-264) {
tmp = t_1;
} else if (t <= -5.6e-305) {
tmp = y * (z / a);
} else if (t <= 4.8e+57) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x * (1.0 - (z / a)) tmp = 0 if t <= -4.2e+97: tmp = y elif t <= -5.6e-264: tmp = t_1 elif t <= -5.6e-305: tmp = y * (z / a) elif t <= 4.8e+57: tmp = t_1 else: tmp = y return tmp
function code(x, y, z, t, a) t_1 = Float64(x * Float64(1.0 - Float64(z / a))) tmp = 0.0 if (t <= -4.2e+97) tmp = y; elseif (t <= -5.6e-264) tmp = t_1; elseif (t <= -5.6e-305) tmp = Float64(y * Float64(z / a)); elseif (t <= 4.8e+57) tmp = t_1; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x * (1.0 - (z / a)); tmp = 0.0; if (t <= -4.2e+97) tmp = y; elseif (t <= -5.6e-264) tmp = t_1; elseif (t <= -5.6e-305) tmp = y * (z / a); elseif (t <= 4.8e+57) tmp = t_1; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.2e+97], y, If[LessEqual[t, -5.6e-264], t$95$1, If[LessEqual[t, -5.6e-305], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e+57], t$95$1, y]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{if}\;t \leq -4.2 \cdot 10^{+97}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq -5.6 \cdot 10^{-264}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.6 \cdot 10^{-305}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -4.20000000000000023e97 or 4.80000000000000009e57 < t Initial program 39.9%
Taylor expanded in t around inf 56.6%
if -4.20000000000000023e97 < t < -5.60000000000000024e-264 or -5.60000000000000028e-305 < t < 4.80000000000000009e57Initial program 82.2%
Taylor expanded in x around inf 59.9%
mul-1-neg59.9%
unsub-neg59.9%
Simplified59.9%
Taylor expanded in t around 0 51.3%
if -5.60000000000000024e-264 < t < -5.60000000000000028e-305Initial program 84.0%
clear-num84.2%
inv-pow84.2%
*-commutative84.2%
associate-/r*99.7%
Applied egg-rr99.7%
Taylor expanded in z around inf 83.2%
div-sub83.2%
Simplified83.2%
Taylor expanded in y around inf 83.2%
Taylor expanded in a around inf 67.7%
associate-/l*83.5%
Simplified83.5%
Final simplification54.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ (- y x) a)))))
(if (<= a -3.3e+66)
t_1
(if (<= a 4.8e-148)
(+ y (/ (* x (- z a)) t))
(if (<= a 6.2e+79) (* y (/ (- z t) (- a t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * ((y - x) / a));
double tmp;
if (a <= -3.3e+66) {
tmp = t_1;
} else if (a <= 4.8e-148) {
tmp = y + ((x * (z - a)) / t);
} else if (a <= 6.2e+79) {
tmp = y * ((z - t) / (a - t));
} 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 + (z * ((y - x) / a))
if (a <= (-3.3d+66)) then
tmp = t_1
else if (a <= 4.8d-148) then
tmp = y + ((x * (z - a)) / t)
else if (a <= 6.2d+79) then
tmp = y * ((z - t) / (a - t))
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 + (z * ((y - x) / a));
double tmp;
if (a <= -3.3e+66) {
tmp = t_1;
} else if (a <= 4.8e-148) {
tmp = y + ((x * (z - a)) / t);
} else if (a <= 6.2e+79) {
tmp = y * ((z - t) / (a - t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * ((y - x) / a)) tmp = 0 if a <= -3.3e+66: tmp = t_1 elif a <= 4.8e-148: tmp = y + ((x * (z - a)) / t) elif a <= 6.2e+79: tmp = y * ((z - t) / (a - t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(Float64(y - x) / a))) tmp = 0.0 if (a <= -3.3e+66) tmp = t_1; elseif (a <= 4.8e-148) tmp = Float64(y + Float64(Float64(x * Float64(z - a)) / t)); elseif (a <= 6.2e+79) tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * ((y - x) / a)); tmp = 0.0; if (a <= -3.3e+66) tmp = t_1; elseif (a <= 4.8e-148) tmp = y + ((x * (z - a)) / t); elseif (a <= 6.2e+79) tmp = y * ((z - t) / (a - t)); else tmp = t_1; 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]}, If[LessEqual[a, -3.3e+66], t$95$1, If[LessEqual[a, 4.8e-148], N[(y + N[(N[(x * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.2e+79], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y - x}{a}\\
\mathbf{if}\;a \leq -3.3 \cdot 10^{+66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-148}:\\
\;\;\;\;y + \frac{x \cdot \left(z - a\right)}{t}\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{+79}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.3000000000000001e66 or 6.1999999999999998e79 < a Initial program 69.8%
Taylor expanded in t around 0 62.1%
associate-/l*75.7%
Simplified75.7%
if -3.3000000000000001e66 < a < 4.8000000000000002e-148Initial program 61.8%
Taylor expanded in t around inf 73.1%
associate--l+73.0%
associate-*r/73.0%
associate-*r/73.0%
mul-1-neg73.0%
div-sub74.9%
mul-1-neg74.9%
distribute-lft-out--74.9%
associate-*r/74.9%
mul-1-neg74.9%
unsub-neg74.9%
distribute-rgt-out--75.1%
Simplified75.1%
Taylor expanded in y around 0 68.0%
associate-*r/68.0%
associate-*r*68.0%
neg-mul-168.0%
Simplified68.0%
Taylor expanded in x around 0 68.0%
if 4.8000000000000002e-148 < a < 6.1999999999999998e79Initial program 74.6%
clear-num74.3%
inv-pow74.3%
*-commutative74.3%
associate-/r*85.2%
Applied egg-rr85.2%
Taylor expanded in y around inf 72.9%
div-sub72.9%
Simplified72.9%
Final simplification71.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.25e-49) (not (<= a 4.6e-33))) (+ x (* y (/ (- z t) (- a t)))) (+ y (/ (* z (- x y)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.25e-49) || !(a <= 4.6e-33)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = y + ((z * (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.25d-49)) .or. (.not. (a <= 4.6d-33))) then
tmp = x + (y * ((z - t) / (a - t)))
else
tmp = y + ((z * (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.25e-49) || !(a <= 4.6e-33)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = y + ((z * (x - y)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.25e-49) or not (a <= 4.6e-33): tmp = x + (y * ((z - t) / (a - t))) else: tmp = y + ((z * (x - y)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.25e-49) || !(a <= 4.6e-33)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = Float64(y + Float64(Float64(z * Float64(x - y)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.25e-49) || ~((a <= 4.6e-33))) tmp = x + (y * ((z - t) / (a - t))); else tmp = y + ((z * (x - y)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.25e-49], N[Not[LessEqual[a, 4.6e-33]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(N[(z * N[(x - y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{-49} \lor \neg \left(a \leq 4.6 \cdot 10^{-33}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + \frac{z \cdot \left(x - y\right)}{t}\\
\end{array}
\end{array}
if a < -1.25e-49 or 4.59999999999999971e-33 < a Initial program 71.5%
Taylor expanded in y around inf 69.5%
associate-/l*80.8%
Simplified80.8%
if -1.25e-49 < a < 4.59999999999999971e-33Initial program 61.6%
Taylor expanded in t around inf 79.3%
associate--l+79.3%
associate-*r/79.3%
associate-*r/79.3%
mul-1-neg79.3%
div-sub80.2%
mul-1-neg80.2%
distribute-lft-out--80.2%
associate-*r/80.2%
mul-1-neg80.2%
unsub-neg80.2%
distribute-rgt-out--80.3%
Simplified80.3%
Taylor expanded in z around inf 74.6%
Final simplification78.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -27000000000.0) (not (<= a 6.2e-33))) (+ x (* y (/ (- z t) (- a t)))) (- y (/ (* (- y x) (- z a)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -27000000000.0) || !(a <= 6.2e-33)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = y - (((y - x) * (z - 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 ((a <= (-27000000000.0d0)) .or. (.not. (a <= 6.2d-33))) then
tmp = x + (y * ((z - t) / (a - t)))
else
tmp = y - (((y - x) * (z - 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 ((a <= -27000000000.0) || !(a <= 6.2e-33)) {
tmp = x + (y * ((z - t) / (a - t)));
} else {
tmp = y - (((y - x) * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -27000000000.0) or not (a <= 6.2e-33): tmp = x + (y * ((z - t) / (a - t))) else: tmp = y - (((y - x) * (z - a)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -27000000000.0) || !(a <= 6.2e-33)) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))); else tmp = Float64(y - Float64(Float64(Float64(y - x) * Float64(z - a)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -27000000000.0) || ~((a <= 6.2e-33))) tmp = x + (y * ((z - t) / (a - t))); else tmp = y - (((y - x) * (z - a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -27000000000.0], N[Not[LessEqual[a, 6.2e-33]], $MachinePrecision]], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y - N[(N[(N[(y - x), $MachinePrecision] * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -27000000000 \lor \neg \left(a \leq 6.2 \cdot 10^{-33}\right):\\
\;\;\;\;x + y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y - \frac{\left(y - x\right) \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if a < -2.7e10 or 6.19999999999999994e-33 < a Initial program 71.7%
Taylor expanded in y around inf 70.5%
associate-/l*82.3%
Simplified82.3%
if -2.7e10 < a < 6.19999999999999994e-33Initial program 61.9%
Taylor expanded in t around inf 77.7%
associate--l+77.7%
associate-*r/77.7%
associate-*r/77.7%
mul-1-neg77.7%
div-sub79.5%
mul-1-neg79.5%
distribute-lft-out--79.5%
associate-*r/79.5%
mul-1-neg79.5%
unsub-neg79.5%
distribute-rgt-out--79.5%
Simplified79.5%
Final simplification81.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.4e+70) (not (<= a 3.5e+79))) (* x (- 1.0 (/ z a))) (+ y (* x (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.4e+70) || !(a <= 3.5e+79)) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y + (x * (z / 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 <= (-4.4d+70)) .or. (.not. (a <= 3.5d+79))) then
tmp = x * (1.0d0 - (z / a))
else
tmp = y + (x * (z / 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 <= -4.4e+70) || !(a <= 3.5e+79)) {
tmp = x * (1.0 - (z / a));
} else {
tmp = y + (x * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.4e+70) or not (a <= 3.5e+79): tmp = x * (1.0 - (z / a)) else: tmp = y + (x * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.4e+70) || !(a <= 3.5e+79)) tmp = Float64(x * Float64(1.0 - Float64(z / a))); else tmp = Float64(y + Float64(x * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.4e+70) || ~((a <= 3.5e+79))) tmp = x * (1.0 - (z / a)); else tmp = y + (x * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.4e+70], N[Not[LessEqual[a, 3.5e+79]], $MachinePrecision]], N[(x * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{+70} \lor \neg \left(a \leq 3.5 \cdot 10^{+79}\right):\\
\;\;\;\;x \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;y + x \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -4.40000000000000001e70 or 3.4999999999999998e79 < a Initial program 69.8%
Taylor expanded in x around inf 58.4%
mul-1-neg58.4%
unsub-neg58.4%
Simplified58.4%
Taylor expanded in t around 0 58.5%
if -4.40000000000000001e70 < a < 3.4999999999999998e79Initial program 65.9%
Taylor expanded in t around inf 69.9%
associate--l+69.9%
associate-*r/69.9%
associate-*r/69.9%
mul-1-neg69.9%
div-sub71.2%
mul-1-neg71.2%
distribute-lft-out--71.2%
associate-*r/71.2%
mul-1-neg71.2%
unsub-neg71.2%
distribute-rgt-out--71.3%
Simplified71.3%
Taylor expanded in y around 0 64.2%
associate-*r/64.2%
associate-*r*64.2%
neg-mul-164.2%
Simplified64.2%
Taylor expanded in a around 0 58.8%
sub-neg58.8%
mul-1-neg58.8%
remove-double-neg58.8%
associate-/l*64.0%
Simplified64.0%
Final simplification61.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.6e+39) x (if (<= a 1.06e-268) (* x (/ z t)) (if (<= a 9e+79) y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.6e+39) {
tmp = x;
} else if (a <= 1.06e-268) {
tmp = x * (z / t);
} else if (a <= 9e+79) {
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 <= (-5.6d+39)) then
tmp = x
else if (a <= 1.06d-268) then
tmp = x * (z / t)
else if (a <= 9d+79) 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 <= -5.6e+39) {
tmp = x;
} else if (a <= 1.06e-268) {
tmp = x * (z / t);
} else if (a <= 9e+79) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.6e+39: tmp = x elif a <= 1.06e-268: tmp = x * (z / t) elif a <= 9e+79: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.6e+39) tmp = x; elseif (a <= 1.06e-268) tmp = Float64(x * Float64(z / t)); elseif (a <= 9e+79) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.6e+39) tmp = x; elseif (a <= 1.06e-268) tmp = x * (z / t); elseif (a <= 9e+79) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.6e+39], x, If[LessEqual[a, 1.06e-268], N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+79], y, x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.6 \cdot 10^{+39}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.06 \cdot 10^{-268}:\\
\;\;\;\;x \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+79}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.60000000000000003e39 or 8.99999999999999987e79 < a Initial program 69.6%
Taylor expanded in a around inf 50.4%
if -5.60000000000000003e39 < a < 1.06e-268Initial program 63.1%
Taylor expanded in x around inf 37.6%
mul-1-neg37.6%
unsub-neg37.6%
Simplified37.6%
Taylor expanded in a around 0 45.9%
if 1.06e-268 < a < 8.99999999999999987e79Initial program 68.6%
Taylor expanded in t around inf 44.8%
Final simplification47.4%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.2e-27) y (if (<= t 1e-22) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.2e-27) {
tmp = y;
} else if (t <= 1e-22) {
tmp = x;
} 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 <= (-1.2d-27)) then
tmp = y
else if (t <= 1d-22) then
tmp = x
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 <= -1.2e-27) {
tmp = y;
} else if (t <= 1e-22) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.2e-27: tmp = y elif t <= 1e-22: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.2e-27) tmp = y; elseif (t <= 1e-22) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.2e-27) tmp = y; elseif (t <= 1e-22) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.2e-27], y, If[LessEqual[t, 1e-22], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-27}:\\
\;\;\;\;y\\
\mathbf{elif}\;t \leq 10^{-22}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if t < -1.20000000000000001e-27 or 1e-22 < t Initial program 49.5%
Taylor expanded in t around inf 46.2%
if -1.20000000000000001e-27 < t < 1e-22Initial program 86.5%
Taylor expanded in a around inf 39.8%
Final simplification43.1%
(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 67.4%
Taylor expanded in a around inf 26.0%
Final simplification26.0%
(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 2024055
(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))))