
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((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 * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((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 * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- z t) (- a t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((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 * ((z - t) / (a - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((z - t) / (a - t)));
}
def code(x, y, z, t, a): return x + (y * ((z - t) / (a - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((z - t) / (a - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a - t}
\end{array}
Initial program 99.1%
Final simplification99.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ y (/ t (- z t))))) (t_2 (+ x (* y (/ (- z t) a)))))
(if (<= a -9.8e+55)
t_2
(if (<= a -3.2e-38)
t_1
(if (<= a -2.1e-84)
(+ x (/ (* y z) a))
(if (<= a 3.1e-123)
t_1
(if (<= a 6e+81) (+ x (* y (/ z (- a t)))) t_2)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y / (t / (z - t)));
double t_2 = x + (y * ((z - t) / a));
double tmp;
if (a <= -9.8e+55) {
tmp = t_2;
} else if (a <= -3.2e-38) {
tmp = t_1;
} else if (a <= -2.1e-84) {
tmp = x + ((y * z) / a);
} else if (a <= 3.1e-123) {
tmp = t_1;
} else if (a <= 6e+81) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - (y / (t / (z - t)))
t_2 = x + (y * ((z - t) / a))
if (a <= (-9.8d+55)) then
tmp = t_2
else if (a <= (-3.2d-38)) then
tmp = t_1
else if (a <= (-2.1d-84)) then
tmp = x + ((y * z) / a)
else if (a <= 3.1d-123) then
tmp = t_1
else if (a <= 6d+81) then
tmp = x + (y * (z / (a - t)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y / (t / (z - t)));
double t_2 = x + (y * ((z - t) / a));
double tmp;
if (a <= -9.8e+55) {
tmp = t_2;
} else if (a <= -3.2e-38) {
tmp = t_1;
} else if (a <= -2.1e-84) {
tmp = x + ((y * z) / a);
} else if (a <= 3.1e-123) {
tmp = t_1;
} else if (a <= 6e+81) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y / (t / (z - t))) t_2 = x + (y * ((z - t) / a)) tmp = 0 if a <= -9.8e+55: tmp = t_2 elif a <= -3.2e-38: tmp = t_1 elif a <= -2.1e-84: tmp = x + ((y * z) / a) elif a <= 3.1e-123: tmp = t_1 elif a <= 6e+81: tmp = x + (y * (z / (a - t))) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y / Float64(t / Float64(z - t)))) t_2 = Float64(x + Float64(y * Float64(Float64(z - t) / a))) tmp = 0.0 if (a <= -9.8e+55) tmp = t_2; elseif (a <= -3.2e-38) tmp = t_1; elseif (a <= -2.1e-84) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif (a <= 3.1e-123) tmp = t_1; elseif (a <= 6e+81) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y / (t / (z - t))); t_2 = x + (y * ((z - t) / a)); tmp = 0.0; if (a <= -9.8e+55) tmp = t_2; elseif (a <= -3.2e-38) tmp = t_1; elseif (a <= -2.1e-84) tmp = x + ((y * z) / a); elseif (a <= 3.1e-123) tmp = t_1; elseif (a <= 6e+81) tmp = x + (y * (z / (a - t))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y / N[(t / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.8e+55], t$95$2, If[LessEqual[a, -3.2e-38], t$95$1, If[LessEqual[a, -2.1e-84], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.1e-123], t$95$1, If[LessEqual[a, 6e+81], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{\frac{t}{z - t}}\\
t_2 := x + y \cdot \frac{z - t}{a}\\
\mathbf{if}\;a \leq -9.8 \cdot 10^{+55}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3.2 \cdot 10^{-38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.1 \cdot 10^{-84}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 6 \cdot 10^{+81}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -9.80000000000000029e55 or 5.99999999999999995e81 < a Initial program 99.8%
Taylor expanded in a around inf 94.3%
if -9.80000000000000029e55 < a < -3.19999999999999977e-38 or -2.09999999999999998e-84 < a < 3.09999999999999998e-123Initial program 99.0%
associate-*r/82.6%
Simplified82.6%
associate-*r/99.0%
*-commutative99.0%
div-inv98.8%
associate-*l*96.0%
Applied egg-rr96.0%
Taylor expanded in a around 0 72.7%
+-commutative72.7%
mul-1-neg72.7%
*-commutative72.7%
unsub-neg72.7%
*-commutative72.7%
associate-/l*89.1%
Simplified89.1%
if -3.19999999999999977e-38 < a < -2.09999999999999998e-84Initial program 92.5%
Taylor expanded in t around 0 82.9%
if 3.09999999999999998e-123 < a < 5.99999999999999995e81Initial program 99.9%
Taylor expanded in z around inf 89.6%
Final simplification90.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) a)))))
(if (<= a -5.5e+55)
t_1
(if (<= a -5e-38)
(- x (/ y (/ t (- z t))))
(if (<= a -5e-85)
(+ x (/ (* y z) a))
(if (<= a 4.1e-123)
(+ x (/ (- t z) (/ t y)))
(if (<= a 2.45e+82) (+ x (* y (/ z (- a t)))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / a));
double tmp;
if (a <= -5.5e+55) {
tmp = t_1;
} else if (a <= -5e-38) {
tmp = x - (y / (t / (z - t)));
} else if (a <= -5e-85) {
tmp = x + ((y * z) / a);
} else if (a <= 4.1e-123) {
tmp = x + ((t - z) / (t / y));
} else if (a <= 2.45e+82) {
tmp = x + (y * (z / (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 + (y * ((z - t) / a))
if (a <= (-5.5d+55)) then
tmp = t_1
else if (a <= (-5d-38)) then
tmp = x - (y / (t / (z - t)))
else if (a <= (-5d-85)) then
tmp = x + ((y * z) / a)
else if (a <= 4.1d-123) then
tmp = x + ((t - z) / (t / y))
else if (a <= 2.45d+82) then
tmp = x + (y * (z / (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 + (y * ((z - t) / a));
double tmp;
if (a <= -5.5e+55) {
tmp = t_1;
} else if (a <= -5e-38) {
tmp = x - (y / (t / (z - t)));
} else if (a <= -5e-85) {
tmp = x + ((y * z) / a);
} else if (a <= 4.1e-123) {
tmp = x + ((t - z) / (t / y));
} else if (a <= 2.45e+82) {
tmp = x + (y * (z / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / a)) tmp = 0 if a <= -5.5e+55: tmp = t_1 elif a <= -5e-38: tmp = x - (y / (t / (z - t))) elif a <= -5e-85: tmp = x + ((y * z) / a) elif a <= 4.1e-123: tmp = x + ((t - z) / (t / y)) elif a <= 2.45e+82: tmp = x + (y * (z / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / a))) tmp = 0.0 if (a <= -5.5e+55) tmp = t_1; elseif (a <= -5e-38) tmp = Float64(x - Float64(y / Float64(t / Float64(z - t)))); elseif (a <= -5e-85) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif (a <= 4.1e-123) tmp = Float64(x + Float64(Float64(t - z) / Float64(t / y))); elseif (a <= 2.45e+82) tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / a)); tmp = 0.0; if (a <= -5.5e+55) tmp = t_1; elseif (a <= -5e-38) tmp = x - (y / (t / (z - t))); elseif (a <= -5e-85) tmp = x + ((y * z) / a); elseif (a <= 4.1e-123) tmp = x + ((t - z) / (t / y)); elseif (a <= 2.45e+82) tmp = x + (y * (z / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.5e+55], t$95$1, If[LessEqual[a, -5e-38], N[(x - N[(y / N[(t / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5e-85], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.1e-123], N[(x + N[(N[(t - z), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.45e+82], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a}\\
\mathbf{if}\;a \leq -5.5 \cdot 10^{+55}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -5 \cdot 10^{-38}:\\
\;\;\;\;x - \frac{y}{\frac{t}{z - t}}\\
\mathbf{elif}\;a \leq -5 \cdot 10^{-85}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{-123}:\\
\;\;\;\;x + \frac{t - z}{\frac{t}{y}}\\
\mathbf{elif}\;a \leq 2.45 \cdot 10^{+82}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -5.5000000000000004e55 or 2.45e82 < a Initial program 99.8%
Taylor expanded in a around inf 94.3%
if -5.5000000000000004e55 < a < -5.00000000000000033e-38Initial program 99.9%
associate-*r/84.3%
Simplified84.3%
associate-*r/99.9%
*-commutative99.9%
div-inv99.8%
associate-*l*87.9%
Applied egg-rr87.9%
Taylor expanded in a around 0 67.8%
+-commutative67.8%
mul-1-neg67.8%
*-commutative67.8%
unsub-neg67.8%
*-commutative67.8%
associate-/l*83.5%
Simplified83.5%
if -5.00000000000000033e-38 < a < -5.0000000000000002e-85Initial program 92.5%
Taylor expanded in t around 0 82.9%
if -5.0000000000000002e-85 < a < 4.1e-123Initial program 98.7%
Taylor expanded in a around 0 74.2%
+-commutative74.2%
mul-1-neg74.2%
unsub-neg74.2%
associate-/l*91.9%
Simplified91.9%
if 4.1e-123 < a < 2.45e82Initial program 99.9%
Taylor expanded in z around inf 89.6%
Final simplification91.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y (- t a)) (- t z))))
(if (<= y -6.5e+107)
t_1
(if (<= y 8.8e-269)
(+ x (/ (* y z) a))
(if (<= y 1.6e-57)
(+ x y)
(if (<= y 115000.0) (+ x (* y (/ z a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / (t - a)) * (t - z);
double tmp;
if (y <= -6.5e+107) {
tmp = t_1;
} else if (y <= 8.8e-269) {
tmp = x + ((y * z) / a);
} else if (y <= 1.6e-57) {
tmp = x + y;
} else if (y <= 115000.0) {
tmp = x + (y * (z / 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 = (y / (t - a)) * (t - z)
if (y <= (-6.5d+107)) then
tmp = t_1
else if (y <= 8.8d-269) then
tmp = x + ((y * z) / a)
else if (y <= 1.6d-57) then
tmp = x + y
else if (y <= 115000.0d0) then
tmp = x + (y * (z / 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 = (y / (t - a)) * (t - z);
double tmp;
if (y <= -6.5e+107) {
tmp = t_1;
} else if (y <= 8.8e-269) {
tmp = x + ((y * z) / a);
} else if (y <= 1.6e-57) {
tmp = x + y;
} else if (y <= 115000.0) {
tmp = x + (y * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / (t - a)) * (t - z) tmp = 0 if y <= -6.5e+107: tmp = t_1 elif y <= 8.8e-269: tmp = x + ((y * z) / a) elif y <= 1.6e-57: tmp = x + y elif y <= 115000.0: tmp = x + (y * (z / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / Float64(t - a)) * Float64(t - z)) tmp = 0.0 if (y <= -6.5e+107) tmp = t_1; elseif (y <= 8.8e-269) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif (y <= 1.6e-57) tmp = Float64(x + y); elseif (y <= 115000.0) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / (t - a)) * (t - z); tmp = 0.0; if (y <= -6.5e+107) tmp = t_1; elseif (y <= 8.8e-269) tmp = x + ((y * z) / a); elseif (y <= 1.6e-57) tmp = x + y; elseif (y <= 115000.0) tmp = x + (y * (z / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.5e+107], t$95$1, If[LessEqual[y, 8.8e-269], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e-57], N[(x + y), $MachinePrecision], If[LessEqual[y, 115000.0], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{t - a} \cdot \left(t - z\right)\\
\mathbf{if}\;y \leq -6.5 \cdot 10^{+107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.8 \cdot 10^{-269}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-57}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;y \leq 115000:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -6.5000000000000006e107 or 115000 < y Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
associate-*l/67.6%
sub-neg67.6%
+-commutative67.6%
neg-sub067.6%
associate-+l-67.6%
sub0-neg67.6%
neg-mul-167.6%
times-frac97.2%
fma-def97.2%
sub-neg97.2%
+-commutative97.2%
neg-sub097.2%
associate-+l-97.2%
sub0-neg97.2%
neg-mul-197.2%
*-commutative97.2%
associate-/l*97.2%
metadata-eval97.2%
/-rgt-identity97.2%
Simplified97.2%
Taylor expanded in y around -inf 53.5%
associate-/l*81.8%
Simplified81.8%
associate-/r/80.1%
Applied egg-rr80.1%
if -6.5000000000000006e107 < y < 8.79999999999999936e-269Initial program 98.8%
Taylor expanded in t around 0 79.4%
if 8.79999999999999936e-269 < y < 1.6e-57Initial program 98.0%
Taylor expanded in t around inf 86.4%
if 1.6e-57 < y < 115000Initial program 100.0%
Taylor expanded in t around 0 75.1%
Final simplification80.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.2e+38)
(+ x y)
(if (or (<= t 1.8e-87) (and (not (<= t 8.2e-23)) (<= t 1.26e+61)))
(+ x (* y (/ z a)))
(+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.2e+38) {
tmp = x + y;
} else if ((t <= 1.8e-87) || (!(t <= 8.2e-23) && (t <= 1.26e+61))) {
tmp = x + (y * (z / a));
} else {
tmp = x + 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 <= (-5.2d+38)) then
tmp = x + y
else if ((t <= 1.8d-87) .or. (.not. (t <= 8.2d-23)) .and. (t <= 1.26d+61)) then
tmp = x + (y * (z / a))
else
tmp = x + 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 <= -5.2e+38) {
tmp = x + y;
} else if ((t <= 1.8e-87) || (!(t <= 8.2e-23) && (t <= 1.26e+61))) {
tmp = x + (y * (z / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.2e+38: tmp = x + y elif (t <= 1.8e-87) or (not (t <= 8.2e-23) and (t <= 1.26e+61)): tmp = x + (y * (z / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.2e+38) tmp = Float64(x + y); elseif ((t <= 1.8e-87) || (!(t <= 8.2e-23) && (t <= 1.26e+61))) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.2e+38) tmp = x + y; elseif ((t <= 1.8e-87) || (~((t <= 8.2e-23)) && (t <= 1.26e+61))) tmp = x + (y * (z / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.2e+38], N[(x + y), $MachinePrecision], If[Or[LessEqual[t, 1.8e-87], And[N[Not[LessEqual[t, 8.2e-23]], $MachinePrecision], LessEqual[t, 1.26e+61]]], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+38}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-87} \lor \neg \left(t \leq 8.2 \cdot 10^{-23}\right) \land t \leq 1.26 \cdot 10^{+61}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -5.1999999999999998e38 or 1.79999999999999996e-87 < t < 8.20000000000000059e-23 or 1.2600000000000001e61 < t Initial program 99.9%
Taylor expanded in t around inf 76.8%
if -5.1999999999999998e38 < t < 1.79999999999999996e-87 or 8.20000000000000059e-23 < t < 1.2600000000000001e61Initial program 98.5%
Taylor expanded in t around 0 79.2%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -5.2e+38)
(+ x y)
(if (<= t 1.86e-87)
(+ x (/ y (/ a z)))
(if (<= t 7.6e-23)
(+ x y)
(if (<= t 2e+61) (+ x (* y (/ z a))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.2e+38) {
tmp = x + y;
} else if (t <= 1.86e-87) {
tmp = x + (y / (a / z));
} else if (t <= 7.6e-23) {
tmp = x + y;
} else if (t <= 2e+61) {
tmp = x + (y * (z / a));
} else {
tmp = x + 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 <= (-5.2d+38)) then
tmp = x + y
else if (t <= 1.86d-87) then
tmp = x + (y / (a / z))
else if (t <= 7.6d-23) then
tmp = x + y
else if (t <= 2d+61) then
tmp = x + (y * (z / a))
else
tmp = x + 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 <= -5.2e+38) {
tmp = x + y;
} else if (t <= 1.86e-87) {
tmp = x + (y / (a / z));
} else if (t <= 7.6e-23) {
tmp = x + y;
} else if (t <= 2e+61) {
tmp = x + (y * (z / a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.2e+38: tmp = x + y elif t <= 1.86e-87: tmp = x + (y / (a / z)) elif t <= 7.6e-23: tmp = x + y elif t <= 2e+61: tmp = x + (y * (z / a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.2e+38) tmp = Float64(x + y); elseif (t <= 1.86e-87) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (t <= 7.6e-23) tmp = Float64(x + y); elseif (t <= 2e+61) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.2e+38) tmp = x + y; elseif (t <= 1.86e-87) tmp = x + (y / (a / z)); elseif (t <= 7.6e-23) tmp = x + y; elseif (t <= 2e+61) tmp = x + (y * (z / a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.2e+38], N[(x + y), $MachinePrecision], If[LessEqual[t, 1.86e-87], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.6e-23], N[(x + y), $MachinePrecision], If[LessEqual[t, 2e+61], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+38}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 1.86 \cdot 10^{-87}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 7.6 \cdot 10^{-23}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 2 \cdot 10^{+61}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -5.1999999999999998e38 or 1.8600000000000001e-87 < t < 7.60000000000000023e-23 or 1.9999999999999999e61 < t Initial program 99.9%
Taylor expanded in t around inf 76.8%
if -5.1999999999999998e38 < t < 1.8600000000000001e-87Initial program 98.3%
Taylor expanded in t around 0 78.2%
associate-/l*80.4%
Simplified80.4%
if 7.60000000000000023e-23 < t < 1.9999999999999999e61Initial program 99.9%
Taylor expanded in t around 0 69.8%
Final simplification78.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6e+42)
(+ x y)
(if (<= t 6.8e-88)
(+ x (/ y (/ a z)))
(if (<= t 1.35e-22)
(+ x y)
(if (<= t 1.26e+61) (- x (/ y (/ a t))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e+42) {
tmp = x + y;
} else if (t <= 6.8e-88) {
tmp = x + (y / (a / z));
} else if (t <= 1.35e-22) {
tmp = x + y;
} else if (t <= 1.26e+61) {
tmp = x - (y / (a / t));
} else {
tmp = x + 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 <= (-6d+42)) then
tmp = x + y
else if (t <= 6.8d-88) then
tmp = x + (y / (a / z))
else if (t <= 1.35d-22) then
tmp = x + y
else if (t <= 1.26d+61) then
tmp = x - (y / (a / t))
else
tmp = x + 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 <= -6e+42) {
tmp = x + y;
} else if (t <= 6.8e-88) {
tmp = x + (y / (a / z));
} else if (t <= 1.35e-22) {
tmp = x + y;
} else if (t <= 1.26e+61) {
tmp = x - (y / (a / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6e+42: tmp = x + y elif t <= 6.8e-88: tmp = x + (y / (a / z)) elif t <= 1.35e-22: tmp = x + y elif t <= 1.26e+61: tmp = x - (y / (a / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6e+42) tmp = Float64(x + y); elseif (t <= 6.8e-88) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (t <= 1.35e-22) tmp = Float64(x + y); elseif (t <= 1.26e+61) tmp = Float64(x - Float64(y / Float64(a / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6e+42) tmp = x + y; elseif (t <= 6.8e-88) tmp = x + (y / (a / z)); elseif (t <= 1.35e-22) tmp = x + y; elseif (t <= 1.26e+61) tmp = x - (y / (a / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6e+42], N[(x + y), $MachinePrecision], If[LessEqual[t, 6.8e-88], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.35e-22], N[(x + y), $MachinePrecision], If[LessEqual[t, 1.26e+61], N[(x - N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+42}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-88}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-22}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{+61}:\\
\;\;\;\;x - \frac{y}{\frac{a}{t}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if t < -6.00000000000000058e42 or 6.79999999999999949e-88 < t < 1.3500000000000001e-22 or 1.2600000000000001e61 < t Initial program 99.9%
Taylor expanded in t around inf 76.8%
if -6.00000000000000058e42 < t < 6.79999999999999949e-88Initial program 98.3%
Taylor expanded in t around 0 78.2%
associate-/l*80.4%
Simplified80.4%
if 1.3500000000000001e-22 < t < 1.2600000000000001e61Initial program 99.9%
Taylor expanded in a around inf 81.9%
Taylor expanded in z around 0 73.0%
+-commutative73.0%
mul-1-neg73.0%
unsub-neg73.0%
associate-/l*73.1%
Simplified73.1%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9.5e+107) (not (<= y 1.3e+157))) (* (/ y (- t a)) (- t z)) (+ x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.5e+107) || !(y <= 1.3e+157)) {
tmp = (y / (t - a)) * (t - z);
} else {
tmp = x + (y * (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 ((y <= (-9.5d+107)) .or. (.not. (y <= 1.3d+157))) then
tmp = (y / (t - a)) * (t - z)
else
tmp = x + (y * (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 ((y <= -9.5e+107) || !(y <= 1.3e+157)) {
tmp = (y / (t - a)) * (t - z);
} else {
tmp = x + (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.5e+107) or not (y <= 1.3e+157): tmp = (y / (t - a)) * (t - z) else: tmp = x + (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.5e+107) || !(y <= 1.3e+157)) tmp = Float64(Float64(y / Float64(t - a)) * Float64(t - z)); else tmp = Float64(x + Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -9.5e+107) || ~((y <= 1.3e+157))) tmp = (y / (t - a)) * (t - z); else tmp = x + (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.5e+107], N[Not[LessEqual[y, 1.3e+157]], $MachinePrecision]], N[(N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.5 \cdot 10^{+107} \lor \neg \left(y \leq 1.3 \cdot 10^{+157}\right):\\
\;\;\;\;\frac{y}{t - a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if y < -9.50000000000000019e107 or 1.30000000000000005e157 < y Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
associate-*l/58.5%
sub-neg58.5%
+-commutative58.5%
neg-sub058.5%
associate-+l-58.5%
sub0-neg58.5%
neg-mul-158.5%
times-frac95.9%
fma-def95.9%
sub-neg95.9%
+-commutative95.9%
neg-sub095.9%
associate-+l-95.9%
sub0-neg95.9%
neg-mul-195.9%
*-commutative95.9%
associate-/l*95.9%
metadata-eval95.9%
/-rgt-identity95.9%
Simplified95.9%
Taylor expanded in y around -inf 52.4%
associate-/l*87.7%
Simplified87.7%
associate-/r/85.2%
Applied egg-rr85.2%
if -9.50000000000000019e107 < y < 1.30000000000000005e157Initial program 98.9%
Taylor expanded in z around inf 84.8%
Final simplification84.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.8e-288) (+ x y) (if (<= a 4.2e-131) (* y (/ (- t z) t)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.8e-288) {
tmp = x + y;
} else if (a <= 4.2e-131) {
tmp = y * ((t - z) / t);
} 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 <= (-4.8d-288)) then
tmp = x + y
else if (a <= 4.2d-131) then
tmp = y * ((t - z) / t)
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 <= -4.8e-288) {
tmp = x + y;
} else if (a <= 4.2e-131) {
tmp = y * ((t - z) / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.8e-288: tmp = x + y elif a <= 4.2e-131: tmp = y * ((t - z) / t) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.8e-288) tmp = Float64(x + y); elseif (a <= 4.2e-131) tmp = Float64(y * Float64(Float64(t - z) / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.8e-288) tmp = x + y; elseif (a <= 4.2e-131) tmp = y * ((t - z) / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.8e-288], N[(x + y), $MachinePrecision], If[LessEqual[a, 4.2e-131], N[(y * N[(N[(t - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{-288}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-131}:\\
\;\;\;\;y \cdot \frac{t - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.7999999999999997e-288Initial program 99.1%
Taylor expanded in t around inf 66.2%
if -4.7999999999999997e-288 < a < 4.19999999999999994e-131Initial program 97.1%
+-commutative97.1%
*-commutative97.1%
associate-*l/72.7%
sub-neg72.7%
+-commutative72.7%
neg-sub072.7%
associate-+l-72.7%
sub0-neg72.7%
neg-mul-172.7%
times-frac96.9%
fma-def96.9%
sub-neg96.9%
+-commutative96.9%
neg-sub096.9%
associate-+l-96.9%
sub0-neg96.9%
neg-mul-196.9%
*-commutative96.9%
associate-/l*96.9%
metadata-eval96.9%
/-rgt-identity96.9%
Simplified96.9%
Taylor expanded in y around -inf 64.2%
associate-/l*85.7%
Simplified85.7%
Taylor expanded in a around 0 53.9%
expm1-log1p-u33.2%
expm1-udef24.7%
Applied egg-rr24.7%
expm1-def33.2%
expm1-log1p53.9%
associate-*r/75.5%
Simplified75.5%
if 4.19999999999999994e-131 < a Initial program 99.8%
Taylor expanded in x around inf 64.3%
Final simplification66.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.5e-286) (+ x y) (if (<= a 7e-131) (* (- t z) (/ y t)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.5e-286) {
tmp = x + y;
} else if (a <= 7e-131) {
tmp = (t - z) * (y / t);
} 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 <= (-4.5d-286)) then
tmp = x + y
else if (a <= 7d-131) then
tmp = (t - z) * (y / t)
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 <= -4.5e-286) {
tmp = x + y;
} else if (a <= 7e-131) {
tmp = (t - z) * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.5e-286: tmp = x + y elif a <= 7e-131: tmp = (t - z) * (y / t) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.5e-286) tmp = Float64(x + y); elseif (a <= 7e-131) tmp = Float64(Float64(t - z) * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.5e-286) tmp = x + y; elseif (a <= 7e-131) tmp = (t - z) * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.5e-286], N[(x + y), $MachinePrecision], If[LessEqual[a, 7e-131], N[(N[(t - z), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{-286}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-131}:\\
\;\;\;\;\left(t - z\right) \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.50000000000000005e-286Initial program 99.1%
Taylor expanded in t around inf 66.2%
if -4.50000000000000005e-286 < a < 7.0000000000000004e-131Initial program 97.1%
+-commutative97.1%
*-commutative97.1%
associate-*l/72.7%
sub-neg72.7%
+-commutative72.7%
neg-sub072.7%
associate-+l-72.7%
sub0-neg72.7%
neg-mul-172.7%
times-frac96.9%
fma-def96.9%
sub-neg96.9%
+-commutative96.9%
neg-sub096.9%
associate-+l-96.9%
sub0-neg96.9%
neg-mul-196.9%
*-commutative96.9%
associate-/l*96.9%
metadata-eval96.9%
/-rgt-identity96.9%
Simplified96.9%
Taylor expanded in y around -inf 64.2%
associate-/l*85.7%
Simplified85.7%
Taylor expanded in a around 0 53.9%
expm1-log1p-u33.2%
expm1-udef24.7%
Applied egg-rr24.7%
expm1-def33.2%
expm1-log1p53.9%
*-commutative53.9%
associate-*r/78.0%
*-commutative78.0%
Simplified78.0%
if 7.0000000000000004e-131 < a Initial program 99.8%
Taylor expanded in x around inf 64.3%
Final simplification67.0%
(FPCore (x y z t a) :precision binary64 (if (<= a 8.8e-308) (+ x y) (if (<= a 3e-245) (* y (/ (- z) t)) (if (<= a 1550000000.0) (+ x y) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 8.8e-308) {
tmp = x + y;
} else if (a <= 3e-245) {
tmp = y * (-z / t);
} else if (a <= 1550000000.0) {
tmp = x + 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 <= 8.8d-308) then
tmp = x + y
else if (a <= 3d-245) then
tmp = y * (-z / t)
else if (a <= 1550000000.0d0) then
tmp = x + 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 <= 8.8e-308) {
tmp = x + y;
} else if (a <= 3e-245) {
tmp = y * (-z / t);
} else if (a <= 1550000000.0) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 8.8e-308: tmp = x + y elif a <= 3e-245: tmp = y * (-z / t) elif a <= 1550000000.0: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 8.8e-308) tmp = Float64(x + y); elseif (a <= 3e-245) tmp = Float64(y * Float64(Float64(-z) / t)); elseif (a <= 1550000000.0) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= 8.8e-308) tmp = x + y; elseif (a <= 3e-245) tmp = y * (-z / t); elseif (a <= 1550000000.0) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 8.8e-308], N[(x + y), $MachinePrecision], If[LessEqual[a, 3e-245], N[(y * N[((-z) / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1550000000.0], N[(x + y), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8.8 \cdot 10^{-308}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 3 \cdot 10^{-245}:\\
\;\;\;\;y \cdot \frac{-z}{t}\\
\mathbf{elif}\;a \leq 1550000000:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < 8.79999999999999979e-308 or 3.0000000000000002e-245 < a < 1.55e9Initial program 98.8%
Taylor expanded in t around inf 66.2%
if 8.79999999999999979e-308 < a < 3.0000000000000002e-245Initial program 99.8%
+-commutative99.8%
*-commutative99.8%
associate-*l/89.9%
sub-neg89.9%
+-commutative89.9%
neg-sub089.9%
associate-+l-89.9%
sub0-neg89.9%
neg-mul-189.9%
times-frac99.7%
fma-def99.7%
sub-neg99.7%
+-commutative99.7%
neg-sub099.7%
associate-+l-99.7%
sub0-neg99.7%
neg-mul-199.7%
*-commutative99.7%
associate-/l*99.7%
metadata-eval99.7%
/-rgt-identity99.7%
Simplified99.7%
Taylor expanded in y around -inf 79.2%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in a around 0 69.6%
expm1-log1p-u45.6%
expm1-udef45.5%
Applied egg-rr45.5%
expm1-def45.6%
expm1-log1p69.6%
associate-*r/79.5%
Simplified79.5%
Taylor expanded in t around 0 69.0%
mul-1-neg69.0%
distribute-neg-frac69.0%
Simplified69.0%
if 1.55e9 < a Initial program 99.8%
Taylor expanded in x around inf 67.5%
Final simplification66.6%
(FPCore (x y z t a) :precision binary64 (if (<= a 1550000000.0) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= 1550000000.0) {
tmp = x + 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 <= 1550000000.0d0) then
tmp = x + 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 <= 1550000000.0) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= 1550000000.0: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= 1550000000.0) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= 1550000000.0) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, 1550000000.0], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1550000000:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < 1.55e9Initial program 98.9%
Taylor expanded in t around inf 64.1%
if 1.55e9 < a Initial program 99.8%
Taylor expanded in x around inf 67.5%
Final simplification65.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 99.1%
Taylor expanded in x around inf 49.9%
Final simplification49.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ (- z t) (- a t))))))
(if (< y -8.508084860551241e-17)
t_1
(if (< y 2.894426862792089e-49)
(+ x (* (* y (- z t)) (/ 1.0 (- a t))))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (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 + (y * ((z - t) / (a - t)))
if (y < (-8.508084860551241d-17)) then
tmp = t_1
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) * (1.0d0 / (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 + (y * ((z - t) / (a - t)));
double tmp;
if (y < -8.508084860551241e-17) {
tmp = t_1;
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) * (1.0 / (a - t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * ((z - t) / (a - t))) tmp = 0 if y < -8.508084860551241e-17: tmp = t_1 elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) * (1.0 / (a - t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(Float64(z - t) / Float64(a - t)))) tmp = 0.0 if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) * Float64(1.0 / Float64(a - t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * ((z - t) / (a - t))); tmp = 0.0; if (y < -8.508084860551241e-17) tmp = t_1; elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) * (1.0 / (a - t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -8.508084860551241e-17], t$95$1, If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z - t}{a - t}\\
\mathbf{if}\;y < -8.508084860551241 \cdot 10^{-17}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \left(y \cdot \left(z - t\right)\right) \cdot \frac{1}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023238
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< y -8.508084860551241e-17) (+ x (* y (/ (- z t) (- a t)))) (if (< y 2.894426862792089e-49) (+ x (* (* y (- z t)) (/ 1.0 (- a t)))) (+ x (* y (/ (- z t) (- a t))))))
(+ x (* y (/ (- z t) (- a t)))))