
(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 17 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
(let* ((t_1 (* y (- z t))))
(if (<= t_1 -5e+224)
(+ x (/ y (/ a (- z t))))
(if (<= t_1 2e+253) (+ x (/ 1.0 (/ a t_1))) (* y (/ (- z t) a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -5e+224) {
tmp = x + (y / (a / (z - t)));
} else if (t_1 <= 2e+253) {
tmp = x + (1.0 / (a / t_1));
} else {
tmp = y * ((z - 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) :: t_1
real(8) :: tmp
t_1 = y * (z - t)
if (t_1 <= (-5d+224)) then
tmp = x + (y / (a / (z - t)))
else if (t_1 <= 2d+253) then
tmp = x + (1.0d0 / (a / t_1))
else
tmp = y * ((z - t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -5e+224) {
tmp = x + (y / (a / (z - t)));
} else if (t_1 <= 2e+253) {
tmp = x + (1.0 / (a / t_1));
} else {
tmp = y * ((z - t) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if t_1 <= -5e+224: tmp = x + (y / (a / (z - t))) elif t_1 <= 2e+253: tmp = x + (1.0 / (a / t_1)) else: tmp = y * ((z - t) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if (t_1 <= -5e+224) tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); elseif (t_1 <= 2e+253) tmp = Float64(x + Float64(1.0 / Float64(a / t_1))); else tmp = Float64(y * Float64(Float64(z - t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if (t_1 <= -5e+224) tmp = x + (y / (a / (z - t))); elseif (t_1 <= 2e+253) tmp = x + (1.0 / (a / t_1)); else tmp = y * ((z - t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+224], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+253], N[(x + N[(1.0 / N[(a / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+224}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+253}:\\
\;\;\;\;x + \frac{1}{\frac{a}{t\_1}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -4.99999999999999964e224Initial program 81.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around 0 81.0%
associate-*l/99.8%
associate-/r/99.9%
Simplified99.9%
if -4.99999999999999964e224 < (*.f64 y (-.f64 z t)) < 1.9999999999999999e253Initial program 99.8%
associate-/l*90.6%
Simplified90.6%
associate-*r/99.8%
clear-num99.8%
Applied egg-rr99.8%
if 1.9999999999999999e253 < (*.f64 y (-.f64 z t)) Initial program 80.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around inf 93.0%
associate--l+93.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 93.0%
div-sub100.0%
Simplified100.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) a)))
(if (or (<= t_1 -2e+152) (not (<= t_1 5e+281)))
(* (- z t) (/ y a))
(- x (/ (* y t) a)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / a;
double tmp;
if ((t_1 <= -2e+152) || !(t_1 <= 5e+281)) {
tmp = (z - t) * (y / a);
} 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) :: t_1
real(8) :: tmp
t_1 = (y * (z - t)) / a
if ((t_1 <= (-2d+152)) .or. (.not. (t_1 <= 5d+281))) then
tmp = (z - t) * (y / a)
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 t_1 = (y * (z - t)) / a;
double tmp;
if ((t_1 <= -2e+152) || !(t_1 <= 5e+281)) {
tmp = (z - t) * (y / a);
} else {
tmp = x - ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / a tmp = 0 if (t_1 <= -2e+152) or not (t_1 <= 5e+281): tmp = (z - t) * (y / a) else: tmp = x - ((y * t) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / a) tmp = 0.0 if ((t_1 <= -2e+152) || !(t_1 <= 5e+281)) tmp = Float64(Float64(z - t) * Float64(y / a)); else tmp = Float64(x - Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / a; tmp = 0.0; if ((t_1 <= -2e+152) || ~((t_1 <= 5e+281))) tmp = (z - t) * (y / a); else tmp = x - ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+152], N[Not[LessEqual[t$95$1, 5e+281]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+152} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+281}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) a) < -2.0000000000000001e152 or 5.00000000000000016e281 < (/.f64 (*.f64 y (-.f64 z t)) a) Initial program 84.9%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in a around 0 83.0%
Taylor expanded in a around 0 81.0%
*-commutative81.0%
associate-/l*90.4%
Applied egg-rr90.4%
if -2.0000000000000001e152 < (/.f64 (*.f64 y (-.f64 z t)) a) < 5.00000000000000016e281Initial program 99.8%
associate-/l*92.8%
Simplified92.8%
Taylor expanded in z around 0 88.9%
+-commutative88.9%
associate-*r/88.9%
mul-1-neg88.9%
distribute-lft-neg-out88.9%
*-commutative88.9%
Simplified88.9%
Final simplification89.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y (- z t)) a)))
(if (or (<= t_1 -2e+152) (not (<= t_1 4e+253)))
(* (- z t) (/ y a))
(- x (/ y (/ a t))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * (z - t)) / a;
double tmp;
if ((t_1 <= -2e+152) || !(t_1 <= 4e+253)) {
tmp = (z - t) * (y / a);
} else {
tmp = x - (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 = (y * (z - t)) / a
if ((t_1 <= (-2d+152)) .or. (.not. (t_1 <= 4d+253))) then
tmp = (z - t) * (y / a)
else
tmp = x - (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 = (y * (z - t)) / a;
double tmp;
if ((t_1 <= -2e+152) || !(t_1 <= 4e+253)) {
tmp = (z - t) * (y / a);
} else {
tmp = x - (y / (a / t));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * (z - t)) / a tmp = 0 if (t_1 <= -2e+152) or not (t_1 <= 4e+253): tmp = (z - t) * (y / a) else: tmp = x - (y / (a / t)) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * Float64(z - t)) / a) tmp = 0.0 if ((t_1 <= -2e+152) || !(t_1 <= 4e+253)) tmp = Float64(Float64(z - t) * Float64(y / a)); else tmp = Float64(x - Float64(y / Float64(a / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * (z - t)) / a; tmp = 0.0; if ((t_1 <= -2e+152) || ~((t_1 <= 4e+253))) tmp = (z - t) * (y / a); else tmp = x - (y / (a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+152], N[Not[LessEqual[t$95$1, 4e+253]], $MachinePrecision]], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+152} \lor \neg \left(t\_1 \leq 4 \cdot 10^{+253}\right):\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if (/.f64 (*.f64 y (-.f64 z t)) a) < -2.0000000000000001e152 or 3.9999999999999997e253 < (/.f64 (*.f64 y (-.f64 z t)) a) Initial program 85.5%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in a around 0 83.6%
Taylor expanded in a around 0 81.6%
*-commutative81.6%
associate-/l*90.7%
Applied egg-rr90.7%
if -2.0000000000000001e152 < (/.f64 (*.f64 y (-.f64 z t)) a) < 3.9999999999999997e253Initial program 99.8%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in z around 0 88.6%
mul-1-neg88.6%
unsub-neg88.6%
*-commutative88.6%
associate-/l*83.6%
Simplified83.6%
clear-num83.5%
un-div-inv86.1%
Applied egg-rr86.1%
Final simplification88.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))))
(if (<= t_1 -5e+224)
(+ x (/ y (/ a (- z t))))
(if (<= t_1 2e+253) (+ x (/ t_1 a)) (* y (/ (- z t) a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -5e+224) {
tmp = x + (y / (a / (z - t)));
} else if (t_1 <= 2e+253) {
tmp = x + (t_1 / a);
} else {
tmp = y * ((z - 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) :: t_1
real(8) :: tmp
t_1 = y * (z - t)
if (t_1 <= (-5d+224)) then
tmp = x + (y / (a / (z - t)))
else if (t_1 <= 2d+253) then
tmp = x + (t_1 / a)
else
tmp = y * ((z - t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -5e+224) {
tmp = x + (y / (a / (z - t)));
} else if (t_1 <= 2e+253) {
tmp = x + (t_1 / a);
} else {
tmp = y * ((z - t) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if t_1 <= -5e+224: tmp = x + (y / (a / (z - t))) elif t_1 <= 2e+253: tmp = x + (t_1 / a) else: tmp = y * ((z - t) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if (t_1 <= -5e+224) tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); elseif (t_1 <= 2e+253) tmp = Float64(x + Float64(t_1 / a)); else tmp = Float64(y * Float64(Float64(z - t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if (t_1 <= -5e+224) tmp = x + (y / (a / (z - t))); elseif (t_1 <= 2e+253) tmp = x + (t_1 / a); else tmp = y * ((z - t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+224], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+253], N[(x + N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+224}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+253}:\\
\;\;\;\;x + \frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -4.99999999999999964e224Initial program 81.0%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around 0 81.0%
associate-*l/99.8%
associate-/r/99.9%
Simplified99.9%
if -4.99999999999999964e224 < (*.f64 y (-.f64 z t)) < 1.9999999999999999e253Initial program 99.8%
if 1.9999999999999999e253 < (*.f64 y (-.f64 z t)) Initial program 80.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around inf 93.0%
associate--l+93.0%
div-sub100.0%
Simplified100.0%
Taylor expanded in x around 0 93.0%
div-sub100.0%
Simplified100.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.6e+202) (not (<= z 3.5e+19))) (+ x (* z (/ y a))) (- x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.6e+202) || !(z <= 3.5e+19)) {
tmp = x + (z * (y / a));
} else {
tmp = x - (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 ((z <= (-2.6d+202)) .or. (.not. (z <= 3.5d+19))) then
tmp = x + (z * (y / a))
else
tmp = x - (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 ((z <= -2.6e+202) || !(z <= 3.5e+19)) {
tmp = x + (z * (y / a));
} else {
tmp = x - (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.6e+202) or not (z <= 3.5e+19): tmp = x + (z * (y / a)) else: tmp = x - (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.6e+202) || !(z <= 3.5e+19)) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(x - Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.6e+202) || ~((z <= 3.5e+19))) tmp = x + (z * (y / a)); else tmp = x - (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.6e+202], N[Not[LessEqual[z, 3.5e+19]], $MachinePrecision]], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+202} \lor \neg \left(z \leq 3.5 \cdot 10^{+19}\right):\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -2.6000000000000002e202 or 3.5e19 < z Initial program 90.6%
+-commutative90.6%
associate-/l*90.7%
fma-define90.7%
Simplified90.7%
fma-undefine90.7%
associate-*r/90.6%
*-commutative90.6%
associate-/l*93.3%
Applied egg-rr93.3%
Taylor expanded in z around inf 82.7%
if -2.6000000000000002e202 < z < 3.5e19Initial program 94.9%
+-commutative94.9%
associate-/l*95.1%
fma-define95.1%
Simplified95.1%
fma-undefine95.1%
associate-*r/94.9%
*-commutative94.9%
associate-/l*96.6%
Applied egg-rr96.6%
Taylor expanded in z around 0 84.7%
mul-1-neg84.7%
sub-neg84.7%
associate-/l*87.4%
Simplified87.4%
Final simplification85.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.62e-52) (not (<= y 6.2e-44))) (* y (/ (- z t) a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.62e-52) || !(y <= 6.2e-44)) {
tmp = y * ((z - t) / 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 ((y <= (-1.62d-52)) .or. (.not. (y <= 6.2d-44))) then
tmp = y * ((z - t) / 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 ((y <= -1.62e-52) || !(y <= 6.2e-44)) {
tmp = y * ((z - t) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.62e-52) or not (y <= 6.2e-44): tmp = y * ((z - t) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.62e-52) || !(y <= 6.2e-44)) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.62e-52) || ~((y <= 6.2e-44))) tmp = y * ((z - t) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.62e-52], N[Not[LessEqual[y, 6.2e-44]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{-52} \lor \neg \left(y \leq 6.2 \cdot 10^{-44}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.61999999999999995e-52 or 6.19999999999999968e-44 < y Initial program 89.5%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in y around inf 95.4%
associate--l+95.4%
div-sub98.0%
Simplified98.0%
Taylor expanded in x around 0 73.7%
div-sub76.2%
Simplified76.2%
if -1.61999999999999995e-52 < y < 6.19999999999999968e-44Initial program 99.8%
associate-/l*85.8%
Simplified85.8%
Taylor expanded in x around inf 69.5%
Final simplification73.6%
(FPCore (x y z t a) :precision binary64 (if (<= t -4.2e+123) (* (- z t) (/ y a)) (if (<= t 3.3e+119) (+ x (* z (/ y a))) (/ t (/ a (- y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.2e+123) {
tmp = (z - t) * (y / a);
} else if (t <= 3.3e+119) {
tmp = x + (z * (y / a));
} else {
tmp = t / (a / -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 (t <= (-4.2d+123)) then
tmp = (z - t) * (y / a)
else if (t <= 3.3d+119) then
tmp = x + (z * (y / a))
else
tmp = t / (a / -y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -4.2e+123) {
tmp = (z - t) * (y / a);
} else if (t <= 3.3e+119) {
tmp = x + (z * (y / a));
} else {
tmp = t / (a / -y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -4.2e+123: tmp = (z - t) * (y / a) elif t <= 3.3e+119: tmp = x + (z * (y / a)) else: tmp = t / (a / -y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -4.2e+123) tmp = Float64(Float64(z - t) * Float64(y / a)); elseif (t <= 3.3e+119) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(t / Float64(a / Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -4.2e+123) tmp = (z - t) * (y / a); elseif (t <= 3.3e+119) tmp = x + (z * (y / a)); else tmp = t / (a / -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.2e+123], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+119], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(a / (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{+123}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+119}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a}{-y}}\\
\end{array}
\end{array}
if t < -4.19999999999999988e123Initial program 83.3%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in a around 0 79.0%
Taylor expanded in a around 0 72.8%
*-commutative72.8%
associate-/l*82.0%
Applied egg-rr82.0%
if -4.19999999999999988e123 < t < 3.3000000000000002e119Initial program 96.8%
+-commutative96.8%
associate-/l*95.4%
fma-define95.4%
Simplified95.4%
fma-undefine95.4%
associate-*r/96.8%
*-commutative96.8%
associate-/l*95.2%
Applied egg-rr95.2%
Taylor expanded in z around inf 82.4%
if 3.3000000000000002e119 < t Initial program 87.7%
associate-/l*88.3%
Simplified88.3%
Taylor expanded in y around inf 75.8%
associate--l+75.8%
div-sub84.1%
Simplified84.1%
Taylor expanded in t around inf 60.0%
neg-mul-160.0%
distribute-frac-neg260.0%
Simplified60.0%
*-commutative60.0%
div-inv60.0%
associate-*l*69.2%
add-sqr-sqrt29.1%
sqrt-unprod22.3%
sqr-neg22.3%
sqrt-unprod0.8%
add-sqr-sqrt0.9%
associate-/r/0.9%
div-inv0.9%
frac-2neg0.9%
distribute-neg-frac0.9%
add-sqr-sqrt0.2%
sqrt-unprod30.3%
sqr-neg30.3%
sqrt-unprod40.1%
add-sqr-sqrt69.3%
Applied egg-rr69.3%
Final simplification81.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.15e+123) (* (- z t) (/ y a)) (if (<= t 5e+119) (+ x (* y (/ z a))) (/ t (/ a (- y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.15e+123) {
tmp = (z - t) * (y / a);
} else if (t <= 5e+119) {
tmp = x + (y * (z / a));
} else {
tmp = t / (a / -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 (t <= (-2.15d+123)) then
tmp = (z - t) * (y / a)
else if (t <= 5d+119) then
tmp = x + (y * (z / a))
else
tmp = t / (a / -y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.15e+123) {
tmp = (z - t) * (y / a);
} else if (t <= 5e+119) {
tmp = x + (y * (z / a));
} else {
tmp = t / (a / -y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.15e+123: tmp = (z - t) * (y / a) elif t <= 5e+119: tmp = x + (y * (z / a)) else: tmp = t / (a / -y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.15e+123) tmp = Float64(Float64(z - t) * Float64(y / a)); elseif (t <= 5e+119) tmp = Float64(x + Float64(y * Float64(z / a))); else tmp = Float64(t / Float64(a / Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.15e+123) tmp = (z - t) * (y / a); elseif (t <= 5e+119) tmp = x + (y * (z / a)); else tmp = t / (a / -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.15e+123], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+119], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t / N[(a / (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.15 \cdot 10^{+123}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+119}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a}{-y}}\\
\end{array}
\end{array}
if t < -2.14999999999999993e123Initial program 83.3%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in a around 0 79.0%
Taylor expanded in a around 0 72.8%
*-commutative72.8%
associate-/l*82.0%
Applied egg-rr82.0%
if -2.14999999999999993e123 < t < 4.9999999999999999e119Initial program 96.8%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in t around 0 81.5%
+-commutative81.5%
associate-/l*82.0%
Simplified82.0%
if 4.9999999999999999e119 < t Initial program 87.7%
associate-/l*88.3%
Simplified88.3%
Taylor expanded in y around inf 75.8%
associate--l+75.8%
div-sub84.1%
Simplified84.1%
Taylor expanded in t around inf 60.0%
neg-mul-160.0%
distribute-frac-neg260.0%
Simplified60.0%
*-commutative60.0%
div-inv60.0%
associate-*l*69.2%
add-sqr-sqrt29.1%
sqrt-unprod22.3%
sqr-neg22.3%
sqrt-unprod0.8%
add-sqr-sqrt0.9%
associate-/r/0.9%
div-inv0.9%
frac-2neg0.9%
distribute-neg-frac0.9%
add-sqr-sqrt0.2%
sqrt-unprod30.3%
sqr-neg30.3%
sqrt-unprod40.1%
add-sqr-sqrt69.3%
Applied egg-rr69.3%
Final simplification80.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.1e+123) (* (- z t) (/ y a)) (if (<= t 4.4e+120) (+ x (/ (* y z) a)) (/ t (/ a (- y))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.1e+123) {
tmp = (z - t) * (y / a);
} else if (t <= 4.4e+120) {
tmp = x + ((y * z) / a);
} else {
tmp = t / (a / -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 (t <= (-2.1d+123)) then
tmp = (z - t) * (y / a)
else if (t <= 4.4d+120) then
tmp = x + ((y * z) / a)
else
tmp = t / (a / -y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.1e+123) {
tmp = (z - t) * (y / a);
} else if (t <= 4.4e+120) {
tmp = x + ((y * z) / a);
} else {
tmp = t / (a / -y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.1e+123: tmp = (z - t) * (y / a) elif t <= 4.4e+120: tmp = x + ((y * z) / a) else: tmp = t / (a / -y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.1e+123) tmp = Float64(Float64(z - t) * Float64(y / a)); elseif (t <= 4.4e+120) tmp = Float64(x + Float64(Float64(y * z) / a)); else tmp = Float64(t / Float64(a / Float64(-y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.1e+123) tmp = (z - t) * (y / a); elseif (t <= 4.4e+120) tmp = x + ((y * z) / a); else tmp = t / (a / -y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.1e+123], N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e+120], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(t / N[(a / (-y)), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{+123}:\\
\;\;\;\;\left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+120}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{\frac{a}{-y}}\\
\end{array}
\end{array}
if t < -2.09999999999999994e123Initial program 83.3%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in a around 0 79.0%
Taylor expanded in a around 0 72.8%
*-commutative72.8%
associate-/l*82.0%
Applied egg-rr82.0%
if -2.09999999999999994e123 < t < 4.4000000000000003e120Initial program 96.8%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in z around inf 81.5%
if 4.4000000000000003e120 < t Initial program 87.7%
associate-/l*88.3%
Simplified88.3%
Taylor expanded in y around inf 75.8%
associate--l+75.8%
div-sub84.1%
Simplified84.1%
Taylor expanded in t around inf 60.0%
neg-mul-160.0%
distribute-frac-neg260.0%
Simplified60.0%
*-commutative60.0%
div-inv60.0%
associate-*l*69.2%
add-sqr-sqrt29.1%
sqrt-unprod22.3%
sqr-neg22.3%
sqrt-unprod0.8%
add-sqr-sqrt0.9%
associate-/r/0.9%
div-inv0.9%
frac-2neg0.9%
distribute-neg-frac0.9%
add-sqr-sqrt0.2%
sqrt-unprod30.3%
sqr-neg30.3%
sqrt-unprod40.1%
add-sqr-sqrt69.3%
Applied egg-rr69.3%
Final simplification80.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9.2e+122) (not (<= y 4.8e+49))) (/ z (/ a y)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.2e+122) || !(y <= 4.8e+49)) {
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 ((y <= (-9.2d+122)) .or. (.not. (y <= 4.8d+49))) 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 ((y <= -9.2e+122) || !(y <= 4.8e+49)) {
tmp = z / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.2e+122) or not (y <= 4.8e+49): tmp = z / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.2e+122) || !(y <= 4.8e+49)) 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 ((y <= -9.2e+122) || ~((y <= 4.8e+49))) tmp = z / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.2e+122], N[Not[LessEqual[y, 4.8e+49]], $MachinePrecision]], N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{+122} \lor \neg \left(y \leq 4.8 \cdot 10^{+49}\right):\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.2000000000000002e122 or 4.8e49 < y Initial program 87.5%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in y around inf 93.4%
associate--l+93.4%
div-sub97.1%
Simplified97.1%
Taylor expanded in z around inf 49.5%
*-commutative49.5%
associate-/r/50.6%
Applied egg-rr50.6%
if -9.2000000000000002e122 < y < 4.8e49Initial program 97.8%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in x around inf 60.0%
Final simplification56.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.1e+120) (not (<= y 5.8e+53))) (* z (/ y a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.1e+120) || !(y <= 5.8e+53)) {
tmp = z * (y / 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 ((y <= (-5.1d+120)) .or. (.not. (y <= 5.8d+53))) then
tmp = z * (y / 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 ((y <= -5.1e+120) || !(y <= 5.8e+53)) {
tmp = z * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.1e+120) or not (y <= 5.8e+53): tmp = z * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.1e+120) || !(y <= 5.8e+53)) tmp = Float64(z * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -5.1e+120) || ~((y <= 5.8e+53))) tmp = z * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.1e+120], N[Not[LessEqual[y, 5.8e+53]], $MachinePrecision]], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.1 \cdot 10^{+120} \lor \neg \left(y \leq 5.8 \cdot 10^{+53}\right):\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.10000000000000027e120 or 5.8000000000000004e53 < y Initial program 87.5%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in a around 0 84.7%
Taylor expanded in z around inf 43.9%
div-inv43.9%
*-commutative43.9%
associate-*l*50.5%
div-inv50.5%
Applied egg-rr50.5%
if -5.10000000000000027e120 < y < 5.8000000000000004e53Initial program 97.8%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in x around inf 60.0%
Final simplification56.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.95e+119) (not (<= y 1.6e+50))) (* y (/ z a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.95e+119) || !(y <= 1.6e+50)) {
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 ((y <= (-2.95d+119)) .or. (.not. (y <= 1.6d+50))) 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 ((y <= -2.95e+119) || !(y <= 1.6e+50)) {
tmp = y * (z / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.95e+119) or not (y <= 1.6e+50): tmp = y * (z / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.95e+119) || !(y <= 1.6e+50)) 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 ((y <= -2.95e+119) || ~((y <= 1.6e+50))) tmp = y * (z / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.95e+119], N[Not[LessEqual[y, 1.6e+50]], $MachinePrecision]], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.95 \cdot 10^{+119} \lor \neg \left(y \leq 1.6 \cdot 10^{+50}\right):\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.95e119 or 1.59999999999999991e50 < y Initial program 87.5%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in y around inf 93.4%
associate--l+93.4%
div-sub97.1%
Simplified97.1%
Taylor expanded in z around inf 49.5%
if -2.95e119 < y < 1.59999999999999991e50Initial program 97.8%
associate-/l*90.4%
Simplified90.4%
Taylor expanded in x around inf 60.0%
Final simplification55.6%
(FPCore (x y z t a) :precision binary64 (if (<= y -5600000000000.0) (/ t (/ a (- y))) (if (<= y 8e+50) x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5600000000000.0) {
tmp = t / (a / -y);
} else if (y <= 8e+50) {
tmp = x;
} else {
tmp = z / (a / 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 (y <= (-5600000000000.0d0)) then
tmp = t / (a / -y)
else if (y <= 8d+50) then
tmp = x
else
tmp = z / (a / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5600000000000.0) {
tmp = t / (a / -y);
} else if (y <= 8e+50) {
tmp = x;
} else {
tmp = z / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5600000000000.0: tmp = t / (a / -y) elif y <= 8e+50: tmp = x else: tmp = z / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5600000000000.0) tmp = Float64(t / Float64(a / Float64(-y))); elseif (y <= 8e+50) tmp = x; else tmp = Float64(z / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5600000000000.0) tmp = t / (a / -y); elseif (y <= 8e+50) tmp = x; else tmp = z / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5600000000000.0], N[(t / N[(a / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+50], x, N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5600000000000:\\
\;\;\;\;\frac{t}{\frac{a}{-y}}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+50}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < -5.6e12Initial program 92.7%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in y around inf 94.0%
associate--l+94.0%
div-sub95.5%
Simplified95.5%
Taylor expanded in t around inf 49.3%
neg-mul-149.3%
distribute-frac-neg249.3%
Simplified49.3%
*-commutative49.3%
div-inv49.3%
associate-*l*50.9%
add-sqr-sqrt18.6%
sqrt-unprod19.4%
sqr-neg19.4%
sqrt-unprod2.6%
add-sqr-sqrt4.4%
associate-/r/4.4%
div-inv4.4%
frac-2neg4.4%
distribute-neg-frac4.4%
add-sqr-sqrt1.8%
sqrt-unprod27.1%
sqr-neg27.1%
sqrt-unprod32.2%
add-sqr-sqrt51.2%
Applied egg-rr51.2%
if -5.6e12 < y < 8.0000000000000006e50Initial program 98.3%
associate-/l*88.9%
Simplified88.9%
Taylor expanded in x around inf 62.5%
if 8.0000000000000006e50 < y Initial program 84.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around inf 94.8%
associate--l+94.8%
div-sub99.8%
Simplified99.8%
Taylor expanded in z around inf 53.9%
*-commutative53.9%
associate-/r/54.1%
Applied egg-rr54.1%
Final simplification57.6%
(FPCore (x y z t a) :precision binary64 (if (<= y -4500000000000.0) (* (/ t a) (- y)) (if (<= y 1.05e+52) x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4500000000000.0) {
tmp = (t / a) * -y;
} else if (y <= 1.05e+52) {
tmp = x;
} else {
tmp = z / (a / 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 (y <= (-4500000000000.0d0)) then
tmp = (t / a) * -y
else if (y <= 1.05d+52) then
tmp = x
else
tmp = z / (a / y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -4500000000000.0) {
tmp = (t / a) * -y;
} else if (y <= 1.05e+52) {
tmp = x;
} else {
tmp = z / (a / y);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -4500000000000.0: tmp = (t / a) * -y elif y <= 1.05e+52: tmp = x else: tmp = z / (a / y) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -4500000000000.0) tmp = Float64(Float64(t / a) * Float64(-y)); elseif (y <= 1.05e+52) tmp = x; else tmp = Float64(z / Float64(a / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -4500000000000.0) tmp = (t / a) * -y; elseif (y <= 1.05e+52) tmp = x; else tmp = z / (a / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -4500000000000.0], N[(N[(t / a), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[y, 1.05e+52], x, N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4500000000000:\\
\;\;\;\;\frac{t}{a} \cdot \left(-y\right)\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+52}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if y < -4.5e12Initial program 92.7%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in y around inf 94.0%
associate--l+94.0%
div-sub95.5%
Simplified95.5%
Taylor expanded in t around inf 49.3%
neg-mul-149.3%
distribute-frac-neg249.3%
Simplified49.3%
if -4.5e12 < y < 1.05e52Initial program 98.3%
associate-/l*88.9%
Simplified88.9%
Taylor expanded in x around inf 62.5%
if 1.05e52 < y Initial program 84.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around inf 94.8%
associate--l+94.8%
div-sub99.8%
Simplified99.8%
Taylor expanded in z around inf 53.9%
*-commutative53.9%
associate-/r/54.1%
Applied egg-rr54.1%
Final simplification57.1%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ a (- z t)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / (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 / (a / (z - t)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / (a / (z - t)));
}
def code(x, y, z, t, a): return x + (y / (a / (z - t)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(a / Float64(z - t)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / (a / (z - t))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a}{z - t}}
\end{array}
Initial program 93.5%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in y around 0 93.5%
associate-*l/95.6%
associate-/r/95.1%
Simplified95.1%
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a}
\end{array}
Initial program 93.5%
associate-/l*93.7%
Simplified93.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 93.5%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in x around inf 41.5%
(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 2024186
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:alt
(! :herbie-platform default (if (< y -430450648655599/4000000000000000000000000) (+ x (/ 1 (/ (/ a (- z t)) y))) (if (< y 2894426862792089/10000000000000000000000000000000000000000000000000000000000000000) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t)))))))
(+ x (/ (* y (- z t)) a)))