
(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 15 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 (/ (- t z) (/ a y))))
double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / (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 + ((t - z) / (a / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / (a / y));
}
def code(x, y, z, t, a): return x + ((t - z) / (a / y))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(t - z) / Float64(a / y))) end
function tmp = code(x, y, z, t, a) tmp = x + ((t - z) / (a / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{t - z}{\frac{a}{y}}
\end{array}
Initial program 91.1%
associate-*r/94.8%
Simplified94.8%
*-commutative94.8%
associate-*l/91.1%
associate-/l*97.8%
Applied egg-rr97.8%
Final simplification97.8%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ y (- a)))))
(if (<= y -2.05e+158)
(* t (/ y a))
(if (<= y -1.06e-73)
t_1
(if (<= y 6.5e+14)
x
(if (<= y 1.95e+56)
t_1
(if (<= y 2.4e+169)
(/ t (/ a y))
(if (<= y 5.6e+209) t_1 (* y (/ t a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (y / -a);
double tmp;
if (y <= -2.05e+158) {
tmp = t * (y / a);
} else if (y <= -1.06e-73) {
tmp = t_1;
} else if (y <= 6.5e+14) {
tmp = x;
} else if (y <= 1.95e+56) {
tmp = t_1;
} else if (y <= 2.4e+169) {
tmp = t / (a / y);
} else if (y <= 5.6e+209) {
tmp = t_1;
} else {
tmp = 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 = z * (y / -a)
if (y <= (-2.05d+158)) then
tmp = t * (y / a)
else if (y <= (-1.06d-73)) then
tmp = t_1
else if (y <= 6.5d+14) then
tmp = x
else if (y <= 1.95d+56) then
tmp = t_1
else if (y <= 2.4d+169) then
tmp = t / (a / y)
else if (y <= 5.6d+209) then
tmp = t_1
else
tmp = 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 = z * (y / -a);
double tmp;
if (y <= -2.05e+158) {
tmp = t * (y / a);
} else if (y <= -1.06e-73) {
tmp = t_1;
} else if (y <= 6.5e+14) {
tmp = x;
} else if (y <= 1.95e+56) {
tmp = t_1;
} else if (y <= 2.4e+169) {
tmp = t / (a / y);
} else if (y <= 5.6e+209) {
tmp = t_1;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (y / -a) tmp = 0 if y <= -2.05e+158: tmp = t * (y / a) elif y <= -1.06e-73: tmp = t_1 elif y <= 6.5e+14: tmp = x elif y <= 1.95e+56: tmp = t_1 elif y <= 2.4e+169: tmp = t / (a / y) elif y <= 5.6e+209: tmp = t_1 else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(y / Float64(-a))) tmp = 0.0 if (y <= -2.05e+158) tmp = Float64(t * Float64(y / a)); elseif (y <= -1.06e-73) tmp = t_1; elseif (y <= 6.5e+14) tmp = x; elseif (y <= 1.95e+56) tmp = t_1; elseif (y <= 2.4e+169) tmp = Float64(t / Float64(a / y)); elseif (y <= 5.6e+209) tmp = t_1; else tmp = Float64(y * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (y / -a); tmp = 0.0; if (y <= -2.05e+158) tmp = t * (y / a); elseif (y <= -1.06e-73) tmp = t_1; elseif (y <= 6.5e+14) tmp = x; elseif (y <= 1.95e+56) tmp = t_1; elseif (y <= 2.4e+169) tmp = t / (a / y); elseif (y <= 5.6e+209) tmp = t_1; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.05e+158], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.06e-73], t$95$1, If[LessEqual[y, 6.5e+14], x, If[LessEqual[y, 1.95e+56], t$95$1, If[LessEqual[y, 2.4e+169], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e+209], t$95$1, N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{-a}\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+158}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq -1.06 \cdot 10^{-73}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+14}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{+56}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+169}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+209}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < -2.05000000000000002e158Initial program 79.3%
sub-neg79.3%
+-commutative79.3%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
remove-double-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 54.7%
*-commutative54.7%
associate-*r/67.4%
Simplified67.4%
if -2.05000000000000002e158 < y < -1.05999999999999997e-73 or 6.5e14 < y < 1.94999999999999997e56 or 2.3999999999999998e169 < y < 5.60000000000000026e209Initial program 94.4%
sub-neg94.4%
+-commutative94.4%
associate-*l/97.3%
distribute-rgt-neg-in97.3%
fma-def97.3%
sub-neg97.3%
+-commutative97.3%
distribute-neg-in97.3%
unsub-neg97.3%
remove-double-neg97.3%
Simplified97.3%
Taylor expanded in z around inf 54.7%
mul-1-neg54.7%
associate-*l/58.8%
*-commutative58.8%
distribute-rgt-neg-in58.8%
*-lft-identity58.8%
metadata-eval58.8%
times-frac58.8%
neg-mul-158.8%
neg-mul-158.8%
distribute-frac-neg58.8%
remove-double-neg58.8%
Simplified58.8%
if -1.05999999999999997e-73 < y < 6.5e14Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l/96.7%
distribute-rgt-neg-in96.7%
fma-def96.7%
sub-neg96.7%
+-commutative96.7%
distribute-neg-in96.7%
unsub-neg96.7%
remove-double-neg96.7%
Simplified96.7%
Taylor expanded in y around 0 63.5%
if 1.94999999999999997e56 < y < 2.3999999999999998e169Initial program 68.9%
sub-neg68.9%
+-commutative68.9%
associate-*l/95.7%
distribute-rgt-neg-in95.7%
fma-def95.8%
sub-neg95.8%
+-commutative95.8%
distribute-neg-in95.8%
unsub-neg95.8%
remove-double-neg95.8%
Simplified95.8%
Taylor expanded in t around inf 40.6%
*-commutative40.6%
associate-*r/59.7%
Simplified59.7%
clear-num59.6%
div-inv59.9%
Applied egg-rr59.9%
if 5.60000000000000026e209 < y Initial program 83.5%
sub-neg83.5%
+-commutative83.5%
associate-*l/95.7%
distribute-rgt-neg-in95.7%
fma-def95.7%
sub-neg95.7%
+-commutative95.7%
distribute-neg-in95.7%
unsub-neg95.7%
remove-double-neg95.7%
Simplified95.7%
Taylor expanded in t around inf 53.9%
*-commutative53.9%
associate-*r/61.7%
Simplified61.7%
Taylor expanded in t around 0 53.9%
associate-*r/66.1%
Simplified66.1%
Final simplification62.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- (/ z a)))))
(if (<= y -4.8e+156)
(* t (/ y a))
(if (<= y -1.7e-73)
(* z (/ y (- a)))
(if (<= y 1.06e+15)
x
(if (<= y 7e+79)
t_1
(if (<= y 2.4e+169)
(/ t (/ a y))
(if (<= y 1.15e+209) t_1 (* y (/ t a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * -(z / a);
double tmp;
if (y <= -4.8e+156) {
tmp = t * (y / a);
} else if (y <= -1.7e-73) {
tmp = z * (y / -a);
} else if (y <= 1.06e+15) {
tmp = x;
} else if (y <= 7e+79) {
tmp = t_1;
} else if (y <= 2.4e+169) {
tmp = t / (a / y);
} else if (y <= 1.15e+209) {
tmp = t_1;
} else {
tmp = 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 / a)
if (y <= (-4.8d+156)) then
tmp = t * (y / a)
else if (y <= (-1.7d-73)) then
tmp = z * (y / -a)
else if (y <= 1.06d+15) then
tmp = x
else if (y <= 7d+79) then
tmp = t_1
else if (y <= 2.4d+169) then
tmp = t / (a / y)
else if (y <= 1.15d+209) then
tmp = t_1
else
tmp = 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 / a);
double tmp;
if (y <= -4.8e+156) {
tmp = t * (y / a);
} else if (y <= -1.7e-73) {
tmp = z * (y / -a);
} else if (y <= 1.06e+15) {
tmp = x;
} else if (y <= 7e+79) {
tmp = t_1;
} else if (y <= 2.4e+169) {
tmp = t / (a / y);
} else if (y <= 1.15e+209) {
tmp = t_1;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * -(z / a) tmp = 0 if y <= -4.8e+156: tmp = t * (y / a) elif y <= -1.7e-73: tmp = z * (y / -a) elif y <= 1.06e+15: tmp = x elif y <= 7e+79: tmp = t_1 elif y <= 2.4e+169: tmp = t / (a / y) elif y <= 1.15e+209: tmp = t_1 else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(-Float64(z / a))) tmp = 0.0 if (y <= -4.8e+156) tmp = Float64(t * Float64(y / a)); elseif (y <= -1.7e-73) tmp = Float64(z * Float64(y / Float64(-a))); elseif (y <= 1.06e+15) tmp = x; elseif (y <= 7e+79) tmp = t_1; elseif (y <= 2.4e+169) tmp = Float64(t / Float64(a / y)); elseif (y <= 1.15e+209) tmp = t_1; else tmp = Float64(y * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * -(z / a); tmp = 0.0; if (y <= -4.8e+156) tmp = t * (y / a); elseif (y <= -1.7e-73) tmp = z * (y / -a); elseif (y <= 1.06e+15) tmp = x; elseif (y <= 7e+79) tmp = t_1; elseif (y <= 2.4e+169) tmp = t / (a / y); elseif (y <= 1.15e+209) tmp = t_1; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * (-N[(z / a), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[y, -4.8e+156], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.7e-73], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.06e+15], x, If[LessEqual[y, 7e+79], t$95$1, If[LessEqual[y, 2.4e+169], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.15e+209], t$95$1, N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-\frac{z}{a}\right)\\
\mathbf{if}\;y \leq -4.8 \cdot 10^{+156}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-73}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{+15}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+79}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+169}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+209}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < -4.8000000000000002e156Initial program 79.3%
sub-neg79.3%
+-commutative79.3%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
remove-double-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 54.7%
*-commutative54.7%
associate-*r/67.4%
Simplified67.4%
if -4.8000000000000002e156 < y < -1.7000000000000001e-73Initial program 95.7%
sub-neg95.7%
+-commutative95.7%
associate-*l/99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in z around inf 46.1%
mul-1-neg46.1%
associate-*l/50.1%
*-commutative50.1%
distribute-rgt-neg-in50.1%
*-lft-identity50.1%
metadata-eval50.1%
times-frac50.1%
neg-mul-150.1%
neg-mul-150.1%
distribute-frac-neg50.1%
remove-double-neg50.1%
Simplified50.1%
if -1.7000000000000001e-73 < y < 1.06e15Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l/96.7%
distribute-rgt-neg-in96.7%
fma-def96.7%
sub-neg96.7%
+-commutative96.7%
distribute-neg-in96.7%
unsub-neg96.7%
remove-double-neg96.7%
Simplified96.7%
Taylor expanded in y around 0 63.5%
if 1.06e15 < y < 6.99999999999999961e79 or 2.3999999999999998e169 < y < 1.15000000000000005e209Initial program 90.1%
sub-neg90.1%
+-commutative90.1%
associate-*l/90.4%
distribute-rgt-neg-in90.4%
fma-def90.4%
sub-neg90.4%
+-commutative90.4%
distribute-neg-in90.4%
unsub-neg90.4%
remove-double-neg90.4%
Simplified90.4%
Taylor expanded in z around inf 63.3%
mul-1-neg63.3%
associate-*l/65.6%
*-commutative65.6%
distribute-rgt-neg-in65.6%
*-lft-identity65.6%
metadata-eval65.6%
times-frac65.6%
neg-mul-165.6%
neg-mul-165.6%
distribute-frac-neg65.6%
remove-double-neg65.6%
Simplified65.6%
Taylor expanded in z around 0 63.3%
mul-1-neg63.3%
*-commutative63.3%
associate-/l*66.0%
distribute-frac-neg66.0%
associate-/r/71.8%
Simplified71.8%
if 6.99999999999999961e79 < y < 2.3999999999999998e169Initial program 65.7%
sub-neg65.7%
+-commutative65.7%
associate-*l/99.7%
distribute-rgt-neg-in99.7%
fma-def99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
unsub-neg99.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in t around inf 45.1%
*-commutative45.1%
associate-*r/69.4%
Simplified69.4%
clear-num69.3%
div-inv69.5%
Applied egg-rr69.5%
if 1.15000000000000005e209 < y Initial program 83.5%
sub-neg83.5%
+-commutative83.5%
associate-*l/95.7%
distribute-rgt-neg-in95.7%
fma-def95.7%
sub-neg95.7%
+-commutative95.7%
distribute-neg-in95.7%
unsub-neg95.7%
remove-double-neg95.7%
Simplified95.7%
Taylor expanded in t around inf 53.9%
*-commutative53.9%
associate-*r/61.7%
Simplified61.7%
Taylor expanded in t around 0 53.9%
associate-*r/66.1%
Simplified66.1%
Final simplification63.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- (/ z a)))))
(if (<= y -1.12e+157)
(* t (/ y a))
(if (<= y -4.1e-79)
(/ (- z) (/ a y))
(if (<= y 7e+14)
x
(if (<= y 2.1e+80)
t_1
(if (<= y 2.4e+169)
(/ t (/ a y))
(if (<= y 4.5e+209) t_1 (* y (/ t a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * -(z / a);
double tmp;
if (y <= -1.12e+157) {
tmp = t * (y / a);
} else if (y <= -4.1e-79) {
tmp = -z / (a / y);
} else if (y <= 7e+14) {
tmp = x;
} else if (y <= 2.1e+80) {
tmp = t_1;
} else if (y <= 2.4e+169) {
tmp = t / (a / y);
} else if (y <= 4.5e+209) {
tmp = t_1;
} else {
tmp = 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 / a)
if (y <= (-1.12d+157)) then
tmp = t * (y / a)
else if (y <= (-4.1d-79)) then
tmp = -z / (a / y)
else if (y <= 7d+14) then
tmp = x
else if (y <= 2.1d+80) then
tmp = t_1
else if (y <= 2.4d+169) then
tmp = t / (a / y)
else if (y <= 4.5d+209) then
tmp = t_1
else
tmp = 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 / a);
double tmp;
if (y <= -1.12e+157) {
tmp = t * (y / a);
} else if (y <= -4.1e-79) {
tmp = -z / (a / y);
} else if (y <= 7e+14) {
tmp = x;
} else if (y <= 2.1e+80) {
tmp = t_1;
} else if (y <= 2.4e+169) {
tmp = t / (a / y);
} else if (y <= 4.5e+209) {
tmp = t_1;
} else {
tmp = y * (t / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * -(z / a) tmp = 0 if y <= -1.12e+157: tmp = t * (y / a) elif y <= -4.1e-79: tmp = -z / (a / y) elif y <= 7e+14: tmp = x elif y <= 2.1e+80: tmp = t_1 elif y <= 2.4e+169: tmp = t / (a / y) elif y <= 4.5e+209: tmp = t_1 else: tmp = y * (t / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(-Float64(z / a))) tmp = 0.0 if (y <= -1.12e+157) tmp = Float64(t * Float64(y / a)); elseif (y <= -4.1e-79) tmp = Float64(Float64(-z) / Float64(a / y)); elseif (y <= 7e+14) tmp = x; elseif (y <= 2.1e+80) tmp = t_1; elseif (y <= 2.4e+169) tmp = Float64(t / Float64(a / y)); elseif (y <= 4.5e+209) tmp = t_1; else tmp = Float64(y * Float64(t / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * -(z / a); tmp = 0.0; if (y <= -1.12e+157) tmp = t * (y / a); elseif (y <= -4.1e-79) tmp = -z / (a / y); elseif (y <= 7e+14) tmp = x; elseif (y <= 2.1e+80) tmp = t_1; elseif (y <= 2.4e+169) tmp = t / (a / y); elseif (y <= 4.5e+209) tmp = t_1; else tmp = y * (t / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * (-N[(z / a), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[y, -1.12e+157], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.1e-79], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+14], x, If[LessEqual[y, 2.1e+80], t$95$1, If[LessEqual[y, 2.4e+169], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+209], t$95$1, N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-\frac{z}{a}\right)\\
\mathbf{if}\;y \leq -1.12 \cdot 10^{+157}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{-79}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+14}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+169}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+209}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < -1.11999999999999995e157Initial program 79.3%
sub-neg79.3%
+-commutative79.3%
associate-*l/99.9%
distribute-rgt-neg-in99.9%
fma-def100.0%
sub-neg100.0%
+-commutative100.0%
distribute-neg-in100.0%
unsub-neg100.0%
remove-double-neg100.0%
Simplified100.0%
Taylor expanded in t around inf 54.7%
*-commutative54.7%
associate-*r/67.4%
Simplified67.4%
if -1.11999999999999995e157 < y < -4.09999999999999994e-79Initial program 95.7%
sub-neg95.7%
+-commutative95.7%
associate-*l/99.8%
distribute-rgt-neg-in99.8%
fma-def99.8%
sub-neg99.8%
+-commutative99.8%
distribute-neg-in99.8%
unsub-neg99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in z around inf 46.1%
mul-1-neg46.1%
associate-*l/50.1%
*-commutative50.1%
distribute-rgt-neg-in50.1%
*-lft-identity50.1%
metadata-eval50.1%
times-frac50.1%
neg-mul-150.1%
neg-mul-150.1%
distribute-frac-neg50.1%
remove-double-neg50.1%
Simplified50.1%
add-sqr-sqrt28.3%
sqrt-unprod26.8%
frac-times24.8%
sqr-neg24.8%
frac-times26.8%
sqrt-unprod0.7%
add-sqr-sqrt3.9%
clear-num3.9%
div-inv3.9%
frac-2neg3.9%
distribute-frac-neg3.9%
add-sqr-sqrt0.7%
sqrt-unprod26.8%
sqr-neg26.8%
sqrt-unprod28.3%
add-sqr-sqrt50.2%
Applied egg-rr50.2%
if -4.09999999999999994e-79 < y < 7e14Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l/96.7%
distribute-rgt-neg-in96.7%
fma-def96.7%
sub-neg96.7%
+-commutative96.7%
distribute-neg-in96.7%
unsub-neg96.7%
remove-double-neg96.7%
Simplified96.7%
Taylor expanded in y around 0 63.5%
if 7e14 < y < 2.10000000000000001e80 or 2.3999999999999998e169 < y < 4.5000000000000003e209Initial program 90.1%
sub-neg90.1%
+-commutative90.1%
associate-*l/90.4%
distribute-rgt-neg-in90.4%
fma-def90.4%
sub-neg90.4%
+-commutative90.4%
distribute-neg-in90.4%
unsub-neg90.4%
remove-double-neg90.4%
Simplified90.4%
Taylor expanded in z around inf 63.3%
mul-1-neg63.3%
associate-*l/65.6%
*-commutative65.6%
distribute-rgt-neg-in65.6%
*-lft-identity65.6%
metadata-eval65.6%
times-frac65.6%
neg-mul-165.6%
neg-mul-165.6%
distribute-frac-neg65.6%
remove-double-neg65.6%
Simplified65.6%
Taylor expanded in z around 0 63.3%
mul-1-neg63.3%
*-commutative63.3%
associate-/l*66.0%
distribute-frac-neg66.0%
associate-/r/71.8%
Simplified71.8%
if 2.10000000000000001e80 < y < 2.3999999999999998e169Initial program 65.7%
sub-neg65.7%
+-commutative65.7%
associate-*l/99.7%
distribute-rgt-neg-in99.7%
fma-def99.7%
sub-neg99.7%
+-commutative99.7%
distribute-neg-in99.7%
unsub-neg99.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in t around inf 45.1%
*-commutative45.1%
associate-*r/69.4%
Simplified69.4%
clear-num69.3%
div-inv69.5%
Applied egg-rr69.5%
if 4.5000000000000003e209 < y Initial program 83.5%
sub-neg83.5%
+-commutative83.5%
associate-*l/95.7%
distribute-rgt-neg-in95.7%
fma-def95.7%
sub-neg95.7%
+-commutative95.7%
distribute-neg-in95.7%
unsub-neg95.7%
remove-double-neg95.7%
Simplified95.7%
Taylor expanded in t around inf 53.9%
*-commutative53.9%
associate-*r/61.7%
Simplified61.7%
Taylor expanded in t around 0 53.9%
associate-*r/66.1%
Simplified66.1%
Final simplification63.2%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.52e+144)
(* t (/ y a))
(if (<= y -8.8e+98)
x
(if (or (<= y -1.7e-84) (not (<= y 2.25e+15))) (/ t (/ a y)) x))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.52e+144) {
tmp = t * (y / a);
} else if (y <= -8.8e+98) {
tmp = x;
} else if ((y <= -1.7e-84) || !(y <= 2.25e+15)) {
tmp = t / (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 <= (-1.52d+144)) then
tmp = t * (y / a)
else if (y <= (-8.8d+98)) then
tmp = x
else if ((y <= (-1.7d-84)) .or. (.not. (y <= 2.25d+15))) then
tmp = t / (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 <= -1.52e+144) {
tmp = t * (y / a);
} else if (y <= -8.8e+98) {
tmp = x;
} else if ((y <= -1.7e-84) || !(y <= 2.25e+15)) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.52e+144: tmp = t * (y / a) elif y <= -8.8e+98: tmp = x elif (y <= -1.7e-84) or not (y <= 2.25e+15): tmp = t / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.52e+144) tmp = Float64(t * Float64(y / a)); elseif (y <= -8.8e+98) tmp = x; elseif ((y <= -1.7e-84) || !(y <= 2.25e+15)) tmp = Float64(t / Float64(a / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.52e+144) tmp = t * (y / a); elseif (y <= -8.8e+98) tmp = x; elseif ((y <= -1.7e-84) || ~((y <= 2.25e+15))) tmp = t / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.52e+144], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8.8e+98], x, If[Or[LessEqual[y, -1.7e-84], N[Not[LessEqual[y, 2.25e+15]], $MachinePrecision]], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.52 \cdot 10^{+144}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq -8.8 \cdot 10^{+98}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-84} \lor \neg \left(y \leq 2.25 \cdot 10^{+15}\right):\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.52e144Initial program 81.4%
sub-neg81.4%
+-commutative81.4%
associate-*l/99.8%
distribute-rgt-neg-in99.8%
fma-def99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in t around inf 54.5%
*-commutative54.5%
associate-*r/65.9%
Simplified65.9%
if -1.52e144 < y < -8.80000000000000034e98 or -1.7000000000000001e-84 < y < 2.25e15Initial program 99.0%
sub-neg99.0%
+-commutative99.0%
associate-*l/96.9%
distribute-rgt-neg-in96.9%
fma-def96.9%
sub-neg96.9%
+-commutative96.9%
distribute-neg-in96.9%
unsub-neg96.9%
remove-double-neg96.9%
Simplified96.9%
Taylor expanded in y around 0 64.3%
if -8.80000000000000034e98 < y < -1.7000000000000001e-84 or 2.25e15 < y Initial program 87.0%
sub-neg87.0%
+-commutative87.0%
associate-*l/96.4%
distribute-rgt-neg-in96.4%
fma-def96.4%
sub-neg96.4%
+-commutative96.4%
distribute-neg-in96.4%
unsub-neg96.4%
remove-double-neg96.4%
Simplified96.4%
Taylor expanded in t around inf 39.6%
*-commutative39.6%
associate-*r/45.5%
Simplified45.5%
clear-num45.5%
div-inv46.1%
Applied egg-rr46.1%
Final simplification56.8%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.4e+78) (+ x (/ (* t y) a)) (if (<= t 56000000000.0) (- x (/ y (/ a z))) (- x (/ y (/ (- a) t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.4e+78) {
tmp = x + ((t * y) / a);
} else if (t <= 56000000000.0) {
tmp = x - (y / (a / z));
} 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) :: tmp
if (t <= (-2.4d+78)) then
tmp = x + ((t * y) / a)
else if (t <= 56000000000.0d0) then
tmp = x - (y / (a / z))
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 tmp;
if (t <= -2.4e+78) {
tmp = x + ((t * y) / a);
} else if (t <= 56000000000.0) {
tmp = x - (y / (a / z));
} else {
tmp = x - (y / (-a / t));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.4e+78: tmp = x + ((t * y) / a) elif t <= 56000000000.0: tmp = x - (y / (a / z)) else: tmp = x - (y / (-a / t)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.4e+78) tmp = Float64(x + Float64(Float64(t * y) / a)); elseif (t <= 56000000000.0) tmp = Float64(x - Float64(y / Float64(a / z))); else tmp = Float64(x - Float64(y / Float64(Float64(-a) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2.4e+78) tmp = x + ((t * y) / a); elseif (t <= 56000000000.0) tmp = x - (y / (a / z)); else tmp = x - (y / (-a / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.4e+78], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 56000000000.0], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[((-a) / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+78}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\mathbf{elif}\;t \leq 56000000000:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{-a}{t}}\\
\end{array}
\end{array}
if t < -2.3999999999999999e78Initial program 93.0%
sub-neg93.0%
+-commutative93.0%
associate-*l/99.2%
distribute-rgt-neg-in99.2%
fma-def99.2%
sub-neg99.2%
+-commutative99.2%
distribute-neg-in99.2%
unsub-neg99.2%
remove-double-neg99.2%
Simplified99.2%
Taylor expanded in z around 0 84.1%
if -2.3999999999999999e78 < t < 5.6e10Initial program 93.2%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in z around inf 84.7%
if 5.6e10 < t Initial program 84.5%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in z around 0 88.7%
associate-*r/88.7%
neg-mul-188.7%
Simplified88.7%
Final simplification85.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.35e-156) (not (<= y 5.5e+14))) (* y (/ (- t z) a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.35e-156) || !(y <= 5.5e+14)) {
tmp = y * ((t - 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 <= (-1.35d-156)) .or. (.not. (y <= 5.5d+14))) then
tmp = y * ((t - 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 <= -1.35e-156) || !(y <= 5.5e+14)) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.35e-156) or not (y <= 5.5e+14): tmp = y * ((t - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.35e-156) || !(y <= 5.5e+14)) tmp = Float64(y * Float64(Float64(t - z) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.35e-156) || ~((y <= 5.5e+14))) tmp = y * ((t - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.35e-156], N[Not[LessEqual[y, 5.5e+14]], $MachinePrecision]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{-156} \lor \neg \left(y \leq 5.5 \cdot 10^{+14}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.35000000000000006e-156 or 5.5e14 < y Initial program 86.7%
sub-neg86.7%
+-commutative86.7%
associate-*l/97.1%
distribute-rgt-neg-in97.1%
fma-def97.1%
sub-neg97.1%
+-commutative97.1%
distribute-neg-in97.1%
unsub-neg97.1%
remove-double-neg97.1%
Simplified97.1%
Taylor expanded in y around -inf 70.2%
Taylor expanded in t around 0 66.0%
associate-*l/64.6%
mul-1-neg64.6%
associate-*l/68.1%
distribute-rgt-neg-in68.1%
distribute-lft-in78.2%
sub-neg78.2%
associate-*l/70.2%
associate-*r/80.4%
Simplified80.4%
if -1.35000000000000006e-156 < y < 5.5e14Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l/97.2%
distribute-rgt-neg-in97.2%
fma-def97.2%
sub-neg97.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
remove-double-neg97.2%
Simplified97.2%
Taylor expanded in y around 0 66.4%
Final simplification75.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.4e+78) (not (<= t 10000000000.0))) (+ x (/ (* t y) a)) (- x (/ y (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.4e+78) || !(t <= 10000000000.0)) {
tmp = x + ((t * y) / a);
} else {
tmp = x - (y / (a / 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 ((t <= (-2.4d+78)) .or. (.not. (t <= 10000000000.0d0))) then
tmp = x + ((t * y) / a)
else
tmp = x - (y / (a / z))
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.4e+78) || !(t <= 10000000000.0)) {
tmp = x + ((t * y) / a);
} else {
tmp = x - (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.4e+78) or not (t <= 10000000000.0): tmp = x + ((t * y) / a) else: tmp = x - (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.4e+78) || !(t <= 10000000000.0)) tmp = Float64(x + Float64(Float64(t * y) / a)); else tmp = Float64(x - Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.4e+78) || ~((t <= 10000000000.0))) tmp = x + ((t * y) / a); else tmp = x - (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.4e+78], N[Not[LessEqual[t, 10000000000.0]], $MachinePrecision]], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{+78} \lor \neg \left(t \leq 10000000000\right):\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if t < -2.3999999999999999e78 or 1e10 < t Initial program 88.5%
sub-neg88.5%
+-commutative88.5%
associate-*l/97.9%
distribute-rgt-neg-in97.9%
fma-def97.9%
sub-neg97.9%
+-commutative97.9%
distribute-neg-in97.9%
unsub-neg97.9%
remove-double-neg97.9%
Simplified97.9%
Taylor expanded in z around 0 81.7%
if -2.3999999999999999e78 < t < 1e10Initial program 93.2%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in z around inf 84.7%
Final simplification83.4%
(FPCore (x y z t a) :precision binary64 (if (<= a -8.2e+115) x (if (<= a 5.4e+110) (* (/ y a) (- t z)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -8.2e+115) {
tmp = x;
} else if (a <= 5.4e+110) {
tmp = (y / a) * (t - 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 <= (-8.2d+115)) then
tmp = x
else if (a <= 5.4d+110) then
tmp = (y / a) * (t - 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 <= -8.2e+115) {
tmp = x;
} else if (a <= 5.4e+110) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -8.2e+115: tmp = x elif a <= 5.4e+110: tmp = (y / a) * (t - z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -8.2e+115) tmp = x; elseif (a <= 5.4e+110) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -8.2e+115) tmp = x; elseif (a <= 5.4e+110) tmp = (y / a) * (t - z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -8.2e+115], x, If[LessEqual[a, 5.4e+110], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.2 \cdot 10^{+115}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{+110}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.19999999999999925e115 or 5.40000000000000019e110 < a Initial program 77.5%
sub-neg77.5%
+-commutative77.5%
associate-*l/95.7%
distribute-rgt-neg-in95.7%
fma-def95.7%
sub-neg95.7%
+-commutative95.7%
distribute-neg-in95.7%
unsub-neg95.7%
remove-double-neg95.7%
Simplified95.7%
Taylor expanded in y around 0 71.0%
if -8.19999999999999925e115 < a < 5.40000000000000019e110Initial program 96.9%
sub-neg96.9%
+-commutative96.9%
associate-*l/97.8%
distribute-rgt-neg-in97.8%
fma-def97.8%
sub-neg97.8%
+-commutative97.8%
distribute-neg-in97.8%
unsub-neg97.8%
remove-double-neg97.8%
Simplified97.8%
Taylor expanded in y around -inf 76.8%
associate-*l/77.5%
*-commutative77.5%
Simplified77.5%
Final simplification75.6%
(FPCore (x y z t a) :precision binary64 (if (<= y -3.2e-58) (* (/ y a) (- t z)) (if (<= y 1.45e+15) (+ x (/ (* t y) a)) (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.2e-58) {
tmp = (y / a) * (t - z);
} else if (y <= 1.45e+15) {
tmp = x + ((t * y) / a);
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-3.2d-58)) then
tmp = (y / a) * (t - z)
else if (y <= 1.45d+15) then
tmp = x + ((t * y) / a)
else
tmp = y * ((t - z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.2e-58) {
tmp = (y / a) * (t - z);
} else if (y <= 1.45e+15) {
tmp = x + ((t * y) / a);
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3.2e-58: tmp = (y / a) * (t - z) elif y <= 1.45e+15: tmp = x + ((t * y) / a) else: tmp = y * ((t - z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -3.2e-58) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif (y <= 1.45e+15) tmp = Float64(x + Float64(Float64(t * y) / a)); else tmp = Float64(y * Float64(Float64(t - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -3.2e-58) tmp = (y / a) * (t - z); elseif (y <= 1.45e+15) tmp = x + ((t * y) / a); else tmp = y * ((t - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3.2e-58], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.45e+15], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-58}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;y \leq 1.45 \cdot 10^{+15}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if y < -3.2000000000000001e-58Initial program 88.5%
sub-neg88.5%
+-commutative88.5%
associate-*l/99.8%
distribute-rgt-neg-in99.8%
fma-def99.9%
sub-neg99.9%
+-commutative99.9%
distribute-neg-in99.9%
unsub-neg99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in y around -inf 74.0%
associate-*l/83.1%
*-commutative83.1%
Simplified83.1%
if -3.2000000000000001e-58 < y < 1.45e15Initial program 99.9%
sub-neg99.9%
+-commutative99.9%
associate-*l/96.8%
distribute-rgt-neg-in96.8%
fma-def96.8%
sub-neg96.8%
+-commutative96.8%
distribute-neg-in96.8%
unsub-neg96.8%
remove-double-neg96.8%
Simplified96.8%
Taylor expanded in z around 0 82.0%
if 1.45e15 < y Initial program 81.4%
sub-neg81.4%
+-commutative81.4%
associate-*l/94.6%
distribute-rgt-neg-in94.6%
fma-def94.6%
sub-neg94.6%
+-commutative94.6%
distribute-neg-in94.6%
unsub-neg94.6%
remove-double-neg94.6%
Simplified94.6%
Taylor expanded in y around -inf 69.1%
Taylor expanded in t around 0 66.0%
associate-*l/63.0%
mul-1-neg63.0%
associate-*l/67.6%
distribute-rgt-neg-in67.6%
distribute-lft-in79.2%
sub-neg79.2%
associate-*l/69.1%
associate-*r/84.4%
Simplified84.4%
Final simplification83.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -2.35e+79) (+ x (/ (* t y) a)) (if (<= t 1.15e+14) (- x (/ y (/ a z))) (+ x (* y (/ t a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2.35e+79) {
tmp = x + ((t * y) / a);
} else if (t <= 1.15e+14) {
tmp = x - (y / (a / 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 (t <= (-2.35d+79)) then
tmp = x + ((t * y) / a)
else if (t <= 1.15d+14) then
tmp = x - (y / (a / 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 (t <= -2.35e+79) {
tmp = x + ((t * y) / a);
} else if (t <= 1.15e+14) {
tmp = x - (y / (a / z));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2.35e+79: tmp = x + ((t * y) / a) elif t <= 1.15e+14: tmp = x - (y / (a / z)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2.35e+79) tmp = Float64(x + Float64(Float64(t * y) / a)); elseif (t <= 1.15e+14) tmp = Float64(x - Float64(y / Float64(a / 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 (t <= -2.35e+79) tmp = x + ((t * y) / a); elseif (t <= 1.15e+14) tmp = x - (y / (a / z)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2.35e+79], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+14], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.35 \cdot 10^{+79}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+14}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if t < -2.35000000000000011e79Initial program 93.0%
sub-neg93.0%
+-commutative93.0%
associate-*l/99.2%
distribute-rgt-neg-in99.2%
fma-def99.2%
sub-neg99.2%
+-commutative99.2%
distribute-neg-in99.2%
unsub-neg99.2%
remove-double-neg99.2%
Simplified99.2%
Taylor expanded in z around 0 84.1%
if -2.35000000000000011e79 < t < 1.15e14Initial program 93.2%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in z around inf 84.7%
if 1.15e14 < t Initial program 84.5%
associate-*r/95.1%
Simplified95.1%
Taylor expanded in z around 0 88.6%
neg-mul-188.6%
distribute-neg-frac88.6%
Simplified88.6%
Final simplification85.5%
(FPCore (x y z t a) :precision binary64 (if (<= a -600000000.0) x (if (<= a 1.9e+85) (* t (/ y a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -600000000.0) {
tmp = x;
} else if (a <= 1.9e+85) {
tmp = t * (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 (a <= (-600000000.0d0)) then
tmp = x
else if (a <= 1.9d+85) then
tmp = t * (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 (a <= -600000000.0) {
tmp = x;
} else if (a <= 1.9e+85) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -600000000.0: tmp = x elif a <= 1.9e+85: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -600000000.0) tmp = x; elseif (a <= 1.9e+85) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -600000000.0) tmp = x; elseif (a <= 1.9e+85) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -600000000.0], x, If[LessEqual[a, 1.9e+85], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -600000000:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{+85}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6e8 or 1.89999999999999996e85 < a Initial program 80.9%
sub-neg80.9%
+-commutative80.9%
associate-*l/96.8%
distribute-rgt-neg-in96.8%
fma-def96.8%
sub-neg96.8%
+-commutative96.8%
distribute-neg-in96.8%
unsub-neg96.8%
remove-double-neg96.8%
Simplified96.8%
Taylor expanded in y around 0 60.4%
if -6e8 < a < 1.89999999999999996e85Initial program 98.1%
sub-neg98.1%
+-commutative98.1%
associate-*l/97.4%
distribute-rgt-neg-in97.4%
fma-def97.4%
sub-neg97.4%
+-commutative97.4%
distribute-neg-in97.4%
unsub-neg97.4%
remove-double-neg97.4%
Simplified97.4%
Taylor expanded in t around inf 46.5%
*-commutative46.5%
associate-*r/48.8%
Simplified48.8%
Final simplification53.5%
(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 91.1%
associate-*r/94.8%
Simplified94.8%
Final simplification94.8%
(FPCore (x y z t a) :precision binary64 (+ x (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
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) * (t - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
def code(x, y, z, t, a): return x + ((y / a) * (t - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y / a) * Float64(t - z))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y / a) * (t - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{a} \cdot \left(t - z\right)
\end{array}
Initial program 91.1%
associate-*l/97.2%
Simplified97.2%
Final simplification97.2%
(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 91.1%
sub-neg91.1%
+-commutative91.1%
associate-*l/97.2%
distribute-rgt-neg-in97.2%
fma-def97.2%
sub-neg97.2%
+-commutative97.2%
distribute-neg-in97.2%
unsub-neg97.2%
remove-double-neg97.2%
Simplified97.2%
Taylor expanded in y around 0 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 2023185
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
: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)))