
(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 (+ x (* y (- (+ (/ t (- a t)) 1.0) (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
return x + (y * (((t / (a - t)) + 1.0) - (z / (a - t))));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * (((t / (a - t)) + 1.0d0) - (z / (a - t))))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * (((t / (a - t)) + 1.0) - (z / (a - t))));
}
def code(x, y, z, t, a): return x + (y * (((t / (a - t)) + 1.0) - (z / (a - t))))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(Float64(t / Float64(a - t)) + 1.0) - Float64(z / Float64(a - t))))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * (((t / (a - t)) + 1.0) - (z / (a - t)))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \left(\left(\frac{t}{a - t} + 1\right) - \frac{z}{a - t}\right)
\end{array}
Initial program 74.5%
sub-neg74.5%
distribute-frac-neg74.5%
distribute-rgt-neg-out74.5%
associate-/l*81.9%
div-sub80.7%
associate-+r-80.7%
associate-/r/81.9%
distribute-rgt-neg-out81.9%
associate-/r/80.7%
distribute-frac-neg80.7%
associate-+l+80.7%
associate-+r-84.6%
distribute-frac-neg84.6%
Simplified85.8%
Taylor expanded in y around 0 93.5%
Final simplification93.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (+ x y) (/ (* y (- t z)) (- a t)))))
(if (<= t_1 -2e-279)
(+ x (+ y (/ (- t z) (/ (- a t) y))))
(if (<= t_1 0.0)
(- x (* y (/ (- a z) t)))
(+ y (+ x (/ y (/ (- a t) (- t z)))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + ((y * (t - z)) / (a - t));
double tmp;
if (t_1 <= -2e-279) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else if (t_1 <= 0.0) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = y + (x + (y / ((a - t) / (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) :: t_1
real(8) :: tmp
t_1 = (x + y) + ((y * (t - z)) / (a - t))
if (t_1 <= (-2d-279)) then
tmp = x + (y + ((t - z) / ((a - t) / y)))
else if (t_1 <= 0.0d0) then
tmp = x - (y * ((a - z) / t))
else
tmp = y + (x + (y / ((a - t) / (t - z))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x + y) + ((y * (t - z)) / (a - t));
double tmp;
if (t_1 <= -2e-279) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else if (t_1 <= 0.0) {
tmp = x - (y * ((a - z) / t));
} else {
tmp = y + (x + (y / ((a - t) / (t - z))));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x + y) + ((y * (t - z)) / (a - t)) tmp = 0 if t_1 <= -2e-279: tmp = x + (y + ((t - z) / ((a - t) / y))) elif t_1 <= 0.0: tmp = x - (y * ((a - z) / t)) else: tmp = y + (x + (y / ((a - t) / (t - z)))) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x + y) + Float64(Float64(y * Float64(t - z)) / Float64(a - t))) tmp = 0.0 if (t_1 <= -2e-279) tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); elseif (t_1 <= 0.0) tmp = Float64(x - Float64(y * Float64(Float64(a - z) / t))); else tmp = Float64(y + Float64(x + Float64(y / Float64(Float64(a - t) / Float64(t - z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x + y) + ((y * (t - z)) / (a - t)); tmp = 0.0; if (t_1 <= -2e-279) tmp = x + (y + ((t - z) / ((a - t) / y))); elseif (t_1 <= 0.0) tmp = x - (y * ((a - z) / t)); else tmp = y + (x + (y / ((a - t) / (t - z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-279], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(x - N[(y * N[(N[(a - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(x + N[(y / N[(N[(a - t), $MachinePrecision] / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + \frac{y \cdot \left(t - z\right)}{a - t}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{-279}:\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;x - y \cdot \frac{a - z}{t}\\
\mathbf{else}:\\
\;\;\;\;y + \left(x + \frac{y}{\frac{a - t}{t - z}}\right)\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2.00000000000000011e-279Initial program 74.8%
sub-neg74.8%
distribute-frac-neg74.8%
distribute-rgt-neg-out74.8%
associate-/l*87.4%
div-sub86.6%
associate-+r-86.6%
associate-/r/87.4%
distribute-rgt-neg-out87.4%
associate-/r/86.6%
distribute-frac-neg86.6%
associate-+l+86.6%
associate-+r-89.2%
distribute-frac-neg89.2%
Simplified90.0%
if -2.00000000000000011e-279 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 4.4%
Taylor expanded in t around inf 95.8%
mul-1-neg95.8%
associate--l+95.8%
mul-1-neg95.8%
associate-*r/95.8%
associate-*r/95.8%
div-sub95.8%
distribute-lft-out--95.8%
associate-*r/95.8%
+-commutative95.8%
mul-1-neg95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in y around 0 95.8%
associate-*r/99.7%
Simplified99.7%
if 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 88.3%
+-commutative88.3%
associate--l+88.3%
sub-neg88.3%
distribute-frac-neg88.3%
*-commutative88.3%
distribute-rgt-neg-in88.3%
associate-/l*94.8%
sub-neg94.8%
distribute-neg-in94.8%
remove-double-neg94.8%
+-commutative94.8%
sub-neg94.8%
Simplified94.8%
Final simplification93.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -1.58e-142) (not (<= a 3e-39))) (+ x (+ y (/ (- t z) (/ (- a t) y)))) (- x (/ (* y z) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.58e-142) || !(a <= 3e-39)) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else {
tmp = x - ((y * z) / (a - t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-1.58d-142)) .or. (.not. (a <= 3d-39))) then
tmp = x + (y + ((t - z) / ((a - t) / y)))
else
tmp = x - ((y * z) / (a - t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -1.58e-142) || !(a <= 3e-39)) {
tmp = x + (y + ((t - z) / ((a - t) / y)));
} else {
tmp = x - ((y * z) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -1.58e-142) or not (a <= 3e-39): tmp = x + (y + ((t - z) / ((a - t) / y))) else: tmp = x - ((y * z) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -1.58e-142) || !(a <= 3e-39)) tmp = Float64(x + Float64(y + Float64(Float64(t - z) / Float64(Float64(a - t) / y)))); else tmp = Float64(x - Float64(Float64(y * z) / Float64(a - t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -1.58e-142) || ~((a <= 3e-39))) tmp = x + (y + ((t - z) / ((a - t) / y))); else tmp = x - ((y * z) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -1.58e-142], N[Not[LessEqual[a, 3e-39]], $MachinePrecision]], N[(x + N[(y + N[(N[(t - z), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.58 \cdot 10^{-142} \lor \neg \left(a \leq 3 \cdot 10^{-39}\right):\\
\;\;\;\;x + \left(y + \frac{t - z}{\frac{a - t}{y}}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\end{array}
\end{array}
if a < -1.58000000000000006e-142 or 3.00000000000000028e-39 < a Initial program 78.2%
sub-neg78.2%
distribute-frac-neg78.2%
distribute-rgt-neg-out78.2%
associate-/l*90.0%
div-sub89.4%
associate-+r-89.4%
associate-/r/90.0%
distribute-rgt-neg-out90.0%
associate-/r/89.4%
distribute-frac-neg89.4%
associate-+l+89.4%
associate-+r-91.3%
distribute-frac-neg91.3%
Simplified91.9%
if -1.58000000000000006e-142 < a < 3.00000000000000028e-39Initial program 68.4%
sub-neg68.4%
distribute-frac-neg68.4%
distribute-rgt-neg-out68.4%
associate-/l*68.1%
div-sub65.9%
associate-+r-65.9%
associate-/r/68.2%
distribute-rgt-neg-out68.2%
associate-/r/65.9%
distribute-frac-neg65.9%
associate-+l+65.9%
associate-+r-73.2%
distribute-frac-neg73.2%
Simplified75.4%
Taylor expanded in z around inf 90.8%
associate-*r/90.8%
associate-*r*90.8%
neg-mul-190.8%
Simplified90.8%
Final simplification91.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -5e-6)
(- (+ x y) (/ y (/ a z)))
(if (<= a 3.1e-6)
(- x (* y (/ z (- a t))))
(+ x (- y (* z (/ y (- a t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5e-6) {
tmp = (x + y) - (y / (a / z));
} else if (a <= 3.1e-6) {
tmp = x - (y * (z / (a - t)));
} else {
tmp = x + (y - (z * (y / (a - t))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5d-6)) then
tmp = (x + y) - (y / (a / z))
else if (a <= 3.1d-6) then
tmp = x - (y * (z / (a - t)))
else
tmp = x + (y - (z * (y / (a - t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5e-6) {
tmp = (x + y) - (y / (a / z));
} else if (a <= 3.1e-6) {
tmp = x - (y * (z / (a - t)));
} else {
tmp = x + (y - (z * (y / (a - t))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5e-6: tmp = (x + y) - (y / (a / z)) elif a <= 3.1e-6: tmp = x - (y * (z / (a - t))) else: tmp = x + (y - (z * (y / (a - t)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5e-6) tmp = Float64(Float64(x + y) - Float64(y / Float64(a / z))); elseif (a <= 3.1e-6) tmp = Float64(x - Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(x + Float64(y - Float64(z * Float64(y / Float64(a - t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5e-6) tmp = (x + y) - (y / (a / z)); elseif (a <= 3.1e-6) tmp = x - (y * (z / (a - t))); else tmp = x + (y - (z * (y / (a - t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5e-6], N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.1e-6], N[(x - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{-6}:\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-6}:\\
\;\;\;\;x - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z \cdot \frac{y}{a - t}\right)\\
\end{array}
\end{array}
if a < -5.00000000000000041e-6Initial program 78.1%
+-commutative78.1%
associate--l+78.1%
sub-neg78.1%
distribute-frac-neg78.1%
*-commutative78.1%
distribute-rgt-neg-in78.1%
associate-/l*90.6%
sub-neg90.6%
distribute-neg-in90.6%
remove-double-neg90.6%
+-commutative90.6%
sub-neg90.6%
Simplified90.6%
Taylor expanded in t around 0 84.2%
mul-1-neg84.2%
sub-neg84.2%
associate--l+84.2%
+-commutative84.2%
associate-/l*90.4%
Simplified90.4%
if -5.00000000000000041e-6 < a < 3.1e-6Initial program 70.7%
sub-neg70.7%
distribute-frac-neg70.7%
distribute-rgt-neg-out70.7%
associate-/l*72.6%
div-sub70.3%
associate-+r-70.3%
associate-/r/72.7%
distribute-rgt-neg-out72.7%
associate-/r/70.3%
distribute-frac-neg70.3%
associate-+l+70.3%
associate-+r-77.8%
distribute-frac-neg77.8%
Simplified80.1%
Taylor expanded in y around 0 92.1%
Taylor expanded in z around inf 86.8%
mul-1-neg86.8%
associate-*r/88.5%
*-commutative88.5%
distribute-rgt-neg-in88.5%
Simplified88.5%
if 3.1e-6 < a Initial program 79.6%
sub-neg79.6%
distribute-frac-neg79.6%
distribute-rgt-neg-out79.6%
associate-/l*95.4%
div-sub95.4%
associate-+r-95.4%
associate-/r/95.4%
distribute-rgt-neg-out95.4%
associate-/r/95.4%
distribute-frac-neg95.4%
associate-+l+95.4%
associate-+r-95.4%
distribute-frac-neg95.4%
Simplified95.4%
Taylor expanded in z around inf 82.5%
associate-/l*92.2%
Simplified92.2%
associate-/r/92.2%
Applied egg-rr92.2%
Final simplification89.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.02e-5)
(+ x (- y (/ y (/ (- a t) z))))
(if (<= a 1.3e-6)
(- x (* y (/ z (- a t))))
(+ x (- y (* z (/ y (- a t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.02e-5) {
tmp = x + (y - (y / ((a - t) / z)));
} else if (a <= 1.3e-6) {
tmp = x - (y * (z / (a - t)));
} else {
tmp = x + (y - (z * (y / (a - t))));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.02d-5)) then
tmp = x + (y - (y / ((a - t) / z)))
else if (a <= 1.3d-6) then
tmp = x - (y * (z / (a - t)))
else
tmp = x + (y - (z * (y / (a - t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.02e-5) {
tmp = x + (y - (y / ((a - t) / z)));
} else if (a <= 1.3e-6) {
tmp = x - (y * (z / (a - t)));
} else {
tmp = x + (y - (z * (y / (a - t))));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.02e-5: tmp = x + (y - (y / ((a - t) / z))) elif a <= 1.3e-6: tmp = x - (y * (z / (a - t))) else: tmp = x + (y - (z * (y / (a - t)))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.02e-5) tmp = Float64(x + Float64(y - Float64(y / Float64(Float64(a - t) / z)))); elseif (a <= 1.3e-6) tmp = Float64(x - Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(x + Float64(y - Float64(z * Float64(y / Float64(a - t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.02e-5) tmp = x + (y - (y / ((a - t) / z))); elseif (a <= 1.3e-6) tmp = x - (y * (z / (a - t))); else tmp = x + (y - (z * (y / (a - t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.02e-5], N[(x + N[(y - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.3e-6], N[(x - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{-5}:\\
\;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z}}\right)\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-6}:\\
\;\;\;\;x - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - z \cdot \frac{y}{a - t}\right)\\
\end{array}
\end{array}
if a < -1.0200000000000001e-5Initial program 78.1%
sub-neg78.1%
distribute-frac-neg78.1%
distribute-rgt-neg-out78.1%
associate-/l*89.1%
div-sub89.1%
associate-+r-89.1%
associate-/r/89.0%
distribute-rgt-neg-out89.0%
associate-/r/89.1%
distribute-frac-neg89.1%
associate-+l+89.1%
associate-+r-89.1%
distribute-frac-neg89.1%
Simplified89.1%
Taylor expanded in z around inf 84.3%
associate-/l*90.5%
Simplified90.5%
if -1.0200000000000001e-5 < a < 1.30000000000000005e-6Initial program 70.7%
sub-neg70.7%
distribute-frac-neg70.7%
distribute-rgt-neg-out70.7%
associate-/l*72.6%
div-sub70.3%
associate-+r-70.3%
associate-/r/72.7%
distribute-rgt-neg-out72.7%
associate-/r/70.3%
distribute-frac-neg70.3%
associate-+l+70.3%
associate-+r-77.8%
distribute-frac-neg77.8%
Simplified80.1%
Taylor expanded in y around 0 92.1%
Taylor expanded in z around inf 86.8%
mul-1-neg86.8%
associate-*r/88.5%
*-commutative88.5%
distribute-rgt-neg-in88.5%
Simplified88.5%
if 1.30000000000000005e-6 < a Initial program 79.6%
sub-neg79.6%
distribute-frac-neg79.6%
distribute-rgt-neg-out79.6%
associate-/l*95.4%
div-sub95.4%
associate-+r-95.4%
associate-/r/95.4%
distribute-rgt-neg-out95.4%
associate-/r/95.4%
distribute-frac-neg95.4%
associate-+l+95.4%
associate-+r-95.4%
distribute-frac-neg95.4%
Simplified95.4%
Taylor expanded in z around inf 82.5%
associate-/l*92.2%
Simplified92.2%
associate-/r/92.2%
Applied egg-rr92.2%
Final simplification89.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z t))))
(if (<= a -3.5e-153)
(+ x y)
(if (<= a -4e-234)
t_1
(if (<= a -1.85e-298) x (if (<= a 2.6e-241) t_1 (+ x y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / t);
double tmp;
if (a <= -3.5e-153) {
tmp = x + y;
} else if (a <= -4e-234) {
tmp = t_1;
} else if (a <= -1.85e-298) {
tmp = x;
} else if (a <= 2.6e-241) {
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 = y * (z / t)
if (a <= (-3.5d-153)) then
tmp = x + y
else if (a <= (-4d-234)) then
tmp = t_1
else if (a <= (-1.85d-298)) then
tmp = x
else if (a <= 2.6d-241) 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 = y * (z / t);
double tmp;
if (a <= -3.5e-153) {
tmp = x + y;
} else if (a <= -4e-234) {
tmp = t_1;
} else if (a <= -1.85e-298) {
tmp = x;
} else if (a <= 2.6e-241) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / t) tmp = 0 if a <= -3.5e-153: tmp = x + y elif a <= -4e-234: tmp = t_1 elif a <= -1.85e-298: tmp = x elif a <= 2.6e-241: tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / t)) tmp = 0.0 if (a <= -3.5e-153) tmp = Float64(x + y); elseif (a <= -4e-234) tmp = t_1; elseif (a <= -1.85e-298) tmp = x; elseif (a <= 2.6e-241) tmp = t_1; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / t); tmp = 0.0; if (a <= -3.5e-153) tmp = x + y; elseif (a <= -4e-234) tmp = t_1; elseif (a <= -1.85e-298) tmp = x; elseif (a <= 2.6e-241) tmp = t_1; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.5e-153], N[(x + y), $MachinePrecision], If[LessEqual[a, -4e-234], t$95$1, If[LessEqual[a, -1.85e-298], x, If[LessEqual[a, 2.6e-241], t$95$1, N[(x + y), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{t}\\
\mathbf{if}\;a \leq -3.5 \cdot 10^{-153}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-234}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.85 \cdot 10^{-298}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-241}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -3.49999999999999981e-153 or 2.5999999999999999e-241 < a Initial program 76.4%
+-commutative76.4%
associate--l+76.4%
sub-neg76.4%
distribute-frac-neg76.4%
*-commutative76.4%
distribute-rgt-neg-in76.4%
associate-/l*86.1%
sub-neg86.1%
distribute-neg-in86.1%
remove-double-neg86.1%
+-commutative86.1%
sub-neg86.1%
Simplified86.1%
Taylor expanded in a around inf 65.1%
+-commutative65.1%
Simplified65.1%
if -3.49999999999999981e-153 < a < -3.9999999999999998e-234 or -1.8499999999999999e-298 < a < 2.5999999999999999e-241Initial program 67.6%
sub-neg67.6%
distribute-frac-neg67.6%
distribute-rgt-neg-out67.6%
associate-/l*64.7%
div-sub60.9%
associate-+r-60.9%
associate-/r/64.5%
distribute-rgt-neg-out64.5%
associate-/r/60.9%
distribute-frac-neg60.9%
associate-+l+60.9%
associate-+r-68.0%
distribute-frac-neg68.0%
Simplified71.9%
Taylor expanded in y around 0 93.1%
Taylor expanded in a around 0 73.4%
Taylor expanded in x around 0 63.0%
associate-*r/63.7%
Simplified63.7%
if -3.9999999999999998e-234 < a < -1.8499999999999999e-298Initial program 65.3%
+-commutative65.3%
associate--l+65.3%
sub-neg65.3%
distribute-frac-neg65.3%
*-commutative65.3%
distribute-rgt-neg-in65.3%
associate-/l*65.5%
sub-neg65.5%
distribute-neg-in65.5%
remove-double-neg65.5%
+-commutative65.5%
sub-neg65.5%
Simplified65.5%
Taylor expanded in y around 0 76.3%
Final simplification65.8%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.7e-151)
(+ x y)
(if (<= a -4.2e-234)
(/ (* y z) t)
(if (<= a -1.35e-297) x (if (<= a 3.6e-232) (* y (/ z t)) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e-151) {
tmp = x + y;
} else if (a <= -4.2e-234) {
tmp = (y * z) / t;
} else if (a <= -1.35e-297) {
tmp = x;
} else if (a <= 3.6e-232) {
tmp = y * (z / t);
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.7d-151)) then
tmp = x + y
else if (a <= (-4.2d-234)) then
tmp = (y * z) / t
else if (a <= (-1.35d-297)) then
tmp = x
else if (a <= 3.6d-232) then
tmp = y * (z / t)
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.7e-151) {
tmp = x + y;
} else if (a <= -4.2e-234) {
tmp = (y * z) / t;
} else if (a <= -1.35e-297) {
tmp = x;
} else if (a <= 3.6e-232) {
tmp = y * (z / t);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.7e-151: tmp = x + y elif a <= -4.2e-234: tmp = (y * z) / t elif a <= -1.35e-297: tmp = x elif a <= 3.6e-232: tmp = y * (z / t) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.7e-151) tmp = Float64(x + y); elseif (a <= -4.2e-234) tmp = Float64(Float64(y * z) / t); elseif (a <= -1.35e-297) tmp = x; elseif (a <= 3.6e-232) tmp = Float64(y * Float64(z / t)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.7e-151) tmp = x + y; elseif (a <= -4.2e-234) tmp = (y * z) / t; elseif (a <= -1.35e-297) tmp = x; elseif (a <= 3.6e-232) tmp = y * (z / t); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.7e-151], N[(x + y), $MachinePrecision], If[LessEqual[a, -4.2e-234], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[a, -1.35e-297], x, If[LessEqual[a, 3.6e-232], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.7 \cdot 10^{-151}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -4.2 \cdot 10^{-234}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq -1.35 \cdot 10^{-297}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{-232}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.7000000000000001e-151 or 3.60000000000000016e-232 < a Initial program 76.4%
+-commutative76.4%
associate--l+76.4%
sub-neg76.4%
distribute-frac-neg76.4%
*-commutative76.4%
distribute-rgt-neg-in76.4%
associate-/l*86.1%
sub-neg86.1%
distribute-neg-in86.1%
remove-double-neg86.1%
+-commutative86.1%
sub-neg86.1%
Simplified86.1%
Taylor expanded in a around inf 65.1%
+-commutative65.1%
Simplified65.1%
if -1.7000000000000001e-151 < a < -4.19999999999999982e-234Initial program 68.8%
sub-neg68.8%
distribute-frac-neg68.8%
distribute-rgt-neg-out68.8%
associate-/l*64.3%
div-sub58.7%
associate-+r-58.7%
associate-/r/63.9%
distribute-rgt-neg-out63.9%
associate-/r/58.7%
distribute-frac-neg58.7%
associate-+l+58.7%
associate-+r-64.5%
distribute-frac-neg64.5%
Simplified70.1%
Taylor expanded in y around 0 89.0%
Taylor expanded in a around 0 67.4%
Taylor expanded in x around 0 56.6%
if -4.19999999999999982e-234 < a < -1.3500000000000001e-297Initial program 65.3%
+-commutative65.3%
associate--l+65.3%
sub-neg65.3%
distribute-frac-neg65.3%
*-commutative65.3%
distribute-rgt-neg-in65.3%
associate-/l*65.5%
sub-neg65.5%
distribute-neg-in65.5%
remove-double-neg65.5%
+-commutative65.5%
sub-neg65.5%
Simplified65.5%
Taylor expanded in y around 0 76.3%
if -1.3500000000000001e-297 < a < 3.60000000000000016e-232Initial program 65.8%
sub-neg65.8%
distribute-frac-neg65.8%
distribute-rgt-neg-out65.8%
associate-/l*65.5%
div-sub64.4%
associate-+r-64.4%
associate-/r/65.5%
distribute-rgt-neg-out65.5%
associate-/r/64.4%
distribute-frac-neg64.4%
associate-+l+64.4%
associate-+r-73.8%
distribute-frac-neg73.8%
Simplified74.9%
Taylor expanded in y around 0 99.7%
Taylor expanded in a around 0 83.2%
Taylor expanded in x around 0 73.6%
associate-*r/75.4%
Simplified75.4%
Final simplification65.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -9e-6) (not (<= a 1e+46))) (- (+ x y) (/ y (/ a z))) (- x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9e-6) || !(a <= 1e+46)) {
tmp = (x + y) - (y / (a / z));
} else {
tmp = x - (z * (y / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-9d-6)) .or. (.not. (a <= 1d+46))) then
tmp = (x + y) - (y / (a / z))
else
tmp = x - (z * (y / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -9e-6) || !(a <= 1e+46)) {
tmp = (x + y) - (y / (a / z));
} else {
tmp = x - (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -9e-6) or not (a <= 1e+46): tmp = (x + y) - (y / (a / z)) else: tmp = x - (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -9e-6) || !(a <= 1e+46)) tmp = Float64(Float64(x + y) - Float64(y / Float64(a / z))); else tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -9e-6) || ~((a <= 1e+46))) tmp = (x + y) - (y / (a / z)); else tmp = x - (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -9e-6], N[Not[LessEqual[a, 1e+46]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9 \cdot 10^{-6} \lor \neg \left(a \leq 10^{+46}\right):\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if a < -9.00000000000000023e-6 or 9.9999999999999999e45 < a Initial program 77.5%
+-commutative77.5%
associate--l+77.5%
sub-neg77.5%
distribute-frac-neg77.5%
*-commutative77.5%
distribute-rgt-neg-in77.5%
associate-/l*92.3%
sub-neg92.3%
distribute-neg-in92.3%
remove-double-neg92.3%
+-commutative92.3%
sub-neg92.3%
Simplified92.3%
Taylor expanded in t around 0 80.8%
mul-1-neg80.8%
sub-neg80.8%
associate--l+80.8%
+-commutative80.8%
associate-/l*88.8%
Simplified88.8%
if -9.00000000000000023e-6 < a < 9.9999999999999999e45Initial program 72.3%
sub-neg72.3%
distribute-frac-neg72.3%
distribute-rgt-neg-out72.3%
associate-/l*74.7%
div-sub72.6%
associate-+r-72.6%
associate-/r/74.7%
distribute-rgt-neg-out74.7%
associate-/r/72.6%
distribute-frac-neg72.6%
associate-+l+72.6%
associate-+r-79.4%
distribute-frac-neg79.4%
Simplified81.5%
Taylor expanded in z around inf 71.8%
associate-/l*72.3%
Simplified72.3%
associate-/r/71.7%
Applied egg-rr71.7%
Taylor expanded in z around inf 86.5%
mul-1-neg86.5%
associate-*l/88.2%
distribute-lft-neg-in88.2%
*-commutative88.2%
distribute-neg-frac88.2%
Simplified88.2%
Taylor expanded in x around 0 86.5%
mul-1-neg86.5%
*-commutative86.5%
associate-*r/88.2%
sub-neg88.2%
Simplified88.2%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -6e-6) (not (<= a 1.06e+45))) (- (+ x y) (/ y (/ a z))) (- x (* y (/ z (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6e-6) || !(a <= 1.06e+45)) {
tmp = (x + y) - (y / (a / z));
} else {
tmp = x - (y * (z / (a - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-6d-6)) .or. (.not. (a <= 1.06d+45))) then
tmp = (x + y) - (y / (a / z))
else
tmp = x - (y * (z / (a - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -6e-6) || !(a <= 1.06e+45)) {
tmp = (x + y) - (y / (a / z));
} else {
tmp = x - (y * (z / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -6e-6) or not (a <= 1.06e+45): tmp = (x + y) - (y / (a / z)) else: tmp = x - (y * (z / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -6e-6) || !(a <= 1.06e+45)) tmp = Float64(Float64(x + y) - Float64(y / Float64(a / z))); else tmp = Float64(x - Float64(y * Float64(z / Float64(a - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -6e-6) || ~((a <= 1.06e+45))) tmp = (x + y) - (y / (a / z)); else tmp = x - (y * (z / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6e-6], N[Not[LessEqual[a, 1.06e+45]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{-6} \lor \neg \left(a \leq 1.06 \cdot 10^{+45}\right):\\
\;\;\;\;\left(x + y\right) - \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{z}{a - t}\\
\end{array}
\end{array}
if a < -6.0000000000000002e-6 or 1.06e45 < a Initial program 77.5%
+-commutative77.5%
associate--l+77.5%
sub-neg77.5%
distribute-frac-neg77.5%
*-commutative77.5%
distribute-rgt-neg-in77.5%
associate-/l*92.3%
sub-neg92.3%
distribute-neg-in92.3%
remove-double-neg92.3%
+-commutative92.3%
sub-neg92.3%
Simplified92.3%
Taylor expanded in t around 0 80.8%
mul-1-neg80.8%
sub-neg80.8%
associate--l+80.8%
+-commutative80.8%
associate-/l*88.8%
Simplified88.8%
if -6.0000000000000002e-6 < a < 1.06e45Initial program 72.3%
sub-neg72.3%
distribute-frac-neg72.3%
distribute-rgt-neg-out72.3%
associate-/l*74.7%
div-sub72.6%
associate-+r-72.6%
associate-/r/74.7%
distribute-rgt-neg-out74.7%
associate-/r/72.6%
distribute-frac-neg72.6%
associate-+l+72.6%
associate-+r-79.4%
distribute-frac-neg79.4%
Simplified81.5%
Taylor expanded in y around 0 92.7%
Taylor expanded in z around inf 86.5%
mul-1-neg86.5%
associate-*r/88.6%
*-commutative88.6%
distribute-rgt-neg-in88.6%
Simplified88.6%
Final simplification88.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -7600000000.0) (+ x y) (if (<= a 3.2e+118) (- x (* z (/ y (- a t)))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7600000000.0) {
tmp = x + y;
} else if (a <= 3.2e+118) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-7600000000.0d0)) then
tmp = x + y
else if (a <= 3.2d+118) then
tmp = x - (z * (y / (a - t)))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -7600000000.0) {
tmp = x + y;
} else if (a <= 3.2e+118) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -7600000000.0: tmp = x + y elif a <= 3.2e+118: tmp = x - (z * (y / (a - t))) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -7600000000.0) tmp = Float64(x + y); elseif (a <= 3.2e+118) tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -7600000000.0) tmp = x + y; elseif (a <= 3.2e+118) tmp = x - (z * (y / (a - t))); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -7600000000.0], N[(x + y), $MachinePrecision], If[LessEqual[a, 3.2e+118], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7600000000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+118}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -7.6e9 or 3.20000000000000016e118 < a Initial program 75.3%
+-commutative75.3%
associate--l+75.3%
sub-neg75.3%
distribute-frac-neg75.3%
*-commutative75.3%
distribute-rgt-neg-in75.3%
associate-/l*91.6%
sub-neg91.6%
distribute-neg-in91.6%
remove-double-neg91.6%
+-commutative91.6%
sub-neg91.6%
Simplified91.6%
Taylor expanded in a around inf 79.4%
+-commutative79.4%
Simplified79.4%
if -7.6e9 < a < 3.20000000000000016e118Initial program 74.1%
sub-neg74.1%
distribute-frac-neg74.1%
distribute-rgt-neg-out74.1%
associate-/l*77.3%
div-sub75.4%
associate-+r-75.4%
associate-/r/77.3%
distribute-rgt-neg-out77.3%
associate-/r/75.4%
distribute-frac-neg75.4%
associate-+l+75.4%
associate-+r-81.4%
distribute-frac-neg81.4%
Simplified83.2%
Taylor expanded in z around inf 73.7%
associate-/l*75.2%
Simplified75.2%
associate-/r/74.7%
Applied egg-rr74.7%
Taylor expanded in z around inf 83.2%
mul-1-neg83.2%
associate-*l/86.3%
distribute-lft-neg-in86.3%
*-commutative86.3%
distribute-neg-frac86.3%
Simplified86.3%
Taylor expanded in x around 0 83.2%
mul-1-neg83.2%
*-commutative83.2%
associate-*r/86.3%
sub-neg86.3%
Simplified86.3%
Final simplification83.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.7e-6) (+ x y) (if (<= a 9.5e-6) (+ x (* z (/ y t))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.7e-6) {
tmp = x + y;
} else if (a <= 9.5e-6) {
tmp = x + (z * (y / t));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5.7d-6)) then
tmp = x + y
else if (a <= 9.5d-6) then
tmp = x + (z * (y / t))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.7e-6) {
tmp = x + y;
} else if (a <= 9.5e-6) {
tmp = x + (z * (y / t));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.7e-6: tmp = x + y elif a <= 9.5e-6: tmp = x + (z * (y / t)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.7e-6) tmp = Float64(x + y); elseif (a <= 9.5e-6) tmp = Float64(x + Float64(z * Float64(y / t))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.7e-6) tmp = x + y; elseif (a <= 9.5e-6) tmp = x + (z * (y / t)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.7e-6], N[(x + y), $MachinePrecision], If[LessEqual[a, 9.5e-6], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.7 \cdot 10^{-6}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{-6}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -5.6999999999999996e-6 or 9.5000000000000005e-6 < a Initial program 78.8%
+-commutative78.8%
associate--l+78.8%
sub-neg78.8%
distribute-frac-neg78.8%
*-commutative78.8%
distribute-rgt-neg-in78.8%
associate-/l*93.0%
sub-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
+-commutative93.0%
sub-neg93.0%
Simplified93.0%
Taylor expanded in a around inf 75.5%
+-commutative75.5%
Simplified75.5%
if -5.6999999999999996e-6 < a < 9.5000000000000005e-6Initial program 70.7%
sub-neg70.7%
distribute-frac-neg70.7%
distribute-rgt-neg-out70.7%
associate-/l*72.6%
div-sub70.3%
associate-+r-70.3%
associate-/r/72.7%
distribute-rgt-neg-out72.7%
associate-/r/70.3%
distribute-frac-neg70.3%
associate-+l+70.3%
associate-+r-77.8%
distribute-frac-neg77.8%
Simplified80.1%
Taylor expanded in z around inf 70.1%
associate-/l*70.0%
Simplified70.0%
associate-/r/69.4%
Applied egg-rr69.4%
Taylor expanded in z around inf 86.8%
mul-1-neg86.8%
associate-*l/88.0%
distribute-lft-neg-in88.0%
*-commutative88.0%
distribute-neg-frac88.0%
Simplified88.0%
Taylor expanded in a around 0 74.8%
Final simplification75.1%
(FPCore (x y z t a) :precision binary64 (if (<= a -8e-6) (+ x y) (if (<= a 1.02e-5) (+ x (/ y (/ t z))) (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8e-6) {
tmp = x + y;
} else if (a <= 1.02e-5) {
tmp = x + (y / (t / z));
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-8d-6)) then
tmp = x + y
else if (a <= 1.02d-5) then
tmp = x + (y / (t / z))
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8e-6) {
tmp = x + y;
} else if (a <= 1.02e-5) {
tmp = x + (y / (t / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8e-6: tmp = x + y elif a <= 1.02e-5: tmp = x + (y / (t / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8e-6) tmp = Float64(x + y); elseif (a <= 1.02e-5) tmp = Float64(x + Float64(y / Float64(t / z))); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8e-6) tmp = x + y; elseif (a <= 1.02e-5) tmp = x + (y / (t / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8e-6], N[(x + y), $MachinePrecision], If[LessEqual[a, 1.02e-5], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{-6}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 1.02 \cdot 10^{-5}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -7.99999999999999964e-6 or 1.0200000000000001e-5 < a Initial program 78.8%
+-commutative78.8%
associate--l+78.8%
sub-neg78.8%
distribute-frac-neg78.8%
*-commutative78.8%
distribute-rgt-neg-in78.8%
associate-/l*93.0%
sub-neg93.0%
distribute-neg-in93.0%
remove-double-neg93.0%
+-commutative93.0%
sub-neg93.0%
Simplified93.0%
Taylor expanded in a around inf 75.5%
+-commutative75.5%
Simplified75.5%
if -7.99999999999999964e-6 < a < 1.0200000000000001e-5Initial program 70.7%
sub-neg70.7%
distribute-frac-neg70.7%
distribute-rgt-neg-out70.7%
associate-/l*72.6%
div-sub70.3%
associate-+r-70.3%
associate-/r/72.7%
distribute-rgt-neg-out72.7%
associate-/r/70.3%
distribute-frac-neg70.3%
associate-+l+70.3%
associate-+r-77.8%
distribute-frac-neg77.8%
Simplified80.1%
Taylor expanded in y around 0 92.1%
Taylor expanded in a around 0 73.1%
associate-/l*75.4%
Simplified75.4%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (if (<= x -3.8e-37) x (if (<= x 1.1e-235) y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.8e-37) {
tmp = x;
} else if (x <= 1.1e-235) {
tmp = 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 (x <= (-3.8d-37)) then
tmp = x
else if (x <= 1.1d-235) then
tmp = 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 (x <= -3.8e-37) {
tmp = x;
} else if (x <= 1.1e-235) {
tmp = y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -3.8e-37: tmp = x elif x <= 1.1e-235: tmp = y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -3.8e-37) tmp = x; elseif (x <= 1.1e-235) tmp = y; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -3.8e-37) tmp = x; elseif (x <= 1.1e-235) tmp = y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.8e-37], x, If[LessEqual[x, 1.1e-235], y, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{-37}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-235}:\\
\;\;\;\;y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.8000000000000004e-37 or 1.09999999999999992e-235 < x Initial program 77.9%
+-commutative77.9%
associate--l+77.9%
sub-neg77.9%
distribute-frac-neg77.9%
*-commutative77.9%
distribute-rgt-neg-in77.9%
associate-/l*86.7%
sub-neg86.7%
distribute-neg-in86.7%
remove-double-neg86.7%
+-commutative86.7%
sub-neg86.7%
Simplified86.7%
Taylor expanded in y around 0 61.9%
if -3.8000000000000004e-37 < x < 1.09999999999999992e-235Initial program 67.4%
+-commutative67.4%
associate--l+67.4%
sub-neg67.4%
distribute-frac-neg67.4%
*-commutative67.4%
distribute-rgt-neg-in67.4%
associate-/l*73.1%
sub-neg73.1%
distribute-neg-in73.1%
remove-double-neg73.1%
+-commutative73.1%
sub-neg73.1%
Simplified73.1%
Taylor expanded in t around 0 57.1%
mul-1-neg57.1%
sub-neg57.1%
associate--l+57.1%
+-commutative57.1%
associate-/l*59.1%
Simplified59.1%
Taylor expanded in y around inf 52.1%
Taylor expanded in z around 0 32.7%
Final simplification52.6%
(FPCore (x y z t a) :precision binary64 (+ x y))
double code(double x, double y, double z, double t, double a) {
return x + y;
}
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
end function
public static double code(double x, double y, double z, double t, double a) {
return x + y;
}
def code(x, y, z, t, a): return x + y
function code(x, y, z, t, a) return Float64(x + y) end
function tmp = code(x, y, z, t, a) tmp = x + y; end
code[x_, y_, z_, t_, a_] := N[(x + y), $MachinePrecision]
\begin{array}{l}
\\
x + y
\end{array}
Initial program 74.5%
+-commutative74.5%
associate--l+74.5%
sub-neg74.5%
distribute-frac-neg74.5%
*-commutative74.5%
distribute-rgt-neg-in74.5%
associate-/l*82.4%
sub-neg82.4%
distribute-neg-in82.4%
remove-double-neg82.4%
+-commutative82.4%
sub-neg82.4%
Simplified82.4%
Taylor expanded in a around inf 57.9%
+-commutative57.9%
Simplified57.9%
Final simplification57.9%
(FPCore (x y z t a) :precision binary64 0.0)
double code(double x, double y, double z, double t, double a) {
return 0.0;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = 0.0d0
end function
public static double code(double x, double y, double z, double t, double a) {
return 0.0;
}
def code(x, y, z, t, a): return 0.0
function code(x, y, z, t, a) return 0.0 end
function tmp = code(x, y, z, t, a) tmp = 0.0; end
code[x_, y_, z_, t_, a_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 74.5%
+-commutative74.5%
associate--l+74.5%
sub-neg74.5%
distribute-frac-neg74.5%
*-commutative74.5%
distribute-rgt-neg-in74.5%
associate-/l*82.4%
sub-neg82.4%
distribute-neg-in82.4%
remove-double-neg82.4%
+-commutative82.4%
sub-neg82.4%
Simplified82.4%
Taylor expanded in x around 0 38.1%
associate-*r/41.9%
Simplified41.9%
Taylor expanded in t around inf 2.7%
distribute-rgt1-in2.7%
metadata-eval2.7%
mul0-lft2.7%
Simplified2.7%
Final simplification2.7%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 74.5%
+-commutative74.5%
associate--l+74.5%
sub-neg74.5%
distribute-frac-neg74.5%
*-commutative74.5%
distribute-rgt-neg-in74.5%
associate-/l*82.4%
sub-neg82.4%
distribute-neg-in82.4%
remove-double-neg82.4%
+-commutative82.4%
sub-neg82.4%
Simplified82.4%
Taylor expanded in y around 0 47.7%
Final simplification47.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 2023275
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTick from plot-0.2.3.4, B"
:precision binary64
:herbie-target
(if (< (- (+ x y) (/ (* (- z t) y) (- a t))) -1.3664970889390727e-7) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y)) (if (< (- (+ x y) (/ (* (- z t) y) (- a t))) 1.4754293444577233e-239) (/ (- (* y (- a z)) (* x t)) (- a t)) (- (+ y x) (* (* (- z t) (/ 1.0 (- a t))) y))))
(- (+ x y) (/ (* (- z t) y) (- a t))))