
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 5e+294)))
(+ x (/ 1.0 (/ (/ (- z a) y) (- z t))))
(+ x t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 5e+294)) {
tmp = x + (1.0 / (((z - a) / y) / (z - t)));
} else {
tmp = x + t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 5e+294)) {
tmp = x + (1.0 / (((z - a) / y) / (z - t)));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 5e+294): tmp = x + (1.0 / (((z - a) / y) / (z - t))) else: tmp = x + t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 5e+294)) tmp = Float64(x + Float64(1.0 / Float64(Float64(Float64(z - a) / y) / Float64(z - t)))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 5e+294))) tmp = x + (1.0 / (((z - a) / y) / (z - t))); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 5e+294]], $MachinePrecision]], N[(x + N[(1.0 / N[(N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 5 \cdot 10^{+294}\right):\\
\;\;\;\;x + \frac{1}{\frac{\frac{z - a}{y}}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0 or 4.9999999999999999e294 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 41.3%
clear-num41.3%
inv-pow41.3%
Applied egg-rr41.3%
unpow-141.3%
associate-/r*99.7%
Simplified99.7%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 4.9999999999999999e294Initial program 99.9%
Final simplification99.8%
(FPCore (x y z t a) :precision binary64 (fma y (/ (- z t) (- z a)) x))
double code(double x, double y, double z, double t, double a) {
return fma(y, ((z - t) / (z - a)), x);
}
function code(x, y, z, t, a) return fma(y, Float64(Float64(z - t) / Float64(z - a)), x) end
code[x_, y_, z_, t_, a_] := N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, \frac{z - t}{z - a}, x\right)
\end{array}
Initial program 85.2%
+-commutative85.2%
associate-/l*98.1%
fma-define98.1%
Simplified98.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (<= t_1 (- INFINITY))
(* (- z t) (/ y (- z a)))
(if (<= t_1 5e+294) (+ x t_1) (/ (- z t) (/ (- z a) y))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (z - t) * (y / (z - a));
} else if (t_1 <= 5e+294) {
tmp = x + t_1;
} else {
tmp = (z - t) / ((z - a) / y);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (z - t) * (y / (z - a));
} else if (t_1 <= 5e+294) {
tmp = x + t_1;
} else {
tmp = (z - t) / ((z - a) / y);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if t_1 <= -math.inf: tmp = (z - t) * (y / (z - a)) elif t_1 <= 5e+294: tmp = x + t_1 else: tmp = (z - t) / ((z - a) / y) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(z - t) * Float64(y / Float64(z - a))); elseif (t_1 <= 5e+294) tmp = Float64(x + t_1); else tmp = Float64(Float64(z - t) / Float64(Float64(z - a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if (t_1 <= -Inf) tmp = (z - t) * (y / (z - a)); elseif (t_1 <= 5e+294) tmp = x + t_1; else tmp = (z - t) / ((z - a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+294], N[(x + t$95$1), $MachinePrecision], N[(N[(z - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+294}:\\
\;\;\;\;x + t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z - t}{\frac{z - a}{y}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0Initial program 42.4%
Taylor expanded in x around 0 42.4%
associate-*l/89.5%
Simplified89.5%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 4.9999999999999999e294Initial program 99.9%
if 4.9999999999999999e294 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 39.8%
Taylor expanded in x around 0 39.8%
associate-*l/96.3%
Simplified96.3%
clear-num96.1%
associate-*l/96.4%
*-un-lft-identity96.4%
Applied egg-rr96.4%
Final simplification98.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))) (t_2 (+ x (* y (/ (- t z) a)))))
(if (<= a -1.26e-25)
t_2
(if (<= a 2.9e-109)
t_1
(if (<= a 3.2e-49) (+ x (/ (* y t) a)) (if (<= a 7.5e-11) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double t_2 = x + (y * ((t - z) / a));
double tmp;
if (a <= -1.26e-25) {
tmp = t_2;
} else if (a <= 2.9e-109) {
tmp = t_1;
} else if (a <= 3.2e-49) {
tmp = x + ((y * t) / a);
} else if (a <= 7.5e-11) {
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 * (1.0d0 - (t / z)))
t_2 = x + (y * ((t - z) / a))
if (a <= (-1.26d-25)) then
tmp = t_2
else if (a <= 2.9d-109) then
tmp = t_1
else if (a <= 3.2d-49) then
tmp = x + ((y * t) / a)
else if (a <= 7.5d-11) 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 * (1.0 - (t / z)));
double t_2 = x + (y * ((t - z) / a));
double tmp;
if (a <= -1.26e-25) {
tmp = t_2;
} else if (a <= 2.9e-109) {
tmp = t_1;
} else if (a <= 3.2e-49) {
tmp = x + ((y * t) / a);
} else if (a <= 7.5e-11) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) t_2 = x + (y * ((t - z) / a)) tmp = 0 if a <= -1.26e-25: tmp = t_2 elif a <= 2.9e-109: tmp = t_1 elif a <= 3.2e-49: tmp = x + ((y * t) / a) elif a <= 7.5e-11: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) t_2 = Float64(x + Float64(y * Float64(Float64(t - z) / a))) tmp = 0.0 if (a <= -1.26e-25) tmp = t_2; elseif (a <= 2.9e-109) tmp = t_1; elseif (a <= 3.2e-49) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (a <= 7.5e-11) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); t_2 = x + (y * ((t - z) / a)); tmp = 0.0; if (a <= -1.26e-25) tmp = t_2; elseif (a <= 2.9e-109) tmp = t_1; elseif (a <= 3.2e-49) tmp = x + ((y * t) / a); elseif (a <= 7.5e-11) 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[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.26e-25], t$95$2, If[LessEqual[a, 2.9e-109], t$95$1, If[LessEqual[a, 3.2e-49], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.5e-11], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
t_2 := x + y \cdot \frac{t - z}{a}\\
\mathbf{if}\;a \leq -1.26 \cdot 10^{-25}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-109}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;a \leq 7.5 \cdot 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.26e-25 or 7.5e-11 < a Initial program 82.8%
Taylor expanded in a around inf 77.7%
mul-1-neg77.7%
unsub-neg77.7%
associate-/l*89.3%
Simplified89.3%
if -1.26e-25 < a < 2.9e-109 or 3.20000000000000002e-49 < a < 7.5e-11Initial program 88.3%
Taylor expanded in a around 0 78.2%
associate-/l*89.6%
div-sub89.6%
*-inverses89.6%
Simplified89.6%
if 2.9e-109 < a < 3.20000000000000002e-49Initial program 79.7%
Taylor expanded in z around 0 80.4%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (- 1.0 (/ t z))))) (t_2 (+ x (* t (/ y a)))))
(if (<= a -2.8e-39)
t_2
(if (<= a 3.2e-112)
t_1
(if (<= a 5e-47) (+ x (/ (* y t) a)) (if (<= a 1.5e-9) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (1.0 - (t / z)));
double t_2 = x + (t * (y / a));
double tmp;
if (a <= -2.8e-39) {
tmp = t_2;
} else if (a <= 3.2e-112) {
tmp = t_1;
} else if (a <= 5e-47) {
tmp = x + ((y * t) / a);
} else if (a <= 1.5e-9) {
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 * (1.0d0 - (t / z)))
t_2 = x + (t * (y / a))
if (a <= (-2.8d-39)) then
tmp = t_2
else if (a <= 3.2d-112) then
tmp = t_1
else if (a <= 5d-47) then
tmp = x + ((y * t) / a)
else if (a <= 1.5d-9) 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 * (1.0 - (t / z)));
double t_2 = x + (t * (y / a));
double tmp;
if (a <= -2.8e-39) {
tmp = t_2;
} else if (a <= 3.2e-112) {
tmp = t_1;
} else if (a <= 5e-47) {
tmp = x + ((y * t) / a);
} else if (a <= 1.5e-9) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (1.0 - (t / z))) t_2 = x + (t * (y / a)) tmp = 0 if a <= -2.8e-39: tmp = t_2 elif a <= 3.2e-112: tmp = t_1 elif a <= 5e-47: tmp = x + ((y * t) / a) elif a <= 1.5e-9: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(1.0 - Float64(t / z)))) t_2 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (a <= -2.8e-39) tmp = t_2; elseif (a <= 3.2e-112) tmp = t_1; elseif (a <= 5e-47) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (a <= 1.5e-9) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (1.0 - (t / z))); t_2 = x + (t * (y / a)); tmp = 0.0; if (a <= -2.8e-39) tmp = t_2; elseif (a <= 3.2e-112) tmp = t_1; elseif (a <= 5e-47) tmp = x + ((y * t) / a); elseif (a <= 1.5e-9) 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[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.8e-39], t$95$2, If[LessEqual[a, 3.2e-112], t$95$1, If[LessEqual[a, 5e-47], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.5e-9], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \left(1 - \frac{t}{z}\right)\\
t_2 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;a \leq -2.8 \cdot 10^{-39}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5 \cdot 10^{-47}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-9}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -2.8000000000000001e-39 or 1.49999999999999999e-9 < a Initial program 83.2%
Taylor expanded in z around 0 69.1%
+-commutative69.1%
associate-/l*78.9%
Simplified78.9%
if -2.8000000000000001e-39 < a < 3.19999999999999993e-112 or 5.00000000000000011e-47 < a < 1.49999999999999999e-9Initial program 88.0%
Taylor expanded in a around 0 78.5%
associate-/l*90.2%
div-sub90.2%
*-inverses90.2%
Simplified90.2%
if 3.19999999999999993e-112 < a < 5.00000000000000011e-47Initial program 79.7%
Taylor expanded in z around 0 80.4%
Final simplification84.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= z -1.22e+61)
(+ y x)
(if (<= z 1000.0)
t_1
(if (<= z 1.25e+64)
(- x (* y (/ t z)))
(if (<= z 8.8e+76) t_1 (+ y x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (z <= -1.22e+61) {
tmp = y + x;
} else if (z <= 1000.0) {
tmp = t_1;
} else if (z <= 1.25e+64) {
tmp = x - (y * (t / z));
} else if (z <= 8.8e+76) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + (t * (y / a))
if (z <= (-1.22d+61)) then
tmp = y + x
else if (z <= 1000.0d0) then
tmp = t_1
else if (z <= 1.25d+64) then
tmp = x - (y * (t / z))
else if (z <= 8.8d+76) then
tmp = t_1
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (z <= -1.22e+61) {
tmp = y + x;
} else if (z <= 1000.0) {
tmp = t_1;
} else if (z <= 1.25e+64) {
tmp = x - (y * (t / z));
} else if (z <= 8.8e+76) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if z <= -1.22e+61: tmp = y + x elif z <= 1000.0: tmp = t_1 elif z <= 1.25e+64: tmp = x - (y * (t / z)) elif z <= 8.8e+76: tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (z <= -1.22e+61) tmp = Float64(y + x); elseif (z <= 1000.0) tmp = t_1; elseif (z <= 1.25e+64) tmp = Float64(x - Float64(y * Float64(t / z))); elseif (z <= 8.8e+76) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (z <= -1.22e+61) tmp = y + x; elseif (z <= 1000.0) tmp = t_1; elseif (z <= 1.25e+64) tmp = x - (y * (t / z)); elseif (z <= 8.8e+76) tmp = t_1; else tmp = y + x; 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[z, -1.22e+61], N[(y + x), $MachinePrecision], If[LessEqual[z, 1000.0], t$95$1, If[LessEqual[z, 1.25e+64], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.8e+76], t$95$1, N[(y + x), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{+61}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 1000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+64}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.22e61 or 8.8000000000000002e76 < z Initial program 73.8%
Taylor expanded in z around inf 78.7%
+-commutative78.7%
Simplified78.7%
if -1.22e61 < z < 1e3 or 1.25e64 < z < 8.8000000000000002e76Initial program 92.6%
Taylor expanded in z around 0 70.9%
+-commutative70.9%
associate-/l*76.4%
Simplified76.4%
if 1e3 < z < 1.25e64Initial program 93.7%
Taylor expanded in a around 0 68.0%
associate-/l*74.0%
div-sub73.9%
*-inverses73.9%
Simplified73.9%
Taylor expanded in t around inf 61.9%
mul-1-neg61.9%
distribute-frac-neg261.9%
associate-*l/62.9%
*-commutative62.9%
Simplified62.9%
Final simplification76.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- z t) (/ y (- z a)))))
(if (<= y -2.6e+17)
t_1
(if (<= y 4e-53) (+ y x) (if (<= y 1.35e+140) (+ x (/ (* y t) a)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * (y / (z - a));
double tmp;
if (y <= -2.6e+17) {
tmp = t_1;
} else if (y <= 4e-53) {
tmp = y + x;
} else if (y <= 1.35e+140) {
tmp = x + ((y * t) / a);
} 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 = (z - t) * (y / (z - a))
if (y <= (-2.6d+17)) then
tmp = t_1
else if (y <= 4d-53) then
tmp = y + x
else if (y <= 1.35d+140) then
tmp = x + ((y * t) / a)
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 = (z - t) * (y / (z - a));
double tmp;
if (y <= -2.6e+17) {
tmp = t_1;
} else if (y <= 4e-53) {
tmp = y + x;
} else if (y <= 1.35e+140) {
tmp = x + ((y * t) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) * (y / (z - a)) tmp = 0 if y <= -2.6e+17: tmp = t_1 elif y <= 4e-53: tmp = y + x elif y <= 1.35e+140: tmp = x + ((y * t) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * Float64(y / Float64(z - a))) tmp = 0.0 if (y <= -2.6e+17) tmp = t_1; elseif (y <= 4e-53) tmp = Float64(y + x); elseif (y <= 1.35e+140) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) * (y / (z - a)); tmp = 0.0; if (y <= -2.6e+17) tmp = t_1; elseif (y <= 4e-53) tmp = y + x; elseif (y <= 1.35e+140) tmp = x + ((y * t) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.6e+17], t$95$1, If[LessEqual[y, 4e-53], N[(y + x), $MachinePrecision], If[LessEqual[y, 1.35e+140], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot \frac{y}{z - a}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-53}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+140}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.6e17 or 1.35000000000000009e140 < y Initial program 62.4%
Taylor expanded in x around 0 45.1%
associate-*l/74.8%
Simplified74.8%
if -2.6e17 < y < 4.00000000000000012e-53Initial program 99.9%
Taylor expanded in z around inf 82.1%
+-commutative82.1%
Simplified82.1%
if 4.00000000000000012e-53 < y < 1.35000000000000009e140Initial program 95.5%
Taylor expanded in z around 0 74.1%
Final simplification78.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -3.8e-246) (+ y x) (if (<= z 3.5e-232) (* t (/ y a)) (if (<= z 3.4e-9) x (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e-246) {
tmp = y + x;
} else if (z <= 3.5e-232) {
tmp = t * (y / a);
} else if (z <= 3.4e-9) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.8d-246)) then
tmp = y + x
else if (z <= 3.5d-232) then
tmp = t * (y / a)
else if (z <= 3.4d-9) then
tmp = x
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.8e-246) {
tmp = y + x;
} else if (z <= 3.5e-232) {
tmp = t * (y / a);
} else if (z <= 3.4e-9) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.8e-246: tmp = y + x elif z <= 3.5e-232: tmp = t * (y / a) elif z <= 3.4e-9: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.8e-246) tmp = Float64(y + x); elseif (z <= 3.5e-232) tmp = Float64(t * Float64(y / a)); elseif (z <= 3.4e-9) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.8e-246) tmp = y + x; elseif (z <= 3.5e-232) tmp = t * (y / a); elseif (z <= 3.4e-9) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.8e-246], N[(y + x), $MachinePrecision], If[LessEqual[z, 3.5e-232], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-9], x, N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.8 \cdot 10^{-246}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-232}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-9}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -3.79999999999999976e-246 or 3.3999999999999998e-9 < z Initial program 82.3%
Taylor expanded in z around inf 65.0%
+-commutative65.0%
Simplified65.0%
if -3.79999999999999976e-246 < z < 3.4999999999999998e-232Initial program 86.6%
Taylor expanded in x around 0 58.9%
associate-*l/68.9%
Simplified68.9%
Taylor expanded in z around 0 54.7%
associate-*r/64.8%
Simplified64.8%
if 3.4999999999999998e-232 < z < 3.3999999999999998e-9Initial program 95.8%
Taylor expanded in x around inf 59.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.3e+59) (not (<= z 3.7e+78))) (+ y x) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.3e+59) || !(z <= 3.7e+78)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.3d+59)) .or. (.not. (z <= 3.7d+78))) then
tmp = y + x
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.3e+59) || !(z <= 3.7e+78)) {
tmp = y + x;
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.3e+59) or not (z <= 3.7e+78): tmp = y + x else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.3e+59) || !(z <= 3.7e+78)) tmp = Float64(y + x); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.3e+59) || ~((z <= 3.7e+78))) tmp = y + x; else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.3e+59], N[Not[LessEqual[z, 3.7e+78]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+59} \lor \neg \left(z \leq 3.7 \cdot 10^{+78}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -3.2999999999999999e59 or 3.69999999999999985e78 < z Initial program 73.8%
Taylor expanded in z around inf 78.7%
+-commutative78.7%
Simplified78.7%
if -3.2999999999999999e59 < z < 3.69999999999999985e78Initial program 92.7%
Taylor expanded in z around 0 67.5%
+-commutative67.5%
associate-/l*72.5%
Simplified72.5%
Final simplification74.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.2e+40) (not (<= z 5.9e+26))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.2e+40) || !(z <= 5.9e+26)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.2d+40)) .or. (.not. (z <= 5.9d+26))) then
tmp = y + x
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.2e+40) || !(z <= 5.9e+26)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.2e+40) or not (z <= 5.9e+26): tmp = y + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.2e+40) || !(z <= 5.9e+26)) tmp = Float64(y + x); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.2e+40) || ~((z <= 5.9e+26))) tmp = y + x; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.2e+40], N[Not[LessEqual[z, 5.9e+26]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+40} \lor \neg \left(z \leq 5.9 \cdot 10^{+26}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -3.19999999999999981e40 or 5.9000000000000003e26 < z Initial program 74.2%
Taylor expanded in z around inf 72.6%
+-commutative72.6%
Simplified72.6%
if -3.19999999999999981e40 < z < 5.9000000000000003e26Initial program 94.5%
Taylor expanded in z around 0 72.6%
Final simplification72.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.06e+148) (* t (/ y a)) (if (<= t 1.9e+118) (+ y x) (* y (/ (- z t) z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.06e+148) {
tmp = t * (y / a);
} else if (t <= 1.9e+118) {
tmp = y + x;
} else {
tmp = y * ((z - t) / z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.06d+148)) then
tmp = t * (y / a)
else if (t <= 1.9d+118) then
tmp = y + x
else
tmp = y * ((z - t) / z)
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.06e+148) {
tmp = t * (y / a);
} else if (t <= 1.9e+118) {
tmp = y + x;
} else {
tmp = y * ((z - t) / z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.06e+148: tmp = t * (y / a) elif t <= 1.9e+118: tmp = y + x else: tmp = y * ((z - t) / z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.06e+148) tmp = Float64(t * Float64(y / a)); elseif (t <= 1.9e+118) tmp = Float64(y + x); else tmp = Float64(y * Float64(Float64(z - t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.06e+148) tmp = t * (y / a); elseif (t <= 1.9e+118) tmp = y + x; else tmp = y * ((z - t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.06e+148], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e+118], N[(y + x), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.06 \cdot 10^{+148}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{+118}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{z}\\
\end{array}
\end{array}
if t < -1.06e148Initial program 69.9%
Taylor expanded in x around 0 47.2%
associate-*l/74.4%
Simplified74.4%
Taylor expanded in z around 0 32.6%
associate-*r/51.7%
Simplified51.7%
if -1.06e148 < t < 1.90000000000000008e118Initial program 89.4%
Taylor expanded in z around inf 69.2%
+-commutative69.2%
Simplified69.2%
if 1.90000000000000008e118 < t Initial program 79.5%
Taylor expanded in x around 0 58.1%
associate-*l/69.5%
Simplified69.5%
Taylor expanded in a around 0 40.8%
associate-/l*51.9%
Simplified51.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -8.2e+147) (* t (/ y a)) (if (<= t 8.6e+270) (+ y x) (* t (/ y (- z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.2e+147) {
tmp = t * (y / a);
} else if (t <= 8.6e+270) {
tmp = y + x;
} else {
tmp = t * (y / -z);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-8.2d+147)) then
tmp = t * (y / a)
else if (t <= 8.6d+270) then
tmp = y + x
else
tmp = t * (y / -z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -8.2e+147) {
tmp = t * (y / a);
} else if (t <= 8.6e+270) {
tmp = y + x;
} else {
tmp = t * (y / -z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -8.2e+147: tmp = t * (y / a) elif t <= 8.6e+270: tmp = y + x else: tmp = t * (y / -z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -8.2e+147) tmp = Float64(t * Float64(y / a)); elseif (t <= 8.6e+270) tmp = Float64(y + x); else tmp = Float64(t * Float64(y / Float64(-z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -8.2e+147) tmp = t * (y / a); elseif (t <= 8.6e+270) tmp = y + x; else tmp = t * (y / -z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -8.2e+147], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.6e+270], N[(y + x), $MachinePrecision], N[(t * N[(y / (-z)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+147}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 8.6 \cdot 10^{+270}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{-z}\\
\end{array}
\end{array}
if t < -8.19999999999999932e147Initial program 69.9%
Taylor expanded in x around 0 47.2%
associate-*l/74.4%
Simplified74.4%
Taylor expanded in z around 0 32.6%
associate-*r/51.7%
Simplified51.7%
if -8.19999999999999932e147 < t < 8.5999999999999999e270Initial program 88.5%
Taylor expanded in z around inf 65.2%
+-commutative65.2%
Simplified65.2%
if 8.5999999999999999e270 < t Initial program 73.7%
+-commutative73.7%
*-commutative73.7%
associate-/l*99.9%
fma-define99.9%
Simplified99.9%
clear-num99.7%
associate-/r/99.8%
Applied egg-rr99.8%
Taylor expanded in t around inf 59.5%
associate-/l*85.8%
associate-*r*85.8%
neg-mul-185.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in z around inf 64.3%
Final simplification63.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7.6e-36) (not (<= z 1.6e-8))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.6e-36) || !(z <= 1.6e-8)) {
tmp = y + x;
} 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 ((z <= (-7.6d-36)) .or. (.not. (z <= 1.6d-8))) then
tmp = y + x
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 ((z <= -7.6e-36) || !(z <= 1.6e-8)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7.6e-36) or not (z <= 1.6e-8): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7.6e-36) || !(z <= 1.6e-8)) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7.6e-36) || ~((z <= 1.6e-8))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.6e-36], N[Not[LessEqual[z, 1.6e-8]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.6 \cdot 10^{-36} \lor \neg \left(z \leq 1.6 \cdot 10^{-8}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.59999999999999942e-36 or 1.6000000000000001e-8 < z Initial program 79.0%
Taylor expanded in z around inf 69.0%
+-commutative69.0%
Simplified69.0%
if -7.59999999999999942e-36 < z < 1.6000000000000001e-8Initial program 93.2%
Taylor expanded in x around inf 52.7%
Final simplification61.8%
(FPCore (x y z t a) :precision binary64 (if (<= x -5.6e-148) x (if (<= x 6e-288) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.6e-148) {
tmp = x;
} else if (x <= 6e-288) {
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 (x <= (-5.6d-148)) then
tmp = x
else if (x <= 6d-288) 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 (x <= -5.6e-148) {
tmp = x;
} else if (x <= 6e-288) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5.6e-148: tmp = x elif x <= 6e-288: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5.6e-148) tmp = x; elseif (x <= 6e-288) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -5.6e-148) tmp = x; elseif (x <= 6e-288) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.6e-148], x, If[LessEqual[x, 6e-288], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{-148}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-288}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -5.6e-148 or 5.99999999999999998e-288 < x Initial program 85.1%
Taylor expanded in x around inf 58.4%
if -5.6e-148 < x < 5.99999999999999998e-288Initial program 85.7%
Taylor expanded in x around 0 79.8%
associate-*l/75.8%
Simplified75.8%
Taylor expanded in z around inf 46.5%
(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 85.2%
Taylor expanded in x around inf 49.4%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - 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 / ((z - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2024085
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:alt
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))