
(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 17 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 (<= a -3.7e+53)
(+ x (- y (/ (- z t) (/ (- a t) y))))
(if (<= a -3.4e+42)
(* y (- (/ z t) (/ a t)))
(if (<= a -3e-124)
(- x (/ (* y z) (- a t)))
(if (<= a 2.7e-123)
(+ (- x (/ y (/ t a))) (/ y (/ t z)))
(+ x (- y (/ y (/ (- a t) z)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+53) {
tmp = x + (y - ((z - t) / ((a - t) / y)));
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if (a <= -3e-124) {
tmp = x - ((y * z) / (a - t));
} else if (a <= 2.7e-123) {
tmp = (x - (y / (t / a))) + (y / (t / z));
} else {
tmp = x + (y - (y / ((a - t) / z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.7d+53)) then
tmp = x + (y - ((z - t) / ((a - t) / y)))
else if (a <= (-3.4d+42)) then
tmp = y * ((z / t) - (a / t))
else if (a <= (-3d-124)) then
tmp = x - ((y * z) / (a - t))
else if (a <= 2.7d-123) then
tmp = (x - (y / (t / a))) + (y / (t / z))
else
tmp = x + (y - (y / ((a - t) / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+53) {
tmp = x + (y - ((z - t) / ((a - t) / y)));
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if (a <= -3e-124) {
tmp = x - ((y * z) / (a - t));
} else if (a <= 2.7e-123) {
tmp = (x - (y / (t / a))) + (y / (t / z));
} else {
tmp = x + (y - (y / ((a - t) / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.7e+53: tmp = x + (y - ((z - t) / ((a - t) / y))) elif a <= -3.4e+42: tmp = y * ((z / t) - (a / t)) elif a <= -3e-124: tmp = x - ((y * z) / (a - t)) elif a <= 2.7e-123: tmp = (x - (y / (t / a))) + (y / (t / z)) else: tmp = x + (y - (y / ((a - t) / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.7e+53) tmp = Float64(x + Float64(y - Float64(Float64(z - t) / Float64(Float64(a - t) / y)))); elseif (a <= -3.4e+42) tmp = Float64(y * Float64(Float64(z / t) - Float64(a / t))); elseif (a <= -3e-124) tmp = Float64(x - Float64(Float64(y * z) / Float64(a - t))); elseif (a <= 2.7e-123) tmp = Float64(Float64(x - Float64(y / Float64(t / a))) + Float64(y / Float64(t / z))); else tmp = Float64(x + Float64(y - Float64(y / Float64(Float64(a - t) / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.7e+53) tmp = x + (y - ((z - t) / ((a - t) / y))); elseif (a <= -3.4e+42) tmp = y * ((z / t) - (a / t)); elseif (a <= -3e-124) tmp = x - ((y * z) / (a - t)); elseif (a <= 2.7e-123) tmp = (x - (y / (t / a))) + (y / (t / z)); else tmp = x + (y - (y / ((a - t) / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.7e+53], N[(x + N[(y - N[(N[(z - t), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.4e+42], N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3e-124], N[(x - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e-123], N[(N[(x - N[(y / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+53}:\\
\;\;\;\;x + \left(y - \frac{z - t}{\frac{a - t}{y}}\right)\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;a \leq -3 \cdot 10^{-124}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{-123}:\\
\;\;\;\;\left(x - \frac{y}{\frac{t}{a}}\right) + \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z}}\right)\\
\end{array}
\end{array}
if a < -3.7e53Initial program 83.5%
associate--l+83.6%
associate-/l*94.6%
Simplified94.6%
if -3.7e53 < a < -3.39999999999999975e42Initial program 34.5%
associate--l+34.3%
associate-/l*19.9%
Simplified19.9%
Taylor expanded in t around -inf 83.1%
+-commutative83.1%
sub-neg83.1%
mul-1-neg83.1%
+-commutative83.1%
*-commutative83.1%
+-commutative83.1%
*-commutative83.1%
mul-1-neg83.1%
unsub-neg83.1%
mul-1-neg83.1%
sub-neg83.1%
distribute-lft-out--99.7%
Simplified99.7%
Taylor expanded in y around inf 100.0%
if -3.39999999999999975e42 < a < -3e-124Initial program 78.9%
associate--l+83.6%
sub-neg83.6%
+-commutative83.6%
associate-/l*83.8%
distribute-neg-frac83.8%
associate-/r/88.2%
fma-def88.1%
sub-neg88.1%
+-commutative88.1%
distribute-neg-in88.1%
unsub-neg88.1%
remove-double-neg88.1%
Simplified88.1%
Taylor expanded in z around inf 90.2%
associate-*r/90.2%
associate-*r*90.2%
neg-mul-190.2%
Simplified90.2%
if -3e-124 < a < 2.7000000000000001e-123Initial program 58.3%
associate--l+62.6%
associate-/l*68.5%
Simplified68.5%
Taylor expanded in t around inf 87.8%
sub-neg87.8%
+-commutative87.8%
mul-1-neg87.8%
unsub-neg87.8%
associate-/l*87.9%
mul-1-neg87.9%
remove-double-neg87.9%
associate-/l*91.7%
Simplified91.7%
if 2.7000000000000001e-123 < a Initial program 85.6%
associate--l+85.7%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in z around inf 86.9%
associate-/l*94.8%
Simplified94.8%
Final simplification93.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ (+ x y) (/ (* y (- t z)) (- a t)))))
(if (or (<= t_1 -2e-231) (not (<= t_1 0.0)))
(+ x (fma (/ (- t z) (- a t)) y y))
(+ (- x (/ y (/ t a))) (/ y (/ 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-231) || !(t_1 <= 0.0)) {
tmp = x + fma(((t - z) / (a - t)), y, y);
} else {
tmp = (x - (y / (t / a))) + (y / (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-231) || !(t_1 <= 0.0)) tmp = Float64(x + fma(Float64(Float64(t - z) / Float64(a - t)), y, y)); else tmp = Float64(Float64(x - Float64(y / Float64(t / a))) + Float64(y / Float64(t / z))); end return 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[Or[LessEqual[t$95$1, -2e-231], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x + N[(N[(N[(t - z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * y + y), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(y / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t / z), $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^{-231} \lor \neg \left(t_1 \leq 0\right):\\
\;\;\;\;x + \mathsf{fma}\left(\frac{t - z}{a - t}, y, y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{\frac{t}{a}}\right) + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < -2e-231 or 0.0 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) Initial program 82.1%
associate--l+82.1%
sub-neg82.1%
+-commutative82.1%
associate-/l*89.7%
distribute-neg-frac89.7%
associate-/r/92.5%
fma-def92.4%
sub-neg92.4%
+-commutative92.4%
distribute-neg-in92.4%
unsub-neg92.4%
remove-double-neg92.4%
Simplified92.4%
if -2e-231 < (-.f64 (+.f64 x y) (/.f64 (*.f64 (-.f64 z t) y) (-.f64 a t))) < 0.0Initial program 8.3%
associate--l+30.6%
associate-/l*22.3%
Simplified22.3%
Taylor expanded in t around inf 96.7%
sub-neg96.7%
+-commutative96.7%
mul-1-neg96.7%
unsub-neg96.7%
associate-/l*96.7%
mul-1-neg96.7%
remove-double-neg96.7%
associate-/l*99.8%
Simplified99.8%
Final simplification93.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.7e+53)
(+ x (- y (/ (- z t) (/ (- a t) y))))
(if (<= a -3.4e+42)
(* y (- (/ z t) (/ a t)))
(if (<= a -2.8e-124)
(- x (/ (* y z) (- a t)))
(if (<= a 4.1e-123)
(+ x (/ (* y (- z a)) t))
(+ x (- y (/ y (/ (- a t) z)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+53) {
tmp = x + (y - ((z - t) / ((a - t) / y)));
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if (a <= -2.8e-124) {
tmp = x - ((y * z) / (a - t));
} else if (a <= 4.1e-123) {
tmp = x + ((y * (z - a)) / t);
} else {
tmp = x + (y - (y / ((a - t) / z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.7d+53)) then
tmp = x + (y - ((z - t) / ((a - t) / y)))
else if (a <= (-3.4d+42)) then
tmp = y * ((z / t) - (a / t))
else if (a <= (-2.8d-124)) then
tmp = x - ((y * z) / (a - t))
else if (a <= 4.1d-123) then
tmp = x + ((y * (z - a)) / t)
else
tmp = x + (y - (y / ((a - t) / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+53) {
tmp = x + (y - ((z - t) / ((a - t) / y)));
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if (a <= -2.8e-124) {
tmp = x - ((y * z) / (a - t));
} else if (a <= 4.1e-123) {
tmp = x + ((y * (z - a)) / t);
} else {
tmp = x + (y - (y / ((a - t) / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.7e+53: tmp = x + (y - ((z - t) / ((a - t) / y))) elif a <= -3.4e+42: tmp = y * ((z / t) - (a / t)) elif a <= -2.8e-124: tmp = x - ((y * z) / (a - t)) elif a <= 4.1e-123: tmp = x + ((y * (z - a)) / t) else: tmp = x + (y - (y / ((a - t) / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.7e+53) tmp = Float64(x + Float64(y - Float64(Float64(z - t) / Float64(Float64(a - t) / y)))); elseif (a <= -3.4e+42) tmp = Float64(y * Float64(Float64(z / t) - Float64(a / t))); elseif (a <= -2.8e-124) tmp = Float64(x - Float64(Float64(y * z) / Float64(a - t))); elseif (a <= 4.1e-123) tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); else tmp = Float64(x + Float64(y - Float64(y / Float64(Float64(a - t) / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.7e+53) tmp = x + (y - ((z - t) / ((a - t) / y))); elseif (a <= -3.4e+42) tmp = y * ((z / t) - (a / t)); elseif (a <= -2.8e-124) tmp = x - ((y * z) / (a - t)); elseif (a <= 4.1e-123) tmp = x + ((y * (z - a)) / t); else tmp = x + (y - (y / ((a - t) / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.7e+53], N[(x + N[(y - N[(N[(z - t), $MachinePrecision] / N[(N[(a - t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.4e+42], N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.8e-124], N[(x - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.1e-123], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+53}:\\
\;\;\;\;x + \left(y - \frac{z - t}{\frac{a - t}{y}}\right)\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;a \leq -2.8 \cdot 10^{-124}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{-123}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z}}\right)\\
\end{array}
\end{array}
if a < -3.7e53Initial program 83.5%
associate--l+83.6%
associate-/l*94.6%
Simplified94.6%
if -3.7e53 < a < -3.39999999999999975e42Initial program 34.5%
associate--l+34.3%
associate-/l*19.9%
Simplified19.9%
Taylor expanded in t around -inf 83.1%
+-commutative83.1%
sub-neg83.1%
mul-1-neg83.1%
+-commutative83.1%
*-commutative83.1%
+-commutative83.1%
*-commutative83.1%
mul-1-neg83.1%
unsub-neg83.1%
mul-1-neg83.1%
sub-neg83.1%
distribute-lft-out--99.7%
Simplified99.7%
Taylor expanded in y around inf 100.0%
if -3.39999999999999975e42 < a < -2.79999999999999998e-124Initial program 78.9%
associate--l+83.6%
sub-neg83.6%
+-commutative83.6%
associate-/l*83.8%
distribute-neg-frac83.8%
associate-/r/88.2%
fma-def88.1%
sub-neg88.1%
+-commutative88.1%
distribute-neg-in88.1%
unsub-neg88.1%
remove-double-neg88.1%
Simplified88.1%
Taylor expanded in z around inf 90.2%
associate-*r/90.2%
associate-*r*90.2%
neg-mul-190.2%
Simplified90.2%
if -2.79999999999999998e-124 < a < 4.1e-123Initial program 58.3%
associate--l+62.6%
associate-/l*68.5%
Simplified68.5%
Taylor expanded in t around -inf 87.8%
+-commutative87.8%
sub-neg87.8%
mul-1-neg87.8%
+-commutative87.8%
*-commutative87.8%
+-commutative87.8%
*-commutative87.8%
mul-1-neg87.8%
unsub-neg87.8%
mul-1-neg87.8%
sub-neg87.8%
distribute-lft-out--87.8%
Simplified87.8%
if 4.1e-123 < a Initial program 85.6%
associate--l+85.7%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in z around inf 86.9%
associate-/l*94.8%
Simplified94.8%
Final simplification92.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (- x (/ y (/ a z))))))
(if (<= a -3.7e+53)
t_1
(if (<= a -3.4e+42)
(* y (- (/ z t) (/ a t)))
(if (or (<= a -7.2e-84) (not (<= a 1.45e-143)))
t_1
(+ x (/ y (/ t z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (x - (y / (a / z)));
double tmp;
if (a <= -3.7e+53) {
tmp = t_1;
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if ((a <= -7.2e-84) || !(a <= 1.45e-143)) {
tmp = t_1;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y + (x - (y / (a / z)))
if (a <= (-3.7d+53)) then
tmp = t_1
else if (a <= (-3.4d+42)) then
tmp = y * ((z / t) - (a / t))
else if ((a <= (-7.2d-84)) .or. (.not. (a <= 1.45d-143))) then
tmp = t_1
else
tmp = x + (y / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y + (x - (y / (a / z)));
double tmp;
if (a <= -3.7e+53) {
tmp = t_1;
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if ((a <= -7.2e-84) || !(a <= 1.45e-143)) {
tmp = t_1;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (x - (y / (a / z))) tmp = 0 if a <= -3.7e+53: tmp = t_1 elif a <= -3.4e+42: tmp = y * ((z / t) - (a / t)) elif (a <= -7.2e-84) or not (a <= 1.45e-143): tmp = t_1 else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(x - Float64(y / Float64(a / z)))) tmp = 0.0 if (a <= -3.7e+53) tmp = t_1; elseif (a <= -3.4e+42) tmp = Float64(y * Float64(Float64(z / t) - Float64(a / t))); elseif ((a <= -7.2e-84) || !(a <= 1.45e-143)) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (x - (y / (a / z))); tmp = 0.0; if (a <= -3.7e+53) tmp = t_1; elseif (a <= -3.4e+42) tmp = y * ((z / t) - (a / t)); elseif ((a <= -7.2e-84) || ~((a <= 1.45e-143))) tmp = t_1; else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.7e+53], t$95$1, If[LessEqual[a, -3.4e+42], N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -7.2e-84], N[Not[LessEqual[a, 1.45e-143]], $MachinePrecision]], t$95$1, N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{if}\;a \leq -3.7 \cdot 10^{+53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;a \leq -7.2 \cdot 10^{-84} \lor \neg \left(a \leq 1.45 \cdot 10^{-143}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if a < -3.7e53 or -3.39999999999999975e42 < a < -7.20000000000000007e-84 or 1.45e-143 < a Initial program 83.2%
associate--l+84.3%
sub-neg84.3%
+-commutative84.3%
associate-/l*90.9%
distribute-neg-frac90.9%
associate-/r/92.9%
fma-def92.9%
sub-neg92.9%
+-commutative92.9%
distribute-neg-in92.9%
unsub-neg92.9%
remove-double-neg92.9%
Simplified92.9%
Taylor expanded in t around 0 81.6%
mul-1-neg81.6%
sub-neg81.6%
associate-/l*85.7%
Simplified85.7%
if -3.7e53 < a < -3.39999999999999975e42Initial program 34.5%
associate--l+34.3%
associate-/l*19.9%
Simplified19.9%
Taylor expanded in t around -inf 83.1%
+-commutative83.1%
sub-neg83.1%
mul-1-neg83.1%
+-commutative83.1%
*-commutative83.1%
+-commutative83.1%
*-commutative83.1%
mul-1-neg83.1%
unsub-neg83.1%
mul-1-neg83.1%
sub-neg83.1%
distribute-lft-out--99.7%
Simplified99.7%
Taylor expanded in y around inf 100.0%
if -7.20000000000000007e-84 < a < 1.45e-143Initial program 60.6%
associate--l+64.8%
sub-neg64.8%
+-commutative64.8%
associate-/l*71.9%
distribute-neg-frac71.9%
associate-/r/76.9%
fma-def76.9%
sub-neg76.9%
+-commutative76.9%
distribute-neg-in76.9%
unsub-neg76.9%
remove-double-neg76.9%
Simplified76.9%
add-cube-cbrt75.7%
pow375.7%
+-commutative75.7%
Applied egg-rr75.7%
Taylor expanded in y around 0 95.5%
associate--l+75.7%
div-sub75.7%
Simplified75.7%
Taylor expanded in a around 0 84.9%
pow-base-184.9%
*-lft-identity84.9%
+-commutative84.9%
associate-/l*89.9%
Simplified89.9%
Final simplification87.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (- x (/ y (/ a z))))))
(if (<= a -3.7e+53)
t_1
(if (<= a -3.4e+42)
(* y (- (/ z t) (/ a t)))
(if (or (<= a -1.12e-82) (not (<= a 4.1e-123)))
t_1
(+ x (/ (* y (- z a)) t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (x - (y / (a / z)));
double tmp;
if (a <= -3.7e+53) {
tmp = t_1;
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if ((a <= -1.12e-82) || !(a <= 4.1e-123)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = y + (x - (y / (a / z)))
if (a <= (-3.7d+53)) then
tmp = t_1
else if (a <= (-3.4d+42)) then
tmp = y * ((z / t) - (a / t))
else if ((a <= (-1.12d-82)) .or. (.not. (a <= 4.1d-123))) then
tmp = t_1
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 t_1 = y + (x - (y / (a / z)));
double tmp;
if (a <= -3.7e+53) {
tmp = t_1;
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if ((a <= -1.12e-82) || !(a <= 4.1e-123)) {
tmp = t_1;
} else {
tmp = x + ((y * (z - a)) / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (x - (y / (a / z))) tmp = 0 if a <= -3.7e+53: tmp = t_1 elif a <= -3.4e+42: tmp = y * ((z / t) - (a / t)) elif (a <= -1.12e-82) or not (a <= 4.1e-123): tmp = t_1 else: tmp = x + ((y * (z - a)) / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(x - Float64(y / Float64(a / z)))) tmp = 0.0 if (a <= -3.7e+53) tmp = t_1; elseif (a <= -3.4e+42) tmp = Float64(y * Float64(Float64(z / t) - Float64(a / t))); elseif ((a <= -1.12e-82) || !(a <= 4.1e-123)) tmp = t_1; else tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (x - (y / (a / z))); tmp = 0.0; if (a <= -3.7e+53) tmp = t_1; elseif (a <= -3.4e+42) tmp = y * ((z / t) - (a / t)); elseif ((a <= -1.12e-82) || ~((a <= 4.1e-123))) tmp = t_1; else tmp = x + ((y * (z - a)) / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.7e+53], t$95$1, If[LessEqual[a, -3.4e+42], N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -1.12e-82], N[Not[LessEqual[a, 4.1e-123]], $MachinePrecision]], t$95$1, N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{if}\;a \leq -3.7 \cdot 10^{+53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;a \leq -1.12 \cdot 10^{-82} \lor \neg \left(a \leq 4.1 \cdot 10^{-123}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\end{array}
\end{array}
if a < -3.7e53 or -3.39999999999999975e42 < a < -1.12e-82 or 4.1e-123 < a Initial program 84.2%
associate--l+85.3%
sub-neg85.3%
+-commutative85.3%
associate-/l*92.2%
distribute-neg-frac92.2%
associate-/r/94.8%
fma-def94.8%
sub-neg94.8%
+-commutative94.8%
distribute-neg-in94.8%
unsub-neg94.8%
remove-double-neg94.8%
Simplified94.8%
Taylor expanded in t around 0 83.1%
mul-1-neg83.1%
sub-neg83.1%
associate-/l*87.4%
Simplified87.4%
if -3.7e53 < a < -3.39999999999999975e42Initial program 34.5%
associate--l+34.3%
associate-/l*19.9%
Simplified19.9%
Taylor expanded in t around -inf 83.1%
+-commutative83.1%
sub-neg83.1%
mul-1-neg83.1%
+-commutative83.1%
*-commutative83.1%
+-commutative83.1%
*-commutative83.1%
mul-1-neg83.1%
unsub-neg83.1%
mul-1-neg83.1%
sub-neg83.1%
distribute-lft-out--99.7%
Simplified99.7%
Taylor expanded in y around inf 100.0%
if -1.12e-82 < a < 4.1e-123Initial program 60.4%
associate--l+64.2%
associate-/l*70.7%
Simplified70.7%
Taylor expanded in t around -inf 87.5%
+-commutative87.5%
sub-neg87.5%
mul-1-neg87.5%
+-commutative87.5%
*-commutative87.5%
+-commutative87.5%
*-commutative87.5%
mul-1-neg87.5%
unsub-neg87.5%
mul-1-neg87.5%
sub-neg87.5%
distribute-lft-out--87.5%
Simplified87.5%
Final simplification87.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (- x (/ y (/ a z))))))
(if (<= a -3.7e+53)
t_1
(if (<= a -3.4e+42)
(* y (- (/ z t) (/ a t)))
(if (<= a -6.2e-83)
(- (+ x y) (* y (/ z a)))
(if (<= a 4.1e-123) (+ x (/ (* y (- z a)) t)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (x - (y / (a / z)));
double tmp;
if (a <= -3.7e+53) {
tmp = t_1;
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if (a <= -6.2e-83) {
tmp = (x + y) - (y * (z / a));
} else if (a <= 4.1e-123) {
tmp = x + ((y * (z - 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) :: tmp
t_1 = y + (x - (y / (a / z)))
if (a <= (-3.7d+53)) then
tmp = t_1
else if (a <= (-3.4d+42)) then
tmp = y * ((z / t) - (a / t))
else if (a <= (-6.2d-83)) then
tmp = (x + y) - (y * (z / a))
else if (a <= 4.1d-123) then
tmp = x + ((y * (z - 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 - (y / (a / z)));
double tmp;
if (a <= -3.7e+53) {
tmp = t_1;
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if (a <= -6.2e-83) {
tmp = (x + y) - (y * (z / a));
} else if (a <= 4.1e-123) {
tmp = x + ((y * (z - a)) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (x - (y / (a / z))) tmp = 0 if a <= -3.7e+53: tmp = t_1 elif a <= -3.4e+42: tmp = y * ((z / t) - (a / t)) elif a <= -6.2e-83: tmp = (x + y) - (y * (z / a)) elif a <= 4.1e-123: tmp = x + ((y * (z - a)) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(x - Float64(y / Float64(a / z)))) tmp = 0.0 if (a <= -3.7e+53) tmp = t_1; elseif (a <= -3.4e+42) tmp = Float64(y * Float64(Float64(z / t) - Float64(a / t))); elseif (a <= -6.2e-83) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / a))); elseif (a <= 4.1e-123) tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (x - (y / (a / z))); tmp = 0.0; if (a <= -3.7e+53) tmp = t_1; elseif (a <= -3.4e+42) tmp = y * ((z / t) - (a / t)); elseif (a <= -6.2e-83) tmp = (x + y) - (y * (z / a)); elseif (a <= 4.1e-123) tmp = x + ((y * (z - a)) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.7e+53], t$95$1, If[LessEqual[a, -3.4e+42], N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -6.2e-83], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.1e-123], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{if}\;a \leq -3.7 \cdot 10^{+53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;a \leq -6.2 \cdot 10^{-83}:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{-123}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -3.7e53 or 4.1e-123 < a Initial program 84.9%
associate--l+85.0%
sub-neg85.0%
+-commutative85.0%
associate-/l*94.0%
distribute-neg-frac94.0%
associate-/r/96.5%
fma-def96.5%
sub-neg96.5%
+-commutative96.5%
distribute-neg-in96.5%
unsub-neg96.5%
remove-double-neg96.5%
Simplified96.5%
Taylor expanded in t around 0 84.6%
mul-1-neg84.6%
sub-neg84.6%
associate-/l*90.5%
Simplified90.5%
if -3.7e53 < a < -3.39999999999999975e42Initial program 34.5%
associate--l+34.3%
associate-/l*19.9%
Simplified19.9%
Taylor expanded in t around -inf 83.1%
+-commutative83.1%
sub-neg83.1%
mul-1-neg83.1%
+-commutative83.1%
*-commutative83.1%
+-commutative83.1%
*-commutative83.1%
mul-1-neg83.1%
unsub-neg83.1%
mul-1-neg83.1%
sub-neg83.1%
distribute-lft-out--99.7%
Simplified99.7%
Taylor expanded in y around inf 100.0%
if -3.39999999999999975e42 < a < -6.19999999999999985e-83Initial program 80.9%
associate-*l/77.6%
Simplified77.6%
Taylor expanded in t around 0 72.8%
if -6.19999999999999985e-83 < a < 4.1e-123Initial program 60.4%
associate--l+64.2%
associate-/l*70.7%
Simplified70.7%
Taylor expanded in t around -inf 87.5%
+-commutative87.5%
sub-neg87.5%
mul-1-neg87.5%
+-commutative87.5%
*-commutative87.5%
+-commutative87.5%
*-commutative87.5%
mul-1-neg87.5%
unsub-neg87.5%
mul-1-neg87.5%
sub-neg87.5%
distribute-lft-out--87.5%
Simplified87.5%
Final simplification87.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ y (- x (/ y (/ a z))))))
(if (<= a -3.7e+53)
t_1
(if (<= a -3.4e+42)
(* y (- (/ z t) (/ a t)))
(if (<= a -1.22e-82)
(- (+ x y) (/ (* y z) a))
(if (<= a 4.1e-123) (+ x (/ (* y (- z a)) t)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y + (x - (y / (a / z)));
double tmp;
if (a <= -3.7e+53) {
tmp = t_1;
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if (a <= -1.22e-82) {
tmp = (x + y) - ((y * z) / a);
} else if (a <= 4.1e-123) {
tmp = x + ((y * (z - 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) :: tmp
t_1 = y + (x - (y / (a / z)))
if (a <= (-3.7d+53)) then
tmp = t_1
else if (a <= (-3.4d+42)) then
tmp = y * ((z / t) - (a / t))
else if (a <= (-1.22d-82)) then
tmp = (x + y) - ((y * z) / a)
else if (a <= 4.1d-123) then
tmp = x + ((y * (z - 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 - (y / (a / z)));
double tmp;
if (a <= -3.7e+53) {
tmp = t_1;
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if (a <= -1.22e-82) {
tmp = (x + y) - ((y * z) / a);
} else if (a <= 4.1e-123) {
tmp = x + ((y * (z - a)) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y + (x - (y / (a / z))) tmp = 0 if a <= -3.7e+53: tmp = t_1 elif a <= -3.4e+42: tmp = y * ((z / t) - (a / t)) elif a <= -1.22e-82: tmp = (x + y) - ((y * z) / a) elif a <= 4.1e-123: tmp = x + ((y * (z - a)) / t) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y + Float64(x - Float64(y / Float64(a / z)))) tmp = 0.0 if (a <= -3.7e+53) tmp = t_1; elseif (a <= -3.4e+42) tmp = Float64(y * Float64(Float64(z / t) - Float64(a / t))); elseif (a <= -1.22e-82) tmp = Float64(Float64(x + y) - Float64(Float64(y * z) / a)); elseif (a <= 4.1e-123) tmp = Float64(x + Float64(Float64(y * Float64(z - a)) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y + (x - (y / (a / z))); tmp = 0.0; if (a <= -3.7e+53) tmp = t_1; elseif (a <= -3.4e+42) tmp = y * ((z / t) - (a / t)); elseif (a <= -1.22e-82) tmp = (x + y) - ((y * z) / a); elseif (a <= 4.1e-123) tmp = x + ((y * (z - a)) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y + N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.7e+53], t$95$1, If[LessEqual[a, -3.4e+42], N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.22e-82], N[(N[(x + y), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.1e-123], N[(x + N[(N[(y * N[(z - a), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{if}\;a \leq -3.7 \cdot 10^{+53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;a \leq -1.22 \cdot 10^{-82}:\\
\;\;\;\;\left(x + y\right) - \frac{y \cdot z}{a}\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{-123}:\\
\;\;\;\;x + \frac{y \cdot \left(z - a\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if a < -3.7e53 or 4.1e-123 < a Initial program 84.9%
associate--l+85.0%
sub-neg85.0%
+-commutative85.0%
associate-/l*94.0%
distribute-neg-frac94.0%
associate-/r/96.5%
fma-def96.5%
sub-neg96.5%
+-commutative96.5%
distribute-neg-in96.5%
unsub-neg96.5%
remove-double-neg96.5%
Simplified96.5%
Taylor expanded in t around 0 84.6%
mul-1-neg84.6%
sub-neg84.6%
associate-/l*90.5%
Simplified90.5%
if -3.7e53 < a < -3.39999999999999975e42Initial program 34.5%
associate--l+34.3%
associate-/l*19.9%
Simplified19.9%
Taylor expanded in t around -inf 83.1%
+-commutative83.1%
sub-neg83.1%
mul-1-neg83.1%
+-commutative83.1%
*-commutative83.1%
+-commutative83.1%
*-commutative83.1%
mul-1-neg83.1%
unsub-neg83.1%
mul-1-neg83.1%
sub-neg83.1%
distribute-lft-out--99.7%
Simplified99.7%
Taylor expanded in y around inf 100.0%
if -3.39999999999999975e42 < a < -1.22000000000000001e-82Initial program 80.9%
associate--l+87.1%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in t around 0 75.9%
if -1.22000000000000001e-82 < a < 4.1e-123Initial program 60.4%
associate--l+64.2%
associate-/l*70.7%
Simplified70.7%
Taylor expanded in t around -inf 87.5%
+-commutative87.5%
sub-neg87.5%
mul-1-neg87.5%
+-commutative87.5%
*-commutative87.5%
+-commutative87.5%
*-commutative87.5%
mul-1-neg87.5%
unsub-neg87.5%
mul-1-neg87.5%
sub-neg87.5%
distribute-lft-out--87.5%
Simplified87.5%
Final simplification88.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -850000000000.0) (not (<= a 3.8e-139))) (- (+ x y) (* y (/ (- z t) (- a t)))) (- x (/ (* y z) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -850000000000.0) || !(a <= 3.8e-139)) {
tmp = (x + y) - (y * ((z - t) / (a - t)));
} 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 <= (-850000000000.0d0)) .or. (.not. (a <= 3.8d-139))) then
tmp = (x + y) - (y * ((z - t) / (a - t)))
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 <= -850000000000.0) || !(a <= 3.8e-139)) {
tmp = (x + y) - (y * ((z - t) / (a - t)));
} else {
tmp = x - ((y * z) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -850000000000.0) or not (a <= 3.8e-139): tmp = (x + y) - (y * ((z - t) / (a - t))) else: tmp = x - ((y * z) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -850000000000.0) || !(a <= 3.8e-139)) tmp = Float64(Float64(x + y) - Float64(y * Float64(Float64(z - t) / Float64(a - t)))); 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 <= -850000000000.0) || ~((a <= 3.8e-139))) tmp = (x + y) - (y * ((z - t) / (a - t))); else tmp = x - ((y * z) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -850000000000.0], N[Not[LessEqual[a, 3.8e-139]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] - N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $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 -850000000000 \lor \neg \left(a \leq 3.8 \cdot 10^{-139}\right):\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z - t}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\end{array}
\end{array}
if a < -8.5e11 or 3.80000000000000008e-139 < a Initial program 82.7%
associate-*l/93.1%
Simplified93.1%
if -8.5e11 < a < 3.80000000000000008e-139Initial program 64.9%
associate--l+68.9%
sub-neg68.9%
+-commutative68.9%
associate-/l*73.9%
distribute-neg-frac73.9%
associate-/r/76.5%
fma-def76.5%
sub-neg76.5%
+-commutative76.5%
distribute-neg-in76.5%
unsub-neg76.5%
remove-double-neg76.5%
Simplified76.5%
Taylor expanded in z around inf 89.4%
associate-*r/89.4%
associate-*r*89.4%
neg-mul-189.4%
Simplified89.4%
Final simplification91.7%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.7e+53)
(+ x y)
(if (<= a -3.4e+42)
(* y (- (/ z t) (/ a t)))
(if (or (<= a -0.0115) (not (<= a 4.1e-123)))
(+ x y)
(+ x (/ y (/ t z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+53) {
tmp = x + y;
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if ((a <= -0.0115) || !(a <= 4.1e-123)) {
tmp = x + y;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.7d+53)) then
tmp = x + y
else if (a <= (-3.4d+42)) then
tmp = y * ((z / t) - (a / t))
else if ((a <= (-0.0115d0)) .or. (.not. (a <= 4.1d-123))) then
tmp = x + y
else
tmp = x + (y / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+53) {
tmp = x + y;
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if ((a <= -0.0115) || !(a <= 4.1e-123)) {
tmp = x + y;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.7e+53: tmp = x + y elif a <= -3.4e+42: tmp = y * ((z / t) - (a / t)) elif (a <= -0.0115) or not (a <= 4.1e-123): tmp = x + y else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.7e+53) tmp = Float64(x + y); elseif (a <= -3.4e+42) tmp = Float64(y * Float64(Float64(z / t) - Float64(a / t))); elseif ((a <= -0.0115) || !(a <= 4.1e-123)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.7e+53) tmp = x + y; elseif (a <= -3.4e+42) tmp = y * ((z / t) - (a / t)); elseif ((a <= -0.0115) || ~((a <= 4.1e-123))) tmp = x + y; else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.7e+53], N[(x + y), $MachinePrecision], If[LessEqual[a, -3.4e+42], N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -0.0115], N[Not[LessEqual[a, 4.1e-123]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+53}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;a \leq -0.0115 \lor \neg \left(a \leq 4.1 \cdot 10^{-123}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if a < -3.7e53 or -3.39999999999999975e42 < a < -0.0115 or 4.1e-123 < a Initial program 85.0%
associate--l+85.7%
sub-neg85.7%
+-commutative85.7%
associate-/l*93.7%
distribute-neg-frac93.7%
associate-/r/96.7%
fma-def96.7%
sub-neg96.7%
+-commutative96.7%
distribute-neg-in96.7%
unsub-neg96.7%
remove-double-neg96.7%
Simplified96.7%
Taylor expanded in a around inf 81.1%
if -3.7e53 < a < -3.39999999999999975e42Initial program 34.5%
associate--l+34.3%
associate-/l*19.9%
Simplified19.9%
Taylor expanded in t around -inf 83.1%
+-commutative83.1%
sub-neg83.1%
mul-1-neg83.1%
+-commutative83.1%
*-commutative83.1%
+-commutative83.1%
*-commutative83.1%
mul-1-neg83.1%
unsub-neg83.1%
mul-1-neg83.1%
sub-neg83.1%
distribute-lft-out--99.7%
Simplified99.7%
Taylor expanded in y around inf 100.0%
if -0.0115 < a < 4.1e-123Initial program 64.7%
associate--l+68.5%
sub-neg68.5%
+-commutative68.5%
associate-/l*73.4%
distribute-neg-frac73.4%
associate-/r/76.1%
fma-def76.0%
sub-neg76.0%
+-commutative76.0%
distribute-neg-in76.0%
unsub-neg76.0%
remove-double-neg76.0%
Simplified76.0%
add-cube-cbrt74.8%
pow374.9%
+-commutative74.9%
Applied egg-rr74.9%
Taylor expanded in y around 0 89.8%
associate--l+74.9%
div-sub74.9%
Simplified74.9%
Taylor expanded in a around 0 75.0%
pow-base-175.0%
*-lft-identity75.0%
+-commutative75.0%
associate-/l*77.5%
Simplified77.5%
Final simplification80.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3.7e+53)
(+ y (+ x (/ y (/ a t))))
(if (<= a -3.4e+42)
(* y (- (/ z t) (/ a t)))
(if (<= a -260000.0)
(+ x y)
(if (<= a 4.1e-123) (+ x (/ y (/ t z))) (+ x y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.7e+53) {
tmp = y + (x + (y / (a / t)));
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if (a <= -260000.0) {
tmp = x + y;
} else if (a <= 4.1e-123) {
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 <= (-3.7d+53)) then
tmp = y + (x + (y / (a / t)))
else if (a <= (-3.4d+42)) then
tmp = y * ((z / t) - (a / t))
else if (a <= (-260000.0d0)) then
tmp = x + y
else if (a <= 4.1d-123) 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 <= -3.7e+53) {
tmp = y + (x + (y / (a / t)));
} else if (a <= -3.4e+42) {
tmp = y * ((z / t) - (a / t));
} else if (a <= -260000.0) {
tmp = x + y;
} else if (a <= 4.1e-123) {
tmp = x + (y / (t / z));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.7e+53: tmp = y + (x + (y / (a / t))) elif a <= -3.4e+42: tmp = y * ((z / t) - (a / t)) elif a <= -260000.0: tmp = x + y elif a <= 4.1e-123: tmp = x + (y / (t / z)) else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.7e+53) tmp = Float64(y + Float64(x + Float64(y / Float64(a / t)))); elseif (a <= -3.4e+42) tmp = Float64(y * Float64(Float64(z / t) - Float64(a / t))); elseif (a <= -260000.0) tmp = Float64(x + y); elseif (a <= 4.1e-123) 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 <= -3.7e+53) tmp = y + (x + (y / (a / t))); elseif (a <= -3.4e+42) tmp = y * ((z / t) - (a / t)); elseif (a <= -260000.0) tmp = x + y; elseif (a <= 4.1e-123) tmp = x + (y / (t / z)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.7e+53], N[(y + N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.4e+42], N[(y * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -260000.0], N[(x + y), $MachinePrecision], If[LessEqual[a, 4.1e-123], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+53}:\\
\;\;\;\;y + \left(x + \frac{y}{\frac{a}{t}}\right)\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{+42}:\\
\;\;\;\;y \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;a \leq -260000:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{-123}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -3.7e53Initial program 83.5%
associate--l+83.6%
associate-/l*94.6%
Simplified94.6%
Taylor expanded in a around inf 91.4%
Taylor expanded in z around 0 80.0%
associate--l+80.0%
sub-neg80.0%
mul-1-neg80.0%
remove-double-neg80.0%
associate-/l*84.8%
Simplified84.8%
if -3.7e53 < a < -3.39999999999999975e42Initial program 34.5%
associate--l+34.3%
associate-/l*19.9%
Simplified19.9%
Taylor expanded in t around -inf 83.1%
+-commutative83.1%
sub-neg83.1%
mul-1-neg83.1%
+-commutative83.1%
*-commutative83.1%
+-commutative83.1%
*-commutative83.1%
mul-1-neg83.1%
unsub-neg83.1%
mul-1-neg83.1%
sub-neg83.1%
distribute-lft-out--99.7%
Simplified99.7%
Taylor expanded in y around inf 100.0%
if -3.39999999999999975e42 < a < -2.6e5 or 4.1e-123 < a Initial program 85.7%
associate--l+86.6%
sub-neg86.6%
+-commutative86.6%
associate-/l*93.2%
distribute-neg-frac93.2%
associate-/r/97.1%
fma-def97.1%
sub-neg97.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
remove-double-neg97.1%
Simplified97.1%
Taylor expanded in a around inf 79.6%
if -2.6e5 < a < 4.1e-123Initial program 64.7%
associate--l+68.5%
sub-neg68.5%
+-commutative68.5%
associate-/l*73.4%
distribute-neg-frac73.4%
associate-/r/76.1%
fma-def76.0%
sub-neg76.0%
+-commutative76.0%
distribute-neg-in76.0%
unsub-neg76.0%
remove-double-neg76.0%
Simplified76.0%
add-cube-cbrt74.8%
pow374.9%
+-commutative74.9%
Applied egg-rr74.9%
Taylor expanded in y around 0 89.8%
associate--l+74.9%
div-sub74.9%
Simplified74.9%
Taylor expanded in a around 0 75.0%
pow-base-175.0%
*-lft-identity75.0%
+-commutative75.0%
associate-/l*77.5%
Simplified77.5%
Final simplification80.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -900000000000.0) (not (<= a 4.1e-123))) (+ x (- y (/ y (/ (- a t) z)))) (- x (/ (* y z) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -900000000000.0) || !(a <= 4.1e-123)) {
tmp = x + (y - (y / ((a - t) / 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 <= (-900000000000.0d0)) .or. (.not. (a <= 4.1d-123))) then
tmp = x + (y - (y / ((a - t) / 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 <= -900000000000.0) || !(a <= 4.1e-123)) {
tmp = x + (y - (y / ((a - t) / z)));
} else {
tmp = x - ((y * z) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -900000000000.0) or not (a <= 4.1e-123): tmp = x + (y - (y / ((a - t) / z))) else: tmp = x - ((y * z) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -900000000000.0) || !(a <= 4.1e-123)) tmp = Float64(x + Float64(y - Float64(y / Float64(Float64(a - t) / z)))); 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 <= -900000000000.0) || ~((a <= 4.1e-123))) tmp = x + (y - (y / ((a - t) / z))); else tmp = x - ((y * z) / (a - t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -900000000000.0], N[Not[LessEqual[a, 4.1e-123]], $MachinePrecision]], N[(x + N[(y - N[(y / N[(N[(a - t), $MachinePrecision] / z), $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 -900000000000 \lor \neg \left(a \leq 4.1 \cdot 10^{-123}\right):\\
\;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\end{array}
\end{array}
if a < -9e11 or 4.1e-123 < a Initial program 82.9%
associate--l+83.6%
associate-/l*90.7%
Simplified90.7%
Taylor expanded in z around inf 84.0%
associate-/l*91.8%
Simplified91.8%
if -9e11 < a < 4.1e-123Initial program 65.0%
associate--l+68.8%
sub-neg68.8%
+-commutative68.8%
associate-/l*73.7%
distribute-neg-frac73.7%
associate-/r/76.3%
fma-def76.3%
sub-neg76.3%
+-commutative76.3%
distribute-neg-in76.3%
unsub-neg76.3%
remove-double-neg76.3%
Simplified76.3%
Taylor expanded in z around inf 88.7%
associate-*r/88.7%
associate-*r*88.7%
neg-mul-188.7%
Simplified88.7%
Final simplification90.5%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1800000000000.0)
(- (+ x y) (* y (/ z (- a t))))
(if (<= a 4.1e-123)
(- x (/ (* y z) (- a t)))
(+ x (- y (/ y (/ (- a t) z)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1800000000000.0) {
tmp = (x + y) - (y * (z / (a - t)));
} else if (a <= 4.1e-123) {
tmp = x - ((y * z) / (a - t));
} else {
tmp = x + (y - (y / ((a - t) / z)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1800000000000.0d0)) then
tmp = (x + y) - (y * (z / (a - t)))
else if (a <= 4.1d-123) then
tmp = x - ((y * z) / (a - t))
else
tmp = x + (y - (y / ((a - t) / z)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1800000000000.0) {
tmp = (x + y) - (y * (z / (a - t)));
} else if (a <= 4.1e-123) {
tmp = x - ((y * z) / (a - t));
} else {
tmp = x + (y - (y / ((a - t) / z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1800000000000.0: tmp = (x + y) - (y * (z / (a - t))) elif a <= 4.1e-123: tmp = x - ((y * z) / (a - t)) else: tmp = x + (y - (y / ((a - t) / z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1800000000000.0) tmp = Float64(Float64(x + y) - Float64(y * Float64(z / Float64(a - t)))); elseif (a <= 4.1e-123) tmp = Float64(x - Float64(Float64(y * z) / Float64(a - t))); else tmp = Float64(x + Float64(y - Float64(y / Float64(Float64(a - t) / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1800000000000.0) tmp = (x + y) - (y * (z / (a - t))); elseif (a <= 4.1e-123) tmp = x - ((y * z) / (a - t)); else tmp = x + (y - (y / ((a - t) / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1800000000000.0], N[(N[(x + y), $MachinePrecision] - N[(y * N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.1e-123], N[(x - N[(N[(y * z), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y - N[(y / N[(N[(a - t), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1800000000000:\\
\;\;\;\;\left(x + y\right) - y \cdot \frac{z}{a - t}\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{-123}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\mathbf{else}:\\
\;\;\;\;x + \left(y - \frac{y}{\frac{a - t}{z}}\right)\\
\end{array}
\end{array}
if a < -1.8e12Initial program 78.6%
associate-*l/88.5%
Simplified88.5%
Taylor expanded in z around inf 86.9%
if -1.8e12 < a < 4.1e-123Initial program 65.0%
associate--l+68.8%
sub-neg68.8%
+-commutative68.8%
associate-/l*73.7%
distribute-neg-frac73.7%
associate-/r/76.3%
fma-def76.3%
sub-neg76.3%
+-commutative76.3%
distribute-neg-in76.3%
unsub-neg76.3%
remove-double-neg76.3%
Simplified76.3%
Taylor expanded in z around inf 88.7%
associate-*r/88.7%
associate-*r*88.7%
neg-mul-188.7%
Simplified88.7%
if 4.1e-123 < a Initial program 85.6%
associate--l+85.7%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in z around inf 86.9%
associate-/l*94.8%
Simplified94.8%
Final simplification90.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -5.5e+55) (not (<= a 2e-104))) (+ y (- x (/ y (/ a z)))) (- x (/ (* y z) (- a t)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -5.5e+55) || !(a <= 2e-104)) {
tmp = y + (x - (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 <= (-5.5d+55)) .or. (.not. (a <= 2d-104))) then
tmp = y + (x - (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 <= -5.5e+55) || !(a <= 2e-104)) {
tmp = y + (x - (y / (a / z)));
} else {
tmp = x - ((y * z) / (a - t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -5.5e+55) or not (a <= 2e-104): tmp = y + (x - (y / (a / z))) else: tmp = x - ((y * z) / (a - t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -5.5e+55) || !(a <= 2e-104)) tmp = Float64(y + Float64(x - Float64(y / Float64(a / z)))); 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 <= -5.5e+55) || ~((a <= 2e-104))) tmp = y + (x - (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, -5.5e+55], N[Not[LessEqual[a, 2e-104]], $MachinePrecision]], N[(y + N[(x - N[(y / N[(a / z), $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 -5.5 \cdot 10^{+55} \lor \neg \left(a \leq 2 \cdot 10^{-104}\right):\\
\;\;\;\;y + \left(x - \frac{y}{\frac{a}{z}}\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot z}{a - t}\\
\end{array}
\end{array}
if a < -5.5000000000000004e55 or 1.99999999999999985e-104 < a Initial program 84.4%
associate--l+84.4%
sub-neg84.4%
+-commutative84.4%
associate-/l*93.8%
distribute-neg-frac93.8%
associate-/r/96.4%
fma-def96.4%
sub-neg96.4%
+-commutative96.4%
distribute-neg-in96.4%
unsub-neg96.4%
remove-double-neg96.4%
Simplified96.4%
Taylor expanded in t around 0 84.8%
mul-1-neg84.8%
sub-neg84.8%
associate-/l*90.8%
Simplified90.8%
if -5.5000000000000004e55 < a < 1.99999999999999985e-104Initial program 65.9%
associate--l+70.0%
sub-neg70.0%
+-commutative70.0%
associate-/l*72.6%
distribute-neg-frac72.6%
associate-/r/76.5%
fma-def76.5%
sub-neg76.5%
+-commutative76.5%
distribute-neg-in76.5%
unsub-neg76.5%
remove-double-neg76.5%
Simplified76.5%
Taylor expanded in z around inf 86.3%
associate-*r/86.3%
associate-*r*86.3%
neg-mul-186.3%
Simplified86.3%
Final simplification88.7%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.02e-11) (+ x y) (if (<= a -2.5e-163) x (if (<= a 9.6e-137) (/ (* y z) t) (+ x y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.02e-11) {
tmp = x + y;
} else if (a <= -2.5e-163) {
tmp = x;
} else if (a <= 9.6e-137) {
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.02d-11)) then
tmp = x + y
else if (a <= (-2.5d-163)) then
tmp = x
else if (a <= 9.6d-137) 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.02e-11) {
tmp = x + y;
} else if (a <= -2.5e-163) {
tmp = x;
} else if (a <= 9.6e-137) {
tmp = (y * z) / t;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.02e-11: tmp = x + y elif a <= -2.5e-163: tmp = x elif a <= 9.6e-137: tmp = (y * z) / t else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.02e-11) tmp = Float64(x + y); elseif (a <= -2.5e-163) tmp = x; elseif (a <= 9.6e-137) tmp = Float64(Float64(y * 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.02e-11) tmp = x + y; elseif (a <= -2.5e-163) tmp = x; elseif (a <= 9.6e-137) tmp = (y * z) / t; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.02e-11], N[(x + y), $MachinePrecision], If[LessEqual[a, -2.5e-163], x, If[LessEqual[a, 9.6e-137], N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision], N[(x + y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.02 \cdot 10^{-11}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq -2.5 \cdot 10^{-163}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{-137}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.01999999999999994e-11 or 9.6000000000000002e-137 < a Initial program 82.9%
associate--l+83.5%
sub-neg83.5%
+-commutative83.5%
associate-/l*90.4%
distribute-neg-frac90.4%
associate-/r/93.9%
fma-def93.9%
sub-neg93.9%
+-commutative93.9%
distribute-neg-in93.9%
unsub-neg93.9%
remove-double-neg93.9%
Simplified93.9%
Taylor expanded in a around inf 77.4%
if -1.01999999999999994e-11 < a < -2.49999999999999989e-163Initial program 70.3%
associate--l+75.2%
sub-neg75.2%
+-commutative75.2%
associate-/l*78.1%
distribute-neg-frac78.1%
associate-/r/82.5%
fma-def82.5%
sub-neg82.5%
+-commutative82.5%
distribute-neg-in82.5%
unsub-neg82.5%
remove-double-neg82.5%
Simplified82.5%
Taylor expanded in x around inf 57.6%
if -2.49999999999999989e-163 < a < 9.6000000000000002e-137Initial program 60.1%
associate--l+63.5%
associate-/l*70.1%
Simplified70.1%
Taylor expanded in t around -inf 86.0%
+-commutative86.0%
sub-neg86.0%
mul-1-neg86.0%
+-commutative86.0%
*-commutative86.0%
+-commutative86.0%
*-commutative86.0%
mul-1-neg86.0%
unsub-neg86.0%
mul-1-neg86.0%
sub-neg86.0%
distribute-lft-out--86.0%
Simplified86.0%
Taylor expanded in z around inf 50.5%
Final simplification68.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= a -3.45e+56) (not (<= a 4.1e-123))) (+ x y) (+ x (/ y (/ t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.45e+56) || !(a <= 4.1e-123)) {
tmp = x + y;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((a <= (-3.45d+56)) .or. (.not. (a <= 4.1d-123))) then
tmp = x + y
else
tmp = x + (y / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((a <= -3.45e+56) || !(a <= 4.1e-123)) {
tmp = x + y;
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (a <= -3.45e+56) or not (a <= 4.1e-123): tmp = x + y else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((a <= -3.45e+56) || !(a <= 4.1e-123)) tmp = Float64(x + y); else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((a <= -3.45e+56) || ~((a <= 4.1e-123))) tmp = x + y; else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -3.45e+56], N[Not[LessEqual[a, 4.1e-123]], $MachinePrecision]], N[(x + y), $MachinePrecision], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.45 \cdot 10^{+56} \lor \neg \left(a \leq 4.1 \cdot 10^{-123}\right):\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if a < -3.45e56 or 4.1e-123 < a Initial program 84.8%
associate--l+84.9%
sub-neg84.9%
+-commutative84.9%
associate-/l*94.0%
distribute-neg-frac94.0%
associate-/r/96.5%
fma-def96.5%
sub-neg96.5%
+-commutative96.5%
distribute-neg-in96.5%
unsub-neg96.5%
remove-double-neg96.5%
Simplified96.5%
Taylor expanded in a around inf 81.3%
if -3.45e56 < a < 4.1e-123Initial program 64.7%
associate--l+68.9%
sub-neg68.9%
+-commutative68.9%
associate-/l*71.7%
distribute-neg-frac71.7%
associate-/r/75.7%
fma-def75.6%
sub-neg75.6%
+-commutative75.6%
distribute-neg-in75.6%
unsub-neg75.6%
remove-double-neg75.6%
Simplified75.6%
add-cube-cbrt74.4%
pow374.5%
+-commutative74.5%
Applied egg-rr74.5%
Taylor expanded in y around 0 87.5%
associate--l+74.5%
div-sub74.5%
Simplified74.5%
Taylor expanded in a around 0 72.1%
pow-base-172.1%
*-lft-identity72.1%
+-commutative72.1%
associate-/l*74.4%
Simplified74.4%
Final simplification78.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.9e-10) (+ x y) (if (<= a 3.9e-142) x (+ x y))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.9e-10) {
tmp = x + y;
} else if (a <= 3.9e-142) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-3.9d-10)) then
tmp = x + y
else if (a <= 3.9d-142) then
tmp = x
else
tmp = x + y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.9e-10) {
tmp = x + y;
} else if (a <= 3.9e-142) {
tmp = x;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.9e-10: tmp = x + y elif a <= 3.9e-142: tmp = x else: tmp = x + y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.9e-10) tmp = Float64(x + y); elseif (a <= 3.9e-142) tmp = x; else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.9e-10) tmp = x + y; elseif (a <= 3.9e-142) tmp = x; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.9e-10], N[(x + y), $MachinePrecision], If[LessEqual[a, 3.9e-142], x, N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.9 \cdot 10^{-10}:\\
\;\;\;\;x + y\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-142}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -3.9e-10 or 3.9000000000000003e-142 < a Initial program 83.1%
associate--l+83.7%
sub-neg83.7%
+-commutative83.7%
associate-/l*90.5%
distribute-neg-frac90.5%
associate-/r/93.4%
fma-def93.4%
sub-neg93.4%
+-commutative93.4%
distribute-neg-in93.4%
unsub-neg93.4%
remove-double-neg93.4%
Simplified93.4%
Taylor expanded in a around inf 76.5%
if -3.9e-10 < a < 3.9000000000000003e-142Initial program 63.5%
associate--l+67.5%
sub-neg67.5%
+-commutative67.5%
associate-/l*72.8%
distribute-neg-frac72.8%
associate-/r/76.6%
fma-def76.6%
sub-neg76.6%
+-commutative76.6%
distribute-neg-in76.6%
unsub-neg76.6%
remove-double-neg76.6%
Simplified76.6%
Taylor expanded in x around inf 44.7%
Final simplification64.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 75.8%
associate--l+77.7%
sub-neg77.7%
+-commutative77.7%
associate-/l*84.0%
distribute-neg-frac84.0%
associate-/r/87.1%
fma-def87.1%
sub-neg87.1%
+-commutative87.1%
distribute-neg-in87.1%
unsub-neg87.1%
remove-double-neg87.1%
Simplified87.1%
Taylor expanded in x around inf 47.4%
Final simplification47.4%
(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 2023238
(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))))