
(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 15 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 -1.9e+95) (not (<= t 1.9e+77))) (+ (- x (* a (/ y t))) (* y (/ z t))) (fma (- z t) (/ -1.0 (/ (- a t) y)) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.9e+95) || !(t <= 1.9e+77)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = fma((z - t), (-1.0 / ((a - t) / y)), (x + y));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.9e+95) || !(t <= 1.9e+77)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = fma(Float64(z - t), Float64(-1.0 / Float64(Float64(a - t) / y)), Float64(x + y)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.9e+95], N[Not[LessEqual[t, 1.9e+77]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(-1.0 / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+95} \lor \neg \left(t \leq 1.9 \cdot 10^{+77}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{-1}{\frac{a - t}{y}}, x + y\right)\\
\end{array}
\end{array}
if t < -1.9e95 or 1.9000000000000001e77 < t Initial program 56.7%
+-commutative56.7%
associate--l+56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in t around inf 86.3%
sub-neg86.3%
mul-1-neg86.3%
unsub-neg86.3%
associate-/l*87.4%
mul-1-neg87.4%
remove-double-neg87.4%
associate-/l*93.6%
Simplified93.6%
if -1.9e95 < t < 1.9000000000000001e77Initial program 87.7%
sub-neg87.7%
+-commutative87.7%
distribute-frac-neg87.7%
distribute-rgt-neg-out87.7%
associate-/l*94.1%
fma-define94.2%
distribute-frac-neg94.2%
distribute-neg-frac294.2%
sub-neg94.2%
distribute-neg-in94.2%
remove-double-neg94.2%
+-commutative94.2%
sub-neg94.2%
Simplified94.2%
clear-num94.2%
inv-pow94.2%
Applied egg-rr94.2%
unpow-194.2%
Simplified94.2%
Final simplification93.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.2e+94) (not (<= t 1.7e+82))) (+ (- x (* a (/ y t))) (* y (/ z t))) (fma (- z t) (/ y (- t a)) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.2e+94) || !(t <= 1.7e+82)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = fma((z - t), (y / (t - a)), (x + y));
}
return tmp;
}
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.2e+94) || !(t <= 1.7e+82)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = fma(Float64(z - t), Float64(y / Float64(t - a)), Float64(x + y)); end return tmp end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.2e+94], N[Not[LessEqual[t, 1.7e+82]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+94} \lor \neg \left(t \leq 1.7 \cdot 10^{+82}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z - t, \frac{y}{t - a}, x + y\right)\\
\end{array}
\end{array}
if t < -6.19999999999999983e94 or 1.69999999999999997e82 < t Initial program 56.7%
+-commutative56.7%
associate--l+56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in t around inf 86.3%
sub-neg86.3%
mul-1-neg86.3%
unsub-neg86.3%
associate-/l*87.4%
mul-1-neg87.4%
remove-double-neg87.4%
associate-/l*93.6%
Simplified93.6%
if -6.19999999999999983e94 < t < 1.69999999999999997e82Initial program 87.7%
sub-neg87.7%
+-commutative87.7%
distribute-frac-neg87.7%
distribute-rgt-neg-out87.7%
associate-/l*94.1%
fma-define94.2%
distribute-frac-neg94.2%
distribute-neg-frac294.2%
sub-neg94.2%
distribute-neg-in94.2%
remove-double-neg94.2%
+-commutative94.2%
sub-neg94.2%
Simplified94.2%
Final simplification93.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.7e+95) (not (<= t 7.5e+79))) (+ (- x (* a (/ y t))) (* y (/ z t))) (+ y (+ x (* (- z t) (* y (/ -1.0 (- a t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.7e+95) || !(t <= 7.5e+79)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = y + (x + ((z - t) * (y * (-1.0 / (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 ((t <= (-2.7d+95)) .or. (.not. (t <= 7.5d+79))) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else
tmp = y + (x + ((z - t) * (y * ((-1.0d0) / (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 ((t <= -2.7e+95) || !(t <= 7.5e+79)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = y + (x + ((z - t) * (y * (-1.0 / (a - t)))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.7e+95) or not (t <= 7.5e+79): tmp = (x - (a * (y / t))) + (y * (z / t)) else: tmp = y + (x + ((z - t) * (y * (-1.0 / (a - t))))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.7e+95) || !(t <= 7.5e+79)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = Float64(y + Float64(x + Float64(Float64(z - t) * Float64(y * Float64(-1.0 / Float64(a - t)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.7e+95) || ~((t <= 7.5e+79))) tmp = (x - (a * (y / t))) + (y * (z / t)); else tmp = y + (x + ((z - t) * (y * (-1.0 / (a - t))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.7e+95], N[Not[LessEqual[t, 7.5e+79]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x + N[(N[(z - t), $MachinePrecision] * N[(y * N[(-1.0 / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{+95} \lor \neg \left(t \leq 7.5 \cdot 10^{+79}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;y + \left(x + \left(z - t\right) \cdot \left(y \cdot \frac{-1}{a - t}\right)\right)\\
\end{array}
\end{array}
if t < -2.7e95 or 7.49999999999999967e79 < t Initial program 56.7%
+-commutative56.7%
associate--l+56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in t around inf 86.3%
sub-neg86.3%
mul-1-neg86.3%
unsub-neg86.3%
associate-/l*87.4%
mul-1-neg87.4%
remove-double-neg87.4%
associate-/l*93.6%
Simplified93.6%
if -2.7e95 < t < 7.49999999999999967e79Initial program 87.7%
+-commutative87.7%
associate--l+87.7%
*-commutative87.7%
Simplified87.7%
div-inv87.8%
*-commutative87.8%
associate-*l*94.1%
Applied egg-rr94.1%
Final simplification93.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.5e+94) (not (<= t 2.1e+77))) (+ (- x (* a (/ y t))) (* y (/ z t))) (+ y (+ x (/ (* y (- z t)) (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.5e+94) || !(t <= 2.1e+77)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = y + (x + ((y * (z - t)) / (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 <= (-6.5d+94)) .or. (.not. (t <= 2.1d+77))) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else
tmp = y + (x + ((y * (z - t)) / (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 <= -6.5e+94) || !(t <= 2.1e+77)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = y + (x + ((y * (z - t)) / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.5e+94) or not (t <= 2.1e+77): tmp = (x - (a * (y / t))) + (y * (z / t)) else: tmp = y + (x + ((y * (z - t)) / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.5e+94) || !(t <= 2.1e+77)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = Float64(y + Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -6.5e+94) || ~((t <= 2.1e+77))) tmp = (x - (a * (y / t))) + (y * (z / t)); else tmp = y + (x + ((y * (z - t)) / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.5e+94], N[Not[LessEqual[t, 2.1e+77]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+94} \lor \neg \left(t \leq 2.1 \cdot 10^{+77}\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;y + \left(x + \frac{y \cdot \left(z - t\right)}{t - a}\right)\\
\end{array}
\end{array}
if t < -6.49999999999999976e94 or 2.0999999999999999e77 < t Initial program 56.7%
+-commutative56.7%
associate--l+56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in t around inf 86.3%
sub-neg86.3%
mul-1-neg86.3%
unsub-neg86.3%
associate-/l*87.4%
mul-1-neg87.4%
remove-double-neg87.4%
associate-/l*93.6%
Simplified93.6%
if -6.49999999999999976e94 < t < 2.0999999999999999e77Initial program 87.7%
+-commutative87.7%
associate--l+87.7%
*-commutative87.7%
Simplified87.7%
Final simplification89.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.05e+95) (not (<= t 4.2e+78))) (+ x (/ (- (* y z) (* a y)) t)) (+ y (+ x (/ (* y (- z t)) (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.05e+95) || !(t <= 4.2e+78)) {
tmp = x + (((y * z) - (a * y)) / t);
} else {
tmp = y + (x + ((y * (z - t)) / (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 <= (-1.05d+95)) .or. (.not. (t <= 4.2d+78))) then
tmp = x + (((y * z) - (a * y)) / t)
else
tmp = y + (x + ((y * (z - t)) / (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 <= -1.05e+95) || !(t <= 4.2e+78)) {
tmp = x + (((y * z) - (a * y)) / t);
} else {
tmp = y + (x + ((y * (z - t)) / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.05e+95) or not (t <= 4.2e+78): tmp = x + (((y * z) - (a * y)) / t) else: tmp = y + (x + ((y * (z - t)) / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.05e+95) || !(t <= 4.2e+78)) tmp = Float64(x + Float64(Float64(Float64(y * z) - Float64(a * y)) / t)); else tmp = Float64(y + Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.05e+95) || ~((t <= 4.2e+78))) tmp = x + (((y * z) - (a * y)) / t); else tmp = y + (x + ((y * (z - t)) / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.05e+95], N[Not[LessEqual[t, 4.2e+78]], $MachinePrecision]], N[(x + N[(N[(N[(y * z), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(y + N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{+95} \lor \neg \left(t \leq 4.2 \cdot 10^{+78}\right):\\
\;\;\;\;x + \frac{y \cdot z - a \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;y + \left(x + \frac{y \cdot \left(z - t\right)}{t - a}\right)\\
\end{array}
\end{array}
if t < -1.05e95 or 4.2000000000000002e78 < t Initial program 56.7%
+-commutative56.7%
associate--l+56.7%
*-commutative56.7%
Simplified56.7%
Taylor expanded in t around -inf 86.3%
mul-1-neg86.3%
unsub-neg86.3%
*-commutative86.3%
Simplified86.3%
if -1.05e95 < t < 4.2000000000000002e78Initial program 87.7%
+-commutative87.7%
associate--l+87.7%
*-commutative87.7%
Simplified87.7%
Final simplification87.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -2.1e-16) (not (<= a 3.2e-21))) (- (+ x y) (* y (/ z a))) (+ x (/ (- (* y z) (* a y)) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.1e-16) || !(a <= 3.2e-21)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (((y * z) - (a * y)) / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-2.1d-16)) .or. (.not. (a <= 3.2d-21))) then
tmp = (x + y) - (y * (z / a))
else
tmp = x + (((y * z) - (a * y)) / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.1e-16) || !(a <= 3.2e-21)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (((y * z) - (a * y)) / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.1e-16) or not (a <= 3.2e-21): tmp = (x + y) - (y * (z / a)) else: tmp = x + (((y * z) - (a * y)) / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.1e-16) || !(a <= 3.2e-21)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = Float64(x + Float64(Float64(Float64(y * z) - Float64(a * y)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -2.1e-16) || ~((a <= 3.2e-21))) tmp = (x + y) - (y * (z / a)); else tmp = x + (((y * z) - (a * y)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.1e-16], N[Not[LessEqual[a, 3.2e-21]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(N[(y * z), $MachinePrecision] - N[(a * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.1 \cdot 10^{-16} \lor \neg \left(a \leq 3.2 \cdot 10^{-21}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z - a \cdot y}{t}\\
\end{array}
\end{array}
if a < -2.1000000000000001e-16 or 3.2000000000000002e-21 < a Initial program 80.6%
sub-neg80.6%
+-commutative80.6%
distribute-frac-neg80.6%
distribute-rgt-neg-out80.6%
associate-/l*89.7%
fma-define89.8%
distribute-frac-neg89.8%
distribute-neg-frac289.8%
sub-neg89.8%
distribute-neg-in89.8%
remove-double-neg89.8%
+-commutative89.8%
sub-neg89.8%
Simplified89.8%
Taylor expanded in t around 0 79.5%
mul-1-neg79.5%
associate-+r+79.5%
sub-neg79.5%
+-commutative79.5%
associate-/l*87.5%
Simplified87.5%
if -2.1000000000000001e-16 < a < 3.2000000000000002e-21Initial program 71.9%
+-commutative71.9%
associate--l+71.9%
*-commutative71.9%
Simplified71.9%
Taylor expanded in t around -inf 76.3%
mul-1-neg76.3%
unsub-neg76.3%
*-commutative76.3%
Simplified76.3%
Final simplification81.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -9.6e+94) x (if (<= t 9.5e+81) (- (+ x y) (* y (/ z a))) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9.6e+94) {
tmp = x;
} else if (t <= 9.5e+81) {
tmp = (x + y) - (y * (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 (t <= (-9.6d+94)) then
tmp = x
else if (t <= 9.5d+81) then
tmp = (x + y) - (y * (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 (t <= -9.6e+94) {
tmp = x;
} else if (t <= 9.5e+81) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9.6e+94: tmp = x elif t <= 9.5e+81: tmp = (x + y) - (y * (z / a)) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9.6e+94) tmp = x; elseif (t <= 9.5e+81) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9.6e+94) tmp = x; elseif (t <= 9.5e+81) tmp = (x + y) - (y * (z / a)); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9.6e+94], x, If[LessEqual[t, 9.5e+81], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.6 \cdot 10^{+94}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{+81}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -9.5999999999999993e94 or 9.50000000000000083e81 < t Initial program 56.7%
sub-neg56.7%
+-commutative56.7%
distribute-frac-neg56.7%
distribute-rgt-neg-out56.7%
associate-/l*62.0%
fma-define62.3%
distribute-frac-neg62.3%
distribute-neg-frac262.3%
sub-neg62.3%
distribute-neg-in62.3%
remove-double-neg62.3%
+-commutative62.3%
sub-neg62.3%
Simplified62.3%
Taylor expanded in y around 0 70.4%
if -9.5999999999999993e94 < t < 9.50000000000000083e81Initial program 87.7%
sub-neg87.7%
+-commutative87.7%
distribute-frac-neg87.7%
distribute-rgt-neg-out87.7%
associate-/l*94.1%
fma-define94.2%
distribute-frac-neg94.2%
distribute-neg-frac294.2%
sub-neg94.2%
distribute-neg-in94.2%
remove-double-neg94.2%
+-commutative94.2%
sub-neg94.2%
Simplified94.2%
Taylor expanded in t around 0 75.3%
mul-1-neg75.3%
associate-+r+75.3%
sub-neg75.3%
+-commutative75.3%
associate-/l*78.2%
Simplified78.2%
Final simplification75.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7e+196) (not (<= z 4.5e+95))) (* z (/ y (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7e+196) || !(z <= 4.5e+95)) {
tmp = z * (y / (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 ((z <= (-7d+196)) .or. (.not. (z <= 4.5d+95))) then
tmp = z * (y / (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 ((z <= -7e+196) || !(z <= 4.5e+95)) {
tmp = z * (y / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7e+196) or not (z <= 4.5e+95): tmp = z * (y / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7e+196) || !(z <= 4.5e+95)) tmp = Float64(z * Float64(y / 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 ((z <= -7e+196) || ~((z <= 4.5e+95))) tmp = z * (y / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7e+196], N[Not[LessEqual[z, 4.5e+95]], $MachinePrecision]], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+196} \lor \neg \left(z \leq 4.5 \cdot 10^{+95}\right):\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -6.9999999999999997e196 or 4.50000000000000017e95 < z Initial program 77.6%
sub-neg77.6%
+-commutative77.6%
distribute-frac-neg77.6%
distribute-rgt-neg-out77.6%
associate-/l*92.5%
fma-define92.6%
distribute-frac-neg92.6%
distribute-neg-frac292.6%
sub-neg92.6%
distribute-neg-in92.6%
remove-double-neg92.6%
+-commutative92.6%
sub-neg92.6%
Simplified92.6%
Taylor expanded in z around inf 58.0%
*-commutative58.0%
*-lft-identity58.0%
times-frac71.0%
/-rgt-identity71.0%
Simplified71.0%
if -6.9999999999999997e196 < z < 4.50000000000000017e95Initial program 75.9%
sub-neg75.9%
+-commutative75.9%
distribute-frac-neg75.9%
distribute-rgt-neg-out75.9%
associate-/l*79.0%
fma-define79.1%
distribute-frac-neg79.1%
distribute-neg-frac279.1%
sub-neg79.1%
distribute-neg-in79.1%
remove-double-neg79.1%
+-commutative79.1%
sub-neg79.1%
Simplified79.1%
Taylor expanded in a around inf 66.9%
+-commutative66.9%
Simplified66.9%
Final simplification67.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2e+198) (not (<= z 5.2e+95))) (* y (/ z (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2e+198) || !(z <= 5.2e+95)) {
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 ((z <= (-2d+198)) .or. (.not. (z <= 5.2d+95))) 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 ((z <= -2e+198) || !(z <= 5.2e+95)) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2e+198) or not (z <= 5.2e+95): tmp = y * (z / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2e+198) || !(z <= 5.2e+95)) 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 ((z <= -2e+198) || ~((z <= 5.2e+95))) tmp = y * (z / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2e+198], N[Not[LessEqual[z, 5.2e+95]], $MachinePrecision]], N[(y * N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+198} \lor \neg \left(z \leq 5.2 \cdot 10^{+95}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -2.00000000000000004e198 or 5.19999999999999981e95 < z Initial program 77.6%
sub-neg77.6%
+-commutative77.6%
distribute-frac-neg77.6%
distribute-rgt-neg-out77.6%
associate-/l*92.5%
fma-define92.6%
distribute-frac-neg92.6%
distribute-neg-frac292.6%
sub-neg92.6%
distribute-neg-in92.6%
remove-double-neg92.6%
+-commutative92.6%
sub-neg92.6%
Simplified92.6%
clear-num92.6%
inv-pow92.6%
Applied egg-rr92.6%
unpow-192.6%
Simplified92.6%
Taylor expanded in z around inf 58.0%
associate-/l*61.2%
Simplified61.2%
if -2.00000000000000004e198 < z < 5.19999999999999981e95Initial program 75.9%
sub-neg75.9%
+-commutative75.9%
distribute-frac-neg75.9%
distribute-rgt-neg-out75.9%
associate-/l*79.0%
fma-define79.1%
distribute-frac-neg79.1%
distribute-neg-frac279.1%
sub-neg79.1%
distribute-neg-in79.1%
remove-double-neg79.1%
+-commutative79.1%
sub-neg79.1%
Simplified79.1%
Taylor expanded in a around inf 66.9%
+-commutative66.9%
Simplified66.9%
Final simplification65.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -9e+195) (* z (/ y (- t a))) (if (<= z 7e+95) (+ x y) (/ z (/ (- t a) y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+195) {
tmp = z * (y / (t - a));
} else if (z <= 7e+95) {
tmp = x + y;
} else {
tmp = 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 (z <= (-9d+195)) then
tmp = z * (y / (t - a))
else if (z <= 7d+95) then
tmp = x + y
else
tmp = 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 (z <= -9e+195) {
tmp = z * (y / (t - a));
} else if (z <= 7e+95) {
tmp = x + y;
} else {
tmp = z / ((t - a) / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9e+195: tmp = z * (y / (t - a)) elif z <= 7e+95: tmp = x + y else: tmp = z / ((t - a) / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e+195) tmp = Float64(z * Float64(y / Float64(t - a))); elseif (z <= 7e+95) tmp = Float64(x + y); else tmp = Float64(z / Float64(Float64(t - a) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -9e+195) tmp = z * (y / (t - a)); elseif (z <= 7e+95) tmp = x + y; else tmp = z / ((t - a) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+195], N[(z * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7e+95], N[(x + y), $MachinePrecision], N[(z / N[(N[(t - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+195}:\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{elif}\;z \leq 7 \cdot 10^{+95}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{t - a}{y}}\\
\end{array}
\end{array}
if z < -9.00000000000000018e195Initial program 82.6%
sub-neg82.6%
+-commutative82.6%
distribute-frac-neg82.6%
distribute-rgt-neg-out82.6%
associate-/l*94.6%
fma-define94.6%
distribute-frac-neg94.6%
distribute-neg-frac294.6%
sub-neg94.6%
distribute-neg-in94.6%
remove-double-neg94.6%
+-commutative94.6%
sub-neg94.6%
Simplified94.6%
Taylor expanded in z around inf 62.3%
*-commutative62.3%
*-lft-identity62.3%
times-frac70.5%
/-rgt-identity70.5%
Simplified70.5%
if -9.00000000000000018e195 < z < 6.99999999999999999e95Initial program 75.9%
sub-neg75.9%
+-commutative75.9%
distribute-frac-neg75.9%
distribute-rgt-neg-out75.9%
associate-/l*79.0%
fma-define79.1%
distribute-frac-neg79.1%
distribute-neg-frac279.1%
sub-neg79.1%
distribute-neg-in79.1%
remove-double-neg79.1%
+-commutative79.1%
sub-neg79.1%
Simplified79.1%
Taylor expanded in a around inf 66.9%
+-commutative66.9%
Simplified66.9%
if 6.99999999999999999e95 < z Initial program 72.3%
sub-neg72.3%
+-commutative72.3%
distribute-frac-neg72.3%
distribute-rgt-neg-out72.3%
associate-/l*90.3%
fma-define90.3%
distribute-frac-neg90.3%
distribute-neg-frac290.3%
sub-neg90.3%
distribute-neg-in90.3%
remove-double-neg90.3%
+-commutative90.3%
sub-neg90.3%
Simplified90.3%
Taylor expanded in z around inf 53.5%
*-commutative53.5%
*-lft-identity53.5%
times-frac71.5%
/-rgt-identity71.5%
Simplified71.5%
clear-num71.5%
un-div-inv71.7%
Applied egg-rr71.7%
Final simplification67.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -4.2e+241) (* z (/ y (- a))) (if (<= z 7.2e+95) (+ x y) (* (/ y t) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -4.2e+241) {
tmp = z * (y / -a);
} else if (z <= 7.2e+95) {
tmp = x + y;
} else {
tmp = (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 (z <= (-4.2d+241)) then
tmp = z * (y / -a)
else if (z <= 7.2d+95) then
tmp = x + y
else
tmp = (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 (z <= -4.2e+241) {
tmp = z * (y / -a);
} else if (z <= 7.2e+95) {
tmp = x + y;
} else {
tmp = (y / t) * z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -4.2e+241: tmp = z * (y / -a) elif z <= 7.2e+95: tmp = x + y else: tmp = (y / t) * z return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -4.2e+241) tmp = Float64(z * Float64(y / Float64(-a))); elseif (z <= 7.2e+95) tmp = Float64(x + y); else tmp = Float64(Float64(y / t) * z); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -4.2e+241) tmp = z * (y / -a); elseif (z <= 7.2e+95) tmp = x + y; else tmp = (y / t) * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.2e+241], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.2e+95], N[(x + y), $MachinePrecision], N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+241}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{+95}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{t} \cdot z\\
\end{array}
\end{array}
if z < -4.2000000000000001e241Initial program 84.4%
sub-neg84.4%
+-commutative84.4%
distribute-frac-neg84.4%
distribute-rgt-neg-out84.4%
associate-/l*99.9%
fma-define99.9%
distribute-frac-neg99.9%
distribute-neg-frac299.9%
sub-neg99.9%
distribute-neg-in99.9%
remove-double-neg99.9%
+-commutative99.9%
sub-neg99.9%
Simplified99.9%
Taylor expanded in z around inf 73.5%
*-commutative73.5%
*-lft-identity73.5%
times-frac89.0%
/-rgt-identity89.0%
Simplified89.0%
Taylor expanded in t around 0 67.6%
associate-*r/67.6%
neg-mul-167.6%
Simplified67.6%
if -4.2000000000000001e241 < z < 7.19999999999999955e95Initial program 76.2%
sub-neg76.2%
+-commutative76.2%
distribute-frac-neg76.2%
distribute-rgt-neg-out76.2%
associate-/l*79.6%
fma-define79.8%
distribute-frac-neg79.8%
distribute-neg-frac279.8%
sub-neg79.8%
distribute-neg-in79.8%
remove-double-neg79.8%
+-commutative79.8%
sub-neg79.8%
Simplified79.8%
Taylor expanded in a around inf 65.4%
+-commutative65.4%
Simplified65.4%
if 7.19999999999999955e95 < z Initial program 72.3%
sub-neg72.3%
+-commutative72.3%
distribute-frac-neg72.3%
distribute-rgt-neg-out72.3%
associate-/l*90.3%
fma-define90.3%
distribute-frac-neg90.3%
distribute-neg-frac290.3%
sub-neg90.3%
distribute-neg-in90.3%
remove-double-neg90.3%
+-commutative90.3%
sub-neg90.3%
Simplified90.3%
Taylor expanded in z around inf 53.5%
*-commutative53.5%
*-lft-identity53.5%
times-frac71.5%
/-rgt-identity71.5%
Simplified71.5%
Taylor expanded in t around inf 52.4%
Final simplification63.9%
(FPCore (x y z t a) :precision binary64 (if (<= t -7e+188) x (if (<= t 1.1e+197) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7e+188) {
tmp = x;
} else if (t <= 1.1e+197) {
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 (t <= (-7d+188)) then
tmp = x
else if (t <= 1.1d+197) 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 (t <= -7e+188) {
tmp = x;
} else if (t <= 1.1e+197) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7e+188: tmp = x elif t <= 1.1e+197: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7e+188) tmp = x; elseif (t <= 1.1e+197) tmp = Float64(x + y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -7e+188) tmp = x; elseif (t <= 1.1e+197) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7e+188], x, If[LessEqual[t, 1.1e+197], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7 \cdot 10^{+188}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+197}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -7.00000000000000016e188 or 1.09999999999999995e197 < t Initial program 43.6%
sub-neg43.6%
+-commutative43.6%
distribute-frac-neg43.6%
distribute-rgt-neg-out43.6%
associate-/l*49.0%
fma-define49.3%
distribute-frac-neg49.3%
distribute-neg-frac249.3%
sub-neg49.3%
distribute-neg-in49.3%
remove-double-neg49.3%
+-commutative49.3%
sub-neg49.3%
Simplified49.3%
Taylor expanded in y around 0 71.3%
if -7.00000000000000016e188 < t < 1.09999999999999995e197Initial program 85.2%
sub-neg85.2%
+-commutative85.2%
distribute-frac-neg85.2%
distribute-rgt-neg-out85.2%
associate-/l*91.5%
fma-define91.5%
distribute-frac-neg91.5%
distribute-neg-frac291.5%
sub-neg91.5%
distribute-neg-in91.5%
remove-double-neg91.5%
+-commutative91.5%
sub-neg91.5%
Simplified91.5%
Taylor expanded in a around inf 60.9%
+-commutative60.9%
Simplified60.9%
Final simplification63.1%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.25e+258) y (if (<= y 1.75e+74) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.25e+258) {
tmp = y;
} else if (y <= 1.75e+74) {
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.25d+258)) then
tmp = y
else if (y <= 1.75d+74) 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.25e+258) {
tmp = y;
} else if (y <= 1.75e+74) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.25e+258: tmp = y elif y <= 1.75e+74: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.25e+258) tmp = y; elseif (y <= 1.75e+74) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.25e+258) tmp = y; elseif (y <= 1.75e+74) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.25e+258], y, If[LessEqual[y, 1.75e+74], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+258}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 1.75 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.25e258 or 1.75000000000000007e74 < y Initial program 53.5%
+-commutative53.5%
associate--l+53.5%
*-commutative53.5%
Simplified53.5%
Taylor expanded in y around -inf 69.3%
neg-mul-169.3%
unsub-neg69.3%
Simplified69.3%
Taylor expanded in a around inf 38.7%
if -1.25e258 < y < 1.75000000000000007e74Initial program 82.4%
sub-neg82.4%
+-commutative82.4%
distribute-frac-neg82.4%
distribute-rgt-neg-out82.4%
associate-/l*85.3%
fma-define85.4%
distribute-frac-neg85.4%
distribute-neg-frac285.4%
sub-neg85.4%
distribute-neg-in85.4%
remove-double-neg85.4%
+-commutative85.4%
sub-neg85.4%
Simplified85.4%
Taylor expanded in y around 0 59.9%
(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 76.3%
sub-neg76.3%
+-commutative76.3%
distribute-frac-neg76.3%
distribute-rgt-neg-out76.3%
associate-/l*82.4%
fma-define82.5%
distribute-frac-neg82.5%
distribute-neg-frac282.5%
sub-neg82.5%
distribute-neg-in82.5%
remove-double-neg82.5%
+-commutative82.5%
sub-neg82.5%
Simplified82.5%
Taylor expanded in y around 0 50.6%
(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 76.3%
+-commutative76.3%
associate--l+76.3%
*-commutative76.3%
Simplified76.3%
Taylor expanded in x around 0 36.0%
Taylor expanded in z around 0 16.9%
sub-neg16.9%
mul-1-neg16.9%
remove-double-neg16.9%
associate-/l*18.4%
Simplified18.4%
Taylor expanded in t around inf 2.7%
distribute-rgt1-in2.7%
metadata-eval2.7%
mul0-lft2.7%
Simplified2.7%
(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 2024139
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:alt
(! :herbie-platform default (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -13664970889390727/100000000000000000000000) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 14754293444577233/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1 (- a t))) y)))))
(- (+ x y) (/ (* (- z t) y) (- a t))))