
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) (- z a))))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
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)) / (z - a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / (z - a));
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / (z - a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / Float64(z - a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / (z - a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{z - a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (or (<= t_1 -2e+305) (not (<= t_1 2e+191)))
(+ x (/ (- z t) (/ (- z a) y)))
(+ t_1 x))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -2e+305) || !(t_1 <= 2e+191)) {
tmp = x + ((z - t) / ((z - a) / y));
} else {
tmp = t_1 + 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) :: t_1
real(8) :: tmp
t_1 = (y * (z - t)) / (z - a)
if ((t_1 <= (-2d+305)) .or. (.not. (t_1 <= 2d+191))) then
tmp = x + ((z - t) / ((z - a) / y))
else
tmp = t_1 + x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if ((t_1 <= -2e+305) || !(t_1 <= 2e+191)) {
tmp = x + ((z - t) / ((z - a) / y));
} else {
tmp = t_1 + x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if (t_1 <= -2e+305) or not (t_1 <= 2e+191): tmp = x + ((z - t) / ((z - a) / y)) else: tmp = t_1 + x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if ((t_1 <= -2e+305) || !(t_1 <= 2e+191)) tmp = Float64(x + Float64(Float64(z - t) / Float64(Float64(z - a) / y))); else tmp = Float64(t_1 + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if ((t_1 <= -2e+305) || ~((t_1 <= 2e+191))) tmp = x + ((z - t) / ((z - a) / y)); else tmp = t_1 + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+305], N[Not[LessEqual[t$95$1, 2e+191]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] / N[(N[(z - a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+305} \lor \neg \left(t_1 \leq 2 \cdot 10^{+191}\right):\\
\;\;\;\;x + \frac{z - t}{\frac{z - a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1 + x\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -1.9999999999999999e305 or 2.00000000000000015e191 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 41.3%
*-commutative41.3%
associate-/l*99.8%
Simplified99.8%
if -1.9999999999999999e305 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 2.00000000000000015e191Initial program 98.9%
Final simplification99.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) (- z a))))
(if (<= t_1 (- INFINITY))
(+ x (- y (/ y (/ z (- t a)))))
(if (<= t_1 2e+275) (+ t_1 x) (+ x (/ (- z t) (/ z y)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = x + (y - (y / (z / (t - a))));
} else if (t_1 <= 2e+275) {
tmp = t_1 + x;
} else {
tmp = x + ((z - t) / (z / y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / (z - a);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = x + (y - (y / (z / (t - a))));
} else if (t_1 <= 2e+275) {
tmp = t_1 + x;
} else {
tmp = x + ((z - t) / (z / y));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / (z - a) tmp = 0 if t_1 <= -math.inf: tmp = x + (y - (y / (z / (t - a)))) elif t_1 <= 2e+275: tmp = t_1 + x else: tmp = x + ((z - t) / (z / y)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / Float64(z - a)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(x + Float64(y - Float64(y / Float64(z / Float64(t - a))))); elseif (t_1 <= 2e+275) tmp = Float64(t_1 + x); else tmp = Float64(x + Float64(Float64(z - t) / Float64(z / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / (z - a); tmp = 0.0; if (t_1 <= -Inf) tmp = x + (y - (y / (z / (t - a)))); elseif (t_1 <= 2e+275) tmp = t_1 + x; else tmp = x + ((z - t) / (z / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(x + N[(y - N[(y / N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+275], N[(t$95$1 + x), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{z - a}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;x + \left(y - \frac{y}{\frac{z}{t - a}}\right)\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+275}:\\
\;\;\;\;t_1 + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z - t}{\frac{z}{y}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -inf.0Initial program 37.5%
Taylor expanded in z around inf 54.5%
associate--l+54.5%
distribute-lft-out--54.5%
div-sub54.5%
mul-1-neg54.5%
unsub-neg54.5%
distribute-rgt-out--58.3%
associate-/l*85.8%
Simplified85.8%
if -inf.0 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 1.99999999999999992e275Initial program 98.9%
if 1.99999999999999992e275 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) Initial program 29.6%
*-commutative29.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 75.6%
Final simplification94.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (- z a))) (t_2 (- x (* t t_1))))
(if (<= t -1.72e-40)
t_2
(if (<= t -1.4e-94)
(+ y x)
(if (<= t -3e-128)
(- x (/ y (/ a (- z t))))
(if (<= t 2.6e+49) (+ x (* z t_1)) t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (z - a);
double t_2 = x - (t * t_1);
double tmp;
if (t <= -1.72e-40) {
tmp = t_2;
} else if (t <= -1.4e-94) {
tmp = y + x;
} else if (t <= -3e-128) {
tmp = x - (y / (a / (z - t)));
} else if (t <= 2.6e+49) {
tmp = x + (z * t_1);
} else {
tmp = t_2;
}
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 / (z - a)
t_2 = x - (t * t_1)
if (t <= (-1.72d-40)) then
tmp = t_2
else if (t <= (-1.4d-94)) then
tmp = y + x
else if (t <= (-3d-128)) then
tmp = x - (y / (a / (z - t)))
else if (t <= 2.6d+49) then
tmp = x + (z * t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y / (z - a);
double t_2 = x - (t * t_1);
double tmp;
if (t <= -1.72e-40) {
tmp = t_2;
} else if (t <= -1.4e-94) {
tmp = y + x;
} else if (t <= -3e-128) {
tmp = x - (y / (a / (z - t)));
} else if (t <= 2.6e+49) {
tmp = x + (z * t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (z - a) t_2 = x - (t * t_1) tmp = 0 if t <= -1.72e-40: tmp = t_2 elif t <= -1.4e-94: tmp = y + x elif t <= -3e-128: tmp = x - (y / (a / (z - t))) elif t <= 2.6e+49: tmp = x + (z * t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(z - a)) t_2 = Float64(x - Float64(t * t_1)) tmp = 0.0 if (t <= -1.72e-40) tmp = t_2; elseif (t <= -1.4e-94) tmp = Float64(y + x); elseif (t <= -3e-128) tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); elseif (t <= 2.6e+49) tmp = Float64(x + Float64(z * t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (z - a); t_2 = x - (t * t_1); tmp = 0.0; if (t <= -1.72e-40) tmp = t_2; elseif (t <= -1.4e-94) tmp = y + x; elseif (t <= -3e-128) tmp = x - (y / (a / (z - t))); elseif (t <= 2.6e+49) tmp = x + (z * t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x - N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.72e-40], t$95$2, If[LessEqual[t, -1.4e-94], N[(y + x), $MachinePrecision], If[LessEqual[t, -3e-128], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.6e+49], N[(x + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z - a}\\
t_2 := x - t \cdot t_1\\
\mathbf{if}\;t \leq -1.72 \cdot 10^{-40}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{-94}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-128}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+49}:\\
\;\;\;\;x + z \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -1.7199999999999999e-40 or 2.59999999999999989e49 < t Initial program 81.6%
Taylor expanded in z around 0 78.6%
mul-1-neg78.6%
distribute-lft-neg-out78.6%
*-commutative78.6%
Simplified78.6%
div-inv78.6%
add-sqr-sqrt34.0%
sqrt-unprod31.8%
sqr-neg31.8%
sqrt-unprod21.6%
add-sqr-sqrt35.6%
distribute-rgt-neg-in35.6%
cancel-sign-sub-inv35.6%
div-inv35.6%
associate-/l*37.2%
associate-/r/37.2%
add-sqr-sqrt23.2%
sqrt-unprod33.7%
sqr-neg33.7%
sqrt-unprod36.5%
add-sqr-sqrt85.9%
Applied egg-rr85.9%
if -1.7199999999999999e-40 < t < -1.3999999999999999e-94Initial program 78.3%
+-commutative78.3%
associate-*l/85.6%
fma-def85.5%
Simplified85.5%
Taylor expanded in z around inf 92.9%
+-commutative92.9%
Simplified92.9%
if -1.3999999999999999e-94 < t < -2.99999999999999978e-128Initial program 99.8%
+-commutative99.8%
associate-*l/73.2%
fma-def73.2%
Simplified73.2%
Taylor expanded in a around inf 99.8%
+-commutative99.8%
mul-1-neg99.8%
associate-/l*100.0%
Simplified100.0%
if -2.99999999999999978e-128 < t < 2.59999999999999989e49Initial program 83.4%
+-commutative83.4%
associate-*l/95.9%
fma-def95.9%
Simplified95.9%
Taylor expanded in t around 0 80.2%
+-commutative80.2%
associate-*l/94.3%
*-commutative94.3%
Simplified94.3%
Final simplification90.3%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.7e+131)
(+ y x)
(if (<= z -0.38)
(+ x (/ (* y z) (- z a)))
(if (<= z 3.6e-78)
(+ x (* y (/ t a)))
(if (<= z 3.3e+76) (- x (/ t (/ z y))) (+ y x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e+131) {
tmp = y + x;
} else if (z <= -0.38) {
tmp = x + ((y * z) / (z - a));
} else if (z <= 3.6e-78) {
tmp = x + (y * (t / a));
} else if (z <= 3.3e+76) {
tmp = x - (t / (z / y));
} 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 (z <= (-1.7d+131)) then
tmp = y + x
else if (z <= (-0.38d0)) then
tmp = x + ((y * z) / (z - a))
else if (z <= 3.6d-78) then
tmp = x + (y * (t / a))
else if (z <= 3.3d+76) then
tmp = x - (t / (z / y))
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 (z <= -1.7e+131) {
tmp = y + x;
} else if (z <= -0.38) {
tmp = x + ((y * z) / (z - a));
} else if (z <= 3.6e-78) {
tmp = x + (y * (t / a));
} else if (z <= 3.3e+76) {
tmp = x - (t / (z / y));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.7e+131: tmp = y + x elif z <= -0.38: tmp = x + ((y * z) / (z - a)) elif z <= 3.6e-78: tmp = x + (y * (t / a)) elif z <= 3.3e+76: tmp = x - (t / (z / y)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e+131) tmp = Float64(y + x); elseif (z <= -0.38) tmp = Float64(x + Float64(Float64(y * z) / Float64(z - a))); elseif (z <= 3.6e-78) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 3.3e+76) tmp = Float64(x - Float64(t / Float64(z / y))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.7e+131) tmp = y + x; elseif (z <= -0.38) tmp = x + ((y * z) / (z - a)); elseif (z <= 3.6e-78) tmp = x + (y * (t / a)); elseif (z <= 3.3e+76) tmp = x - (t / (z / y)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e+131], N[(y + x), $MachinePrecision], If[LessEqual[z, -0.38], N[(x + N[(N[(y * z), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.6e-78], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.3e+76], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+131}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq -0.38:\\
\;\;\;\;x + \frac{y \cdot z}{z - a}\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-78}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+76}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -1.69999999999999993e131 or 3.3000000000000001e76 < z Initial program 65.0%
+-commutative65.0%
associate-*l/90.4%
fma-def90.4%
Simplified90.4%
Taylor expanded in z around inf 84.3%
+-commutative84.3%
Simplified84.3%
if -1.69999999999999993e131 < z < -0.38Initial program 86.1%
Taylor expanded in t around 0 71.1%
if -0.38 < z < 3.6000000000000002e-78Initial program 94.6%
+-commutative94.6%
associate-*l/95.6%
fma-def95.6%
Simplified95.6%
Taylor expanded in z around 0 78.8%
+-commutative78.8%
associate-/l*79.5%
associate-/r/82.3%
Simplified82.3%
if 3.6000000000000002e-78 < z < 3.3000000000000001e76Initial program 95.9%
+-commutative95.9%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 80.5%
+-commutative80.5%
associate-/l*80.6%
associate-/r/80.7%
Simplified80.7%
Taylor expanded in z around 0 78.7%
mul-1-neg78.7%
associate-/l*78.8%
Simplified78.8%
Final simplification81.2%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.65e+29)
(+ y x)
(if (<= z 4e-78)
(+ x (* y (/ t a)))
(if (<= z 9e+74) (- x (* y (/ t z))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.65e+29) {
tmp = y + x;
} else if (z <= 4e-78) {
tmp = x + (y * (t / a));
} else if (z <= 9e+74) {
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 (z <= (-2.65d+29)) then
tmp = y + x
else if (z <= 4d-78) then
tmp = x + (y * (t / a))
else if (z <= 9d+74) 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 (z <= -2.65e+29) {
tmp = y + x;
} else if (z <= 4e-78) {
tmp = x + (y * (t / a));
} else if (z <= 9e+74) {
tmp = x - (y * (t / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.65e+29: tmp = y + x elif z <= 4e-78: tmp = x + (y * (t / a)) elif z <= 9e+74: tmp = x - (y * (t / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.65e+29) tmp = Float64(y + x); elseif (z <= 4e-78) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 9e+74) 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 (z <= -2.65e+29) tmp = y + x; elseif (z <= 4e-78) tmp = x + (y * (t / a)); elseif (z <= 9e+74) tmp = x - (y * (t / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.65e+29], N[(y + x), $MachinePrecision], If[LessEqual[z, 4e-78], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9e+74], N[(x - N[(y * N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.65 \cdot 10^{+29}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-78}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+74}:\\
\;\;\;\;x - y \cdot \frac{t}{z}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -2.65e29 or 8.9999999999999999e74 < z Initial program 69.0%
+-commutative69.0%
associate-*l/92.4%
fma-def92.3%
Simplified92.3%
Taylor expanded in z around inf 77.6%
+-commutative77.6%
Simplified77.6%
if -2.65e29 < z < 4e-78Initial program 94.2%
+-commutative94.2%
associate-*l/95.9%
fma-def95.9%
Simplified95.9%
Taylor expanded in z around 0 76.4%
+-commutative76.4%
associate-/l*77.9%
associate-/r/80.5%
Simplified80.5%
if 4e-78 < z < 8.9999999999999999e74Initial program 95.9%
+-commutative95.9%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 80.5%
+-commutative80.5%
associate-/l*80.6%
associate-/r/80.7%
Simplified80.7%
Taylor expanded in z around 0 78.7%
mul-1-neg78.7%
associate-/l*78.8%
Simplified78.8%
+-commutative78.8%
unsub-neg78.8%
associate-/r/78.8%
*-commutative78.8%
Applied egg-rr78.8%
Final simplification79.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6e+27)
(+ y x)
(if (<= z 3.8e-78)
(+ x (* y (/ t a)))
(if (<= z 3.2e+77) (- x (/ t (/ z y))) (+ y x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+27) {
tmp = y + x;
} else if (z <= 3.8e-78) {
tmp = x + (y * (t / a));
} else if (z <= 3.2e+77) {
tmp = x - (t / (z / y));
} 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 (z <= (-6d+27)) then
tmp = y + x
else if (z <= 3.8d-78) then
tmp = x + (y * (t / a))
else if (z <= 3.2d+77) then
tmp = x - (t / (z / y))
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 (z <= -6e+27) {
tmp = y + x;
} else if (z <= 3.8e-78) {
tmp = x + (y * (t / a));
} else if (z <= 3.2e+77) {
tmp = x - (t / (z / y));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e+27: tmp = y + x elif z <= 3.8e-78: tmp = x + (y * (t / a)) elif z <= 3.2e+77: tmp = x - (t / (z / y)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e+27) tmp = Float64(y + x); elseif (z <= 3.8e-78) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 3.2e+77) tmp = Float64(x - Float64(t / Float64(z / y))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6e+27) tmp = y + x; elseif (z <= 3.8e-78) tmp = x + (y * (t / a)); elseif (z <= 3.2e+77) tmp = x - (t / (z / y)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+27], N[(y + x), $MachinePrecision], If[LessEqual[z, 3.8e-78], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.2e+77], N[(x - N[(t / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+27}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-78}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{+77}:\\
\;\;\;\;x - \frac{t}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if z < -5.99999999999999953e27 or 3.2000000000000002e77 < z Initial program 69.0%
+-commutative69.0%
associate-*l/92.4%
fma-def92.3%
Simplified92.3%
Taylor expanded in z around inf 77.6%
+-commutative77.6%
Simplified77.6%
if -5.99999999999999953e27 < z < 3.7999999999999999e-78Initial program 94.2%
+-commutative94.2%
associate-*l/95.9%
fma-def95.9%
Simplified95.9%
Taylor expanded in z around 0 76.4%
+-commutative76.4%
associate-/l*77.9%
associate-/r/80.5%
Simplified80.5%
if 3.7999999999999999e-78 < z < 3.2000000000000002e77Initial program 95.9%
+-commutative95.9%
associate-*l/99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in a around 0 80.5%
+-commutative80.5%
associate-/l*80.6%
associate-/r/80.7%
Simplified80.7%
Taylor expanded in z around 0 78.7%
mul-1-neg78.7%
associate-/l*78.8%
Simplified78.8%
Final simplification79.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.3e-74) (not (<= z 3.1e-78))) (+ x (/ (- z t) (/ z y))) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.3e-74) || !(z <= 3.1e-78)) {
tmp = x + ((z - t) / (z / y));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.3d-74)) .or. (.not. (z <= 3.1d-78))) then
tmp = x + ((z - t) / (z / y))
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.3e-74) || !(z <= 3.1e-78)) {
tmp = x + ((z - t) / (z / y));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.3e-74) or not (z <= 3.1e-78): tmp = x + ((z - t) / (z / y)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.3e-74) || !(z <= 3.1e-78)) tmp = Float64(x + Float64(Float64(z - t) / Float64(z / y))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -3.3e-74) || ~((z <= 3.1e-78))) tmp = x + ((z - t) / (z / y)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.3e-74], N[Not[LessEqual[z, 3.1e-78]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] / N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{-74} \lor \neg \left(z \leq 3.1 \cdot 10^{-78}\right):\\
\;\;\;\;x + \frac{z - t}{\frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -3.29999999999999996e-74 or 3.10000000000000018e-78 < z Initial program 75.6%
*-commutative75.6%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in z around inf 78.8%
if -3.29999999999999996e-74 < z < 3.10000000000000018e-78Initial program 95.8%
+-commutative95.8%
associate-*l/94.9%
fma-def94.9%
Simplified94.9%
Taylor expanded in z around 0 84.1%
+-commutative84.1%
associate-/l*82.9%
associate-/r/86.2%
Simplified86.2%
Final simplification81.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -6.4e-71) (not (<= z 1.6e-78))) (+ x (* (- z t) (/ y z))) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.4e-71) || !(z <= 1.6e-78)) {
tmp = x + ((z - t) * (y / z));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-6.4d-71)) .or. (.not. (z <= 1.6d-78))) then
tmp = x + ((z - t) * (y / z))
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -6.4e-71) || !(z <= 1.6e-78)) {
tmp = x + ((z - t) * (y / z));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -6.4e-71) or not (z <= 1.6e-78): tmp = x + ((z - t) * (y / z)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -6.4e-71) || !(z <= 1.6e-78)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / z))); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -6.4e-71) || ~((z <= 1.6e-78))) tmp = x + ((z - t) * (y / z)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -6.4e-71], N[Not[LessEqual[z, 1.6e-78]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{-71} \lor \neg \left(z \leq 1.6 \cdot 10^{-78}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -6.3999999999999998e-71 or 1.6e-78 < z Initial program 75.6%
+-commutative75.6%
associate-*l/94.5%
fma-def94.5%
Simplified94.5%
Taylor expanded in a around 0 63.0%
+-commutative63.0%
associate-/l*82.6%
associate-/r/79.2%
Simplified79.2%
if -6.3999999999999998e-71 < z < 1.6e-78Initial program 95.8%
+-commutative95.8%
associate-*l/94.9%
fma-def94.9%
Simplified94.9%
Taylor expanded in z around 0 84.1%
+-commutative84.1%
associate-/l*82.9%
associate-/r/86.2%
Simplified86.2%
Final simplification81.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.1e-68) (not (<= z 1.35e-78))) (+ x (* (- z t) (/ y z))) (+ x (* (/ y a) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.1e-68) || !(z <= 1.35e-78)) {
tmp = x + ((z - t) * (y / z));
} else {
tmp = x + ((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 ((z <= (-2.1d-68)) .or. (.not. (z <= 1.35d-78))) then
tmp = x + ((z - t) * (y / z))
else
tmp = x + ((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 ((z <= -2.1e-68) || !(z <= 1.35e-78)) {
tmp = x + ((z - t) * (y / z));
} else {
tmp = x + ((y / a) * (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.1e-68) or not (z <= 1.35e-78): tmp = x + ((z - t) * (y / z)) else: tmp = x + ((y / a) * (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.1e-68) || !(z <= 1.35e-78)) tmp = Float64(x + Float64(Float64(z - t) * Float64(y / z))); else tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.1e-68) || ~((z <= 1.35e-78))) tmp = x + ((z - t) * (y / z)); else tmp = x + ((y / a) * (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.1e-68], N[Not[LessEqual[z, 1.35e-78]], $MachinePrecision]], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{-68} \lor \neg \left(z \leq 1.35 \cdot 10^{-78}\right):\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if z < -2.10000000000000008e-68 or 1.34999999999999997e-78 < z Initial program 75.6%
+-commutative75.6%
associate-*l/94.5%
fma-def94.5%
Simplified94.5%
Taylor expanded in a around 0 63.0%
+-commutative63.0%
associate-/l*82.6%
associate-/r/79.2%
Simplified79.2%
if -2.10000000000000008e-68 < z < 1.34999999999999997e-78Initial program 95.8%
+-commutative95.8%
associate-*l/94.9%
fma-def94.9%
Simplified94.9%
Taylor expanded in a around inf 88.3%
mul-1-neg88.3%
unsub-neg88.3%
associate-/l*89.2%
associate-/r/87.4%
Simplified87.4%
Final simplification82.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ y (- z a))))
(if (or (<= t -8.6e-38) (not (<= t 5.5e+49)))
(- x (* t t_1))
(+ x (* z t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y / (z - a);
double tmp;
if ((t <= -8.6e-38) || !(t <= 5.5e+49)) {
tmp = x - (t * t_1);
} else {
tmp = x + (z * 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 / (z - a)
if ((t <= (-8.6d-38)) .or. (.not. (t <= 5.5d+49))) then
tmp = x - (t * t_1)
else
tmp = x + (z * 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 / (z - a);
double tmp;
if ((t <= -8.6e-38) || !(t <= 5.5e+49)) {
tmp = x - (t * t_1);
} else {
tmp = x + (z * t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y / (z - a) tmp = 0 if (t <= -8.6e-38) or not (t <= 5.5e+49): tmp = x - (t * t_1) else: tmp = x + (z * t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(y / Float64(z - a)) tmp = 0.0 if ((t <= -8.6e-38) || !(t <= 5.5e+49)) tmp = Float64(x - Float64(t * t_1)); else tmp = Float64(x + Float64(z * t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y / (z - a); tmp = 0.0; if ((t <= -8.6e-38) || ~((t <= 5.5e+49))) tmp = x - (t * t_1); else tmp = x + (z * t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t, -8.6e-38], N[Not[LessEqual[t, 5.5e+49]], $MachinePrecision]], N[(x - N[(t * t$95$1), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{z - a}\\
\mathbf{if}\;t \leq -8.6 \cdot 10^{-38} \lor \neg \left(t \leq 5.5 \cdot 10^{+49}\right):\\
\;\;\;\;x - t \cdot t_1\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot t_1\\
\end{array}
\end{array}
if t < -8.6000000000000004e-38 or 5.50000000000000042e49 < t Initial program 81.6%
Taylor expanded in z around 0 78.6%
mul-1-neg78.6%
distribute-lft-neg-out78.6%
*-commutative78.6%
Simplified78.6%
div-inv78.6%
add-sqr-sqrt34.0%
sqrt-unprod31.8%
sqr-neg31.8%
sqrt-unprod21.6%
add-sqr-sqrt35.6%
distribute-rgt-neg-in35.6%
cancel-sign-sub-inv35.6%
div-inv35.6%
associate-/l*37.2%
associate-/r/37.2%
add-sqr-sqrt23.2%
sqrt-unprod33.7%
sqr-neg33.7%
sqrt-unprod36.5%
add-sqr-sqrt85.9%
Applied egg-rr85.9%
if -8.6000000000000004e-38 < t < 5.50000000000000042e49Initial program 83.7%
+-commutative83.7%
associate-*l/93.7%
fma-def93.7%
Simplified93.7%
Taylor expanded in t around 0 78.9%
+-commutative78.9%
associate-*l/90.9%
*-commutative90.9%
Simplified90.9%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -7e+98) (not (<= y 6.2e+181))) (* y (- 1.0 (/ t z))) (+ y x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7e+98) || !(y <= 6.2e+181)) {
tmp = y * (1.0 - (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 ((y <= (-7d+98)) .or. (.not. (y <= 6.2d+181))) then
tmp = y * (1.0d0 - (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 ((y <= -7e+98) || !(y <= 6.2e+181)) {
tmp = y * (1.0 - (t / z));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -7e+98) or not (y <= 6.2e+181): tmp = y * (1.0 - (t / z)) else: tmp = y + x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -7e+98) || !(y <= 6.2e+181)) tmp = Float64(y * Float64(1.0 - 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 ((y <= -7e+98) || ~((y <= 6.2e+181))) tmp = y * (1.0 - (t / z)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -7e+98], N[Not[LessEqual[y, 6.2e+181]], $MachinePrecision]], N[(y * N[(1.0 - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{+98} \lor \neg \left(y \leq 6.2 \cdot 10^{+181}\right):\\
\;\;\;\;y \cdot \left(1 - \frac{t}{z}\right)\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if y < -7e98 or 6.19999999999999978e181 < y Initial program 53.9%
+-commutative53.9%
associate-*l/98.5%
fma-def98.5%
Simplified98.5%
Taylor expanded in a around 0 36.3%
+-commutative36.3%
associate-/l*73.5%
associate-/r/71.1%
Simplified71.1%
Taylor expanded in y around inf 66.5%
if -7e98 < y < 6.19999999999999978e181Initial program 93.3%
+-commutative93.3%
associate-*l/93.3%
fma-def93.3%
Simplified93.3%
Taylor expanded in z around inf 65.2%
+-commutative65.2%
Simplified65.2%
Final simplification65.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.8e-58) (not (<= z 1.65e+76))) (+ y x) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.8e-58) || !(z <= 1.65e+76)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.8d-58)) .or. (.not. (z <= 1.65d+76))) then
tmp = y + x
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.8e-58) || !(z <= 1.65e+76)) {
tmp = y + x;
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.8e-58) or not (z <= 1.65e+76): tmp = y + x else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.8e-58) || !(z <= 1.65e+76)) tmp = Float64(y + x); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.8e-58) || ~((z <= 1.65e+76))) tmp = y + x; else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.8e-58], N[Not[LessEqual[z, 1.65e+76]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{-58} \lor \neg \left(z \leq 1.65 \cdot 10^{+76}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -4.8000000000000001e-58 or 1.65e76 < z Initial program 71.8%
+-commutative71.8%
associate-*l/93.5%
fma-def93.5%
Simplified93.5%
Taylor expanded in z around inf 73.8%
+-commutative73.8%
Simplified73.8%
if -4.8000000000000001e-58 < z < 1.65e76Initial program 95.9%
Taylor expanded in z around 0 77.6%
Final simplification75.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.4e+29) (not (<= z 1.3e+77))) (+ y x) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.4e+29) || !(z <= 1.3e+77)) {
tmp = y + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.4d+29)) .or. (.not. (z <= 1.3d+77))) then
tmp = y + x
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.4e+29) || !(z <= 1.3e+77)) {
tmp = y + x;
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.4e+29) or not (z <= 1.3e+77): tmp = y + x else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.4e+29) || !(z <= 1.3e+77)) tmp = Float64(y + x); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.4e+29) || ~((z <= 1.3e+77))) tmp = y + x; else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.4e+29], N[Not[LessEqual[z, 1.3e+77]], $MachinePrecision]], N[(y + x), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+29} \lor \neg \left(z \leq 1.3 \cdot 10^{+77}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -4.4000000000000003e29 or 1.3000000000000001e77 < z Initial program 69.0%
+-commutative69.0%
associate-*l/92.4%
fma-def92.3%
Simplified92.3%
Taylor expanded in z around inf 77.6%
+-commutative77.6%
Simplified77.6%
if -4.4000000000000003e29 < z < 1.3000000000000001e77Initial program 94.5%
+-commutative94.5%
associate-*l/96.7%
fma-def96.7%
Simplified96.7%
Taylor expanded in z around 0 72.9%
+-commutative72.9%
associate-/l*74.9%
associate-/r/77.0%
Simplified77.0%
Final simplification77.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7e-104) (not (<= z 1.9e+24))) (+ y x) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7e-104) || !(z <= 1.9e+24)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-7d-104)) .or. (.not. (z <= 1.9d+24))) then
tmp = y + x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7e-104) || !(z <= 1.9e+24)) {
tmp = y + x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7e-104) or not (z <= 1.9e+24): tmp = y + x else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7e-104) || !(z <= 1.9e+24)) tmp = Float64(y + x); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7e-104) || ~((z <= 1.9e+24))) tmp = y + x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7e-104], N[Not[LessEqual[z, 1.9e+24]], $MachinePrecision]], N[(y + x), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-104} \lor \neg \left(z \leq 1.9 \cdot 10^{+24}\right):\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -7.00000000000000057e-104 or 1.90000000000000008e24 < z Initial program 74.7%
+-commutative74.7%
associate-*l/93.6%
fma-def93.6%
Simplified93.6%
Taylor expanded in z around inf 71.8%
+-commutative71.8%
Simplified71.8%
if -7.00000000000000057e-104 < z < 1.90000000000000008e24Initial program 95.3%
+-commutative95.3%
associate-*l/96.3%
fma-def96.3%
Simplified96.3%
Taylor expanded in y around 0 54.8%
Final simplification65.1%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 82.7%
+-commutative82.7%
associate-*l/94.7%
fma-def94.7%
Simplified94.7%
Taylor expanded in y around 0 47.6%
Final simplification47.6%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ (- z a) (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - 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 - a) / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / ((z - a) / (z - t)));
}
def code(x, y, z, t, a): return x + (y / ((z - a) / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(Float64(z - a) / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / ((z - a) / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(N[(z - a), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{z - a}{z - t}}
\end{array}
herbie shell --seed 2023333
(FPCore (x y z t a)
:name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisTicks from plot-0.2.3.4, A"
:precision binary64
:herbie-target
(+ x (/ y (/ (- z a) (- z t))))
(+ x (/ (* y (- z t)) (- z a))))