
(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 (<= a -2.9e-50) (not (<= a 7.2e-191))) (+ x (* y (+ (/ (- t z) (- a t)) 1.0))) (- x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -2.9e-50) || !(a <= 7.2e-191)) {
tmp = x + (y * (((t - z) / (a - t)) + 1.0));
} 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 <= (-2.9d-50)) .or. (.not. (a <= 7.2d-191))) then
tmp = x + (y * (((t - z) / (a - t)) + 1.0d0))
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 <= -2.9e-50) || !(a <= 7.2e-191)) {
tmp = x + (y * (((t - z) / (a - t)) + 1.0));
} else {
tmp = x - (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -2.9e-50) or not (a <= 7.2e-191): tmp = x + (y * (((t - z) / (a - t)) + 1.0)) else: tmp = x - (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -2.9e-50) || !(a <= 7.2e-191)) tmp = Float64(x + Float64(y * Float64(Float64(Float64(t - z) / Float64(a - t)) + 1.0))); 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 <= -2.9e-50) || ~((a <= 7.2e-191))) tmp = x + (y * (((t - z) / (a - t)) + 1.0)); else tmp = x - (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -2.9e-50], N[Not[LessEqual[a, 7.2e-191]], $MachinePrecision]], N[(x + N[(y * N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $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 -2.9 \cdot 10^{-50} \lor \neg \left(a \leq 7.2 \cdot 10^{-191}\right):\\
\;\;\;\;x + y \cdot \left(\frac{t - z}{a - t} + 1\right)\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if a < -2.90000000000000008e-50 or 7.20000000000000038e-191 < a Initial program 81.9%
sub-neg81.9%
distribute-frac-neg81.9%
distribute-rgt-neg-out81.9%
associate-/l*91.0%
div-sub91.0%
associate-+r-91.0%
associate-/r/91.5%
distribute-rgt-neg-out91.5%
associate-/r/91.0%
distribute-frac-neg91.0%
associate-+l+91.0%
associate-+r-91.5%
distribute-frac-neg91.5%
Simplified91.5%
Taylor expanded in y around 0 94.7%
associate--l+92.9%
div-sub92.8%
Simplified92.8%
if -2.90000000000000008e-50 < a < 7.20000000000000038e-191Initial program 72.3%
sub-neg72.3%
distribute-frac-neg72.3%
distribute-rgt-neg-out72.3%
associate-/l*80.2%
div-sub78.8%
associate-+r-78.8%
associate-/r/80.2%
distribute-rgt-neg-out80.2%
associate-/r/78.8%
distribute-frac-neg78.8%
associate-+l+78.8%
associate-+r-86.4%
distribute-frac-neg86.4%
Simplified87.8%
Taylor expanded in z around inf 95.9%
associate-*r/95.9%
associate-*r*95.9%
neg-mul-195.9%
Simplified95.9%
Taylor expanded in x around 0 95.9%
mul-1-neg95.9%
associate-/l*90.7%
sub-neg90.7%
associate-/r/97.4%
Simplified97.4%
Final simplification94.1%
(FPCore (x y z t a) :precision binary64 (+ (* y (- (log (exp (+ (/ t (- a t)) 1.0))) (/ z (- a t)))) x))
double code(double x, double y, double z, double t, double a) {
return (y * (log(exp(((t / (a - t)) + 1.0))) - (z / (a - t)))) + 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 = (y * (log(exp(((t / (a - t)) + 1.0d0))) - (z / (a - t)))) + x
end function
public static double code(double x, double y, double z, double t, double a) {
return (y * (Math.log(Math.exp(((t / (a - t)) + 1.0))) - (z / (a - t)))) + x;
}
def code(x, y, z, t, a): return (y * (math.log(math.exp(((t / (a - t)) + 1.0))) - (z / (a - t)))) + x
function code(x, y, z, t, a) return Float64(Float64(y * Float64(log(exp(Float64(Float64(t / Float64(a - t)) + 1.0))) - Float64(z / Float64(a - t)))) + x) end
function tmp = code(x, y, z, t, a) tmp = (y * (log(exp(((t / (a - t)) + 1.0))) - (z / (a - t)))) + x; end
code[x_, y_, z_, t_, a_] := N[(N[(y * N[(N[Log[N[Exp[N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] - N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(\log \left(e^{\frac{t}{a - t} + 1}\right) - \frac{z}{a - t}\right) + x
\end{array}
Initial program 79.2%
sub-neg79.2%
distribute-frac-neg79.2%
distribute-rgt-neg-out79.2%
associate-/l*88.0%
div-sub87.6%
associate-+r-87.6%
associate-/r/88.3%
distribute-rgt-neg-out88.3%
associate-/r/87.6%
distribute-frac-neg87.6%
associate-+l+87.6%
associate-+r-90.1%
distribute-frac-neg90.1%
Simplified90.5%
Taylor expanded in y around 0 93.6%
add-log-exp93.6%
Applied egg-rr93.6%
Final simplification93.6%
(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 79.2%
sub-neg79.2%
distribute-frac-neg79.2%
distribute-rgt-neg-out79.2%
associate-/l*88.0%
div-sub87.6%
associate-+r-87.6%
associate-/r/88.3%
distribute-rgt-neg-out88.3%
associate-/r/87.6%
distribute-frac-neg87.6%
associate-+l+87.6%
associate-+r-90.1%
distribute-frac-neg90.1%
Simplified90.5%
Taylor expanded in y around 0 93.6%
Final simplification93.6%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.65e-14)
(+ y (+ x (/ y (- (/ a z)))))
(if (<= a 1.55e+22)
(- x (* z (/ y (- a t))))
(+ x (* y (+ (/ t (- a t)) 1.0))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.65e-14) {
tmp = y + (x + (y / -(a / z)));
} else if (a <= 1.55e+22) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = x + (y * ((t / (a - t)) + 1.0));
}
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.65d-14)) then
tmp = y + (x + (y / -(a / z)))
else if (a <= 1.55d+22) then
tmp = x - (z * (y / (a - t)))
else
tmp = x + (y * ((t / (a - t)) + 1.0d0))
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.65e-14) {
tmp = y + (x + (y / -(a / z)));
} else if (a <= 1.55e+22) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = x + (y * ((t / (a - t)) + 1.0));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.65e-14: tmp = y + (x + (y / -(a / z))) elif a <= 1.55e+22: tmp = x - (z * (y / (a - t))) else: tmp = x + (y * ((t / (a - t)) + 1.0)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.65e-14) tmp = Float64(y + Float64(x + Float64(y / Float64(-Float64(a / z))))); elseif (a <= 1.55e+22) tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(x + Float64(y * Float64(Float64(t / Float64(a - t)) + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.65e-14) tmp = y + (x + (y / -(a / z))); elseif (a <= 1.55e+22) tmp = x - (z * (y / (a - t))); else tmp = x + (y * ((t / (a - t)) + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.65e-14], N[(y + N[(x + N[(y / (-N[(a / z), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.55e+22], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{-14}:\\
\;\;\;\;y + \left(x + \frac{y}{-\frac{a}{z}}\right)\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{+22}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(\frac{t}{a - t} + 1\right)\\
\end{array}
\end{array}
if a < -1.6499999999999999e-14Initial program 85.8%
+-commutative85.8%
associate--l+85.8%
sub-neg85.8%
distribute-frac-neg85.8%
*-commutative85.8%
distribute-rgt-neg-in85.8%
associate-/l*96.0%
sub-neg96.0%
distribute-neg-in96.0%
remove-double-neg96.0%
+-commutative96.0%
sub-neg96.0%
Simplified96.0%
Taylor expanded in t around 0 91.1%
associate-*r/91.1%
mul-1-neg91.1%
Simplified91.1%
if -1.6499999999999999e-14 < a < 1.5500000000000001e22Initial program 74.2%
sub-neg74.2%
distribute-frac-neg74.2%
distribute-rgt-neg-out74.2%
associate-/l*81.7%
div-sub80.9%
associate-+r-80.9%
associate-/r/81.8%
distribute-rgt-neg-out81.8%
associate-/r/80.9%
distribute-frac-neg80.9%
associate-+l+80.9%
associate-+r-85.2%
distribute-frac-neg85.2%
Simplified86.0%
Taylor expanded in z around inf 87.4%
associate-*r/87.4%
associate-*r*87.4%
neg-mul-187.4%
Simplified87.4%
Taylor expanded in x around 0 87.4%
mul-1-neg87.4%
associate-/l*86.6%
sub-neg86.6%
associate-/r/89.3%
Simplified89.3%
if 1.5500000000000001e22 < a Initial program 81.8%
sub-neg81.8%
distribute-frac-neg81.8%
distribute-rgt-neg-out81.8%
associate-/l*92.2%
div-sub92.2%
associate-+r-92.2%
associate-/r/92.6%
distribute-rgt-neg-out92.6%
associate-/r/92.2%
distribute-frac-neg92.2%
associate-+l+92.2%
associate-+r-92.3%
distribute-frac-neg92.3%
Simplified92.3%
Taylor expanded in y around 0 95.1%
add-log-exp95.0%
Applied egg-rr95.0%
Taylor expanded in z around 0 88.1%
Final simplification89.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3e-51) (not (<= a 7.2e-50))) (+ y (+ x (/ y (- (/ a z))))) (+ x (/ (- z a) (/ t y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e-51) || !(a <= 7.2e-50)) {
tmp = y + (x + (y / -(a / z)));
} else {
tmp = x + ((z - a) / (t / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3d-51)) .or. (.not. (a <= 7.2d-50))) then
tmp = y + (x + (y / -(a / z)))
else
tmp = x + ((z - a) / (t / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3e-51) || !(a <= 7.2e-50)) {
tmp = y + (x + (y / -(a / z)));
} else {
tmp = x + ((z - a) / (t / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3e-51) or not (a <= 7.2e-50): tmp = y + (x + (y / -(a / z))) else: tmp = x + ((z - a) / (t / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3e-51) || !(a <= 7.2e-50)) tmp = Float64(y + Float64(x + Float64(y / Float64(-Float64(a / z))))); else tmp = Float64(x + Float64(Float64(z - a) / Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3e-51) || ~((a <= 7.2e-50))) tmp = y + (x + (y / -(a / z))); else tmp = x + ((z - a) / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3e-51], N[Not[LessEqual[a, 7.2e-50]], $MachinePrecision]], N[(y + N[(x + N[(y / (-N[(a / z), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - a), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-51} \lor \neg \left(a \leq 7.2 \cdot 10^{-50}\right):\\
\;\;\;\;y + \left(x + \frac{y}{-\frac{a}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - a}{\frac{t}{y}}\\
\end{array}
\end{array}
if a < -3.00000000000000002e-51 or 7.19999999999999958e-50 < a Initial program 84.1%
+-commutative84.1%
associate--l+84.1%
sub-neg84.1%
distribute-frac-neg84.1%
*-commutative84.1%
distribute-rgt-neg-in84.1%
associate-/l*92.9%
sub-neg92.9%
distribute-neg-in92.9%
remove-double-neg92.9%
+-commutative92.9%
sub-neg92.9%
Simplified92.9%
Taylor expanded in t around 0 86.7%
associate-*r/86.7%
mul-1-neg86.7%
Simplified86.7%
if -3.00000000000000002e-51 < a < 7.19999999999999958e-50Initial program 71.8%
sub-neg71.8%
distribute-frac-neg71.8%
distribute-rgt-neg-out71.8%
associate-/l*81.2%
div-sub80.2%
associate-+r-80.2%
associate-/r/81.2%
distribute-rgt-neg-out81.2%
associate-/r/80.2%
distribute-frac-neg80.2%
associate-+l+80.2%
associate-+r-85.5%
distribute-frac-neg85.5%
Simplified86.5%
Taylor expanded in y around 0 91.3%
Taylor expanded in t around inf 90.8%
mul-1-neg90.8%
associate-/l*93.7%
+-commutative93.7%
mul-1-neg93.7%
sub-neg93.7%
Simplified93.7%
Final simplification89.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -4.2e-52) (not (<= a 2.1e-50))) (+ y (- x (/ (* y z) a))) (+ x (* z (/ y t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.2e-52) || !(a <= 2.1e-50)) {
tmp = y + (x - ((y * z) / a));
} else {
tmp = x + (z * (y / t));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-4.2d-52)) .or. (.not. (a <= 2.1d-50))) then
tmp = y + (x - ((y * z) / a))
else
tmp = x + (z * (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -4.2e-52) || !(a <= 2.1e-50)) {
tmp = y + (x - ((y * z) / a));
} else {
tmp = x + (z * (y / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -4.2e-52) or not (a <= 2.1e-50): tmp = y + (x - ((y * z) / a)) else: tmp = x + (z * (y / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -4.2e-52) || !(a <= 2.1e-50)) tmp = Float64(y + Float64(x - Float64(Float64(y * z) / a))); else tmp = Float64(x + Float64(z * Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -4.2e-52) || ~((a <= 2.1e-50))) tmp = y + (x - ((y * z) / a)); else tmp = x + (z * (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -4.2e-52], N[Not[LessEqual[a, 2.1e-50]], $MachinePrecision]], N[(y + N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{-52} \lor \neg \left(a \leq 2.1 \cdot 10^{-50}\right):\\
\;\;\;\;y + \left(x - \frac{y \cdot z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\end{array}
\end{array}
if a < -4.1999999999999997e-52 or 2.1000000000000001e-50 < a Initial program 83.5%
sub-neg83.5%
distribute-frac-neg83.5%
distribute-rgt-neg-out83.5%
associate-/l*91.9%
div-sub91.9%
associate-+r-91.9%
associate-/r/92.4%
distribute-rgt-neg-out92.4%
associate-/r/91.9%
distribute-frac-neg91.9%
associate-+l+91.9%
associate-+r-92.5%
distribute-frac-neg92.5%
Simplified92.5%
Taylor expanded in t around 0 81.8%
associate--l+81.8%
Simplified81.8%
if -4.1999999999999997e-52 < a < 2.1000000000000001e-50Initial program 72.5%
sub-neg72.5%
distribute-frac-neg72.5%
distribute-rgt-neg-out72.5%
associate-/l*82.0%
div-sub81.0%
associate-+r-81.0%
associate-/r/81.9%
distribute-rgt-neg-out81.9%
associate-/r/81.0%
distribute-frac-neg81.0%
associate-+l+81.0%
associate-+r-86.3%
distribute-frac-neg86.3%
Simplified87.4%
Taylor expanded in z around inf 91.0%
associate-*r/91.0%
associate-*r*91.0%
neg-mul-191.0%
Simplified91.0%
Taylor expanded in x around 0 91.0%
mul-1-neg91.0%
associate-/l*90.2%
sub-neg90.2%
associate-/r/93.3%
Simplified93.3%
Taylor expanded in a around 0 90.5%
associate-*r/90.5%
neg-mul-190.5%
Simplified90.5%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.8e-16) (not (<= a 2.9e+21))) (- (+ y x) (* y (/ z a))) (- x (* z (/ y (- a t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.8e-16) || !(a <= 2.9e+21)) {
tmp = (y + x) - (y * (z / a));
} 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 <= (-3.8d-16)) .or. (.not. (a <= 2.9d+21))) then
tmp = (y + x) - (y * (z / a))
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 <= -3.8e-16) || !(a <= 2.9e+21)) {
tmp = (y + x) - (y * (z / a));
} else {
tmp = x - (z * (y / (a - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.8e-16) or not (a <= 2.9e+21): tmp = (y + x) - (y * (z / a)) else: tmp = x - (z * (y / (a - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.8e-16) || !(a <= 2.9e+21)) tmp = Float64(Float64(y + x) - Float64(y * Float64(z / a))); 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 <= -3.8e-16) || ~((a <= 2.9e+21))) tmp = (y + x) - (y * (z / a)); else tmp = x - (z * (y / (a - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.8e-16], N[Not[LessEqual[a, 2.9e+21]], $MachinePrecision]], N[(N[(y + x), $MachinePrecision] - N[(y * N[(z / a), $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 -3.8 \cdot 10^{-16} \lor \neg \left(a \leq 2.9 \cdot 10^{+21}\right):\\
\;\;\;\;\left(y + x\right) - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\end{array}
\end{array}
if a < -3.80000000000000012e-16 or 2.9e21 < a Initial program 84.1%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in t around 0 89.5%
if -3.80000000000000012e-16 < a < 2.9e21Initial program 74.2%
sub-neg74.2%
distribute-frac-neg74.2%
distribute-rgt-neg-out74.2%
associate-/l*81.7%
div-sub80.9%
associate-+r-80.9%
associate-/r/81.8%
distribute-rgt-neg-out81.8%
associate-/r/80.9%
distribute-frac-neg80.9%
associate-+l+80.9%
associate-+r-85.2%
distribute-frac-neg85.2%
Simplified86.0%
Taylor expanded in z around inf 87.4%
associate-*r/87.4%
associate-*r*87.4%
neg-mul-187.4%
Simplified87.4%
Taylor expanded in x around 0 87.4%
mul-1-neg87.4%
associate-/l*86.6%
sub-neg86.6%
associate-/r/89.3%
Simplified89.3%
Final simplification89.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.7e-18) (+ y (- x (/ (* y z) a))) (if (<= a 9.5e+22) (- x (* y (/ z (- a t)))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.7e-18) {
tmp = y + (x - ((y * z) / a));
} else if (a <= 9.5e+22) {
tmp = x - (y * (z / (a - t)));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-6.7d-18)) then
tmp = y + (x - ((y * z) / a))
else if (a <= 9.5d+22) then
tmp = x - (y * (z / (a - t)))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.7e-18) {
tmp = y + (x - ((y * z) / a));
} else if (a <= 9.5e+22) {
tmp = x - (y * (z / (a - t)));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.7e-18: tmp = y + (x - ((y * z) / a)) elif a <= 9.5e+22: tmp = x - (y * (z / (a - t))) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.7e-18) tmp = Float64(y + Float64(x - Float64(Float64(y * z) / a))); elseif (a <= 9.5e+22) tmp = Float64(x - Float64(y * Float64(z / Float64(a - t)))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.7e-18) tmp = y + (x - ((y * z) / a)); elseif (a <= 9.5e+22) tmp = x - (y * (z / (a - t))); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.7e-18], N[(y + N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e+22], N[(x - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.7 \cdot 10^{-18}:\\
\;\;\;\;y + \left(x - \frac{y \cdot z}{a}\right)\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+22}:\\
\;\;\;\;x - y \cdot \frac{z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -6.6999999999999998e-18Initial program 86.0%
sub-neg86.0%
distribute-frac-neg86.0%
distribute-rgt-neg-out86.0%
associate-/l*95.4%
div-sub95.4%
associate-+r-95.4%
associate-/r/96.1%
distribute-rgt-neg-out96.1%
associate-/r/95.4%
distribute-frac-neg95.4%
associate-+l+95.4%
associate-+r-96.7%
distribute-frac-neg96.7%
Simplified96.7%
Taylor expanded in t around 0 85.6%
associate--l+85.6%
Simplified85.6%
if -6.6999999999999998e-18 < a < 9.49999999999999937e22Initial program 74.0%
sub-neg74.0%
distribute-frac-neg74.0%
distribute-rgt-neg-out74.0%
associate-/l*81.6%
div-sub80.8%
associate-+r-80.8%
associate-/r/81.7%
distribute-rgt-neg-out81.7%
associate-/r/80.8%
distribute-frac-neg80.8%
associate-+l+80.8%
associate-+r-85.1%
distribute-frac-neg85.1%
Simplified85.9%
Taylor expanded in z around inf 87.3%
associate-*r/87.3%
associate-*r*87.3%
neg-mul-187.3%
Simplified87.3%
Taylor expanded in x around 0 87.3%
metadata-eval87.3%
associate-/l*86.7%
cancel-sign-sub-inv86.7%
associate-/l*87.3%
associate-*r/87.3%
associate-*l/87.4%
*-commutative87.4%
associate-*l*86.6%
associate-*r/86.6%
*-commutative86.6%
*-lft-identity86.6%
Simplified86.6%
if 9.49999999999999937e22 < a Initial program 81.8%
sub-neg81.8%
distribute-frac-neg81.8%
distribute-rgt-neg-out81.8%
associate-/l*92.2%
div-sub92.2%
associate-+r-92.2%
associate-/r/92.6%
distribute-rgt-neg-out92.6%
associate-/r/92.2%
distribute-frac-neg92.2%
associate-+l+92.2%
associate-+r-92.3%
distribute-frac-neg92.3%
Simplified92.3%
Taylor expanded in a around inf 84.0%
Final simplification85.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -5.5e-15) (+ y (- x (/ (* y z) a))) (if (<= a 2e+21) (- x (* z (/ y (- a t)))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.5e-15) {
tmp = y + (x - ((y * z) / a));
} else if (a <= 2e+21) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-5.5d-15)) then
tmp = y + (x - ((y * z) / a))
else if (a <= 2d+21) then
tmp = x - (z * (y / (a - t)))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -5.5e-15) {
tmp = y + (x - ((y * z) / a));
} else if (a <= 2e+21) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -5.5e-15: tmp = y + (x - ((y * z) / a)) elif a <= 2e+21: tmp = x - (z * (y / (a - t))) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -5.5e-15) tmp = Float64(y + Float64(x - Float64(Float64(y * z) / a))); elseif (a <= 2e+21) tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -5.5e-15) tmp = y + (x - ((y * z) / a)); elseif (a <= 2e+21) tmp = x - (z * (y / (a - t))); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -5.5e-15], N[(y + N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e+21], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{-15}:\\
\;\;\;\;y + \left(x - \frac{y \cdot z}{a}\right)\\
\mathbf{elif}\;a \leq 2 \cdot 10^{+21}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -5.5000000000000002e-15Initial program 85.8%
sub-neg85.8%
distribute-frac-neg85.8%
distribute-rgt-neg-out85.8%
associate-/l*95.3%
div-sub95.3%
associate-+r-95.3%
associate-/r/96.0%
distribute-rgt-neg-out96.0%
associate-/r/95.3%
distribute-frac-neg95.3%
associate-+l+95.4%
associate-+r-96.7%
distribute-frac-neg96.7%
Simplified96.7%
Taylor expanded in t around 0 85.4%
associate--l+85.4%
Simplified85.4%
if -5.5000000000000002e-15 < a < 2e21Initial program 74.2%
sub-neg74.2%
distribute-frac-neg74.2%
distribute-rgt-neg-out74.2%
associate-/l*81.7%
div-sub80.9%
associate-+r-80.9%
associate-/r/81.8%
distribute-rgt-neg-out81.8%
associate-/r/80.9%
distribute-frac-neg80.9%
associate-+l+80.9%
associate-+r-85.2%
distribute-frac-neg85.2%
Simplified86.0%
Taylor expanded in z around inf 87.4%
associate-*r/87.4%
associate-*r*87.4%
neg-mul-187.4%
Simplified87.4%
Taylor expanded in x around 0 87.4%
mul-1-neg87.4%
associate-/l*86.6%
sub-neg86.6%
associate-/r/89.3%
Simplified89.3%
if 2e21 < a Initial program 81.8%
sub-neg81.8%
distribute-frac-neg81.8%
distribute-rgt-neg-out81.8%
associate-/l*92.2%
div-sub92.2%
associate-+r-92.2%
associate-/r/92.6%
distribute-rgt-neg-out92.6%
associate-/r/92.2%
distribute-frac-neg92.2%
associate-+l+92.2%
associate-+r-92.3%
distribute-frac-neg92.3%
Simplified92.3%
Taylor expanded in a around inf 84.0%
Final simplification87.0%
(FPCore (x y z t a) :precision binary64 (if (<= a -4.6e-13) (+ y (+ x (/ y (- (/ a z))))) (if (<= a 5e+22) (- x (* z (/ y (- a t)))) (- (+ y x) (* y (/ z a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.6e-13) {
tmp = y + (x + (y / -(a / z)));
} else if (a <= 5e+22) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = (y + x) - (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-4.6d-13)) then
tmp = y + (x + (y / -(a / z)))
else if (a <= 5d+22) then
tmp = x - (z * (y / (a - t)))
else
tmp = (y + x) - (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4.6e-13) {
tmp = y + (x + (y / -(a / z)));
} else if (a <= 5e+22) {
tmp = x - (z * (y / (a - t)));
} else {
tmp = (y + x) - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4.6e-13: tmp = y + (x + (y / -(a / z))) elif a <= 5e+22: tmp = x - (z * (y / (a - t))) else: tmp = (y + x) - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4.6e-13) tmp = Float64(y + Float64(x + Float64(y / Float64(-Float64(a / z))))); elseif (a <= 5e+22) tmp = Float64(x - Float64(z * Float64(y / Float64(a - t)))); else tmp = Float64(Float64(y + x) - Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4.6e-13) tmp = y + (x + (y / -(a / z))); elseif (a <= 5e+22) tmp = x - (z * (y / (a - t))); else tmp = (y + x) - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4.6e-13], N[(y + N[(x + N[(y / (-N[(a / z), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5e+22], N[(x - N[(z * N[(y / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + x), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.6 \cdot 10^{-13}:\\
\;\;\;\;y + \left(x + \frac{y}{-\frac{a}{z}}\right)\\
\mathbf{elif}\;a \leq 5 \cdot 10^{+22}:\\
\;\;\;\;x - z \cdot \frac{y}{a - t}\\
\mathbf{else}:\\
\;\;\;\;\left(y + x\right) - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if a < -4.59999999999999958e-13Initial program 85.8%
+-commutative85.8%
associate--l+85.8%
sub-neg85.8%
distribute-frac-neg85.8%
*-commutative85.8%
distribute-rgt-neg-in85.8%
associate-/l*96.0%
sub-neg96.0%
distribute-neg-in96.0%
remove-double-neg96.0%
+-commutative96.0%
sub-neg96.0%
Simplified96.0%
Taylor expanded in t around 0 91.1%
associate-*r/91.1%
mul-1-neg91.1%
Simplified91.1%
if -4.59999999999999958e-13 < a < 4.9999999999999996e22Initial program 74.2%
sub-neg74.2%
distribute-frac-neg74.2%
distribute-rgt-neg-out74.2%
associate-/l*81.7%
div-sub80.9%
associate-+r-80.9%
associate-/r/81.8%
distribute-rgt-neg-out81.8%
associate-/r/80.9%
distribute-frac-neg80.9%
associate-+l+80.9%
associate-+r-85.2%
distribute-frac-neg85.2%
Simplified86.0%
Taylor expanded in z around inf 87.4%
associate-*r/87.4%
associate-*r*87.4%
neg-mul-187.4%
Simplified87.4%
Taylor expanded in x around 0 87.4%
mul-1-neg87.4%
associate-/l*86.6%
sub-neg86.6%
associate-/r/89.3%
Simplified89.3%
if 4.9999999999999996e22 < a Initial program 81.8%
associate-*l/92.6%
Simplified92.6%
Taylor expanded in t around 0 87.4%
Final simplification89.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -6.8e-18) (+ y x) (if (<= a 6.2e-55) (+ x (/ y (/ t z))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.8e-18) {
tmp = y + x;
} else if (a <= 6.2e-55) {
tmp = x + (y / (t / z));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-6.8d-18)) then
tmp = y + x
else if (a <= 6.2d-55) then
tmp = x + (y / (t / z))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -6.8e-18) {
tmp = y + x;
} else if (a <= 6.2e-55) {
tmp = x + (y / (t / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -6.8e-18: tmp = y + x elif a <= 6.2e-55: tmp = x + (y / (t / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -6.8e-18) tmp = Float64(y + x); elseif (a <= 6.2e-55) tmp = Float64(x + Float64(y / Float64(t / z))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -6.8e-18) tmp = y + x; elseif (a <= 6.2e-55) tmp = x + (y / (t / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -6.8e-18], N[(y + x), $MachinePrecision], If[LessEqual[a, 6.2e-55], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{-18}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-55}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -6.80000000000000002e-18 or 6.19999999999999993e-55 < a Initial program 84.0%
sub-neg84.0%
distribute-frac-neg84.0%
distribute-rgt-neg-out84.0%
associate-/l*92.7%
div-sub92.7%
associate-+r-92.7%
associate-/r/93.3%
distribute-rgt-neg-out93.3%
associate-/r/92.7%
distribute-frac-neg92.7%
associate-+l+92.8%
associate-+r-93.5%
distribute-frac-neg93.5%
Simplified93.5%
Taylor expanded in a around inf 80.3%
if -6.80000000000000002e-18 < a < 6.19999999999999993e-55Initial program 72.6%
sub-neg72.6%
distribute-frac-neg72.6%
distribute-rgt-neg-out72.6%
associate-/l*81.4%
div-sub80.4%
associate-+r-80.4%
associate-/r/81.4%
distribute-rgt-neg-out81.4%
associate-/r/80.4%
distribute-frac-neg80.4%
associate-+l+80.4%
associate-+r-85.5%
distribute-frac-neg85.5%
Simplified86.4%
Taylor expanded in y around 0 91.8%
Taylor expanded in a around 0 84.8%
associate-/l*84.9%
Simplified84.9%
Final simplification82.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.8e-18) (+ y x) (if (<= a 1.58e-9) (+ x (/ (* y z) t)) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e-18) {
tmp = y + x;
} else if (a <= 1.58e-9) {
tmp = x + ((y * z) / t);
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.8d-18)) then
tmp = y + x
else if (a <= 1.58d-9) then
tmp = x + ((y * z) / t)
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.8e-18) {
tmp = y + x;
} else if (a <= 1.58e-9) {
tmp = x + ((y * z) / t);
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.8e-18: tmp = y + x elif a <= 1.58e-9: tmp = x + ((y * z) / t) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.8e-18) tmp = Float64(y + x); elseif (a <= 1.58e-9) tmp = Float64(x + Float64(Float64(y * z) / t)); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.8e-18) tmp = y + x; elseif (a <= 1.58e-9) tmp = x + ((y * z) / t); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.8e-18], N[(y + x), $MachinePrecision], If[LessEqual[a, 1.58e-9], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.8 \cdot 10^{-18}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 1.58 \cdot 10^{-9}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -3.7999999999999998e-18 or 1.5799999999999999e-9 < a Initial program 83.8%
sub-neg83.8%
distribute-frac-neg83.8%
distribute-rgt-neg-out83.8%
associate-/l*93.0%
div-sub93.0%
associate-+r-93.0%
associate-/r/93.6%
distribute-rgt-neg-out93.6%
associate-/r/93.0%
distribute-frac-neg93.0%
associate-+l+93.0%
associate-+r-93.8%
distribute-frac-neg93.8%
Simplified93.8%
Taylor expanded in a around inf 81.9%
if -3.7999999999999998e-18 < a < 1.5799999999999999e-9Initial program 73.6%
sub-neg73.6%
distribute-frac-neg73.6%
distribute-rgt-neg-out73.6%
associate-/l*81.8%
div-sub80.9%
associate-+r-80.9%
associate-/r/81.9%
distribute-rgt-neg-out81.9%
associate-/r/80.9%
distribute-frac-neg80.9%
associate-+l+80.9%
associate-+r-85.6%
distribute-frac-neg85.6%
Simplified86.5%
Taylor expanded in y around 0 91.5%
Taylor expanded in a around 0 83.3%
Final simplification82.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -9.5e-18) (+ y x) (if (<= a 5.5e-16) (+ x (* z (/ y t))) (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.5e-18) {
tmp = y + x;
} else if (a <= 5.5e-16) {
tmp = x + (z * (y / t));
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-9.5d-18)) then
tmp = y + x
else if (a <= 5.5d-16) then
tmp = x + (z * (y / t))
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.5e-18) {
tmp = y + x;
} else if (a <= 5.5e-16) {
tmp = x + (z * (y / t));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.5e-18: tmp = y + x elif a <= 5.5e-16: tmp = x + (z * (y / t)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.5e-18) tmp = Float64(y + x); elseif (a <= 5.5e-16) tmp = Float64(x + Float64(z * Float64(y / t))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.5e-18) tmp = y + x; elseif (a <= 5.5e-16) tmp = x + (z * (y / t)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.5e-18], N[(y + x), $MachinePrecision], If[LessEqual[a, 5.5e-16], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{-18}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{-16}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -9.5000000000000003e-18 or 5.49999999999999964e-16 < a Initial program 83.8%
sub-neg83.8%
distribute-frac-neg83.8%
distribute-rgt-neg-out83.8%
associate-/l*93.0%
div-sub93.0%
associate-+r-93.0%
associate-/r/93.6%
distribute-rgt-neg-out93.6%
associate-/r/93.0%
distribute-frac-neg93.0%
associate-+l+93.0%
associate-+r-93.8%
distribute-frac-neg93.8%
Simplified93.8%
Taylor expanded in a around inf 81.9%
if -9.5000000000000003e-18 < a < 5.49999999999999964e-16Initial program 73.6%
sub-neg73.6%
distribute-frac-neg73.6%
distribute-rgt-neg-out73.6%
associate-/l*81.8%
div-sub80.9%
associate-+r-80.9%
associate-/r/81.9%
distribute-rgt-neg-out81.9%
associate-/r/80.9%
distribute-frac-neg80.9%
associate-+l+80.9%
associate-+r-85.6%
distribute-frac-neg85.6%
Simplified86.5%
Taylor expanded in z around inf 88.8%
associate-*r/88.8%
associate-*r*88.8%
neg-mul-188.8%
Simplified88.8%
Taylor expanded in x around 0 88.8%
mul-1-neg88.8%
associate-/l*88.1%
sub-neg88.1%
associate-/r/90.8%
Simplified90.8%
Taylor expanded in a around 0 85.0%
associate-*r/85.0%
neg-mul-185.0%
Simplified85.0%
Final simplification83.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -4e-49) (+ y x) (if (<= a 6.5e-268) x (+ y x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4e-49) {
tmp = y + x;
} else if (a <= 6.5e-268) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-4d-49)) then
tmp = y + x
else if (a <= 6.5d-268) then
tmp = x
else
tmp = y + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -4e-49) {
tmp = y + x;
} else if (a <= 6.5e-268) {
tmp = x;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -4e-49: tmp = y + x elif a <= 6.5e-268: tmp = x else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -4e-49) tmp = Float64(y + x); elseif (a <= 6.5e-268) tmp = x; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -4e-49) tmp = y + x; elseif (a <= 6.5e-268) tmp = x; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -4e-49], N[(y + x), $MachinePrecision], If[LessEqual[a, 6.5e-268], x, N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{-49}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-268}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if a < -3.99999999999999975e-49 or 6.5000000000000003e-268 < a Initial program 82.2%
sub-neg82.2%
distribute-frac-neg82.2%
distribute-rgt-neg-out82.2%
associate-/l*91.4%
div-sub91.4%
associate-+r-91.4%
associate-/r/91.8%
distribute-rgt-neg-out91.8%
associate-/r/91.4%
distribute-frac-neg91.4%
associate-+l+91.4%
associate-+r-91.9%
distribute-frac-neg91.9%
Simplified91.9%
Taylor expanded in a around inf 73.1%
if -3.99999999999999975e-49 < a < 6.5000000000000003e-268Initial program 67.3%
sub-neg67.3%
distribute-frac-neg67.3%
distribute-rgt-neg-out67.3%
associate-/l*74.4%
div-sub72.4%
associate-+r-72.4%
associate-/r/74.4%
distribute-rgt-neg-out74.4%
associate-/r/72.4%
distribute-frac-neg72.4%
associate-+l+72.4%
associate-+r-83.0%
distribute-frac-neg83.0%
Simplified85.0%
Taylor expanded in x around inf 64.1%
Final simplification71.3%
(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 79.2%
+-commutative79.2%
associate--l+79.2%
sub-neg79.2%
distribute-frac-neg79.2%
*-commutative79.2%
distribute-rgt-neg-in79.2%
associate-/l*86.7%
sub-neg86.7%
distribute-neg-in86.7%
remove-double-neg86.7%
+-commutative86.7%
sub-neg86.7%
Simplified86.7%
associate-/r/87.6%
Applied egg-rr87.6%
Taylor expanded in x around 0 34.3%
associate-*l/39.1%
*-commutative39.1%
Simplified39.1%
Taylor expanded in t around inf 2.9%
distribute-rgt1-in2.9%
metadata-eval2.9%
mul0-lft2.9%
Simplified2.9%
Final simplification2.9%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 79.2%
sub-neg79.2%
distribute-frac-neg79.2%
distribute-rgt-neg-out79.2%
associate-/l*88.0%
div-sub87.6%
associate-+r-87.6%
associate-/r/88.3%
distribute-rgt-neg-out88.3%
associate-/r/87.6%
distribute-frac-neg87.6%
associate-+l+87.6%
associate-+r-90.1%
distribute-frac-neg90.1%
Simplified90.5%
Taylor expanded in x around inf 54.2%
Final simplification54.2%
(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 2023279
(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))))