
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / 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)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / 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)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (/ (- z t) (/ a y))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) / (a / y));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((z - t) / (a / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) / (a / y));
}
def code(x, y, z, t, a): return x + ((z - t) / (a / y))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) / Float64(a / y))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) / (a / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{z - t}{\frac{a}{y}}
\end{array}
Initial program 92.9%
associate-*l/96.5%
Simplified96.5%
*-commutative96.5%
clear-num96.5%
un-div-inv96.9%
Applied egg-rr96.9%
Final simplification96.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* z y) a))))
(if (<= t -1.2e+133)
(/ (- y) (/ a t))
(if (<= t 4.2e+108)
t_1
(if (<= t 2.95e+209)
(* (/ t a) (- y))
(if (<= t 6.2e+242) t_1 (/ (* t (- y)) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z * y) / a);
double tmp;
if (t <= -1.2e+133) {
tmp = -y / (a / t);
} else if (t <= 4.2e+108) {
tmp = t_1;
} else if (t <= 2.95e+209) {
tmp = (t / a) * -y;
} else if (t <= 6.2e+242) {
tmp = t_1;
} else {
tmp = (t * -y) / 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) :: t_1
real(8) :: tmp
t_1 = x + ((z * y) / a)
if (t <= (-1.2d+133)) then
tmp = -y / (a / t)
else if (t <= 4.2d+108) then
tmp = t_1
else if (t <= 2.95d+209) then
tmp = (t / a) * -y
else if (t <= 6.2d+242) then
tmp = t_1
else
tmp = (t * -y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((z * y) / a);
double tmp;
if (t <= -1.2e+133) {
tmp = -y / (a / t);
} else if (t <= 4.2e+108) {
tmp = t_1;
} else if (t <= 2.95e+209) {
tmp = (t / a) * -y;
} else if (t <= 6.2e+242) {
tmp = t_1;
} else {
tmp = (t * -y) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((z * y) / a) tmp = 0 if t <= -1.2e+133: tmp = -y / (a / t) elif t <= 4.2e+108: tmp = t_1 elif t <= 2.95e+209: tmp = (t / a) * -y elif t <= 6.2e+242: tmp = t_1 else: tmp = (t * -y) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(z * y) / a)) tmp = 0.0 if (t <= -1.2e+133) tmp = Float64(Float64(-y) / Float64(a / t)); elseif (t <= 4.2e+108) tmp = t_1; elseif (t <= 2.95e+209) tmp = Float64(Float64(t / a) * Float64(-y)); elseif (t <= 6.2e+242) tmp = t_1; else tmp = Float64(Float64(t * Float64(-y)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((z * y) / a); tmp = 0.0; if (t <= -1.2e+133) tmp = -y / (a / t); elseif (t <= 4.2e+108) tmp = t_1; elseif (t <= 2.95e+209) tmp = (t / a) * -y; elseif (t <= 6.2e+242) tmp = t_1; else tmp = (t * -y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.2e+133], N[((-y) / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e+108], t$95$1, If[LessEqual[t, 2.95e+209], N[(N[(t / a), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[t, 6.2e+242], t$95$1, N[(N[(t * (-y)), $MachinePrecision] / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{z \cdot y}{a}\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{+133}:\\
\;\;\;\;\frac{-y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{+108}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{+209}:\\
\;\;\;\;\frac{t}{a} \cdot \left(-y\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{+242}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \left(-y\right)}{a}\\
\end{array}
\end{array}
if t < -1.1999999999999999e133Initial program 84.9%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in z around 0 84.9%
mul-1-neg84.9%
unsub-neg84.9%
associate-*r/94.9%
Simplified94.9%
add-sqr-sqrt0.0%
sqrt-unprod5.5%
sqr-neg5.5%
sqrt-unprod20.3%
add-sqr-sqrt20.3%
div-inv20.3%
associate-*r*17.5%
*-commutative17.5%
div-inv17.5%
associate-/l*20.2%
add-sqr-sqrt20.2%
sqrt-unprod5.8%
sqr-neg5.8%
sqrt-unprod0.0%
add-sqr-sqrt94.9%
Applied egg-rr94.9%
Taylor expanded in x around 0 66.9%
mul-1-neg66.9%
associate-*l/74.5%
distribute-rgt-neg-in74.5%
Simplified74.5%
distribute-rgt-neg-out74.5%
clear-num74.4%
associate-*l/74.5%
*-un-lft-identity74.5%
Applied egg-rr74.5%
if -1.1999999999999999e133 < t < 4.20000000000000019e108 or 2.9499999999999999e209 < t < 6.2000000000000002e242Initial program 94.7%
associate-*l/96.7%
Simplified96.7%
Taylor expanded in z around inf 79.2%
if 4.20000000000000019e108 < t < 2.9499999999999999e209Initial program 91.6%
associate-*l/95.7%
Simplified95.7%
Taylor expanded in z around 0 91.6%
mul-1-neg91.6%
unsub-neg91.6%
associate-*r/95.7%
Simplified95.7%
add-sqr-sqrt95.5%
sqrt-unprod57.8%
sqr-neg57.8%
sqrt-unprod0.0%
add-sqr-sqrt31.0%
div-inv31.0%
associate-*r*30.9%
*-commutative30.9%
div-inv30.9%
associate-/l*30.9%
add-sqr-sqrt0.0%
sqrt-unprod58.1%
sqr-neg58.1%
sqrt-unprod95.7%
add-sqr-sqrt95.9%
Applied egg-rr95.9%
Taylor expanded in x around 0 62.0%
mul-1-neg62.0%
associate-*l/66.5%
distribute-rgt-neg-in66.5%
Simplified66.5%
if 6.2000000000000002e242 < t Initial program 93.1%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in y around inf 79.6%
Taylor expanded in a around 0 86.0%
Taylor expanded in z around 0 86.0%
mul-1-neg86.0%
distribute-lft-neg-out86.0%
*-commutative86.0%
Simplified86.0%
Final simplification77.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* z (/ y a)))))
(if (<= t -1.2e+133)
(/ (- y) (/ a t))
(if (<= t 4.5e+108)
t_1
(if (<= t 4.1e+139)
(* (/ t a) (- y))
(if (<= t 7.8e+242) t_1 (/ (* t (- y)) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double tmp;
if (t <= -1.2e+133) {
tmp = -y / (a / t);
} else if (t <= 4.5e+108) {
tmp = t_1;
} else if (t <= 4.1e+139) {
tmp = (t / a) * -y;
} else if (t <= 7.8e+242) {
tmp = t_1;
} else {
tmp = (t * -y) / 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) :: t_1
real(8) :: tmp
t_1 = x + (z * (y / a))
if (t <= (-1.2d+133)) then
tmp = -y / (a / t)
else if (t <= 4.5d+108) then
tmp = t_1
else if (t <= 4.1d+139) then
tmp = (t / a) * -y
else if (t <= 7.8d+242) then
tmp = t_1
else
tmp = (t * -y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (z * (y / a));
double tmp;
if (t <= -1.2e+133) {
tmp = -y / (a / t);
} else if (t <= 4.5e+108) {
tmp = t_1;
} else if (t <= 4.1e+139) {
tmp = (t / a) * -y;
} else if (t <= 7.8e+242) {
tmp = t_1;
} else {
tmp = (t * -y) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (z * (y / a)) tmp = 0 if t <= -1.2e+133: tmp = -y / (a / t) elif t <= 4.5e+108: tmp = t_1 elif t <= 4.1e+139: tmp = (t / a) * -y elif t <= 7.8e+242: tmp = t_1 else: tmp = (t * -y) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(z * Float64(y / a))) tmp = 0.0 if (t <= -1.2e+133) tmp = Float64(Float64(-y) / Float64(a / t)); elseif (t <= 4.5e+108) tmp = t_1; elseif (t <= 4.1e+139) tmp = Float64(Float64(t / a) * Float64(-y)); elseif (t <= 7.8e+242) tmp = t_1; else tmp = Float64(Float64(t * Float64(-y)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (z * (y / a)); tmp = 0.0; if (t <= -1.2e+133) tmp = -y / (a / t); elseif (t <= 4.5e+108) tmp = t_1; elseif (t <= 4.1e+139) tmp = (t / a) * -y; elseif (t <= 7.8e+242) tmp = t_1; else tmp = (t * -y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.2e+133], N[((-y) / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+108], t$95$1, If[LessEqual[t, 4.1e+139], N[(N[(t / a), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[t, 7.8e+242], t$95$1, N[(N[(t * (-y)), $MachinePrecision] / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{+133}:\\
\;\;\;\;\frac{-y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+108}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{+139}:\\
\;\;\;\;\frac{t}{a} \cdot \left(-y\right)\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+242}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \left(-y\right)}{a}\\
\end{array}
\end{array}
if t < -1.1999999999999999e133Initial program 84.9%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in z around 0 84.9%
mul-1-neg84.9%
unsub-neg84.9%
associate-*r/94.9%
Simplified94.9%
add-sqr-sqrt0.0%
sqrt-unprod5.5%
sqr-neg5.5%
sqrt-unprod20.3%
add-sqr-sqrt20.3%
div-inv20.3%
associate-*r*17.5%
*-commutative17.5%
div-inv17.5%
associate-/l*20.2%
add-sqr-sqrt20.2%
sqrt-unprod5.8%
sqr-neg5.8%
sqrt-unprod0.0%
add-sqr-sqrt94.9%
Applied egg-rr94.9%
Taylor expanded in x around 0 66.9%
mul-1-neg66.9%
associate-*l/74.5%
distribute-rgt-neg-in74.5%
Simplified74.5%
distribute-rgt-neg-out74.5%
clear-num74.4%
associate-*l/74.5%
*-un-lft-identity74.5%
Applied egg-rr74.5%
if -1.1999999999999999e133 < t < 4.5e108 or 4.1000000000000002e139 < t < 7.8000000000000003e242Initial program 95.0%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in t around 0 77.1%
+-commutative77.1%
associate-*l/80.6%
*-commutative80.6%
Simplified80.6%
if 4.5e108 < t < 4.1000000000000002e139Initial program 82.7%
associate-*l/99.6%
Simplified99.6%
Taylor expanded in z around 0 82.7%
mul-1-neg82.7%
unsub-neg82.7%
associate-*r/99.6%
Simplified99.6%
add-sqr-sqrt99.6%
sqrt-unprod99.6%
sqr-neg99.6%
sqrt-unprod0.0%
add-sqr-sqrt18.5%
div-inv18.5%
associate-*r*18.4%
*-commutative18.4%
div-inv18.4%
associate-/l*18.5%
add-sqr-sqrt0.0%
sqrt-unprod99.9%
sqr-neg99.9%
sqrt-unprod99.7%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 65.0%
mul-1-neg65.0%
associate-*l/82.3%
distribute-rgt-neg-in82.3%
Simplified82.3%
if 7.8000000000000003e242 < t Initial program 93.1%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in y around inf 79.6%
Taylor expanded in a around 0 86.0%
Taylor expanded in z around 0 86.0%
mul-1-neg86.0%
distribute-lft-neg-out86.0%
*-commutative86.0%
Simplified86.0%
Final simplification80.1%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.5e+133)
(/ (- y) (/ a t))
(if (<= t 4.5e+108)
(+ x (/ z (/ a y)))
(if (<= t 2.8e+140)
(* (/ t a) (- y))
(if (<= t 4.1e+244) (+ x (* z (/ y a))) (/ (* t (- y)) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.5e+133) {
tmp = -y / (a / t);
} else if (t <= 4.5e+108) {
tmp = x + (z / (a / y));
} else if (t <= 2.8e+140) {
tmp = (t / a) * -y;
} else if (t <= 4.1e+244) {
tmp = x + (z * (y / a));
} else {
tmp = (t * -y) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.5d+133)) then
tmp = -y / (a / t)
else if (t <= 4.5d+108) then
tmp = x + (z / (a / y))
else if (t <= 2.8d+140) then
tmp = (t / a) * -y
else if (t <= 4.1d+244) then
tmp = x + (z * (y / a))
else
tmp = (t * -y) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.5e+133) {
tmp = -y / (a / t);
} else if (t <= 4.5e+108) {
tmp = x + (z / (a / y));
} else if (t <= 2.8e+140) {
tmp = (t / a) * -y;
} else if (t <= 4.1e+244) {
tmp = x + (z * (y / a));
} else {
tmp = (t * -y) / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.5e+133: tmp = -y / (a / t) elif t <= 4.5e+108: tmp = x + (z / (a / y)) elif t <= 2.8e+140: tmp = (t / a) * -y elif t <= 4.1e+244: tmp = x + (z * (y / a)) else: tmp = (t * -y) / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.5e+133) tmp = Float64(Float64(-y) / Float64(a / t)); elseif (t <= 4.5e+108) tmp = Float64(x + Float64(z / Float64(a / y))); elseif (t <= 2.8e+140) tmp = Float64(Float64(t / a) * Float64(-y)); elseif (t <= 4.1e+244) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(Float64(t * Float64(-y)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.5e+133) tmp = -y / (a / t); elseif (t <= 4.5e+108) tmp = x + (z / (a / y)); elseif (t <= 2.8e+140) tmp = (t / a) * -y; elseif (t <= 4.1e+244) tmp = x + (z * (y / a)); else tmp = (t * -y) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.5e+133], N[((-y) / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.5e+108], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+140], N[(N[(t / a), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[t, 4.1e+244], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t * (-y)), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+133}:\\
\;\;\;\;\frac{-y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+108}:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+140}:\\
\;\;\;\;\frac{t}{a} \cdot \left(-y\right)\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{+244}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot \left(-y\right)}{a}\\
\end{array}
\end{array}
if t < -1.50000000000000003e133Initial program 84.9%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in z around 0 84.9%
mul-1-neg84.9%
unsub-neg84.9%
associate-*r/94.9%
Simplified94.9%
add-sqr-sqrt0.0%
sqrt-unprod5.5%
sqr-neg5.5%
sqrt-unprod20.3%
add-sqr-sqrt20.3%
div-inv20.3%
associate-*r*17.5%
*-commutative17.5%
div-inv17.5%
associate-/l*20.2%
add-sqr-sqrt20.2%
sqrt-unprod5.8%
sqr-neg5.8%
sqrt-unprod0.0%
add-sqr-sqrt94.9%
Applied egg-rr94.9%
Taylor expanded in x around 0 66.9%
mul-1-neg66.9%
associate-*l/74.5%
distribute-rgt-neg-in74.5%
Simplified74.5%
distribute-rgt-neg-out74.5%
clear-num74.4%
associate-*l/74.5%
*-un-lft-identity74.5%
Applied egg-rr74.5%
if -1.50000000000000003e133 < t < 4.5e108Initial program 95.1%
associate-*l/96.6%
Simplified96.6%
Taylor expanded in t around 0 79.1%
+-commutative79.1%
associate-*l/82.4%
*-commutative82.4%
Simplified82.4%
clear-num82.4%
div-inv82.9%
Applied egg-rr82.9%
if 4.5e108 < t < 2.79999999999999983e140Initial program 82.7%
associate-*l/99.6%
Simplified99.6%
Taylor expanded in z around 0 82.7%
mul-1-neg82.7%
unsub-neg82.7%
associate-*r/99.6%
Simplified99.6%
add-sqr-sqrt99.6%
sqrt-unprod99.6%
sqr-neg99.6%
sqrt-unprod0.0%
add-sqr-sqrt18.5%
div-inv18.5%
associate-*r*18.4%
*-commutative18.4%
div-inv18.4%
associate-/l*18.5%
add-sqr-sqrt0.0%
sqrt-unprod99.9%
sqr-neg99.9%
sqrt-unprod99.7%
add-sqr-sqrt99.9%
Applied egg-rr99.9%
Taylor expanded in x around 0 65.0%
mul-1-neg65.0%
associate-*l/82.3%
distribute-rgt-neg-in82.3%
Simplified82.3%
if 2.79999999999999983e140 < t < 4.09999999999999993e244Initial program 94.4%
associate-*l/94.7%
Simplified94.7%
Taylor expanded in t around 0 57.7%
+-commutative57.7%
associate-*l/63.0%
*-commutative63.0%
Simplified63.0%
if 4.09999999999999993e244 < t Initial program 93.1%
associate-*l/92.9%
Simplified92.9%
Taylor expanded in y around inf 79.6%
Taylor expanded in a around 0 86.0%
Taylor expanded in z around 0 86.0%
mul-1-neg86.0%
distribute-lft-neg-out86.0%
*-commutative86.0%
Simplified86.0%
Final simplification80.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ z (/ a y))))
(if (<= y -1.22e+51)
t_1
(if (<= y 7.2e-60) x (if (<= y 6.2e+85) t_1 (/ (- y) (/ a t)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z / (a / y);
double tmp;
if (y <= -1.22e+51) {
tmp = t_1;
} else if (y <= 7.2e-60) {
tmp = x;
} else if (y <= 6.2e+85) {
tmp = t_1;
} else {
tmp = -y / (a / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = z / (a / y)
if (y <= (-1.22d+51)) then
tmp = t_1
else if (y <= 7.2d-60) then
tmp = x
else if (y <= 6.2d+85) then
tmp = t_1
else
tmp = -y / (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 = z / (a / y);
double tmp;
if (y <= -1.22e+51) {
tmp = t_1;
} else if (y <= 7.2e-60) {
tmp = x;
} else if (y <= 6.2e+85) {
tmp = t_1;
} else {
tmp = -y / (a / t);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z / (a / y) tmp = 0 if y <= -1.22e+51: tmp = t_1 elif y <= 7.2e-60: tmp = x elif y <= 6.2e+85: tmp = t_1 else: tmp = -y / (a / t) return tmp
function code(x, y, z, t, a) t_1 = Float64(z / Float64(a / y)) tmp = 0.0 if (y <= -1.22e+51) tmp = t_1; elseif (y <= 7.2e-60) tmp = x; elseif (y <= 6.2e+85) tmp = t_1; else tmp = Float64(Float64(-y) / Float64(a / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z / (a / y); tmp = 0.0; if (y <= -1.22e+51) tmp = t_1; elseif (y <= 7.2e-60) tmp = x; elseif (y <= 6.2e+85) tmp = t_1; else tmp = -y / (a / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.22e+51], t$95$1, If[LessEqual[y, 7.2e-60], x, If[LessEqual[y, 6.2e+85], t$95$1, N[((-y) / N[(a / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{\frac{a}{y}}\\
\mathbf{if}\;y \leq -1.22 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-60}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+85}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{-y}{\frac{a}{t}}\\
\end{array}
\end{array}
if y < -1.22000000000000005e51 or 7.2e-60 < y < 6.20000000000000023e85Initial program 93.1%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in y around inf 73.4%
Taylor expanded in z around inf 49.1%
Taylor expanded in y around 0 47.9%
*-commutative47.9%
associate-/l*51.4%
Simplified51.4%
if -1.22000000000000005e51 < y < 7.2e-60Initial program 98.4%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in x around inf 56.2%
if 6.20000000000000023e85 < y Initial program 79.7%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in z around 0 65.9%
mul-1-neg65.9%
unsub-neg65.9%
associate-*r/76.9%
Simplified76.9%
add-sqr-sqrt31.3%
sqrt-unprod35.7%
sqr-neg35.7%
sqrt-unprod8.4%
add-sqr-sqrt14.5%
div-inv14.5%
associate-*r*12.5%
*-commutative12.5%
div-inv12.5%
associate-/l*14.5%
add-sqr-sqrt8.3%
sqrt-unprod35.8%
sqr-neg35.8%
sqrt-unprod29.5%
add-sqr-sqrt76.9%
Applied egg-rr76.9%
Taylor expanded in x around 0 56.4%
mul-1-neg56.4%
associate-*l/65.5%
distribute-rgt-neg-in65.5%
Simplified65.5%
distribute-rgt-neg-out65.5%
clear-num65.5%
associate-*l/65.5%
*-un-lft-identity65.5%
Applied egg-rr65.5%
Final simplification56.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ z (/ a y))))
(if (<= y -1.15e+51)
t_1
(if (<= y 1.1e-59) x (if (<= y 9.5e+57) t_1 (* t (/ y (- a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z / (a / y);
double tmp;
if (y <= -1.15e+51) {
tmp = t_1;
} else if (y <= 1.1e-59) {
tmp = x;
} else if (y <= 9.5e+57) {
tmp = t_1;
} else {
tmp = t * (y / -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) :: t_1
real(8) :: tmp
t_1 = z / (a / y)
if (y <= (-1.15d+51)) then
tmp = t_1
else if (y <= 1.1d-59) then
tmp = x
else if (y <= 9.5d+57) then
tmp = t_1
else
tmp = t * (y / -a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = z / (a / y);
double tmp;
if (y <= -1.15e+51) {
tmp = t_1;
} else if (y <= 1.1e-59) {
tmp = x;
} else if (y <= 9.5e+57) {
tmp = t_1;
} else {
tmp = t * (y / -a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z / (a / y) tmp = 0 if y <= -1.15e+51: tmp = t_1 elif y <= 1.1e-59: tmp = x elif y <= 9.5e+57: tmp = t_1 else: tmp = t * (y / -a) return tmp
function code(x, y, z, t, a) t_1 = Float64(z / Float64(a / y)) tmp = 0.0 if (y <= -1.15e+51) tmp = t_1; elseif (y <= 1.1e-59) tmp = x; elseif (y <= 9.5e+57) tmp = t_1; else tmp = Float64(t * Float64(y / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z / (a / y); tmp = 0.0; if (y <= -1.15e+51) tmp = t_1; elseif (y <= 1.1e-59) tmp = x; elseif (y <= 9.5e+57) tmp = t_1; else tmp = t * (y / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.15e+51], t$95$1, If[LessEqual[y, 1.1e-59], x, If[LessEqual[y, 9.5e+57], t$95$1, N[(t * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{\frac{a}{y}}\\
\mathbf{if}\;y \leq -1.15 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-59}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+57}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{-a}\\
\end{array}
\end{array}
if y < -1.15000000000000003e51 or 1.0999999999999999e-59 < y < 9.4999999999999997e57Initial program 93.7%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in y around inf 74.1%
Taylor expanded in z around inf 49.5%
Taylor expanded in y around 0 49.4%
*-commutative49.4%
associate-/l*51.9%
Simplified51.9%
if -1.15000000000000003e51 < y < 1.0999999999999999e-59Initial program 98.4%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in x around inf 56.2%
if 9.4999999999999997e57 < y Initial program 80.5%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in z around 0 66.6%
mul-1-neg66.6%
unsub-neg66.6%
associate-*r/76.2%
Simplified76.2%
add-sqr-sqrt30.9%
sqrt-unprod36.6%
sqr-neg36.6%
sqrt-unprod9.1%
add-sqr-sqrt14.6%
div-inv14.6%
associate-*r*12.9%
*-commutative12.9%
div-inv12.9%
associate-/l*14.7%
add-sqr-sqrt9.1%
sqrt-unprod35.1%
sqr-neg35.1%
sqrt-unprod27.8%
add-sqr-sqrt74.6%
Applied egg-rr74.6%
Taylor expanded in x around 0 55.4%
mul-1-neg55.4%
associate-*l/62.2%
distribute-rgt-neg-in62.2%
Simplified62.2%
Taylor expanded in t around 0 55.4%
associate-*r/55.4%
*-commutative55.4%
neg-mul-155.4%
distribute-rgt-neg-out55.4%
associate-/l*61.7%
*-lft-identity61.7%
neg-mul-161.7%
times-frac61.7%
metadata-eval61.7%
neg-mul-161.7%
distribute-frac-neg61.7%
associate-/r/63.4%
*-commutative63.4%
Simplified63.4%
Final simplification56.5%
(FPCore (x y z t a) :precision binary64 (if (<= z -880000000000.0) (+ x (/ z (/ a y))) (if (<= z 6.2e-29) (- x (* t (/ y a))) (+ x (* z (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -880000000000.0) {
tmp = x + (z / (a / y));
} else if (z <= 6.2e-29) {
tmp = x - (t * (y / a));
} else {
tmp = x + (z * (y / 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 <= (-880000000000.0d0)) then
tmp = x + (z / (a / y))
else if (z <= 6.2d-29) then
tmp = x - (t * (y / a))
else
tmp = x + (z * (y / 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 <= -880000000000.0) {
tmp = x + (z / (a / y));
} else if (z <= 6.2e-29) {
tmp = x - (t * (y / a));
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -880000000000.0: tmp = x + (z / (a / y)) elif z <= 6.2e-29: tmp = x - (t * (y / a)) else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -880000000000.0) tmp = Float64(x + Float64(z / Float64(a / y))); elseif (z <= 6.2e-29) tmp = Float64(x - Float64(t * Float64(y / a))); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -880000000000.0) tmp = x + (z / (a / y)); elseif (z <= 6.2e-29) tmp = x - (t * (y / a)); else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -880000000000.0], N[(x + N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e-29], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -880000000000:\\
\;\;\;\;x + \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-29}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -8.8e11Initial program 94.3%
associate-*l/94.1%
Simplified94.1%
Taylor expanded in t around 0 83.0%
+-commutative83.0%
associate-*l/84.3%
*-commutative84.3%
Simplified84.3%
clear-num84.3%
div-inv84.4%
Applied egg-rr84.4%
if -8.8e11 < z < 6.20000000000000052e-29Initial program 95.5%
associate-*l/95.3%
Simplified95.3%
Taylor expanded in z around 0 90.9%
mul-1-neg90.9%
unsub-neg90.9%
associate-*r/91.6%
Simplified91.6%
if 6.20000000000000052e-29 < z Initial program 88.7%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in t around 0 77.6%
+-commutative77.6%
associate-*l/84.3%
*-commutative84.3%
Simplified84.3%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.4e-73) x (if (<= a 2.1e+82) (* y (/ z a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.4e-73) {
tmp = x;
} else if (a <= 2.1e+82) {
tmp = y * (z / a);
} 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 (a <= (-1.4d-73)) then
tmp = x
else if (a <= 2.1d+82) then
tmp = y * (z / a)
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 (a <= -1.4e-73) {
tmp = x;
} else if (a <= 2.1e+82) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.4e-73: tmp = x elif a <= 2.1e+82: tmp = y * (z / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.4e-73) tmp = x; elseif (a <= 2.1e+82) tmp = Float64(y * Float64(z / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.4e-73) tmp = x; elseif (a <= 2.1e+82) tmp = y * (z / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.4e-73], x, If[LessEqual[a, 2.1e+82], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.4 \cdot 10^{-73}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{+82}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.40000000000000006e-73 or 2.1e82 < a Initial program 87.3%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in x around inf 56.7%
if -1.40000000000000006e-73 < a < 2.1e82Initial program 99.2%
associate-*l/96.7%
Simplified96.7%
Taylor expanded in y around inf 77.4%
Taylor expanded in z around inf 48.5%
Final simplification52.8%
(FPCore (x y z t a) :precision binary64 (if (<= a -3.9e-69) x (if (<= a 7.8e+81) (/ y (/ a z)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.9e-69) {
tmp = x;
} else if (a <= 7.8e+81) {
tmp = y / (a / z);
} 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 (a <= (-3.9d-69)) then
tmp = x
else if (a <= 7.8d+81) then
tmp = y / (a / z)
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 (a <= -3.9e-69) {
tmp = x;
} else if (a <= 7.8e+81) {
tmp = y / (a / z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.9e-69: tmp = x elif a <= 7.8e+81: tmp = y / (a / z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.9e-69) tmp = x; elseif (a <= 7.8e+81) tmp = Float64(y / Float64(a / z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.9e-69) tmp = x; elseif (a <= 7.8e+81) tmp = y / (a / z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.9e-69], x, If[LessEqual[a, 7.8e+81], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.9 \cdot 10^{-69}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{+81}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.89999999999999981e-69 or 7.8000000000000002e81 < a Initial program 87.3%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in x around inf 56.7%
if -3.89999999999999981e-69 < a < 7.8000000000000002e81Initial program 99.2%
associate-*l/96.7%
Simplified96.7%
Taylor expanded in y around inf 77.4%
Taylor expanded in z around inf 48.5%
Taylor expanded in y around 0 52.3%
associate-/l*48.7%
Simplified48.7%
Final simplification52.9%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.65e-69) x (if (<= a 8.6e+81) (/ z (/ a y)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.65e-69) {
tmp = x;
} else if (a <= 8.6e+81) {
tmp = z / (a / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.65d-69)) then
tmp = x
else if (a <= 8.6d+81) then
tmp = z / (a / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.65e-69) {
tmp = x;
} else if (a <= 8.6e+81) {
tmp = z / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.65e-69: tmp = x elif a <= 8.6e+81: tmp = z / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.65e-69) tmp = x; elseif (a <= 8.6e+81) tmp = Float64(z / Float64(a / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.65e-69) tmp = x; elseif (a <= 8.6e+81) tmp = z / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.65e-69], x, If[LessEqual[a, 8.6e+81], N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.65 \cdot 10^{-69}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 8.6 \cdot 10^{+81}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.65e-69 or 8.6000000000000003e81 < a Initial program 87.3%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in x around inf 56.7%
if -1.65e-69 < a < 8.6000000000000003e81Initial program 99.2%
associate-*l/96.7%
Simplified96.7%
Taylor expanded in y around inf 77.4%
Taylor expanded in z around inf 48.5%
Taylor expanded in y around 0 52.3%
*-commutative52.3%
associate-/l*55.5%
Simplified55.5%
Final simplification56.1%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y a))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / 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 + ((z - t) * (y / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / a));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a}
\end{array}
Initial program 92.9%
associate-*l/96.5%
Simplified96.5%
Final simplification96.5%
(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 92.9%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in x around inf 36.4%
Final simplification36.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(+ x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(+ x (/ (* y (- z t)) a))
(+ x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x + (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) / a);
} else {
tmp = x + (y / 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 = a / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x + (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) / a)
else
tmp = x + (y / 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 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x + (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) / a);
} else {
tmp = x + (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x + (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) / a) else: tmp = x + (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x + Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x + Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x + (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) / a); else tmp = x + (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x + N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{1}{\frac{t_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{t_1}\\
\end{array}
\end{array}
herbie shell --seed 2023297
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:herbie-target
(if (< y -1.0761266216389975e-10) (+ x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t))))))
(+ x (/ (* y (- z t)) a)))