
(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 16 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 (<= t -5.2e+116)
(- (+ x (* y (/ z t))) (* a (/ y t)))
(if (<= t 2.9e+173)
(+ x (+ y (* (- z t) (/ y (- t a)))))
(- x (* y (/ (- a z) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -5.2e+116) {
tmp = (x + (y * (z / t))) - (a * (y / t));
} else if (t <= 2.9e+173) {
tmp = x + (y + ((z - t) * (y / (t - a))));
} else {
tmp = x - (y * ((a - 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 (t <= (-5.2d+116)) then
tmp = (x + (y * (z / t))) - (a * (y / t))
else if (t <= 2.9d+173) then
tmp = x + (y + ((z - t) * (y / (t - a))))
else
tmp = x - (y * ((a - 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 (t <= -5.2e+116) {
tmp = (x + (y * (z / t))) - (a * (y / t));
} else if (t <= 2.9e+173) {
tmp = x + (y + ((z - t) * (y / (t - a))));
} else {
tmp = x - (y * ((a - z) / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -5.2e+116: tmp = (x + (y * (z / t))) - (a * (y / t)) elif t <= 2.9e+173: tmp = x + (y + ((z - t) * (y / (t - a)))) else: tmp = x - (y * ((a - z) / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -5.2e+116) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) - Float64(a * Float64(y / t))); elseif (t <= 2.9e+173) tmp = Float64(x + Float64(y + Float64(Float64(z - t) * Float64(y / Float64(t - a))))); else tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -5.2e+116) tmp = (x + (y * (z / t))) - (a * (y / t)); elseif (t <= 2.9e+173) tmp = x + (y + ((z - t) * (y / (t - a)))); else tmp = x - (y * ((a - z) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -5.2e+116], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.9e+173], N[(x + N[(y + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+116}:\\
\;\;\;\;\left(x + y \cdot \frac{z}{t}\right) - a \cdot \frac{y}{t}\\
\mathbf{elif}\;t \leq 2.9 \cdot 10^{+173}:\\
\;\;\;\;x + \left(y + \left(z - t\right) \cdot \frac{y}{t - a}\right)\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\end{array}
\end{array}
if t < -5.19999999999999973e116Initial program 38.7%
sub-neg38.7%
+-commutative38.7%
distribute-frac-neg38.7%
distribute-rgt-neg-out38.7%
associate-/l*42.6%
fma-define42.8%
distribute-frac-neg42.8%
distribute-neg-frac242.8%
sub-neg42.8%
distribute-neg-in42.8%
remove-double-neg42.8%
+-commutative42.8%
sub-neg42.8%
Simplified42.8%
Taylor expanded in t around inf 74.3%
associate-+r+81.3%
distribute-rgt1-in81.3%
metadata-eval81.3%
mul0-lft81.3%
associate-+r+81.3%
associate-/l*95.2%
associate-/l*97.6%
Simplified97.6%
if -5.19999999999999973e116 < t < 2.90000000000000007e173Initial program 88.1%
associate--l+90.3%
+-commutative90.3%
associate-/l*94.2%
Applied egg-rr94.2%
if 2.90000000000000007e173 < t Initial program 39.9%
Taylor expanded in y around 0 92.9%
Taylor expanded in t around inf 89.6%
mul-1-neg89.6%
unsub-neg89.6%
associate-/l*96.7%
mul-1-neg96.7%
sub-neg96.7%
Simplified96.7%
Final simplification95.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ (- a z) t)))))
(if (<= a -9e+44)
(+ x y)
(if (<= a 4.05e-134)
t_1
(if (<= a 1.12e-114)
(/ (* y z) (- t a))
(if (<= a 6.4e-13) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * ((a - z) / t));
double tmp;
if (a <= -9e+44) {
tmp = x + y;
} else if (a <= 4.05e-134) {
tmp = t_1;
} else if (a <= 1.12e-114) {
tmp = (y * z) / (t - a);
} else if (a <= 6.4e-13) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x - (y * ((a - z) / t))
if (a <= (-9d+44)) then
tmp = x + y
else if (a <= 4.05d-134) then
tmp = t_1
else if (a <= 1.12d-114) then
tmp = (y * z) / (t - a)
else if (a <= 6.4d-13) then
tmp = t_1
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 t_1 = x - (y * ((a - z) / t));
double tmp;
if (a <= -9e+44) {
tmp = x + y;
} else if (a <= 4.05e-134) {
tmp = t_1;
} else if (a <= 1.12e-114) {
tmp = (y * z) / (t - a);
} else if (a <= 6.4e-13) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * ((a - z) / t)) tmp = 0 if a <= -9e+44: tmp = x + y elif a <= 4.05e-134: tmp = t_1 elif a <= 1.12e-114: tmp = (y * z) / (t - a) elif a <= 6.4e-13: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(Float64(a - z) / t))) tmp = 0.0 if (a <= -9e+44) tmp = Float64(x + y); elseif (a <= 4.05e-134) tmp = t_1; elseif (a <= 1.12e-114) tmp = Float64(Float64(y * z) / Float64(t - a)); elseif (a <= 6.4e-13) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * ((a - z) / t)); tmp = 0.0; if (a <= -9e+44) tmp = x + y; elseif (a <= 4.05e-134) tmp = t_1; elseif (a <= 1.12e-114) tmp = (y * z) / (t - a); elseif (a <= 6.4e-13) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9e+44], N[(x + y), $MachinePrecision], If[LessEqual[a, 4.05e-134], t$95$1, If[LessEqual[a, 1.12e-114], N[(N[(y * z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.4e-13], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{a - z}{t}\\
\mathbf{if}\;a \leq -9 \cdot 10^{+44}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 4.05 \cdot 10^{-134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.12 \cdot 10^{-114}:\\
\;\;\;\;\frac{y \cdot z}{t - a}\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -9e44 or 6.39999999999999999e-13 < a Initial program 81.6%
Taylor expanded in a around inf 82.4%
+-commutative82.4%
Simplified82.4%
if -9e44 < a < 4.04999999999999995e-134 or 1.11999999999999995e-114 < a < 6.39999999999999999e-13Initial program 68.2%
Taylor expanded in y around 0 94.9%
Taylor expanded in t around inf 78.8%
mul-1-neg78.8%
unsub-neg78.8%
associate-/l*83.8%
mul-1-neg83.8%
sub-neg83.8%
Simplified83.8%
if 4.04999999999999995e-134 < a < 1.11999999999999995e-114Initial program 89.8%
sub-neg89.8%
+-commutative89.8%
distribute-frac-neg89.8%
distribute-rgt-neg-out89.8%
associate-/l*90.0%
fma-define90.0%
distribute-frac-neg90.0%
distribute-neg-frac290.0%
sub-neg90.0%
distribute-neg-in90.0%
remove-double-neg90.0%
+-commutative90.0%
sub-neg90.0%
Simplified90.0%
Taylor expanded in z around inf 80.4%
Final simplification83.1%
(FPCore (x y z t a)
:precision binary64
(if (<= x -2.75e-151)
x
(if (<= x -2.4e-290)
(* y (/ z (- t a)))
(if (or (<= x 6.5e-285) (not (<= x 7.6e-215)))
(+ x y)
(* y (/ (- z a) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -2.75e-151) {
tmp = x;
} else if (x <= -2.4e-290) {
tmp = y * (z / (t - a));
} else if ((x <= 6.5e-285) || !(x <= 7.6e-215)) {
tmp = x + y;
} else {
tmp = 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 (x <= (-2.75d-151)) then
tmp = x
else if (x <= (-2.4d-290)) then
tmp = y * (z / (t - a))
else if ((x <= 6.5d-285) .or. (.not. (x <= 7.6d-215))) then
tmp = x + y
else
tmp = 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 (x <= -2.75e-151) {
tmp = x;
} else if (x <= -2.4e-290) {
tmp = y * (z / (t - a));
} else if ((x <= 6.5e-285) || !(x <= 7.6e-215)) {
tmp = x + y;
} else {
tmp = y * ((z - a) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -2.75e-151: tmp = x elif x <= -2.4e-290: tmp = y * (z / (t - a)) elif (x <= 6.5e-285) or not (x <= 7.6e-215): tmp = x + y else: tmp = y * ((z - a) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -2.75e-151) tmp = x; elseif (x <= -2.4e-290) tmp = Float64(y * Float64(z / Float64(t - a))); elseif ((x <= 6.5e-285) || !(x <= 7.6e-215)) tmp = Float64(x + y); else tmp = Float64(y * Float64(Float64(z - a) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -2.75e-151) tmp = x; elseif (x <= -2.4e-290) tmp = y * (z / (t - a)); elseif ((x <= 6.5e-285) || ~((x <= 7.6e-215))) tmp = x + y; else tmp = y * ((z - a) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -2.75e-151], x, If[LessEqual[x, -2.4e-290], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 6.5e-285], N[Not[LessEqual[x, 7.6e-215]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(y * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.75 \cdot 10^{-151}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-290}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-285} \lor \neg \left(x \leq 7.6 \cdot 10^{-215}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - a}{t}\\
\end{array}
\end{array}
if x < -2.7499999999999999e-151Initial program 72.6%
Taylor expanded in x around inf 71.7%
if -2.7499999999999999e-151 < x < -2.4000000000000001e-290Initial program 77.9%
sub-neg77.9%
+-commutative77.9%
distribute-frac-neg77.9%
distribute-rgt-neg-out77.9%
associate-/l*67.2%
fma-define67.2%
distribute-frac-neg67.2%
distribute-neg-frac267.2%
sub-neg67.2%
distribute-neg-in67.2%
remove-double-neg67.2%
+-commutative67.2%
sub-neg67.2%
Simplified67.2%
Taylor expanded in z around inf 67.2%
associate-/l*67.1%
Simplified67.1%
if -2.4000000000000001e-290 < x < 6.5e-285 or 7.59999999999999954e-215 < x Initial program 80.8%
Taylor expanded in a around inf 67.3%
+-commutative67.3%
Simplified67.3%
if 6.5e-285 < x < 7.59999999999999954e-215Initial program 45.6%
sub-neg45.6%
+-commutative45.6%
distribute-frac-neg45.6%
distribute-rgt-neg-out45.6%
associate-/l*45.9%
fma-define45.6%
distribute-frac-neg45.6%
distribute-neg-frac245.6%
sub-neg45.6%
distribute-neg-in45.6%
remove-double-neg45.6%
+-commutative45.6%
sub-neg45.6%
Simplified45.6%
Taylor expanded in t around inf 57.4%
associate-+r+69.4%
distribute-rgt1-in69.4%
metadata-eval69.4%
mul0-lft69.4%
associate-+r+69.4%
associate-/l*75.4%
associate-/l*75.6%
Simplified75.6%
Taylor expanded in y around inf 58.0%
div-sub58.0%
Simplified58.0%
Final simplification68.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= a -3.4e+41)
(+ x y)
(if (<= a 4.05e-134)
t_1
(if (<= a 2.25e-96)
(/ (* y z) (- t a))
(if (<= a 9.5e+81) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (z / t));
double tmp;
if (a <= -3.4e+41) {
tmp = x + y;
} else if (a <= 4.05e-134) {
tmp = t_1;
} else if (a <= 2.25e-96) {
tmp = (y * z) / (t - a);
} else if (a <= 9.5e+81) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if (a <= (-3.4d+41)) then
tmp = x + y
else if (a <= 4.05d-134) then
tmp = t_1
else if (a <= 2.25d-96) then
tmp = (y * z) / (t - a)
else if (a <= 9.5d+81) then
tmp = t_1
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 t_1 = x + (y * (z / t));
double tmp;
if (a <= -3.4e+41) {
tmp = x + y;
} else if (a <= 4.05e-134) {
tmp = t_1;
} else if (a <= 2.25e-96) {
tmp = (y * z) / (t - a);
} else if (a <= 9.5e+81) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (z / t)) tmp = 0 if a <= -3.4e+41: tmp = x + y elif a <= 4.05e-134: tmp = t_1 elif a <= 2.25e-96: tmp = (y * z) / (t - a) elif a <= 9.5e+81: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (a <= -3.4e+41) tmp = Float64(x + y); elseif (a <= 4.05e-134) tmp = t_1; elseif (a <= 2.25e-96) tmp = Float64(Float64(y * z) / Float64(t - a)); elseif (a <= 9.5e+81) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (z / t)); tmp = 0.0; if (a <= -3.4e+41) tmp = x + y; elseif (a <= 4.05e-134) tmp = t_1; elseif (a <= 2.25e-96) tmp = (y * z) / (t - a); elseif (a <= 9.5e+81) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.4e+41], N[(x + y), $MachinePrecision], If[LessEqual[a, 4.05e-134], t$95$1, If[LessEqual[a, 2.25e-96], N[(N[(y * z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e+81], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;a \leq -3.4 \cdot 10^{+41}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 4.05 \cdot 10^{-134}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{-96}:\\
\;\;\;\;\frac{y \cdot z}{t - a}\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+81}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -3.39999999999999998e41 or 9.50000000000000083e81 < a Initial program 82.9%
Taylor expanded in a around inf 85.4%
+-commutative85.4%
Simplified85.4%
if -3.39999999999999998e41 < a < 4.04999999999999995e-134 or 2.25e-96 < a < 9.50000000000000083e81Initial program 68.7%
Taylor expanded in y around 0 96.6%
Taylor expanded in a around 0 77.0%
associate-*r/81.6%
Simplified81.6%
if 4.04999999999999995e-134 < a < 2.25e-96Initial program 85.7%
sub-neg85.7%
+-commutative85.7%
distribute-frac-neg85.7%
distribute-rgt-neg-out85.7%
associate-/l*86.2%
fma-define86.2%
distribute-frac-neg86.2%
distribute-neg-frac286.2%
sub-neg86.2%
distribute-neg-in86.2%
remove-double-neg86.2%
+-commutative86.2%
sub-neg86.2%
Simplified86.2%
Taylor expanded in z around inf 67.4%
Final simplification82.2%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3e-67)
(+ x y)
(if (<= a 4.05e-134)
x
(if (<= a 2.35e-96) (/ (* y (- z)) a) (if (<= a 4.2e-83) x (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3e-67) {
tmp = x + y;
} else if (a <= 4.05e-134) {
tmp = x;
} else if (a <= 2.35e-96) {
tmp = (y * -z) / a;
} else if (a <= 4.2e-83) {
tmp = x;
} 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 <= (-3d-67)) then
tmp = x + y
else if (a <= 4.05d-134) then
tmp = x
else if (a <= 2.35d-96) then
tmp = (y * -z) / a
else if (a <= 4.2d-83) then
tmp = x
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 <= -3e-67) {
tmp = x + y;
} else if (a <= 4.05e-134) {
tmp = x;
} else if (a <= 2.35e-96) {
tmp = (y * -z) / a;
} else if (a <= 4.2e-83) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3e-67: tmp = x + y elif a <= 4.05e-134: tmp = x elif a <= 2.35e-96: tmp = (y * -z) / a elif a <= 4.2e-83: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3e-67) tmp = Float64(x + y); elseif (a <= 4.05e-134) tmp = x; elseif (a <= 2.35e-96) tmp = Float64(Float64(y * Float64(-z)) / a); elseif (a <= 4.2e-83) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3e-67) tmp = x + y; elseif (a <= 4.05e-134) tmp = x; elseif (a <= 2.35e-96) tmp = (y * -z) / a; elseif (a <= 4.2e-83) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3e-67], N[(x + y), $MachinePrecision], If[LessEqual[a, 4.05e-134], x, If[LessEqual[a, 2.35e-96], N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 4.2e-83], x, N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-67}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 4.05 \cdot 10^{-134}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{-96}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{-83}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -3.00000000000000032e-67 or 4.1999999999999998e-83 < a Initial program 79.5%
Taylor expanded in a around inf 73.1%
+-commutative73.1%
Simplified73.1%
if -3.00000000000000032e-67 < a < 4.04999999999999995e-134 or 2.3499999999999999e-96 < a < 4.1999999999999998e-83Initial program 65.6%
Taylor expanded in x around inf 58.5%
if 4.04999999999999995e-134 < a < 2.3499999999999999e-96Initial program 85.7%
sub-neg85.7%
+-commutative85.7%
distribute-frac-neg85.7%
distribute-rgt-neg-out85.7%
associate-/l*86.2%
fma-define86.2%
distribute-frac-neg86.2%
distribute-neg-frac286.2%
sub-neg86.2%
distribute-neg-in86.2%
remove-double-neg86.2%
+-commutative86.2%
sub-neg86.2%
Simplified86.2%
Taylor expanded in z around inf 67.4%
Taylor expanded in t around 0 46.6%
associate-*r/46.6%
associate-*r*46.6%
neg-mul-146.6%
Simplified46.6%
Final simplification66.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5.7e-67)
(+ x y)
(if (<= a 4.05e-134)
x
(if (<= a 2.35e-96) (* z (/ (- y) a)) (if (<= a 1.45e-85) x (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.7e-67) {
tmp = x + y;
} else if (a <= 4.05e-134) {
tmp = x;
} else if (a <= 2.35e-96) {
tmp = z * (-y / a);
} else if (a <= 1.45e-85) {
tmp = x;
} 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 <= (-5.7d-67)) then
tmp = x + y
else if (a <= 4.05d-134) then
tmp = x
else if (a <= 2.35d-96) then
tmp = z * (-y / a)
else if (a <= 1.45d-85) then
tmp = x
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 <= -5.7e-67) {
tmp = x + y;
} else if (a <= 4.05e-134) {
tmp = x;
} else if (a <= 2.35e-96) {
tmp = z * (-y / a);
} else if (a <= 1.45e-85) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.7e-67: tmp = x + y elif a <= 4.05e-134: tmp = x elif a <= 2.35e-96: tmp = z * (-y / a) elif a <= 1.45e-85: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.7e-67) tmp = Float64(x + y); elseif (a <= 4.05e-134) tmp = x; elseif (a <= 2.35e-96) tmp = Float64(z * Float64(Float64(-y) / a)); elseif (a <= 1.45e-85) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.7e-67) tmp = x + y; elseif (a <= 4.05e-134) tmp = x; elseif (a <= 2.35e-96) tmp = z * (-y / a); elseif (a <= 1.45e-85) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.7e-67], N[(x + y), $MachinePrecision], If[LessEqual[a, 4.05e-134], x, If[LessEqual[a, 2.35e-96], N[(z * N[((-y) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e-85], x, N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.7 \cdot 10^{-67}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 4.05 \cdot 10^{-134}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{-96}:\\
\;\;\;\;z \cdot \frac{-y}{a}\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{-85}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -5.7000000000000002e-67 or 1.4500000000000001e-85 < a Initial program 79.5%
Taylor expanded in a around inf 73.1%
+-commutative73.1%
Simplified73.1%
if -5.7000000000000002e-67 < a < 4.04999999999999995e-134 or 2.3499999999999999e-96 < a < 1.4500000000000001e-85Initial program 65.6%
Taylor expanded in x around inf 58.5%
if 4.04999999999999995e-134 < a < 2.3499999999999999e-96Initial program 85.7%
sub-neg85.7%
+-commutative85.7%
distribute-frac-neg85.7%
distribute-rgt-neg-out85.7%
associate-/l*86.2%
fma-define86.2%
distribute-frac-neg86.2%
distribute-neg-frac286.2%
sub-neg86.2%
distribute-neg-in86.2%
remove-double-neg86.2%
+-commutative86.2%
sub-neg86.2%
Simplified86.2%
Taylor expanded in z around inf 67.4%
Taylor expanded in t around 0 46.6%
associate-*r/46.6%
associate-*r*46.6%
neg-mul-146.6%
Simplified46.6%
Taylor expanded in y around 0 46.6%
mul-1-neg46.6%
*-commutative46.6%
associate-*r/46.5%
*-commutative46.5%
distribute-rgt-neg-in46.5%
Simplified46.5%
Final simplification66.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.5e+119) (not (<= t 4.9e+173))) (- x (* y (/ (- a z) t))) (+ x (+ y (* (- z t) (/ y (- t a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.5e+119) || !(t <= 4.9e+173)) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = x + (y + ((z - t) * (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 ((t <= (-2.5d+119)) .or. (.not. (t <= 4.9d+173))) then
tmp = x - (y * ((a - z) / t))
else
tmp = x + (y + ((z - t) * (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 ((t <= -2.5e+119) || !(t <= 4.9e+173)) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = x + (y + ((z - t) * (y / (t - a))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.5e+119) or not (t <= 4.9e+173): tmp = x - (y * ((a - z) / t)) else: tmp = x + (y + ((z - t) * (y / (t - a)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.5e+119) || !(t <= 4.9e+173)) tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); else tmp = Float64(x + Float64(y + Float64(Float64(z - t) * Float64(y / Float64(t - a))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.5e+119) || ~((t <= 4.9e+173))) tmp = x - (y * ((a - z) / t)); else tmp = x + (y + ((z - t) * (y / (t - a)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.5e+119], N[Not[LessEqual[t, 4.9e+173]], $MachinePrecision]], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+119} \lor \neg \left(t \leq 4.9 \cdot 10^{+173}\right):\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y + \left(z - t\right) \cdot \frac{y}{t - a}\right)\\
\end{array}
\end{array}
if t < -2.5e119 or 4.9000000000000001e173 < t Initial program 39.2%
Taylor expanded in y around 0 92.9%
Taylor expanded in t around inf 84.7%
mul-1-neg84.7%
unsub-neg84.7%
associate-/l*95.8%
mul-1-neg95.8%
sub-neg95.8%
Simplified95.8%
if -2.5e119 < t < 4.9000000000000001e173Initial program 88.1%
associate--l+90.3%
+-commutative90.3%
associate-/l*94.2%
Applied egg-rr94.2%
Final simplification94.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.9e+43) (not (<= a 4.8e+80))) (- (+ x y) (* y (/ z a))) (+ x (* z (/ y (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.9e+43) || !(a <= 4.8e+80)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (z * (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 ((a <= (-1.9d+43)) .or. (.not. (a <= 4.8d+80))) then
tmp = (x + y) - (y * (z / a))
else
tmp = x + (z * (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 ((a <= -1.9e+43) || !(a <= 4.8e+80)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (z * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.9e+43) or not (a <= 4.8e+80): tmp = (x + y) - (y * (z / a)) else: tmp = x + (z * (y / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.9e+43) || !(a <= 4.8e+80)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(z * Float64(y / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.9e+43) || ~((a <= 4.8e+80))) tmp = (x + y) - (y * (z / a)); else tmp = x + (z * (y / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.9e+43], N[Not[LessEqual[a, 4.8e+80]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.9 \cdot 10^{+43} \lor \neg \left(a \leq 4.8 \cdot 10^{+80}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if a < -1.90000000000000004e43 or 4.79999999999999958e80 < a Initial program 82.9%
Taylor expanded in t around 0 87.7%
+-commutative87.7%
associate-/l*91.7%
Simplified91.7%
if -1.90000000000000004e43 < a < 4.79999999999999958e80Initial program 70.2%
Taylor expanded in y around 0 93.4%
add-cube-cbrt92.9%
pow393.0%
Applied egg-rr93.0%
Taylor expanded in z around inf 86.3%
mul-1-neg86.3%
*-commutative86.3%
remove-double-neg86.3%
neg-mul-186.3%
times-frac89.3%
metadata-eval89.3%
distribute-neg-frac289.3%
/-rgt-identity89.3%
distribute-neg-frac289.3%
mul-1-neg89.3%
distribute-lft-neg-out89.3%
remove-double-neg89.3%
mul-1-neg89.3%
distribute-frac-neg89.3%
Simplified89.3%
Final simplification90.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.4e+20) (not (<= t 1.8e-22))) (- x (* y (/ (- a z) t))) (- (+ x y) (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.4e+20) || !(t <= 1.8e-22)) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = (x + y) - (z * (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 ((t <= (-1.4d+20)) .or. (.not. (t <= 1.8d-22))) then
tmp = x - (y * ((a - z) / t))
else
tmp = (x + y) - (z * (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 ((t <= -1.4e+20) || !(t <= 1.8e-22)) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = (x + y) - (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.4e+20) or not (t <= 1.8e-22): tmp = x - (y * ((a - z) / t)) else: tmp = (x + y) - (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.4e+20) || !(t <= 1.8e-22)) tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); else tmp = Float64(Float64(x + y) - Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.4e+20) || ~((t <= 1.8e-22))) tmp = x - (y * ((a - z) / t)); else tmp = (x + y) - (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.4e+20], N[Not[LessEqual[t, 1.8e-22]], $MachinePrecision]], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{+20} \lor \neg \left(t \leq 1.8 \cdot 10^{-22}\right):\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -1.4e20 or 1.7999999999999999e-22 < t Initial program 56.8%
Taylor expanded in y around 0 94.1%
Taylor expanded in t around inf 77.1%
mul-1-neg77.1%
unsub-neg77.1%
associate-/l*84.9%
mul-1-neg84.9%
sub-neg84.9%
Simplified84.9%
if -1.4e20 < t < 1.7999999999999999e-22Initial program 94.8%
Taylor expanded in t around 0 86.8%
+-commutative86.8%
associate-/l*85.2%
Simplified85.2%
Taylor expanded in y around 0 86.8%
*-commutative86.8%
associate-*r/87.5%
Simplified87.5%
Final simplification86.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.15e+20) (not (<= t 4.4e-20))) (- x (* y (/ (- a z) t))) (- (+ x y) (/ (* y z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.15e+20) || !(t <= 4.4e-20)) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = (x + y) - ((y * z) / 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 ((t <= (-2.15d+20)) .or. (.not. (t <= 4.4d-20))) then
tmp = x - (y * ((a - z) / t))
else
tmp = (x + y) - ((y * z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.15e+20) || !(t <= 4.4e-20)) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = (x + y) - ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.15e+20) or not (t <= 4.4e-20): tmp = x - (y * ((a - z) / t)) else: tmp = (x + y) - ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.15e+20) || !(t <= 4.4e-20)) tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); else tmp = Float64(Float64(x + y) - Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.15e+20) || ~((t <= 4.4e-20))) tmp = x - (y * ((a - z) / t)); else tmp = (x + y) - ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.15e+20], N[Not[LessEqual[t, 4.4e-20]], $MachinePrecision]], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.15 \cdot 10^{+20} \lor \neg \left(t \leq 4.4 \cdot 10^{-20}\right):\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if t < -2.15e20 or 4.39999999999999982e-20 < t Initial program 56.8%
Taylor expanded in y around 0 94.1%
Taylor expanded in t around inf 77.1%
mul-1-neg77.1%
unsub-neg77.1%
associate-/l*84.9%
mul-1-neg84.9%
sub-neg84.9%
Simplified84.9%
if -2.15e20 < t < 4.39999999999999982e-20Initial program 94.8%
Taylor expanded in t around 0 86.8%
Final simplification85.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.9e+42) (not (<= a 1.7e+81))) (+ x y) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.9e+42) || !(a <= 1.7e+81)) {
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.9d+42)) .or. (.not. (a <= 1.7d+81))) 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.9e+42) || !(a <= 1.7e+81)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.9e+42) or not (a <= 1.7e+81): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.9e+42) || !(a <= 1.7e+81)) 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.9e+42) || ~((a <= 1.7e+81))) 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.9e+42], N[Not[LessEqual[a, 1.7e+81]], $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.9 \cdot 10^{+42} \lor \neg \left(a \leq 1.7 \cdot 10^{+81}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -2.89999999999999981e42 or 1.70000000000000001e81 < a Initial program 82.9%
Taylor expanded in a around inf 85.4%
+-commutative85.4%
Simplified85.4%
if -2.89999999999999981e42 < a < 1.70000000000000001e81Initial program 70.2%
Taylor expanded in y around 0 93.4%
Taylor expanded in a around 0 73.3%
associate-*r/77.2%
Simplified77.2%
Final simplification80.3%
(FPCore (x y z t a) :precision binary64 (if (<= x -6.5e-152) x (if (<= x -4.5e-291) (* y (/ z (- t a))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -6.5e-152) {
tmp = x;
} else if (x <= -4.5e-291) {
tmp = y * (z / (t - 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 (x <= (-6.5d-152)) then
tmp = x
else if (x <= (-4.5d-291)) then
tmp = y * (z / (t - 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 (x <= -6.5e-152) {
tmp = x;
} else if (x <= -4.5e-291) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -6.5e-152: tmp = x elif x <= -4.5e-291: tmp = y * (z / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -6.5e-152) tmp = x; elseif (x <= -4.5e-291) tmp = Float64(y * Float64(z / Float64(t - a))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -6.5e-152) tmp = x; elseif (x <= -4.5e-291) tmp = y * (z / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -6.5e-152], x, If[LessEqual[x, -4.5e-291], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{-152}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-291}:\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if x < -6.5000000000000001e-152Initial program 72.6%
Taylor expanded in x around inf 71.7%
if -6.5000000000000001e-152 < x < -4.49999999999999974e-291Initial program 77.9%
sub-neg77.9%
+-commutative77.9%
distribute-frac-neg77.9%
distribute-rgt-neg-out77.9%
associate-/l*67.2%
fma-define67.2%
distribute-frac-neg67.2%
distribute-neg-frac267.2%
sub-neg67.2%
distribute-neg-in67.2%
remove-double-neg67.2%
+-commutative67.2%
sub-neg67.2%
Simplified67.2%
Taylor expanded in z around inf 67.2%
associate-/l*67.1%
Simplified67.1%
if -4.49999999999999974e-291 < x Initial program 76.0%
Taylor expanded in a around inf 61.0%
+-commutative61.0%
Simplified61.0%
Final simplification66.2%
(FPCore (x y z t a) :precision binary64 (+ x (* y (- (+ (/ t (- a t)) 1.0) (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
return x + (y * (((t / (a - t)) + 1.0) - (z / (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 * (((t / (a - t)) + 1.0d0) - (z / (a - t))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * (((t / (a - t)) + 1.0) - (z / (a - t))));
}
def code(x, y, z, t, a): return x + (y * (((t / (a - t)) + 1.0) - (z / (a - t))))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(Float64(t / Float64(a - t)) + 1.0) - Float64(z / Float64(a - t))))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * (((t / (a - t)) + 1.0) - (z / (a - t)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \left(\left(\frac{t}{a - t} + 1\right) - \frac{z}{a - t}\right)
\end{array}
Initial program 74.9%
Taylor expanded in y around 0 93.9%
Final simplification93.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.35e-67) (not (<= a 6.2e-80))) (+ x y) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.35e-67) || !(a <= 6.2e-80)) {
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 <= (-1.35d-67)) .or. (.not. (a <= 6.2d-80))) 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 <= -1.35e-67) || !(a <= 6.2e-80)) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.35e-67) or not (a <= 6.2e-80): tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.35e-67) || !(a <= 6.2e-80)) 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 <= -1.35e-67) || ~((a <= 6.2e-80))) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.35e-67], N[Not[LessEqual[a, 6.2e-80]], $MachinePrecision]], N[(x + y), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.35 \cdot 10^{-67} \lor \neg \left(a \leq 6.2 \cdot 10^{-80}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.35000000000000008e-67 or 6.20000000000000032e-80 < a Initial program 79.5%
Taylor expanded in a around inf 73.1%
+-commutative73.1%
Simplified73.1%
if -1.35000000000000008e-67 < a < 6.20000000000000032e-80Initial program 68.3%
Taylor expanded in x around inf 53.0%
Final simplification65.0%
(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 74.9%
Taylor expanded in x around inf 51.2%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
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 = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 74.9%
Taylor expanded in x around 0 37.6%
associate-*r/40.1%
Simplified40.1%
Taylor expanded in z around 0 17.8%
sub-neg17.8%
mul-1-neg17.8%
remove-double-neg17.8%
Simplified17.8%
Taylor expanded in t around inf 2.6%
distribute-rgt1-in2.6%
metadata-eval2.6%
mul0-lft2.6%
Simplified2.6%
(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 2024085
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(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))))