
(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 (or (<= t -3.7e+190) (not (<= t 3200000000.0))) (+ (- 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 <= -3.7e+190) || !(t <= 3200000000.0)) {
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 <= -3.7e+190) || !(t <= 3200000000.0)) 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, -3.7e+190], N[Not[LessEqual[t, 3200000000.0]], $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 -3.7 \cdot 10^{+190} \lor \neg \left(t \leq 3200000000\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 < -3.69999999999999971e190 or 3.2e9 < t Initial program 59.1%
Taylor expanded in t around inf 84.9%
sub-neg84.9%
mul-1-neg84.9%
unsub-neg84.9%
associate-/l*90.2%
mul-1-neg90.2%
remove-double-neg90.2%
associate-/l*94.6%
Simplified94.6%
if -3.69999999999999971e190 < t < 3.2e9Initial program 88.8%
sub-neg88.8%
+-commutative88.8%
distribute-frac-neg88.8%
distribute-rgt-neg-out88.8%
associate-/l*94.4%
fma-define94.4%
distribute-frac-neg94.4%
distribute-neg-frac294.4%
sub-neg94.4%
distribute-neg-in94.4%
remove-double-neg94.4%
+-commutative94.4%
sub-neg94.4%
Simplified94.4%
Final simplification94.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ z a)))))
(if (<= a -4.4e+153)
(+ x y)
(if (<= a -2e-7)
t_1
(if (<= a 2.6e-85)
(+ x (* y (/ z t)))
(if (<= a 3.5e+79) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / a));
double tmp;
if (a <= -4.4e+153) {
tmp = x + y;
} else if (a <= -2e-7) {
tmp = t_1;
} else if (a <= 2.6e-85) {
tmp = x + (y * (z / t));
} else if (a <= 3.5e+79) {
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 / a))
if (a <= (-4.4d+153)) then
tmp = x + y
else if (a <= (-2d-7)) then
tmp = t_1
else if (a <= 2.6d-85) then
tmp = x + (y * (z / t))
else if (a <= 3.5d+79) 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 / a));
double tmp;
if (a <= -4.4e+153) {
tmp = x + y;
} else if (a <= -2e-7) {
tmp = t_1;
} else if (a <= 2.6e-85) {
tmp = x + (y * (z / t));
} else if (a <= 3.5e+79) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (z / a)) tmp = 0 if a <= -4.4e+153: tmp = x + y elif a <= -2e-7: tmp = t_1 elif a <= 2.6e-85: tmp = x + (y * (z / t)) elif a <= 3.5e+79: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(z / a))) tmp = 0.0 if (a <= -4.4e+153) tmp = Float64(x + y); elseif (a <= -2e-7) tmp = t_1; elseif (a <= 2.6e-85) tmp = Float64(x + Float64(y * Float64(z / t))); elseif (a <= 3.5e+79) 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 / a)); tmp = 0.0; if (a <= -4.4e+153) tmp = x + y; elseif (a <= -2e-7) tmp = t_1; elseif (a <= 2.6e-85) tmp = x + (y * (z / t)); elseif (a <= 3.5e+79) 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 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.4e+153], N[(x + y), $MachinePrecision], If[LessEqual[a, -2e-7], t$95$1, If[LessEqual[a, 2.6e-85], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.5e+79], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{z}{a}\\
\mathbf{if}\;a \leq -4.4 \cdot 10^{+153}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-85}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{+79}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -4.3999999999999999e153 or 3.4999999999999998e79 < a Initial program 77.0%
sub-neg77.0%
+-commutative77.0%
distribute-frac-neg77.0%
distribute-rgt-neg-out77.0%
associate-/l*92.2%
fma-define92.2%
distribute-frac-neg92.2%
distribute-neg-frac292.2%
sub-neg92.2%
distribute-neg-in92.2%
remove-double-neg92.2%
+-commutative92.2%
sub-neg92.2%
Simplified92.2%
Taylor expanded in a around inf 84.4%
+-commutative84.4%
Simplified84.4%
if -4.3999999999999999e153 < a < -1.9999999999999999e-7 or 2.60000000000000011e-85 < a < 3.4999999999999998e79Initial program 86.9%
clear-num86.7%
associate-/r/86.8%
*-commutative86.8%
Applied egg-rr86.8%
Taylor expanded in z around inf 88.7%
Taylor expanded in a around inf 84.3%
associate-+r+84.3%
mul-1-neg84.3%
sub-neg84.3%
+-commutative84.3%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in y around 0 80.2%
if -1.9999999999999999e-7 < a < 2.60000000000000011e-85Initial program 75.9%
Taylor expanded in t around -inf 82.1%
mul-1-neg82.1%
unsub-neg82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in a around 0 80.0%
+-commutative80.0%
associate-/l*84.2%
Simplified84.2%
Final simplification83.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.5e+190) (not (<= t 12500000000.0))) (+ (- x (* a (/ y t))) (* y (/ 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 <= -5.5e+190) || !(t <= 12500000000.0)) {
tmp = (x - (a * (y / t))) + (y * (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 <= (-5.5d+190)) .or. (.not. (t <= 12500000000.0d0))) then
tmp = (x - (a * (y / t))) + (y * (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 <= -5.5e+190) || !(t <= 12500000000.0)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((z - t) * (y / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.5e+190) or not (t <= 12500000000.0): tmp = (x - (a * (y / t))) + (y * (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 <= -5.5e+190) || !(t <= 12500000000.0)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = Float64(Float64(x + 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 <= -5.5e+190) || ~((t <= 12500000000.0))) tmp = (x - (a * (y / t))) + (y * (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, -5.5e+190], N[Not[LessEqual[t, 12500000000.0]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(z - t), $MachinePrecision] * N[(y / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{+190} \lor \neg \left(t \leq 12500000000\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(z - t\right) \cdot \frac{y}{t - a}\\
\end{array}
\end{array}
if t < -5.5e190 or 1.25e10 < t Initial program 59.1%
Taylor expanded in t around inf 84.9%
sub-neg84.9%
mul-1-neg84.9%
unsub-neg84.9%
associate-/l*90.2%
mul-1-neg90.2%
remove-double-neg90.2%
associate-/l*94.6%
Simplified94.6%
if -5.5e190 < t < 1.25e10Initial program 88.8%
associate-/l*94.4%
*-commutative94.4%
Applied egg-rr94.4%
Final simplification94.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5.6e+135) (not (<= t 850000000.0))) (+ (- x (* a (/ y t))) (* y (/ z t))) (+ (+ x y) (* (* y z) (/ 1.0 (- t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5.6e+135) || !(t <= 850000000.0)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((y * z) * (1.0 / (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 <= (-5.6d+135)) .or. (.not. (t <= 850000000.0d0))) then
tmp = (x - (a * (y / t))) + (y * (z / t))
else
tmp = (x + y) + ((y * z) * (1.0d0 / (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 <= -5.6e+135) || !(t <= 850000000.0)) {
tmp = (x - (a * (y / t))) + (y * (z / t));
} else {
tmp = (x + y) + ((y * z) * (1.0 / (t - a)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5.6e+135) or not (t <= 850000000.0): tmp = (x - (a * (y / t))) + (y * (z / t)) else: tmp = (x + y) + ((y * z) * (1.0 / (t - a))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5.6e+135) || !(t <= 850000000.0)) tmp = Float64(Float64(x - Float64(a * Float64(y / t))) + Float64(y * Float64(z / t))); else tmp = Float64(Float64(x + y) + Float64(Float64(y * z) * Float64(1.0 / Float64(t - a)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -5.6e+135) || ~((t <= 850000000.0))) tmp = (x - (a * (y / t))) + (y * (z / t)); else tmp = (x + y) + ((y * z) * (1.0 / (t - a))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.6e+135], N[Not[LessEqual[t, 850000000.0]], $MachinePrecision]], N[(N[(x - N[(a * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] * N[(1.0 / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.6 \cdot 10^{+135} \lor \neg \left(t \leq 850000000\right):\\
\;\;\;\;\left(x - a \cdot \frac{y}{t}\right) + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(y \cdot z\right) \cdot \frac{1}{t - a}\\
\end{array}
\end{array}
if t < -5.60000000000000004e135 or 8.5e8 < t Initial program 58.3%
Taylor expanded in t around inf 82.7%
sub-neg82.7%
mul-1-neg82.7%
unsub-neg82.7%
associate-/l*87.4%
mul-1-neg87.4%
remove-double-neg87.4%
associate-/l*92.3%
Simplified92.3%
if -5.60000000000000004e135 < t < 8.5e8Initial program 91.5%
clear-num91.4%
associate-/r/91.5%
*-commutative91.5%
Applied egg-rr91.5%
Taylor expanded in z around inf 91.1%
Final simplification91.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6.2e-13) (not (<= a 2.4e-90))) (- (+ x y) (* y (/ z a))) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6.2e-13) || !(a <= 2.4e-90)) {
tmp = (x + y) - (y * (z / a));
} 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 <= (-6.2d-13)) .or. (.not. (a <= 2.4d-90))) then
tmp = (x + y) - (y * (z / a))
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 <= -6.2e-13) || !(a <= 2.4e-90)) {
tmp = (x + y) - (y * (z / a));
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6.2e-13) or not (a <= 2.4e-90): tmp = (x + y) - (y * (z / a)) else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6.2e-13) || !(a <= 2.4e-90)) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); 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 <= -6.2e-13) || ~((a <= 2.4e-90))) tmp = (x + y) - (y * (z / a)); else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6.2e-13], N[Not[LessEqual[a, 2.4e-90]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{-13} \lor \neg \left(a \leq 2.4 \cdot 10^{-90}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -6.1999999999999998e-13 or 2.4000000000000002e-90 < a Initial program 81.7%
Taylor expanded in t around 0 81.7%
associate-/l*90.6%
Simplified90.6%
if -6.1999999999999998e-13 < a < 2.4000000000000002e-90Initial program 75.2%
Taylor expanded in t around -inf 83.4%
mul-1-neg83.4%
unsub-neg83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in a around 0 81.1%
+-commutative81.1%
associate-/l*85.5%
Simplified85.5%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -7.3e-13) (- (+ x y) (* y (/ z a))) (if (<= a 1.55e-87) (+ x (* y (/ z t))) (- (+ x y) (/ y (/ a z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7.3e-13) {
tmp = (x + y) - (y * (z / a));
} else if (a <= 1.55e-87) {
tmp = x + (y * (z / t));
} else {
tmp = (x + y) - (y / (a / 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.3d-13)) then
tmp = (x + y) - (y * (z / a))
else if (a <= 1.55d-87) then
tmp = x + (y * (z / t))
else
tmp = (x + y) - (y / (a / 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.3e-13) {
tmp = (x + y) - (y * (z / a));
} else if (a <= 1.55e-87) {
tmp = x + (y * (z / t));
} else {
tmp = (x + y) - (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7.3e-13: tmp = (x + y) - (y * (z / a)) elif a <= 1.55e-87: tmp = x + (y * (z / t)) else: tmp = (x + y) - (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7.3e-13) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); elseif (a <= 1.55e-87) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(Float64(x + y) - Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7.3e-13) tmp = (x + y) - (y * (z / a)); elseif (a <= 1.55e-87) tmp = x + (y * (z / t)); else tmp = (x + y) - (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7.3e-13], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e-87], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.3 \cdot 10^{-13}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-87}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if a < -7.3000000000000002e-13Initial program 81.3%
Taylor expanded in t around 0 82.8%
associate-/l*92.7%
Simplified92.7%
if -7.3000000000000002e-13 < a < 1.54999999999999999e-87Initial program 75.2%
Taylor expanded in t around -inf 83.4%
mul-1-neg83.4%
unsub-neg83.4%
*-commutative83.4%
Simplified83.4%
Taylor expanded in a around 0 81.1%
+-commutative81.1%
associate-/l*85.5%
Simplified85.5%
if 1.54999999999999999e-87 < a Initial program 82.1%
clear-num82.0%
associate-/r/82.0%
*-commutative82.0%
Applied egg-rr82.0%
Taylor expanded in z around inf 83.2%
Taylor expanded in a around inf 80.9%
associate-+r+80.9%
mul-1-neg80.9%
sub-neg80.9%
+-commutative80.9%
associate-/l*88.9%
Simplified88.9%
clear-num88.9%
un-div-inv88.9%
Applied egg-rr88.9%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.2e-201) (+ x y) (if (<= a 1.6e-258) (/ z (/ t y)) (if (<= a 1.42e-96) x (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.2e-201) {
tmp = x + y;
} else if (a <= 1.6e-258) {
tmp = z / (t / y);
} else if (a <= 1.42e-96) {
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 <= (-2.2d-201)) then
tmp = x + y
else if (a <= 1.6d-258) then
tmp = z / (t / y)
else if (a <= 1.42d-96) 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 <= -2.2e-201) {
tmp = x + y;
} else if (a <= 1.6e-258) {
tmp = z / (t / y);
} else if (a <= 1.42e-96) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.2e-201: tmp = x + y elif a <= 1.6e-258: tmp = z / (t / y) elif a <= 1.42e-96: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.2e-201) tmp = Float64(x + y); elseif (a <= 1.6e-258) tmp = Float64(z / Float64(t / y)); elseif (a <= 1.42e-96) 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 <= -2.2e-201) tmp = x + y; elseif (a <= 1.6e-258) tmp = z / (t / y); elseif (a <= 1.42e-96) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.2e-201], N[(x + y), $MachinePrecision], If[LessEqual[a, 1.6e-258], N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.42e-96], x, N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{-201}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 1.6 \cdot 10^{-258}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;a \leq 1.42 \cdot 10^{-96}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -2.2e-201 or 1.42000000000000003e-96 < a Initial program 82.3%
sub-neg82.3%
+-commutative82.3%
distribute-frac-neg82.3%
distribute-rgt-neg-out82.3%
associate-/l*89.7%
fma-define89.7%
distribute-frac-neg89.7%
distribute-neg-frac289.7%
sub-neg89.7%
distribute-neg-in89.7%
remove-double-neg89.7%
+-commutative89.7%
sub-neg89.7%
Simplified89.7%
Taylor expanded in a around inf 67.8%
+-commutative67.8%
Simplified67.8%
if -2.2e-201 < a < 1.6000000000000001e-258Initial program 76.6%
sub-neg76.6%
+-commutative76.6%
distribute-frac-neg76.6%
distribute-rgt-neg-out76.6%
associate-/l*85.0%
fma-define85.0%
distribute-frac-neg85.0%
distribute-neg-frac285.0%
sub-neg85.0%
distribute-neg-in85.0%
remove-double-neg85.0%
+-commutative85.0%
sub-neg85.0%
Simplified85.0%
Taylor expanded in z around inf 60.3%
*-commutative60.3%
*-lft-identity60.3%
times-frac68.7%
/-rgt-identity68.7%
Simplified68.7%
clear-num68.6%
un-div-inv68.7%
Applied egg-rr68.7%
Taylor expanded in t around inf 65.1%
if 1.6000000000000001e-258 < a < 1.42000000000000003e-96Initial program 63.6%
sub-neg63.6%
+-commutative63.6%
distribute-frac-neg63.6%
distribute-rgt-neg-out63.6%
associate-/l*69.1%
fma-define69.4%
distribute-frac-neg69.4%
distribute-neg-frac269.4%
sub-neg69.4%
distribute-neg-in69.4%
remove-double-neg69.4%
+-commutative69.4%
sub-neg69.4%
Simplified69.4%
Taylor expanded in t around inf 61.5%
distribute-rgt1-in61.5%
metadata-eval61.5%
mul0-lft61.5%
Simplified61.5%
Taylor expanded in x around 0 61.5%
Final simplification66.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.5e-201) (+ x y) (if (<= a 4.1e-258) (* (/ y t) z) (if (<= a 1.3e-96) x (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.5e-201) {
tmp = x + y;
} else if (a <= 4.1e-258) {
tmp = (y / t) * z;
} else if (a <= 1.3e-96) {
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 <= (-1.5d-201)) then
tmp = x + y
else if (a <= 4.1d-258) then
tmp = (y / t) * z
else if (a <= 1.3d-96) 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 <= -1.5e-201) {
tmp = x + y;
} else if (a <= 4.1e-258) {
tmp = (y / t) * z;
} else if (a <= 1.3e-96) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.5e-201: tmp = x + y elif a <= 4.1e-258: tmp = (y / t) * z elif a <= 1.3e-96: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.5e-201) tmp = Float64(x + y); elseif (a <= 4.1e-258) tmp = Float64(Float64(y / t) * z); elseif (a <= 1.3e-96) 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 <= -1.5e-201) tmp = x + y; elseif (a <= 4.1e-258) tmp = (y / t) * z; elseif (a <= 1.3e-96) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.5e-201], N[(x + y), $MachinePrecision], If[LessEqual[a, 4.1e-258], N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[a, 1.3e-96], x, N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{-201}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{-258}:\\
\;\;\;\;\frac{y}{t} \cdot z\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-96}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.50000000000000001e-201 or 1.3000000000000001e-96 < a Initial program 82.3%
sub-neg82.3%
+-commutative82.3%
distribute-frac-neg82.3%
distribute-rgt-neg-out82.3%
associate-/l*89.7%
fma-define89.7%
distribute-frac-neg89.7%
distribute-neg-frac289.7%
sub-neg89.7%
distribute-neg-in89.7%
remove-double-neg89.7%
+-commutative89.7%
sub-neg89.7%
Simplified89.7%
Taylor expanded in a around inf 67.8%
+-commutative67.8%
Simplified67.8%
if -1.50000000000000001e-201 < a < 4.1000000000000001e-258Initial program 76.6%
sub-neg76.6%
+-commutative76.6%
distribute-frac-neg76.6%
distribute-rgt-neg-out76.6%
associate-/l*85.0%
fma-define85.0%
distribute-frac-neg85.0%
distribute-neg-frac285.0%
sub-neg85.0%
distribute-neg-in85.0%
remove-double-neg85.0%
+-commutative85.0%
sub-neg85.0%
Simplified85.0%
Taylor expanded in z around inf 60.3%
*-commutative60.3%
*-lft-identity60.3%
times-frac68.7%
/-rgt-identity68.7%
Simplified68.7%
Taylor expanded in t around inf 65.1%
if 4.1000000000000001e-258 < a < 1.3000000000000001e-96Initial program 63.6%
sub-neg63.6%
+-commutative63.6%
distribute-frac-neg63.6%
distribute-rgt-neg-out63.6%
associate-/l*69.1%
fma-define69.4%
distribute-frac-neg69.4%
distribute-neg-frac269.4%
sub-neg69.4%
distribute-neg-in69.4%
remove-double-neg69.4%
+-commutative69.4%
sub-neg69.4%
Simplified69.4%
Taylor expanded in t around inf 61.5%
distribute-rgt1-in61.5%
metadata-eval61.5%
mul0-lft61.5%
Simplified61.5%
Taylor expanded in x around 0 61.5%
Final simplification66.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -2e-201) (+ x y) (if (<= a 5.5e-259) (* y (/ z t)) (if (<= a 1.8e-96) x (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2e-201) {
tmp = x + y;
} else if (a <= 5.5e-259) {
tmp = y * (z / t);
} else if (a <= 1.8e-96) {
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 <= (-2d-201)) then
tmp = x + y
else if (a <= 5.5d-259) then
tmp = y * (z / t)
else if (a <= 1.8d-96) 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 <= -2e-201) {
tmp = x + y;
} else if (a <= 5.5e-259) {
tmp = y * (z / t);
} else if (a <= 1.8e-96) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2e-201: tmp = x + y elif a <= 5.5e-259: tmp = y * (z / t) elif a <= 1.8e-96: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2e-201) tmp = Float64(x + y); elseif (a <= 5.5e-259) tmp = Float64(y * Float64(z / t)); elseif (a <= 1.8e-96) 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 <= -2e-201) tmp = x + y; elseif (a <= 5.5e-259) tmp = y * (z / t); elseif (a <= 1.8e-96) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2e-201], N[(x + y), $MachinePrecision], If[LessEqual[a, 5.5e-259], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8e-96], x, N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-201}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-259}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-96}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.99999999999999989e-201 or 1.80000000000000004e-96 < a Initial program 82.3%
sub-neg82.3%
+-commutative82.3%
distribute-frac-neg82.3%
distribute-rgt-neg-out82.3%
associate-/l*89.7%
fma-define89.7%
distribute-frac-neg89.7%
distribute-neg-frac289.7%
sub-neg89.7%
distribute-neg-in89.7%
remove-double-neg89.7%
+-commutative89.7%
sub-neg89.7%
Simplified89.7%
Taylor expanded in a around inf 67.8%
+-commutative67.8%
Simplified67.8%
if -1.99999999999999989e-201 < a < 5.50000000000000038e-259Initial program 76.6%
sub-neg76.6%
+-commutative76.6%
distribute-frac-neg76.6%
distribute-rgt-neg-out76.6%
associate-/l*85.0%
fma-define85.0%
distribute-frac-neg85.0%
distribute-neg-frac285.0%
sub-neg85.0%
distribute-neg-in85.0%
remove-double-neg85.0%
+-commutative85.0%
sub-neg85.0%
Simplified85.0%
Taylor expanded in z around inf 60.3%
*-commutative60.3%
*-lft-identity60.3%
times-frac68.7%
/-rgt-identity68.7%
Simplified68.7%
Taylor expanded in t around inf 56.7%
associate-/l*65.1%
Simplified65.1%
if 5.50000000000000038e-259 < a < 1.80000000000000004e-96Initial program 63.6%
sub-neg63.6%
+-commutative63.6%
distribute-frac-neg63.6%
distribute-rgt-neg-out63.6%
associate-/l*69.1%
fma-define69.4%
distribute-frac-neg69.4%
distribute-neg-frac269.4%
sub-neg69.4%
distribute-neg-in69.4%
remove-double-neg69.4%
+-commutative69.4%
sub-neg69.4%
Simplified69.4%
Taylor expanded in t around inf 61.5%
distribute-rgt1-in61.5%
metadata-eval61.5%
mul0-lft61.5%
Simplified61.5%
Taylor expanded in x around 0 61.5%
Final simplification66.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -200.0) (not (<= a 2.1e-49))) (+ x y) (+ x (* y (/ z t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -200.0) || !(a <= 2.1e-49)) {
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 <= (-200.0d0)) .or. (.not. (a <= 2.1d-49))) 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 <= -200.0) || !(a <= 2.1e-49)) {
tmp = x + y;
} else {
tmp = x + (y * (z / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -200.0) or not (a <= 2.1e-49): tmp = x + y else: tmp = x + (y * (z / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -200.0) || !(a <= 2.1e-49)) 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 <= -200.0) || ~((a <= 2.1e-49))) tmp = x + y; else tmp = x + (y * (z / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -200.0], N[Not[LessEqual[a, 2.1e-49]], $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 -200 \lor \neg \left(a \leq 2.1 \cdot 10^{-49}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\end{array}
if a < -200 or 2.0999999999999999e-49 < a Initial program 81.0%
sub-neg81.0%
+-commutative81.0%
distribute-frac-neg81.0%
distribute-rgt-neg-out81.0%
associate-/l*92.5%
fma-define92.5%
distribute-frac-neg92.5%
distribute-neg-frac292.5%
sub-neg92.5%
distribute-neg-in92.5%
remove-double-neg92.5%
+-commutative92.5%
sub-neg92.5%
Simplified92.5%
Taylor expanded in a around inf 76.1%
+-commutative76.1%
Simplified76.1%
if -200 < a < 2.0999999999999999e-49Initial program 76.9%
Taylor expanded in t around -inf 79.9%
mul-1-neg79.9%
unsub-neg79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in a around 0 77.2%
+-commutative77.2%
associate-/l*81.1%
Simplified81.1%
Final simplification78.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.25) (not (<= a 2.5e-50))) (+ x y) (+ x (* (/ y t) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.25) || !(a <= 2.5e-50)) {
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 <= (-1.25d0)) .or. (.not. (a <= 2.5d-50))) 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 <= -1.25) || !(a <= 2.5e-50)) {
tmp = x + y;
} else {
tmp = x + ((y / t) * z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.25) or not (a <= 2.5e-50): tmp = x + y else: tmp = x + ((y / t) * z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.25) || !(a <= 2.5e-50)) tmp = Float64(x + y); else tmp = Float64(x + Float64(Float64(y / t) * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.25) || ~((a <= 2.5e-50))) tmp = x + y; else tmp = x + ((y / t) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.25], N[Not[LessEqual[a, 2.5e-50]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \lor \neg \left(a \leq 2.5 \cdot 10^{-50}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{t} \cdot z\\
\end{array}
\end{array}
if a < -1.25 or 2.49999999999999984e-50 < a Initial program 81.0%
sub-neg81.0%
+-commutative81.0%
distribute-frac-neg81.0%
distribute-rgt-neg-out81.0%
associate-/l*92.5%
fma-define92.5%
distribute-frac-neg92.5%
distribute-neg-frac292.5%
sub-neg92.5%
distribute-neg-in92.5%
remove-double-neg92.5%
+-commutative92.5%
sub-neg92.5%
Simplified92.5%
Taylor expanded in a around inf 76.1%
+-commutative76.1%
Simplified76.1%
if -1.25 < a < 2.49999999999999984e-50Initial program 76.9%
Taylor expanded in t around -inf 79.9%
mul-1-neg79.9%
unsub-neg79.9%
*-commutative79.9%
Simplified79.9%
Taylor expanded in a around 0 77.2%
*-commutative77.2%
associate-/l*79.3%
Applied egg-rr79.3%
Final simplification77.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.05e+150) (not (<= z 1.55e+221))) (* z (/ y (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.05e+150) || !(z <= 1.55e+221)) {
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 <= (-3.05d+150)) .or. (.not. (z <= 1.55d+221))) 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 <= -3.05e+150) || !(z <= 1.55e+221)) {
tmp = z * (y / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.05e+150) or not (z <= 1.55e+221): tmp = z * (y / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.05e+150) || !(z <= 1.55e+221)) 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 <= -3.05e+150) || ~((z <= 1.55e+221))) tmp = z * (y / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.05e+150], N[Not[LessEqual[z, 1.55e+221]], $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 -3.05 \cdot 10^{+150} \lor \neg \left(z \leq 1.55 \cdot 10^{+221}\right):\\
\;\;\;\;z \cdot \frac{y}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -3.05000000000000013e150 or 1.55000000000000003e221 < z Initial program 76.8%
sub-neg76.8%
+-commutative76.8%
distribute-frac-neg76.8%
distribute-rgt-neg-out76.8%
associate-/l*91.9%
fma-define92.0%
distribute-frac-neg92.0%
distribute-neg-frac292.0%
sub-neg92.0%
distribute-neg-in92.0%
remove-double-neg92.0%
+-commutative92.0%
sub-neg92.0%
Simplified92.0%
Taylor expanded in z around inf 53.1%
*-commutative53.1%
*-lft-identity53.1%
times-frac65.6%
/-rgt-identity65.6%
Simplified65.6%
if -3.05000000000000013e150 < z < 1.55000000000000003e221Initial program 79.6%
sub-neg79.6%
+-commutative79.6%
distribute-frac-neg79.6%
distribute-rgt-neg-out79.6%
associate-/l*84.9%
fma-define84.9%
distribute-frac-neg84.9%
distribute-neg-frac284.9%
sub-neg84.9%
distribute-neg-in84.9%
remove-double-neg84.9%
+-commutative84.9%
sub-neg84.9%
Simplified84.9%
Taylor expanded in a around inf 66.5%
+-commutative66.5%
Simplified66.5%
Final simplification66.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.2e+150) (not (<= z 3.2e+221))) (* y (/ z (- t a))) (+ x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.2e+150) || !(z <= 3.2e+221)) {
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 <= (-4.2d+150)) .or. (.not. (z <= 3.2d+221))) 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 <= -4.2e+150) || !(z <= 3.2e+221)) {
tmp = y * (z / (t - a));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.2e+150) or not (z <= 3.2e+221): tmp = y * (z / (t - a)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.2e+150) || !(z <= 3.2e+221)) 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 <= -4.2e+150) || ~((z <= 3.2e+221))) tmp = y * (z / (t - a)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.2e+150], N[Not[LessEqual[z, 3.2e+221]], $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 -4.2 \cdot 10^{+150} \lor \neg \left(z \leq 3.2 \cdot 10^{+221}\right):\\
\;\;\;\;y \cdot \frac{z}{t - a}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if z < -4.19999999999999996e150 or 3.2e221 < z Initial program 76.8%
sub-neg76.8%
+-commutative76.8%
distribute-frac-neg76.8%
distribute-rgt-neg-out76.8%
associate-/l*91.9%
fma-define92.0%
distribute-frac-neg92.0%
distribute-neg-frac292.0%
sub-neg92.0%
distribute-neg-in92.0%
remove-double-neg92.0%
+-commutative92.0%
sub-neg92.0%
Simplified92.0%
Taylor expanded in z around inf 53.1%
associate-/l*63.9%
Simplified63.9%
if -4.19999999999999996e150 < z < 3.2e221Initial program 79.6%
sub-neg79.6%
+-commutative79.6%
distribute-frac-neg79.6%
distribute-rgt-neg-out79.6%
associate-/l*84.9%
fma-define84.9%
distribute-frac-neg84.9%
distribute-neg-frac284.9%
sub-neg84.9%
distribute-neg-in84.9%
remove-double-neg84.9%
+-commutative84.9%
sub-neg84.9%
Simplified84.9%
Taylor expanded in a around inf 66.5%
+-commutative66.5%
Simplified66.5%
Final simplification66.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.5e+135) x (if (<= t 9.8e+89) (+ x y) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.5e+135) {
tmp = x;
} else if (t <= 9.8e+89) {
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 <= (-4.5d+135)) then
tmp = x
else if (t <= 9.8d+89) 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 <= -4.5e+135) {
tmp = x;
} else if (t <= 9.8e+89) {
tmp = x + y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.5e+135: tmp = x elif t <= 9.8e+89: tmp = x + y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.5e+135) tmp = x; elseif (t <= 9.8e+89) 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 <= -4.5e+135) tmp = x; elseif (t <= 9.8e+89) tmp = x + y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.5e+135], x, If[LessEqual[t, 9.8e+89], N[(x + y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{+135}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{+89}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -4.50000000000000007e135 or 9.79999999999999992e89 < t Initial program 54.5%
sub-neg54.5%
+-commutative54.5%
distribute-frac-neg54.5%
distribute-rgt-neg-out54.5%
associate-/l*69.3%
fma-define69.2%
distribute-frac-neg69.2%
distribute-neg-frac269.2%
sub-neg69.2%
distribute-neg-in69.2%
remove-double-neg69.2%
+-commutative69.2%
sub-neg69.2%
Simplified69.2%
Taylor expanded in t around inf 73.2%
distribute-rgt1-in73.2%
metadata-eval73.2%
mul0-lft73.2%
Simplified73.2%
Taylor expanded in x around 0 73.2%
if -4.50000000000000007e135 < t < 9.79999999999999992e89Initial program 89.2%
sub-neg89.2%
+-commutative89.2%
distribute-frac-neg89.2%
distribute-rgt-neg-out89.2%
associate-/l*93.4%
fma-define93.5%
distribute-frac-neg93.5%
distribute-neg-frac293.5%
sub-neg93.5%
distribute-neg-in93.5%
remove-double-neg93.5%
+-commutative93.5%
sub-neg93.5%
Simplified93.5%
Taylor expanded in a around inf 59.9%
+-commutative59.9%
Simplified59.9%
Final simplification63.8%
(FPCore (x y z t a) :precision binary64 (if (<= y -1.85e+90) y (if (<= y 3.4e+67) x y)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.85e+90) {
tmp = y;
} else if (y <= 3.4e+67) {
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.85d+90)) then
tmp = y
else if (y <= 3.4d+67) 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.85e+90) {
tmp = y;
} else if (y <= 3.4e+67) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.85e+90: tmp = y elif y <= 3.4e+67: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.85e+90) tmp = y; elseif (y <= 3.4e+67) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.85e+90) tmp = y; elseif (y <= 3.4e+67) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.85e+90], y, If[LessEqual[y, 3.4e+67], x, y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.85 \cdot 10^{+90}:\\
\;\;\;\;y\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{+67}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < -1.85e90 or 3.4000000000000002e67 < y Initial program 60.9%
sub-neg60.9%
+-commutative60.9%
distribute-frac-neg60.9%
distribute-rgt-neg-out60.9%
associate-/l*80.0%
fma-define80.2%
distribute-frac-neg80.2%
distribute-neg-frac280.2%
sub-neg80.2%
distribute-neg-in80.2%
remove-double-neg80.2%
+-commutative80.2%
sub-neg80.2%
Simplified80.2%
Taylor expanded in a around inf 42.8%
+-commutative42.8%
Simplified42.8%
Taylor expanded in y around inf 32.4%
if -1.85e90 < y < 3.4000000000000002e67Initial program 90.5%
sub-neg90.5%
+-commutative90.5%
distribute-frac-neg90.5%
distribute-rgt-neg-out90.5%
associate-/l*90.3%
fma-define90.2%
distribute-frac-neg90.2%
distribute-neg-frac290.2%
sub-neg90.2%
distribute-neg-in90.2%
remove-double-neg90.2%
+-commutative90.2%
sub-neg90.2%
Simplified90.2%
Taylor expanded in t around inf 66.1%
distribute-rgt1-in66.1%
metadata-eval66.1%
mul0-lft66.1%
Simplified66.1%
Taylor expanded in x around 0 66.1%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 79.0%
sub-neg79.0%
+-commutative79.0%
distribute-frac-neg79.0%
distribute-rgt-neg-out79.0%
associate-/l*86.3%
fma-define86.4%
distribute-frac-neg86.4%
distribute-neg-frac286.4%
sub-neg86.4%
distribute-neg-in86.4%
remove-double-neg86.4%
+-commutative86.4%
sub-neg86.4%
Simplified86.4%
Taylor expanded in t around inf 47.9%
distribute-rgt1-in47.9%
metadata-eval47.9%
mul0-lft47.9%
Simplified47.9%
Taylor expanded in x around 0 47.9%
(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 2024158
(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))))