
(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 13 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 (* (/ 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(Float64(y / 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[(N[(y / a), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{a} \cdot \left(z - t\right)
\end{array}
Initial program 92.0%
associate-*l/97.3%
Simplified97.3%
Final simplification97.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) z)))
(if (<= a -5.2e+24)
x
(if (<= a -2.9e-137)
t_1
(if (<= a -1.2e-227)
x
(if (<= a -4.4e-271) (* y (/ z a)) (if (<= a 3.1e-65) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * z;
double tmp;
if (a <= -5.2e+24) {
tmp = x;
} else if (a <= -2.9e-137) {
tmp = t_1;
} else if (a <= -1.2e-227) {
tmp = x;
} else if (a <= -4.4e-271) {
tmp = y * (z / a);
} else if (a <= 3.1e-65) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (y / a) * z
if (a <= (-5.2d+24)) then
tmp = x
else if (a <= (-2.9d-137)) then
tmp = t_1
else if (a <= (-1.2d-227)) then
tmp = x
else if (a <= (-4.4d-271)) then
tmp = y * (z / a)
else if (a <= 3.1d-65) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * z;
double tmp;
if (a <= -5.2e+24) {
tmp = x;
} else if (a <= -2.9e-137) {
tmp = t_1;
} else if (a <= -1.2e-227) {
tmp = x;
} else if (a <= -4.4e-271) {
tmp = y * (z / a);
} else if (a <= 3.1e-65) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) * z tmp = 0 if a <= -5.2e+24: tmp = x elif a <= -2.9e-137: tmp = t_1 elif a <= -1.2e-227: tmp = x elif a <= -4.4e-271: tmp = y * (z / a) elif a <= 3.1e-65: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) * z) tmp = 0.0 if (a <= -5.2e+24) tmp = x; elseif (a <= -2.9e-137) tmp = t_1; elseif (a <= -1.2e-227) tmp = x; elseif (a <= -4.4e-271) tmp = Float64(y * Float64(z / a)); elseif (a <= 3.1e-65) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) * z; tmp = 0.0; if (a <= -5.2e+24) tmp = x; elseif (a <= -2.9e-137) tmp = t_1; elseif (a <= -1.2e-227) tmp = x; elseif (a <= -4.4e-271) tmp = y * (z / a); elseif (a <= 3.1e-65) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[a, -5.2e+24], x, If[LessEqual[a, -2.9e-137], t$95$1, If[LessEqual[a, -1.2e-227], x, If[LessEqual[a, -4.4e-271], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.1e-65], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot z\\
\mathbf{if}\;a \leq -5.2 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -2.9 \cdot 10^{-137}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.2 \cdot 10^{-227}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -4.4 \cdot 10^{-271}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-65}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -5.1999999999999997e24 or -2.89999999999999985e-137 < a < -1.2e-227 or 3.10000000000000016e-65 < a Initial program 88.1%
associate-*l/98.6%
Simplified98.6%
Taylor expanded in x around inf 58.5%
if -5.1999999999999997e24 < a < -2.89999999999999985e-137 or -4.3999999999999999e-271 < a < 3.10000000000000016e-65Initial program 98.5%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in y around inf 75.7%
Taylor expanded in z around inf 50.8%
*-commutative50.8%
clear-num50.7%
un-div-inv50.8%
Applied egg-rr50.8%
associate-/r/55.1%
Applied egg-rr55.1%
if -1.2e-227 < a < -4.3999999999999999e-271Initial program 99.7%
associate-*l/64.5%
Simplified64.5%
Taylor expanded in y around inf 99.1%
Taylor expanded in z around inf 79.1%
Final simplification57.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ y a) z)))
(if (<= a -9.5e+26)
x
(if (<= a -5.2e-138)
t_1
(if (<= a -1.65e-227)
x
(if (<= a -6.5e-271) (/ y (/ a z)) (if (<= a 3.1e-64) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * z;
double tmp;
if (a <= -9.5e+26) {
tmp = x;
} else if (a <= -5.2e-138) {
tmp = t_1;
} else if (a <= -1.65e-227) {
tmp = x;
} else if (a <= -6.5e-271) {
tmp = y / (a / z);
} else if (a <= 3.1e-64) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (y / a) * z
if (a <= (-9.5d+26)) then
tmp = x
else if (a <= (-5.2d-138)) then
tmp = t_1
else if (a <= (-1.65d-227)) then
tmp = x
else if (a <= (-6.5d-271)) then
tmp = y / (a / z)
else if (a <= 3.1d-64) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y / a) * z;
double tmp;
if (a <= -9.5e+26) {
tmp = x;
} else if (a <= -5.2e-138) {
tmp = t_1;
} else if (a <= -1.65e-227) {
tmp = x;
} else if (a <= -6.5e-271) {
tmp = y / (a / z);
} else if (a <= 3.1e-64) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y / a) * z tmp = 0 if a <= -9.5e+26: tmp = x elif a <= -5.2e-138: tmp = t_1 elif a <= -1.65e-227: tmp = x elif a <= -6.5e-271: tmp = y / (a / z) elif a <= 3.1e-64: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y / a) * z) tmp = 0.0 if (a <= -9.5e+26) tmp = x; elseif (a <= -5.2e-138) tmp = t_1; elseif (a <= -1.65e-227) tmp = x; elseif (a <= -6.5e-271) tmp = Float64(y / Float64(a / z)); elseif (a <= 3.1e-64) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y / a) * z; tmp = 0.0; if (a <= -9.5e+26) tmp = x; elseif (a <= -5.2e-138) tmp = t_1; elseif (a <= -1.65e-227) tmp = x; elseif (a <= -6.5e-271) tmp = y / (a / z); elseif (a <= 3.1e-64) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[a, -9.5e+26], x, If[LessEqual[a, -5.2e-138], t$95$1, If[LessEqual[a, -1.65e-227], x, If[LessEqual[a, -6.5e-271], N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.1e-64], t$95$1, x]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{a} \cdot z\\
\mathbf{if}\;a \leq -9.5 \cdot 10^{+26}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -5.2 \cdot 10^{-138}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -1.65 \cdot 10^{-227}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{-271}:\\
\;\;\;\;\frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -9.50000000000000054e26 or -5.2e-138 < a < -1.65e-227 or 3.10000000000000025e-64 < a Initial program 88.1%
associate-*l/98.6%
Simplified98.6%
Taylor expanded in x around inf 58.5%
if -9.50000000000000054e26 < a < -5.2e-138 or -6.5000000000000005e-271 < a < 3.10000000000000025e-64Initial program 98.5%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in y around inf 75.7%
Taylor expanded in z around inf 50.8%
*-commutative50.8%
clear-num50.7%
un-div-inv50.8%
Applied egg-rr50.8%
associate-/r/55.1%
Applied egg-rr55.1%
if -1.65e-227 < a < -6.5000000000000005e-271Initial program 99.7%
associate-*l/64.5%
Simplified64.5%
Taylor expanded in y around inf 99.1%
Taylor expanded in z around inf 79.1%
*-commutative79.1%
clear-num79.1%
un-div-inv80.0%
Applied egg-rr80.0%
Final simplification57.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y z) a)) (t_2 (* y (- (/ t a)))))
(if (<= a -6e+59)
x
(if (<= a -1.15e-225)
t_2
(if (<= a 1.1e-284)
t_1
(if (<= a 4.8e-217) t_2 (if (<= a 2.9e-65) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / a;
double t_2 = y * -(t / a);
double tmp;
if (a <= -6e+59) {
tmp = x;
} else if (a <= -1.15e-225) {
tmp = t_2;
} else if (a <= 1.1e-284) {
tmp = t_1;
} else if (a <= 4.8e-217) {
tmp = t_2;
} else if (a <= 2.9e-65) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * z) / a
t_2 = y * -(t / a)
if (a <= (-6d+59)) then
tmp = x
else if (a <= (-1.15d-225)) then
tmp = t_2
else if (a <= 1.1d-284) then
tmp = t_1
else if (a <= 4.8d-217) then
tmp = t_2
else if (a <= 2.9d-65) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / a;
double t_2 = y * -(t / a);
double tmp;
if (a <= -6e+59) {
tmp = x;
} else if (a <= -1.15e-225) {
tmp = t_2;
} else if (a <= 1.1e-284) {
tmp = t_1;
} else if (a <= 4.8e-217) {
tmp = t_2;
} else if (a <= 2.9e-65) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * z) / a t_2 = y * -(t / a) tmp = 0 if a <= -6e+59: tmp = x elif a <= -1.15e-225: tmp = t_2 elif a <= 1.1e-284: tmp = t_1 elif a <= 4.8e-217: tmp = t_2 elif a <= 2.9e-65: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * z) / a) t_2 = Float64(y * Float64(-Float64(t / a))) tmp = 0.0 if (a <= -6e+59) tmp = x; elseif (a <= -1.15e-225) tmp = t_2; elseif (a <= 1.1e-284) tmp = t_1; elseif (a <= 4.8e-217) tmp = t_2; elseif (a <= 2.9e-65) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * z) / a; t_2 = y * -(t / a); tmp = 0.0; if (a <= -6e+59) tmp = x; elseif (a <= -1.15e-225) tmp = t_2; elseif (a <= 1.1e-284) tmp = t_1; elseif (a <= 4.8e-217) tmp = t_2; elseif (a <= 2.9e-65) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]}, Block[{t$95$2 = N[(y * (-N[(t / a), $MachinePrecision])), $MachinePrecision]}, If[LessEqual[a, -6e+59], x, If[LessEqual[a, -1.15e-225], t$95$2, If[LessEqual[a, 1.1e-284], t$95$1, If[LessEqual[a, 4.8e-217], t$95$2, If[LessEqual[a, 2.9e-65], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{a}\\
t_2 := y \cdot \left(-\frac{t}{a}\right)\\
\mathbf{if}\;a \leq -6 \cdot 10^{+59}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.15 \cdot 10^{-225}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-284}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.8 \cdot 10^{-217}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{-65}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -6.0000000000000001e59 or 2.8999999999999998e-65 < a Initial program 86.3%
associate-*l/99.0%
Simplified99.0%
Taylor expanded in x around inf 62.0%
if -6.0000000000000001e59 < a < -1.1499999999999999e-225 or 1.1e-284 < a < 4.7999999999999997e-217Initial program 99.8%
associate-*l/98.3%
Simplified98.3%
Taylor expanded in y around inf 71.4%
Taylor expanded in z around 0 51.4%
associate-*r/51.4%
neg-mul-151.4%
Simplified51.4%
if -1.1499999999999999e-225 < a < 1.1e-284 or 4.7999999999999997e-217 < a < 2.8999999999999998e-65Initial program 97.8%
associate-*l/91.9%
Simplified91.9%
Taylor expanded in y around inf 76.5%
Taylor expanded in z around 0 76.5%
+-commutative76.5%
mul-1-neg76.5%
sub-neg76.5%
div-sub76.5%
Simplified76.5%
associate-*l/83.1%
associate-/l*76.9%
Applied egg-rr76.9%
Taylor expanded in z around inf 66.2%
Final simplification60.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y z) a)) (t_2 (/ t (/ (- a) y))))
(if (<= a -9.8e+55)
x
(if (<= a -2.3e-227)
t_2
(if (<= a 5.1e-287)
t_1
(if (<= a 5.4e-217) t_2 (if (<= a 2.95e-64) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / a;
double t_2 = t / (-a / y);
double tmp;
if (a <= -9.8e+55) {
tmp = x;
} else if (a <= -2.3e-227) {
tmp = t_2;
} else if (a <= 5.1e-287) {
tmp = t_1;
} else if (a <= 5.4e-217) {
tmp = t_2;
} else if (a <= 2.95e-64) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * z) / a
t_2 = t / (-a / y)
if (a <= (-9.8d+55)) then
tmp = x
else if (a <= (-2.3d-227)) then
tmp = t_2
else if (a <= 5.1d-287) then
tmp = t_1
else if (a <= 5.4d-217) then
tmp = t_2
else if (a <= 2.95d-64) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / a;
double t_2 = t / (-a / y);
double tmp;
if (a <= -9.8e+55) {
tmp = x;
} else if (a <= -2.3e-227) {
tmp = t_2;
} else if (a <= 5.1e-287) {
tmp = t_1;
} else if (a <= 5.4e-217) {
tmp = t_2;
} else if (a <= 2.95e-64) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * z) / a t_2 = t / (-a / y) tmp = 0 if a <= -9.8e+55: tmp = x elif a <= -2.3e-227: tmp = t_2 elif a <= 5.1e-287: tmp = t_1 elif a <= 5.4e-217: tmp = t_2 elif a <= 2.95e-64: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * z) / a) t_2 = Float64(t / Float64(Float64(-a) / y)) tmp = 0.0 if (a <= -9.8e+55) tmp = x; elseif (a <= -2.3e-227) tmp = t_2; elseif (a <= 5.1e-287) tmp = t_1; elseif (a <= 5.4e-217) tmp = t_2; elseif (a <= 2.95e-64) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * z) / a; t_2 = t / (-a / y); tmp = 0.0; if (a <= -9.8e+55) tmp = x; elseif (a <= -2.3e-227) tmp = t_2; elseif (a <= 5.1e-287) tmp = t_1; elseif (a <= 5.4e-217) tmp = t_2; elseif (a <= 2.95e-64) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]}, Block[{t$95$2 = N[(t / N[((-a) / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9.8e+55], x, If[LessEqual[a, -2.3e-227], t$95$2, If[LessEqual[a, 5.1e-287], t$95$1, If[LessEqual[a, 5.4e-217], t$95$2, If[LessEqual[a, 2.95e-64], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{a}\\
t_2 := \frac{t}{\frac{-a}{y}}\\
\mathbf{if}\;a \leq -9.8 \cdot 10^{+55}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{-227}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 5.1 \cdot 10^{-287}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{-217}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 2.95 \cdot 10^{-64}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -9.80000000000000029e55 or 2.94999999999999997e-64 < a Initial program 86.3%
associate-*l/99.0%
Simplified99.0%
Taylor expanded in x around inf 62.0%
if -9.80000000000000029e55 < a < -2.30000000000000012e-227 or 5.0999999999999998e-287 < a < 5.40000000000000032e-217Initial program 99.8%
associate-*l/98.3%
Simplified98.3%
Taylor expanded in y around inf 71.4%
Taylor expanded in z around 0 51.4%
associate-*r/51.4%
neg-mul-151.4%
Simplified51.4%
associate-*l/59.4%
add-cube-cbrt58.8%
times-frac55.7%
add-sqr-sqrt26.7%
sqrt-unprod26.0%
sqr-neg26.0%
sqrt-unprod2.8%
add-sqr-sqrt3.6%
times-frac3.6%
*-commutative3.6%
add-cube-cbrt3.6%
div-inv3.6%
*-commutative3.6%
associate-*l*3.6%
div-inv3.6%
clear-num3.6%
div-inv3.6%
frac-2neg3.6%
add-sqr-sqrt0.8%
sqrt-unprod22.0%
sqr-neg22.0%
sqrt-unprod29.3%
add-sqr-sqrt57.8%
distribute-neg-frac57.8%
Applied egg-rr57.8%
if -2.30000000000000012e-227 < a < 5.0999999999999998e-287 or 5.40000000000000032e-217 < a < 2.94999999999999997e-64Initial program 97.8%
associate-*l/91.9%
Simplified91.9%
Taylor expanded in y around inf 76.5%
Taylor expanded in z around 0 76.5%
+-commutative76.5%
mul-1-neg76.5%
sub-neg76.5%
div-sub76.5%
Simplified76.5%
associate-*l/83.1%
associate-/l*76.9%
Applied egg-rr76.9%
Taylor expanded in z around inf 66.2%
Final simplification62.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* y z) a)) (t_2 (/ (* y t) (- a))))
(if (<= a -3e+55)
x
(if (<= a -1.05e-226)
t_2
(if (<= a 6.6e-286)
t_1
(if (<= a 5.4e-217) t_2 (if (<= a 7.2e-66) t_1 x)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / a;
double t_2 = (y * t) / -a;
double tmp;
if (a <= -3e+55) {
tmp = x;
} else if (a <= -1.05e-226) {
tmp = t_2;
} else if (a <= 6.6e-286) {
tmp = t_1;
} else if (a <= 5.4e-217) {
tmp = t_2;
} else if (a <= 7.2e-66) {
tmp = t_1;
} 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * z) / a
t_2 = (y * t) / -a
if (a <= (-3d+55)) then
tmp = x
else if (a <= (-1.05d-226)) then
tmp = t_2
else if (a <= 6.6d-286) then
tmp = t_1
else if (a <= 5.4d-217) then
tmp = t_2
else if (a <= 7.2d-66) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (y * z) / a;
double t_2 = (y * t) / -a;
double tmp;
if (a <= -3e+55) {
tmp = x;
} else if (a <= -1.05e-226) {
tmp = t_2;
} else if (a <= 6.6e-286) {
tmp = t_1;
} else if (a <= 5.4e-217) {
tmp = t_2;
} else if (a <= 7.2e-66) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y * z) / a t_2 = (y * t) / -a tmp = 0 if a <= -3e+55: tmp = x elif a <= -1.05e-226: tmp = t_2 elif a <= 6.6e-286: tmp = t_1 elif a <= 5.4e-217: tmp = t_2 elif a <= 7.2e-66: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y * z) / a) t_2 = Float64(Float64(y * t) / Float64(-a)) tmp = 0.0 if (a <= -3e+55) tmp = x; elseif (a <= -1.05e-226) tmp = t_2; elseif (a <= 6.6e-286) tmp = t_1; elseif (a <= 5.4e-217) tmp = t_2; elseif (a <= 7.2e-66) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y * z) / a; t_2 = (y * t) / -a; tmp = 0.0; if (a <= -3e+55) tmp = x; elseif (a <= -1.05e-226) tmp = t_2; elseif (a <= 6.6e-286) tmp = t_1; elseif (a <= 5.4e-217) tmp = t_2; elseif (a <= 7.2e-66) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * t), $MachinePrecision] / (-a)), $MachinePrecision]}, If[LessEqual[a, -3e+55], x, If[LessEqual[a, -1.05e-226], t$95$2, If[LessEqual[a, 6.6e-286], t$95$1, If[LessEqual[a, 5.4e-217], t$95$2, If[LessEqual[a, 7.2e-66], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot z}{a}\\
t_2 := \frac{y \cdot t}{-a}\\
\mathbf{if}\;a \leq -3 \cdot 10^{+55}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.05 \cdot 10^{-226}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{-286}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 5.4 \cdot 10^{-217}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-66}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.00000000000000017e55 or 7.20000000000000025e-66 < a Initial program 86.3%
associate-*l/99.0%
Simplified99.0%
Taylor expanded in x around inf 62.0%
if -3.00000000000000017e55 < a < -1.0500000000000001e-226 or 6.5999999999999997e-286 < a < 5.40000000000000032e-217Initial program 99.8%
associate-*l/98.3%
Simplified98.3%
Taylor expanded in y around inf 71.4%
Taylor expanded in z around 0 51.4%
associate-*r/51.4%
neg-mul-151.4%
Simplified51.4%
*-commutative51.4%
frac-2neg51.4%
remove-double-neg51.4%
associate-*r/59.4%
Applied egg-rr59.4%
if -1.0500000000000001e-226 < a < 6.5999999999999997e-286 or 5.40000000000000032e-217 < a < 7.20000000000000025e-66Initial program 97.8%
associate-*l/91.9%
Simplified91.9%
Taylor expanded in y around inf 76.5%
Taylor expanded in z around 0 76.5%
+-commutative76.5%
mul-1-neg76.5%
sub-neg76.5%
div-sub76.5%
Simplified76.5%
associate-*l/83.1%
associate-/l*76.9%
Applied egg-rr76.9%
Taylor expanded in z around inf 66.2%
Final simplification62.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* (/ y a) z))))
(if (<= x -6.4e-80)
t_1
(if (<= x 2.6e-6)
(* y (/ (- z t) a))
(if (<= x 8e+26)
(+ x (/ y (/ a z)))
(if (<= x 1.2e+37) (/ t (/ (- a) y)) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y / a) * z);
double tmp;
if (x <= -6.4e-80) {
tmp = t_1;
} else if (x <= 2.6e-6) {
tmp = y * ((z - t) / a);
} else if (x <= 8e+26) {
tmp = x + (y / (a / z));
} else if (x <= 1.2e+37) {
tmp = t / (-a / y);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x + ((y / a) * z)
if (x <= (-6.4d-80)) then
tmp = t_1
else if (x <= 2.6d-6) then
tmp = y * ((z - t) / a)
else if (x <= 8d+26) then
tmp = x + (y / (a / z))
else if (x <= 1.2d+37) then
tmp = t / (-a / y)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y / a) * z);
double tmp;
if (x <= -6.4e-80) {
tmp = t_1;
} else if (x <= 2.6e-6) {
tmp = y * ((z - t) / a);
} else if (x <= 8e+26) {
tmp = x + (y / (a / z));
} else if (x <= 1.2e+37) {
tmp = t / (-a / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y / a) * z) tmp = 0 if x <= -6.4e-80: tmp = t_1 elif x <= 2.6e-6: tmp = y * ((z - t) / a) elif x <= 8e+26: tmp = x + (y / (a / z)) elif x <= 1.2e+37: tmp = t / (-a / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y / a) * z)) tmp = 0.0 if (x <= -6.4e-80) tmp = t_1; elseif (x <= 2.6e-6) tmp = Float64(y * Float64(Float64(z - t) / a)); elseif (x <= 8e+26) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (x <= 1.2e+37) tmp = Float64(t / Float64(Float64(-a) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y / a) * z); tmp = 0.0; if (x <= -6.4e-80) tmp = t_1; elseif (x <= 2.6e-6) tmp = y * ((z - t) / a); elseif (x <= 8e+26) tmp = x + (y / (a / z)); elseif (x <= 1.2e+37) tmp = t / (-a / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -6.4e-80], t$95$1, If[LessEqual[x, 2.6e-6], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 8e+26], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.2e+37], N[(t / N[((-a) / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{a} \cdot z\\
\mathbf{if}\;x \leq -6.4 \cdot 10^{-80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-6}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{elif}\;x \leq 8 \cdot 10^{+26}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{+37}:\\
\;\;\;\;\frac{t}{\frac{-a}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -6.3999999999999998e-80 or 1.2e37 < x Initial program 93.1%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in t around 0 80.0%
associate-*l/83.7%
*-commutative83.7%
Simplified83.7%
if -6.3999999999999998e-80 < x < 2.60000000000000009e-6Initial program 90.1%
associate-*l/94.8%
Simplified94.8%
Taylor expanded in y around inf 80.1%
Taylor expanded in z around 0 80.1%
+-commutative80.1%
mul-1-neg80.1%
sub-neg80.1%
div-sub80.1%
Simplified80.1%
if 2.60000000000000009e-6 < x < 8.00000000000000038e26Initial program 100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 100.0%
if 8.00000000000000038e26 < x < 1.2e37Initial program 99.2%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in y around inf 99.2%
Taylor expanded in z around 0 99.2%
associate-*r/99.2%
neg-mul-199.2%
Simplified99.2%
associate-*l/99.2%
add-cube-cbrt98.0%
times-frac97.9%
add-sqr-sqrt24.4%
sqrt-unprod24.7%
sqr-neg24.7%
sqrt-unprod0.4%
add-sqr-sqrt0.5%
times-frac0.5%
*-commutative0.5%
add-cube-cbrt0.5%
div-inv0.5%
*-commutative0.5%
associate-*l*0.5%
div-inv0.5%
clear-num0.5%
div-inv0.5%
frac-2neg0.5%
add-sqr-sqrt0.1%
sqrt-unprod51.5%
sqr-neg51.5%
sqrt-unprod74.2%
add-sqr-sqrt99.6%
distribute-neg-frac99.6%
Applied egg-rr99.6%
Final simplification82.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= x -2.6e-81) (not (<= x 5.8e-10))) (+ x (/ y (/ a z))) (* y (/ (- z t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((x <= -2.6e-81) || !(x <= 5.8e-10)) {
tmp = x + (y / (a / z));
} 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) :: tmp
if ((x <= (-2.6d-81)) .or. (.not. (x <= 5.8d-10))) then
tmp = x + (y / (a / z))
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 tmp;
if ((x <= -2.6e-81) || !(x <= 5.8e-10)) {
tmp = x + (y / (a / z));
} else {
tmp = y * ((z - t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (x <= -2.6e-81) or not (x <= 5.8e-10): tmp = x + (y / (a / z)) else: tmp = y * ((z - t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((x <= -2.6e-81) || !(x <= 5.8e-10)) tmp = Float64(x + Float64(y / Float64(a / z))); else tmp = Float64(y * Float64(Float64(z - t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((x <= -2.6e-81) || ~((x <= 5.8e-10))) tmp = x + (y / (a / z)); else tmp = y * ((z - t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -2.6e-81], N[Not[LessEqual[x, 5.8e-10]], $MachinePrecision]], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{-81} \lor \neg \left(x \leq 5.8 \cdot 10^{-10}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\end{array}
\end{array}
if x < -2.5999999999999999e-81 or 5.79999999999999962e-10 < x Initial program 93.6%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in z around inf 78.7%
if -2.5999999999999999e-81 < x < 5.79999999999999962e-10Initial program 90.1%
associate-*l/94.8%
Simplified94.8%
Taylor expanded in y around inf 80.1%
Taylor expanded in z around 0 80.1%
+-commutative80.1%
mul-1-neg80.1%
sub-neg80.1%
div-sub80.1%
Simplified80.1%
Final simplification79.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.7e-75) (not (<= t 1.6e+87))) (- x (* (/ y a) t)) (+ x (* (/ y a) z))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.7e-75) || !(t <= 1.6e+87)) {
tmp = x - ((y / a) * t);
} 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 <= (-3.7d-75)) .or. (.not. (t <= 1.6d+87))) then
tmp = x - ((y / a) * t)
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 <= -3.7e-75) || !(t <= 1.6e+87)) {
tmp = x - ((y / a) * t);
} else {
tmp = x + ((y / a) * z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.7e-75) or not (t <= 1.6e+87): tmp = x - ((y / a) * t) else: tmp = x + ((y / a) * z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -3.7e-75) || !(t <= 1.6e+87)) tmp = Float64(x - Float64(Float64(y / a) * t)); else tmp = Float64(x + Float64(Float64(y / a) * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -3.7e-75) || ~((t <= 1.6e+87))) tmp = x - ((y / a) * t); else tmp = x + ((y / a) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -3.7e-75], N[Not[LessEqual[t, 1.6e+87]], $MachinePrecision]], N[(x - N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.7 \cdot 10^{-75} \lor \neg \left(t \leq 1.6 \cdot 10^{+87}\right):\\
\;\;\;\;x - \frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot z\\
\end{array}
\end{array}
if t < -3.70000000000000024e-75 or 1.6e87 < t Initial program 90.8%
associate-*l/98.8%
Simplified98.8%
Taylor expanded in z around 0 85.2%
mul-1-neg85.2%
associate-*l/91.5%
distribute-rgt-neg-out91.5%
+-commutative91.5%
*-commutative91.5%
distribute-lft-neg-out91.5%
unsub-neg91.5%
Simplified91.5%
if -3.70000000000000024e-75 < t < 1.6e87Initial program 93.0%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in t around 0 82.7%
associate-*l/87.7%
*-commutative87.7%
Simplified87.7%
Final simplification89.5%
(FPCore (x y z t a) :precision binary64 (if (<= x -3.15e+205) x (if (<= x 1.6e+40) (* y (/ (- z t) a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.15e+205) {
tmp = x;
} else if (x <= 1.6e+40) {
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 (x <= (-3.15d+205)) then
tmp = x
else if (x <= 1.6d+40) 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 (x <= -3.15e+205) {
tmp = x;
} else if (x <= 1.6e+40) {
tmp = y * ((z - t) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -3.15e+205: tmp = x elif x <= 1.6e+40: tmp = y * ((z - t) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -3.15e+205) tmp = x; elseif (x <= 1.6e+40) 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 (x <= -3.15e+205) tmp = x; elseif (x <= 1.6e+40) tmp = y * ((z - t) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.15e+205], x, If[LessEqual[x, 1.6e+40], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.15 \cdot 10^{+205}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+40}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.15000000000000007e205 or 1.5999999999999999e40 < x Initial program 93.6%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around inf 76.1%
if -3.15000000000000007e205 < x < 1.5999999999999999e40Initial program 91.2%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in y around inf 69.4%
Taylor expanded in z around 0 69.4%
+-commutative69.4%
mul-1-neg69.4%
sub-neg69.4%
div-sub69.4%
Simplified69.4%
Final simplification71.4%
(FPCore (x y z t a) :precision binary64 (if (<= x -5.6e-80) (+ x (* (/ y a) z)) (if (<= x 7.6e-9) (* y (/ (- z t) a)) (+ x (/ (* y z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -5.6e-80) {
tmp = x + ((y / a) * z);
} else if (x <= 7.6e-9) {
tmp = y * ((z - t) / a);
} else {
tmp = x + ((y * 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 (x <= (-5.6d-80)) then
tmp = x + ((y / a) * z)
else if (x <= 7.6d-9) then
tmp = y * ((z - t) / a)
else
tmp = x + ((y * 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 (x <= -5.6e-80) {
tmp = x + ((y / a) * z);
} else if (x <= 7.6e-9) {
tmp = y * ((z - t) / a);
} else {
tmp = x + ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -5.6e-80: tmp = x + ((y / a) * z) elif x <= 7.6e-9: tmp = y * ((z - t) / a) else: tmp = x + ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -5.6e-80) tmp = Float64(x + Float64(Float64(y / a) * z)); elseif (x <= 7.6e-9) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = Float64(x + Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (x <= -5.6e-80) tmp = x + ((y / a) * z); elseif (x <= 7.6e-9) tmp = y * ((z - t) / a); else tmp = x + ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -5.6e-80], N[(x + N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.6e-9], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.6 \cdot 10^{-80}:\\
\;\;\;\;x + \frac{y}{a} \cdot z\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{-9}:\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if x < -5.59999999999999978e-80Initial program 92.0%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in t around 0 74.9%
associate-*l/81.4%
*-commutative81.4%
Simplified81.4%
if -5.59999999999999978e-80 < x < 7.60000000000000023e-9Initial program 90.1%
associate-*l/94.8%
Simplified94.8%
Taylor expanded in y around inf 80.1%
Taylor expanded in z around 0 80.1%
+-commutative80.1%
mul-1-neg80.1%
sub-neg80.1%
div-sub80.1%
Simplified80.1%
if 7.60000000000000023e-9 < x Initial program 95.4%
associate-*l/98.6%
Simplified98.6%
Taylor expanded in t around 0 82.9%
Final simplification81.2%
(FPCore (x y z t a) :precision binary64 (if (<= a -2.05e+24) x (if (<= a 7.8e-66) (* (/ y a) z) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.05e+24) {
tmp = x;
} else if (a <= 7.8e-66) {
tmp = (y / a) * z;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.05d+24)) then
tmp = x
else if (a <= 7.8d-66) then
tmp = (y / a) * z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.05e+24) {
tmp = x;
} else if (a <= 7.8e-66) {
tmp = (y / a) * z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.05e+24: tmp = x elif a <= 7.8e-66: tmp = (y / a) * z else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.05e+24) tmp = x; elseif (a <= 7.8e-66) tmp = Float64(Float64(y / a) * z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.05e+24) tmp = x; elseif (a <= 7.8e-66) tmp = (y / a) * z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.05e+24], x, If[LessEqual[a, 7.8e-66], N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.05 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-66}:\\
\;\;\;\;\frac{y}{a} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.05e24 or 7.79999999999999965e-66 < a Initial program 86.7%
associate-*l/99.0%
Simplified99.0%
Taylor expanded in x around inf 61.7%
if -2.05e24 < a < 7.79999999999999965e-66Initial program 98.8%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in y around inf 74.7%
Taylor expanded in z around inf 45.9%
*-commutative45.9%
clear-num45.9%
un-div-inv46.0%
Applied egg-rr46.0%
associate-/r/47.9%
Applied egg-rr47.9%
Final simplification55.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 92.0%
associate-*l/97.3%
Simplified97.3%
Taylor expanded in x around inf 42.8%
Final simplification42.8%
(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 2023196
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:herbie-target
(if (< y -1.0761266216389975e-10) (+ x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t))))))
(+ x (/ (* y (- z t)) a)))