
(FPCore (x y z t a) :precision binary64 (- (+ x y) (/ (* (- z t) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (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) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{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) y) (- a t))))
double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (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) * y) / (a - t))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x + y) - (((z - t) * y) / (a - t));
}
def code(x, y, z, t, a): return (x + y) - (((z - t) * y) / (a - t))
function code(x, y, z, t, a) return Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) end
function tmp = code(x, y, z, t, a) tmp = (x + y) - (((z - t) * y) / (a - t)); end
code[x_, y_, z_, t_, a_] := N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5e+120) (not (<= t 4e+156))) (+ x (/ y (/ t (- z a)))) (+ x (fma (/ (- t z) (- a t)) y y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5e+120) || !(t <= 4e+156)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = x + fma(((t - z) / (a - t)), y, y);
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5e+120) || !(t <= 4e+156)) tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); else tmp = Float64(x + fma(Float64(Float64(t - z) / Float64(a - t)), y, y)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5e+120], N[Not[LessEqual[t, 4e+156]], $MachinePrecision]], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+120} \lor \neg \left(t \leq 4 \cdot 10^{+156}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\mathbf{else}:\\
\;\;\;\;x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)\\
\end{array}
\end{array}
if t < -5.00000000000000019e120 or 3.9999999999999999e156 < t Initial program 50.5%
associate--l+59.1%
sub-neg59.1%
distribute-frac-neg59.1%
distribute-rgt-neg-out59.1%
+-commutative59.1%
distribute-rgt-neg-out59.1%
distribute-lft-neg-in59.1%
associate-/l*76.0%
associate-/r/81.9%
fma-def81.8%
sub-neg81.8%
distribute-neg-in81.8%
remove-double-neg81.8%
+-commutative81.8%
sub-neg81.8%
Simplified81.8%
Taylor expanded in t around inf 70.4%
neg-mul-170.4%
associate-+r+81.7%
neg-mul-181.7%
distribute-rgt1-in81.7%
metadata-eval81.7%
mul0-lft81.7%
associate-/l*97.6%
Simplified97.6%
if -5.00000000000000019e120 < t < 3.9999999999999999e156Initial program 83.8%
associate--l+84.3%
sub-neg84.3%
distribute-frac-neg84.3%
distribute-rgt-neg-out84.3%
+-commutative84.3%
distribute-rgt-neg-out84.3%
distribute-lft-neg-in84.3%
associate-/l*92.8%
associate-/r/93.3%
fma-def93.3%
sub-neg93.3%
distribute-neg-in93.3%
remove-double-neg93.3%
+-commutative93.3%
sub-neg93.3%
Simplified93.3%
Final simplification94.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (- y (/ y (/ a z))))))
(if (<= a -1.45e+31)
t_1
(if (<= a 1.45e-211)
(+ x (/ y (/ t z)))
(if (or (<= a 3.3e-16) (not (<= a 4.6e+64)))
t_1
(+ x (* y (/ z t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y - (y / (a / z)));
double tmp;
if (a <= -1.45e+31) {
tmp = t_1;
} else if (a <= 1.45e-211) {
tmp = x + (y / (t / z));
} else if ((a <= 3.3e-16) || !(a <= 4.6e+64)) {
tmp = t_1;
} else {
tmp = x + (y * (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) :: t_1
real(8) :: tmp
t_1 = x + (y - (y / (a / z)))
if (a <= (-1.45d+31)) then
tmp = t_1
else if (a <= 1.45d-211) then
tmp = x + (y / (t / z))
else if ((a <= 3.3d-16) .or. (.not. (a <= 4.6d+64))) then
tmp = t_1
else
tmp = x + (y * (z / 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 - (y / (a / z)));
double tmp;
if (a <= -1.45e+31) {
tmp = t_1;
} else if (a <= 1.45e-211) {
tmp = x + (y / (t / z));
} else if ((a <= 3.3e-16) || !(a <= 4.6e+64)) {
tmp = t_1;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y - (y / (a / z))) tmp = 0 if a <= -1.45e+31: tmp = t_1 elif a <= 1.45e-211: tmp = x + (y / (t / z)) elif (a <= 3.3e-16) or not (a <= 4.6e+64): tmp = t_1 else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y - Float64(y / Float64(a / z)))) tmp = 0.0 if (a <= -1.45e+31) tmp = t_1; elseif (a <= 1.45e-211) tmp = Float64(x + Float64(y / Float64(t / z))); elseif ((a <= 3.3e-16) || !(a <= 4.6e+64)) tmp = t_1; else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y - (y / (a / z))); tmp = 0.0; if (a <= -1.45e+31) tmp = t_1; elseif (a <= 1.45e-211) tmp = x + (y / (t / z)); elseif ((a <= 3.3e-16) || ~((a <= 4.6e+64))) tmp = t_1; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.45e+31], t$95$1, If[LessEqual[a, 1.45e-211], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 3.3e-16], N[Not[LessEqual[a, 4.6e+64]], $MachinePrecision]], t$95$1, N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(y - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{if}\;a \leq -1.45 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{-211}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;a \leq 3.3 \cdot 10^{-16} \lor \neg \left(a \leq 4.6 \cdot 10^{+64}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -1.45e31 or 1.45000000000000007e-211 < a < 3.29999999999999988e-16 or 4.6e64 < a Initial program 76.6%
associate--l+77.5%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in t around 0 77.9%
associate-/l*88.0%
Simplified88.0%
if -1.45e31 < a < 1.45000000000000007e-211Initial program 69.6%
associate--l+76.3%
associate-/l*82.0%
Simplified82.0%
Taylor expanded in z around inf 89.9%
mul-1-neg89.9%
associate-*l/93.0%
*-commutative93.0%
distribute-rgt-neg-in93.0%
distribute-frac-neg93.0%
Simplified93.0%
Taylor expanded in a around 0 85.3%
associate-/l*89.6%
Simplified89.6%
if 3.29999999999999988e-16 < a < 4.6e64Initial program 57.5%
associate--l+63.2%
associate-/l*75.8%
Simplified75.8%
Taylor expanded in z around inf 70.2%
mul-1-neg70.2%
associate-*l/82.0%
*-commutative82.0%
distribute-rgt-neg-in82.0%
distribute-frac-neg82.0%
Simplified82.0%
associate-*r/70.2%
frac-2neg70.2%
add-sqr-sqrt25.2%
sqrt-unprod57.8%
sqr-neg57.8%
sqrt-unprod44.5%
add-sqr-sqrt57.4%
*-commutative57.4%
distribute-lft-neg-in57.4%
add-sqr-sqrt12.9%
sqrt-unprod52.4%
sqr-neg52.4%
sqrt-unprod44.9%
add-sqr-sqrt70.2%
*-commutative70.2%
sub-neg70.2%
distribute-neg-in70.2%
remove-double-neg70.2%
Applied egg-rr70.2%
associate-/l*81.7%
+-commutative81.7%
unsub-neg81.7%
Simplified81.7%
Taylor expanded in t around inf 70.2%
associate-*r/87.7%
Simplified87.7%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.15e+122) (not (<= t 2.5e+158))) (+ x (/ y (/ t (- z a)))) (+ x (+ y (/ (- t z) (/ (- a t) y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.15e+122) || !(t <= 2.5e+158)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = x + (y + ((t - z) / ((a - t) / 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.15d+122)) .or. (.not. (t <= 2.5d+158))) then
tmp = x + (y / (t / (z - a)))
else
tmp = x + (y + ((t - z) / ((a - t) / 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.15e+122) || !(t <= 2.5e+158)) {
tmp = x + (y / (t / (z - a)));
} else {
tmp = x + (y + ((t - z) / ((a - t) / y)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.15e+122) or not (t <= 2.5e+158): tmp = x + (y / (t / (z - a))) else: tmp = x + (y + ((t - z) / ((a - t) / y))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.15e+122) || !(t <= 2.5e+158)) tmp = Float64(x + Float64(y / Float64(t / Float64(z - a)))); else tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.15e+122) || ~((t <= 2.5e+158))) tmp = x + (y / (t / (z - a))); else tmp = x + (y + ((t - z) / ((a - t) / y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.15e+122], N[Not[LessEqual[t, 2.5e+158]], $MachinePrecision]], N[(x + N[(y / N[(t / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{+122} \lor \neg \left(t \leq 2.5 \cdot 10^{+158}\right):\\
\;\;\;\;x + \frac{y}{\frac{t}{z - a}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\end{array}
\end{array}
if t < -1.15e122 or 2.4999999999999998e158 < t Initial program 50.5%
associate--l+59.1%
sub-neg59.1%
distribute-frac-neg59.1%
distribute-rgt-neg-out59.1%
+-commutative59.1%
distribute-rgt-neg-out59.1%
distribute-lft-neg-in59.1%
associate-/l*76.0%
associate-/r/81.9%
fma-def81.8%
sub-neg81.8%
distribute-neg-in81.8%
remove-double-neg81.8%
+-commutative81.8%
sub-neg81.8%
Simplified81.8%
Taylor expanded in t around inf 70.4%
neg-mul-170.4%
associate-+r+81.7%
neg-mul-181.7%
distribute-rgt1-in81.7%
metadata-eval81.7%
mul0-lft81.7%
associate-/l*97.6%
Simplified97.6%
if -1.15e122 < t < 2.4999999999999998e158Initial program 83.8%
associate--l+84.3%
associate-/l*92.8%
Simplified92.8%
Final simplification94.4%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.5e+128)
(+ x y)
(if (<= a -1.85e+30)
(- x (* z (/ y a)))
(if (<= a 2.3e+101) (+ x (/ y (/ t z))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.5e+128) {
tmp = x + y;
} else if (a <= -1.85e+30) {
tmp = x - (z * (y / a));
} else if (a <= 2.3e+101) {
tmp = x + (y / (t / z));
} 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 (a <= (-9.5d+128)) then
tmp = x + y
else if (a <= (-1.85d+30)) then
tmp = x - (z * (y / a))
else if (a <= 2.3d+101) then
tmp = x + (y / (t / z))
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 (a <= -9.5e+128) {
tmp = x + y;
} else if (a <= -1.85e+30) {
tmp = x - (z * (y / a));
} else if (a <= 2.3e+101) {
tmp = x + (y / (t / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.5e+128: tmp = x + y elif a <= -1.85e+30: tmp = x - (z * (y / a)) elif a <= 2.3e+101: tmp = x + (y / (t / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.5e+128) tmp = Float64(x + y); elseif (a <= -1.85e+30) tmp = Float64(x - Float64(z * Float64(y / a))); elseif (a <= 2.3e+101) tmp = Float64(x + Float64(y / Float64(t / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.5e+128) tmp = x + y; elseif (a <= -1.85e+30) tmp = x - (z * (y / a)); elseif (a <= 2.3e+101) tmp = x + (y / (t / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.5e+128], N[(x + y), $MachinePrecision], If[LessEqual[a, -1.85e+30], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e+101], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{+128}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -1.85 \cdot 10^{+30}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{+101}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -9.50000000000000014e128 or 2.3000000000000001e101 < a Initial program 71.4%
+-commutative71.4%
associate--l+71.4%
*-commutative71.4%
associate-/l*90.8%
associate-/r/90.9%
Simplified90.9%
Taylor expanded in a around inf 79.4%
+-commutative79.4%
Simplified79.4%
if -9.50000000000000014e128 < a < -1.85000000000000008e30Initial program 99.9%
associate--l+99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 96.6%
mul-1-neg96.6%
associate-*l/96.6%
*-commutative96.6%
distribute-rgt-neg-in96.6%
distribute-frac-neg96.6%
Simplified96.6%
Taylor expanded in a around inf 96.6%
mul-1-neg96.6%
distribute-neg-frac96.6%
Simplified96.6%
*-commutative96.6%
add-sqr-sqrt45.0%
sqrt-unprod75.3%
sqr-neg75.3%
sqrt-unprod33.8%
add-sqr-sqrt68.8%
cancel-sign-sub68.8%
distribute-frac-neg68.8%
*-commutative68.8%
add-sqr-sqrt35.0%
sqrt-unprod81.6%
sqr-neg81.6%
sqrt-unprod51.5%
add-sqr-sqrt96.6%
Applied egg-rr96.6%
if -1.85000000000000008e30 < a < 2.3000000000000001e101Initial program 70.5%
associate--l+75.8%
associate-/l*83.2%
Simplified83.2%
Taylor expanded in z around inf 83.7%
mul-1-neg83.7%
associate-*l/88.8%
*-commutative88.8%
distribute-rgt-neg-in88.8%
distribute-frac-neg88.8%
Simplified88.8%
Taylor expanded in a around 0 76.2%
associate-/l*81.5%
Simplified81.5%
Final simplification81.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.8e+128)
(+ x y)
(if (<= a -2.7e+29)
(- x (* y (/ z a)))
(if (<= a 1.9e+101) (+ x (/ y (/ t z))) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.8e+128) {
tmp = x + y;
} else if (a <= -2.7e+29) {
tmp = x - (y * (z / a));
} else if (a <= 1.9e+101) {
tmp = x + (y / (t / z));
} 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 (a <= (-9.8d+128)) then
tmp = x + y
else if (a <= (-2.7d+29)) then
tmp = x - (y * (z / a))
else if (a <= 1.9d+101) then
tmp = x + (y / (t / z))
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 (a <= -9.8e+128) {
tmp = x + y;
} else if (a <= -2.7e+29) {
tmp = x - (y * (z / a));
} else if (a <= 1.9e+101) {
tmp = x + (y / (t / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.8e+128: tmp = x + y elif a <= -2.7e+29: tmp = x - (y * (z / a)) elif a <= 1.9e+101: tmp = x + (y / (t / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.8e+128) tmp = Float64(x + y); elseif (a <= -2.7e+29) tmp = Float64(x - Float64(y * Float64(z / a))); elseif (a <= 1.9e+101) tmp = Float64(x + Float64(y / Float64(t / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.8e+128) tmp = x + y; elseif (a <= -2.7e+29) tmp = x - (y * (z / a)); elseif (a <= 1.9e+101) tmp = x + (y / (t / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.8e+128], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.7e+29], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.9e+101], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.8 \cdot 10^{+128}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{+29}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{+101}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -9.80000000000000035e128 or 1.8999999999999999e101 < a Initial program 71.4%
+-commutative71.4%
associate--l+71.4%
*-commutative71.4%
associate-/l*90.8%
associate-/r/90.9%
Simplified90.9%
Taylor expanded in a around inf 79.4%
+-commutative79.4%
Simplified79.4%
if -9.80000000000000035e128 < a < -2.7e29Initial program 99.9%
associate--l+99.9%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around inf 96.6%
mul-1-neg96.6%
associate-*l/96.6%
*-commutative96.6%
distribute-rgt-neg-in96.6%
distribute-frac-neg96.6%
Simplified96.6%
Taylor expanded in a around inf 96.6%
associate-*r/96.6%
*-commutative96.6%
neg-mul-196.6%
*-commutative96.6%
distribute-rgt-neg-in96.6%
associate-*r/96.6%
Simplified96.6%
if -2.7e29 < a < 1.8999999999999999e101Initial program 70.5%
associate--l+75.8%
associate-/l*83.2%
Simplified83.2%
Taylor expanded in z around inf 83.7%
mul-1-neg83.7%
associate-*l/88.8%
*-commutative88.8%
distribute-rgt-neg-in88.8%
distribute-frac-neg88.8%
Simplified88.8%
Taylor expanded in a around 0 76.2%
associate-/l*81.5%
Simplified81.5%
Final simplification81.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.6e+139) (not (<= a 1.46e+65))) (+ x (- y (/ y (/ a z)))) (+ x (/ z (/ (- t a) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.6e+139) || !(a <= 1.46e+65)) {
tmp = x + (y - (y / (a / z)));
} else {
tmp = x + (z / ((t - a) / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.6d+139)) .or. (.not. (a <= 1.46d+65))) then
tmp = x + (y - (y / (a / z)))
else
tmp = x + (z / ((t - a) / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.6e+139) || !(a <= 1.46e+65)) {
tmp = x + (y - (y / (a / z)));
} else {
tmp = x + (z / ((t - a) / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.6e+139) or not (a <= 1.46e+65): tmp = x + (y - (y / (a / z))) else: tmp = x + (z / ((t - a) / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.6e+139) || !(a <= 1.46e+65)) tmp = Float64(x + Float64(y - Float64(y / Float64(a / z)))); else tmp = Float64(x + Float64(z / Float64(Float64(t - a) / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.6e+139) || ~((a <= 1.46e+65))) tmp = x + (y - (y / (a / z))); else tmp = x + (z / ((t - a) / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.6e+139], N[Not[LessEqual[a, 1.46e+65]], $MachinePrecision]], N[(x + N[(y - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{+139} \lor \neg \left(a \leq 1.46 \cdot 10^{+65}\right):\\
\;\;\;\;x + \left(y - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{t - a}{y}}\\
\end{array}
\end{array}
if a < -2.60000000000000022e139 or 1.45999999999999999e65 < a Initial program 71.4%
associate--l+71.9%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in t around 0 74.5%
associate-/l*92.1%
Simplified92.1%
if -2.60000000000000022e139 < a < 1.45999999999999999e65Initial program 74.0%
associate--l+78.5%
associate-/l*83.4%
Simplified83.4%
Taylor expanded in z around inf 86.2%
mul-1-neg86.2%
associate-*l/89.1%
*-commutative89.1%
distribute-rgt-neg-in89.1%
distribute-frac-neg89.1%
Simplified89.1%
associate-*r/86.2%
frac-2neg86.2%
add-sqr-sqrt41.3%
sqrt-unprod67.3%
sqr-neg67.3%
sqrt-unprod30.9%
add-sqr-sqrt55.5%
*-commutative55.5%
distribute-lft-neg-in55.5%
add-sqr-sqrt24.6%
sqrt-unprod64.2%
sqr-neg64.2%
sqrt-unprod44.7%
add-sqr-sqrt86.2%
*-commutative86.2%
sub-neg86.2%
distribute-neg-in86.2%
remove-double-neg86.2%
Applied egg-rr86.2%
associate-/l*89.1%
+-commutative89.1%
unsub-neg89.1%
Simplified89.1%
Final simplification90.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.04e+139) (not (<= a 1.5e+101))) (+ x (- y (/ y (/ a z)))) (- x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.04e+139) || !(a <= 1.5e+101)) {
tmp = x + (y - (y / (a / z)));
} else {
tmp = x - (z * (y / (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 <= (-1.04d+139)) .or. (.not. (a <= 1.5d+101))) then
tmp = x + (y - (y / (a / z)))
else
tmp = x - (z * (y / (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 <= -1.04e+139) || !(a <= 1.5e+101)) {
tmp = x + (y - (y / (a / z)));
} else {
tmp = x - (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.04e+139) or not (a <= 1.5e+101): tmp = x + (y - (y / (a / z))) else: tmp = x - (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.04e+139) || !(a <= 1.5e+101)) tmp = Float64(x + Float64(y - Float64(y / Float64(a / z)))); else tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.04e+139) || ~((a <= 1.5e+101))) tmp = x + (y - (y / (a / z))); else tmp = x - (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.04e+139], N[Not[LessEqual[a, 1.5e+101]], $MachinePrecision]], N[(x + N[(y - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.04 \cdot 10^{+139} \lor \neg \left(a \leq 1.5 \cdot 10^{+101}\right):\\
\;\;\;\;x + \left(y - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if a < -1.04e139 or 1.49999999999999997e101 < a Initial program 73.2%
associate--l+73.7%
associate-/l*94.7%
Simplified94.7%
Taylor expanded in t around 0 76.6%
associate-/l*92.9%
Simplified92.9%
if -1.04e139 < a < 1.49999999999999997e101Initial program 73.0%
associate--l+77.5%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in z around inf 84.3%
mul-1-neg84.3%
associate-*l/88.8%
*-commutative88.8%
distribute-rgt-neg-in88.8%
distribute-frac-neg88.8%
Simplified88.8%
Final simplification90.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.8e+82) (not (<= y 1e+117))) (* y (- 1.0 (/ z a))) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.8e+82) || !(y <= 1e+117)) {
tmp = y * (1.0 - (z / a));
} 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 ((y <= (-3.8d+82)) .or. (.not. (y <= 1d+117))) then
tmp = y * (1.0d0 - (z / a))
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 ((y <= -3.8e+82) || !(y <= 1e+117)) {
tmp = y * (1.0 - (z / a));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.8e+82) or not (y <= 1e+117): tmp = y * (1.0 - (z / a)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.8e+82) || !(y <= 1e+117)) tmp = Float64(y * Float64(1.0 - Float64(z / a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.8e+82) || ~((y <= 1e+117))) tmp = y * (1.0 - (z / a)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.8e+82], N[Not[LessEqual[y, 1e+117]], $MachinePrecision]], N[(y * N[(1.0 - N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{+82} \lor \neg \left(y \leq 10^{+117}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.80000000000000033e82 or 1.00000000000000005e117 < y Initial program 52.1%
+-commutative52.1%
associate--l+52.1%
*-commutative52.1%
associate-/l*78.4%
associate-/r/75.5%
Simplified75.5%
Taylor expanded in t around 0 53.9%
Taylor expanded in x around 0 46.0%
associate-*r/59.7%
*-commutative59.7%
cancel-sign-sub-inv59.7%
*-lft-identity59.7%
mul-1-neg59.7%
distribute-rgt-in59.7%
mul-1-neg59.7%
sub-neg59.7%
Simplified59.7%
if -3.80000000000000033e82 < y < 1.00000000000000005e117Initial program 85.2%
+-commutative85.2%
associate--l+85.2%
*-commutative85.2%
associate-/l*88.0%
associate-/r/88.1%
Simplified88.1%
Taylor expanded in y around 0 73.4%
Final simplification68.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.7e+75) (not (<= a 2.32e+101))) (+ x y) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.7e+75) || !(a <= 2.32e+101)) {
tmp = x + y;
} else {
tmp = x + (y * (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 <= (-2.7d+75)) .or. (.not. (a <= 2.32d+101))) then
tmp = x + y
else
tmp = x + (y * (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 <= -2.7e+75) || !(a <= 2.32e+101)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.7e+75) or not (a <= 2.32e+101): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.7e+75) || !(a <= 2.32e+101)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y * Float64(z / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.7e+75) || ~((a <= 2.32e+101))) tmp = x + y; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.7e+75], N[Not[LessEqual[a, 2.32e+101]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.7 \cdot 10^{+75} \lor \neg \left(a \leq 2.32 \cdot 10^{+101}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -2.69999999999999998e75 or 2.32e101 < a Initial program 74.4%
+-commutative74.4%
associate--l+74.4%
*-commutative74.4%
associate-/l*91.8%
associate-/r/91.8%
Simplified91.8%
Taylor expanded in a around inf 77.8%
+-commutative77.8%
Simplified77.8%
if -2.69999999999999998e75 < a < 2.32e101Initial program 72.2%
associate--l+77.2%
associate-/l*84.2%
Simplified84.2%
Taylor expanded in z around inf 84.7%
mul-1-neg84.7%
associate-*l/89.4%
*-commutative89.4%
distribute-rgt-neg-in89.4%
distribute-frac-neg89.4%
Simplified89.4%
associate-*r/84.7%
frac-2neg84.7%
add-sqr-sqrt40.3%
sqrt-unprod66.1%
sqr-neg66.1%
sqrt-unprod30.8%
add-sqr-sqrt54.6%
*-commutative54.6%
distribute-lft-neg-in54.6%
add-sqr-sqrt23.8%
sqrt-unprod63.0%
sqr-neg63.0%
sqrt-unprod44.3%
add-sqr-sqrt84.7%
*-commutative84.7%
sub-neg84.7%
distribute-neg-in84.7%
remove-double-neg84.7%
Applied egg-rr84.7%
associate-/l*89.4%
+-commutative89.4%
unsub-neg89.4%
Simplified89.4%
Taylor expanded in t around inf 76.4%
associate-*r/81.2%
Simplified81.2%
Final simplification79.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -7.2e+75) (not (<= a 2.65e+101))) (+ x y) (+ x (/ y (/ t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -7.2e+75) || !(a <= 2.65e+101)) {
tmp = x + y;
} else {
tmp = x + (y / (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 ((a <= (-7.2d+75)) .or. (.not. (a <= 2.65d+101))) then
tmp = x + y
else
tmp = x + (y / (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 ((a <= -7.2e+75) || !(a <= 2.65e+101)) {
tmp = x + y;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -7.2e+75) or not (a <= 2.65e+101): tmp = x + y else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -7.2e+75) || !(a <= 2.65e+101)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -7.2e+75) || ~((a <= 2.65e+101))) tmp = x + y; else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -7.2e+75], N[Not[LessEqual[a, 2.65e+101]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+75} \lor \neg \left(a \leq 2.65 \cdot 10^{+101}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if a < -7.2e75 or 2.65000000000000003e101 < a Initial program 74.4%
+-commutative74.4%
associate--l+74.4%
*-commutative74.4%
associate-/l*91.8%
associate-/r/91.8%
Simplified91.8%
Taylor expanded in a around inf 77.8%
+-commutative77.8%
Simplified77.8%
if -7.2e75 < a < 2.65000000000000003e101Initial program 72.2%
associate--l+77.2%
associate-/l*84.2%
Simplified84.2%
Taylor expanded in z around inf 84.7%
mul-1-neg84.7%
associate-*l/89.4%
*-commutative89.4%
distribute-rgt-neg-in89.4%
distribute-frac-neg89.4%
Simplified89.4%
Taylor expanded in a around 0 76.4%
associate-/l*81.3%
Simplified81.3%
Final simplification79.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.8e+87) (not (<= a 1.1e-129))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.8e+87) || !(a <= 1.1e-129)) {
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 <= (-5.8d+87)) .or. (.not. (a <= 1.1d-129))) 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 <= -5.8e+87) || !(a <= 1.1e-129)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.8e+87) or not (a <= 1.1e-129): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.8e+87) || !(a <= 1.1e-129)) 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 <= -5.8e+87) || ~((a <= 1.1e-129))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -5.8e+87], N[Not[LessEqual[a, 1.1e-129]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.8 \cdot 10^{+87} \lor \neg \left(a \leq 1.1 \cdot 10^{-129}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.7999999999999996e87 or 1.10000000000000001e-129 < a Initial program 70.9%
+-commutative70.9%
associate--l+70.9%
*-commutative70.9%
associate-/l*89.1%
associate-/r/87.9%
Simplified87.9%
Taylor expanded in a around inf 72.6%
+-commutative72.6%
Simplified72.6%
if -5.7999999999999996e87 < a < 1.10000000000000001e-129Initial program 75.8%
+-commutative75.8%
associate--l+75.8%
*-commutative75.8%
associate-/l*78.8%
associate-/r/78.1%
Simplified78.1%
Taylor expanded in y around 0 60.7%
Final simplification67.2%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.8e+148) y (if (<= y 9e+162) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.8e+148) {
tmp = y;
} else if (y <= 9e+162) {
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 (y <= (-1.8d+148)) then
tmp = y
else if (y <= 9d+162) 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 (y <= -1.8e+148) {
tmp = y;
} else if (y <= 9e+162) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.8e+148: tmp = y elif y <= 9e+162: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.8e+148) tmp = y; elseif (y <= 9e+162) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.8e+148) tmp = y; elseif (y <= 9e+162) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.8e+148], y, If[LessEqual[y, 9e+162], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+148}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+162}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.80000000000000003e148 or 8.99999999999999944e162 < y Initial program 45.2%
+-commutative45.2%
associate--l+45.2%
*-commutative45.2%
associate-/l*72.4%
associate-/r/69.7%
Simplified69.7%
Taylor expanded in t around 0 49.3%
Taylor expanded in x around 0 45.6%
associate-*r/61.7%
*-commutative61.7%
cancel-sign-sub-inv61.7%
*-lft-identity61.7%
mul-1-neg61.7%
distribute-rgt-in61.7%
mul-1-neg61.7%
sub-neg61.7%
Simplified61.7%
Taylor expanded in z around 0 36.4%
if -1.80000000000000003e148 < y < 8.99999999999999944e162Initial program 82.2%
+-commutative82.2%
associate--l+82.2%
*-commutative82.2%
associate-/l*88.4%
associate-/r/88.0%
Simplified88.0%
Taylor expanded in y around 0 67.0%
Final simplification59.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 73.1%
+-commutative73.1%
associate--l+73.1%
*-commutative73.1%
associate-/l*84.5%
associate-/r/83.5%
Simplified83.5%
Taylor expanded in y around 0 53.5%
Final simplification53.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)))
(t_2 (- (+ x y) (/ (* (- z t) y) (- a t)))))
(if (< t_2 -1.3664970889390727e-7)
t_1
(if (< t_2 1.4754293444577233e-239)
(/ (- (* y (- a z)) (* x t)) (- a t))
t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * 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) :: t_2
real(8) :: tmp
t_1 = (y + x) - (((z - t) * (1.0d0 / (a - t))) * y)
t_2 = (x + y) - (((z - t) * y) / (a - t))
if (t_2 < (-1.3664970889390727d-7)) then
tmp = t_1
else if (t_2 < 1.4754293444577233d-239) then
tmp = ((y * (a - z)) - (x * 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 = (y + x) - (((z - t) * (1.0 / (a - t))) * y);
double t_2 = (x + y) - (((z - t) * y) / (a - t));
double tmp;
if (t_2 < -1.3664970889390727e-7) {
tmp = t_1;
} else if (t_2 < 1.4754293444577233e-239) {
tmp = ((y * (a - z)) - (x * t)) / (a - t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y) t_2 = (x + y) - (((z - t) * y) / (a - t)) tmp = 0 if t_2 < -1.3664970889390727e-7: tmp = t_1 elif t_2 < 1.4754293444577233e-239: tmp = ((y * (a - z)) - (x * t)) / (a - t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y + x) - Float64(Float64(Float64(z - t) * Float64(1.0 / Float64(a - t))) * y)) t_2 = Float64(Float64(x + y) - Float64(Float64(Float64(z - t) * y) / Float64(a - t))) tmp = 0.0 if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = Float64(Float64(Float64(y * Float64(a - z)) - Float64(x * t)) / Float64(a - t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y + x) - (((z - t) * (1.0 / (a - t))) * y); t_2 = (x + y) - (((z - t) * y) / (a - t)); tmp = 0.0; if (t_2 < -1.3664970889390727e-7) tmp = t_1; elseif (t_2 < 1.4754293444577233e-239) tmp = ((y * (a - z)) - (x * t)) / (a - t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y + x), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * N[(1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + y), $MachinePrecision] - N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$2, -1.3664970889390727e-7], t$95$1, If[Less[t$95$2, 1.4754293444577233e-239], N[(N[(N[(y * N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(x * t), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(y + x\right) - \left(\left(z - t\right) \cdot \frac{1}{a - t}\right) \cdot y\\
t_2 := \left(x + y\right) - \frac{\left(z - t\right) \cdot y}{a - t}\\
\mathbf{if}\;t_2 < -1.3664970889390727 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 < 1.4754293444577233 \cdot 10^{-239}:\\
\;\;\;\;\frac{y \cdot \left(a - z\right) - x \cdot t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
herbie shell --seed 2023310
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))