
(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 14 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 (if (<= z 1.9e-122) (+ x (/ (* y (- t z)) a)) (- x (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 1.9e-122) {
tmp = x + ((y * (t - z)) / a);
} else {
tmp = x - ((z - t) * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= 1.9d-122) then
tmp = x + ((y * (t - z)) / a)
else
tmp = x - ((z - t) * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 1.9e-122) {
tmp = x + ((y * (t - z)) / a);
} else {
tmp = x - ((z - t) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 1.9e-122: tmp = x + ((y * (t - z)) / a) else: tmp = x - ((z - t) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 1.9e-122) tmp = Float64(x + Float64(Float64(y * Float64(t - z)) / a)); else tmp = Float64(x - Float64(Float64(z - t) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 1.9e-122) tmp = x + ((y * (t - z)) / a); else tmp = x - ((z - t) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 1.9e-122], N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.9 \cdot 10^{-122}:\\
\;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < 1.9e-122Initial program 98.1%
if 1.9e-122 < z Initial program 93.3%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in y around 0 93.3%
associate-*l/99.0%
*-commutative99.0%
Simplified99.0%
Final simplification98.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- a)))))
(if (<= z -3.7e+115)
t_1
(if (<= z -2.7e-104)
x
(if (<= z -6.2e-159)
(* t (/ y a))
(if (<= z -1.4e-231)
x
(if (<= z 5.5e-191) (/ (* y t) a) (if (<= z 2.4e+139) x t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / -a);
double tmp;
if (z <= -3.7e+115) {
tmp = t_1;
} else if (z <= -2.7e-104) {
tmp = x;
} else if (z <= -6.2e-159) {
tmp = t * (y / a);
} else if (z <= -1.4e-231) {
tmp = x;
} else if (z <= 5.5e-191) {
tmp = (y * t) / a;
} else if (z <= 2.4e+139) {
tmp = x;
} 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 = y * (z / -a)
if (z <= (-3.7d+115)) then
tmp = t_1
else if (z <= (-2.7d-104)) then
tmp = x
else if (z <= (-6.2d-159)) then
tmp = t * (y / a)
else if (z <= (-1.4d-231)) then
tmp = x
else if (z <= 5.5d-191) then
tmp = (y * t) / a
else if (z <= 2.4d+139) then
tmp = x
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 = y * (z / -a);
double tmp;
if (z <= -3.7e+115) {
tmp = t_1;
} else if (z <= -2.7e-104) {
tmp = x;
} else if (z <= -6.2e-159) {
tmp = t * (y / a);
} else if (z <= -1.4e-231) {
tmp = x;
} else if (z <= 5.5e-191) {
tmp = (y * t) / a;
} else if (z <= 2.4e+139) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / -a) tmp = 0 if z <= -3.7e+115: tmp = t_1 elif z <= -2.7e-104: tmp = x elif z <= -6.2e-159: tmp = t * (y / a) elif z <= -1.4e-231: tmp = x elif z <= 5.5e-191: tmp = (y * t) / a elif z <= 2.4e+139: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(-a))) tmp = 0.0 if (z <= -3.7e+115) tmp = t_1; elseif (z <= -2.7e-104) tmp = x; elseif (z <= -6.2e-159) tmp = Float64(t * Float64(y / a)); elseif (z <= -1.4e-231) tmp = x; elseif (z <= 5.5e-191) tmp = Float64(Float64(y * t) / a); elseif (z <= 2.4e+139) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / -a); tmp = 0.0; if (z <= -3.7e+115) tmp = t_1; elseif (z <= -2.7e-104) tmp = x; elseif (z <= -6.2e-159) tmp = t * (y / a); elseif (z <= -1.4e-231) tmp = x; elseif (z <= 5.5e-191) tmp = (y * t) / a; elseif (z <= 2.4e+139) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.7e+115], t$95$1, If[LessEqual[z, -2.7e-104], x, If[LessEqual[z, -6.2e-159], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.4e-231], x, If[LessEqual[z, 5.5e-191], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 2.4e+139], x, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{-a}\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{-104}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-159}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-231}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-191}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+139}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.70000000000000006e115 or 2.40000000000000008e139 < z Initial program 93.8%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in z around inf 69.5%
mul-1-neg69.5%
associate-/l*66.0%
distribute-rgt-neg-in66.0%
distribute-neg-frac266.0%
Simplified66.0%
if -3.70000000000000006e115 < z < -2.6999999999999998e-104 or -6.2e-159 < z < -1.3999999999999999e-231 or 5.5000000000000001e-191 < z < 2.40000000000000008e139Initial program 96.9%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in x around inf 54.1%
if -2.6999999999999998e-104 < z < -6.2e-159Initial program 93.3%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in t around inf 59.1%
*-commutative59.1%
Simplified59.1%
*-commutative59.1%
associate-/l*79.2%
*-commutative79.2%
Applied egg-rr79.2%
if -1.3999999999999999e-231 < z < 5.5000000000000001e-191Initial program 99.8%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in t around inf 70.3%
*-commutative70.3%
Simplified70.3%
Final simplification61.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.85e+118)
(* y (/ z (- a)))
(if (<= z -4.2e-104)
x
(if (<= z -4e-159)
(* t (/ y a))
(if (<= z -3.7e-232)
x
(if (<= z 1e-190)
(/ (* y t) a)
(if (<= z 2.4e+139) x (* z (/ y (- a))))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.85e+118) {
tmp = y * (z / -a);
} else if (z <= -4.2e-104) {
tmp = x;
} else if (z <= -4e-159) {
tmp = t * (y / a);
} else if (z <= -3.7e-232) {
tmp = x;
} else if (z <= 1e-190) {
tmp = (y * t) / a;
} else if (z <= 2.4e+139) {
tmp = x;
} else {
tmp = z * (y / -a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.85d+118)) then
tmp = y * (z / -a)
else if (z <= (-4.2d-104)) then
tmp = x
else if (z <= (-4d-159)) then
tmp = t * (y / a)
else if (z <= (-3.7d-232)) then
tmp = x
else if (z <= 1d-190) then
tmp = (y * t) / a
else if (z <= 2.4d+139) then
tmp = x
else
tmp = z * (y / -a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.85e+118) {
tmp = y * (z / -a);
} else if (z <= -4.2e-104) {
tmp = x;
} else if (z <= -4e-159) {
tmp = t * (y / a);
} else if (z <= -3.7e-232) {
tmp = x;
} else if (z <= 1e-190) {
tmp = (y * t) / a;
} else if (z <= 2.4e+139) {
tmp = x;
} else {
tmp = z * (y / -a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.85e+118: tmp = y * (z / -a) elif z <= -4.2e-104: tmp = x elif z <= -4e-159: tmp = t * (y / a) elif z <= -3.7e-232: tmp = x elif z <= 1e-190: tmp = (y * t) / a elif z <= 2.4e+139: tmp = x else: tmp = z * (y / -a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.85e+118) tmp = Float64(y * Float64(z / Float64(-a))); elseif (z <= -4.2e-104) tmp = x; elseif (z <= -4e-159) tmp = Float64(t * Float64(y / a)); elseif (z <= -3.7e-232) tmp = x; elseif (z <= 1e-190) tmp = Float64(Float64(y * t) / a); elseif (z <= 2.4e+139) tmp = x; else tmp = Float64(z * Float64(y / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.85e+118) tmp = y * (z / -a); elseif (z <= -4.2e-104) tmp = x; elseif (z <= -4e-159) tmp = t * (y / a); elseif (z <= -3.7e-232) tmp = x; elseif (z <= 1e-190) tmp = (y * t) / a; elseif (z <= 2.4e+139) tmp = x; else tmp = z * (y / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.85e+118], N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e-104], x, If[LessEqual[z, -4e-159], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.7e-232], x, If[LessEqual[z, 1e-190], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 2.4e+139], x, N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.85 \cdot 10^{+118}:\\
\;\;\;\;y \cdot \frac{z}{-a}\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-104}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -4 \cdot 10^{-159}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -3.7 \cdot 10^{-232}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 10^{-190}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+139}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\end{array}
\end{array}
if z < -1.84999999999999993e118Initial program 94.6%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in z around inf 71.6%
mul-1-neg71.6%
associate-/l*68.9%
distribute-rgt-neg-in68.9%
distribute-neg-frac268.9%
Simplified68.9%
if -1.84999999999999993e118 < z < -4.19999999999999997e-104 or -3.99999999999999995e-159 < z < -3.69999999999999979e-232 or 1e-190 < z < 2.40000000000000008e139Initial program 96.9%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in x around inf 54.1%
if -4.19999999999999997e-104 < z < -3.99999999999999995e-159Initial program 93.3%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in t around inf 59.1%
*-commutative59.1%
Simplified59.1%
*-commutative59.1%
associate-/l*79.2%
*-commutative79.2%
Applied egg-rr79.2%
if -3.69999999999999979e-232 < z < 1e-190Initial program 99.8%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in t around inf 70.3%
*-commutative70.3%
Simplified70.3%
if 2.40000000000000008e139 < z Initial program 93.0%
associate-/l*93.5%
Simplified93.5%
Taylor expanded in y around 0 93.0%
associate-*l/97.7%
*-commutative97.7%
Simplified97.7%
Taylor expanded in z around inf 67.8%
mul-1-neg67.8%
distribute-neg-frac267.8%
*-commutative67.8%
associate-*r/67.7%
Simplified67.7%
Final simplification62.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (* z (- y)) a)))
(if (<= z -6e+115)
t_1
(if (<= z -1.55e-103)
x
(if (<= z -1.4e-163)
(* t (/ y a))
(if (<= z -2.05e-231)
x
(if (<= z 3.8e-188) (/ (* y t) a) (if (<= z 2.4e+139) x t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z * -y) / a;
double tmp;
if (z <= -6e+115) {
tmp = t_1;
} else if (z <= -1.55e-103) {
tmp = x;
} else if (z <= -1.4e-163) {
tmp = t * (y / a);
} else if (z <= -2.05e-231) {
tmp = x;
} else if (z <= 3.8e-188) {
tmp = (y * t) / a;
} else if (z <= 2.4e+139) {
tmp = x;
} 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 = (z * -y) / a
if (z <= (-6d+115)) then
tmp = t_1
else if (z <= (-1.55d-103)) then
tmp = x
else if (z <= (-1.4d-163)) then
tmp = t * (y / a)
else if (z <= (-2.05d-231)) then
tmp = x
else if (z <= 3.8d-188) then
tmp = (y * t) / a
else if (z <= 2.4d+139) then
tmp = x
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 = (z * -y) / a;
double tmp;
if (z <= -6e+115) {
tmp = t_1;
} else if (z <= -1.55e-103) {
tmp = x;
} else if (z <= -1.4e-163) {
tmp = t * (y / a);
} else if (z <= -2.05e-231) {
tmp = x;
} else if (z <= 3.8e-188) {
tmp = (y * t) / a;
} else if (z <= 2.4e+139) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z * -y) / a tmp = 0 if z <= -6e+115: tmp = t_1 elif z <= -1.55e-103: tmp = x elif z <= -1.4e-163: tmp = t * (y / a) elif z <= -2.05e-231: tmp = x elif z <= 3.8e-188: tmp = (y * t) / a elif z <= 2.4e+139: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z * Float64(-y)) / a) tmp = 0.0 if (z <= -6e+115) tmp = t_1; elseif (z <= -1.55e-103) tmp = x; elseif (z <= -1.4e-163) tmp = Float64(t * Float64(y / a)); elseif (z <= -2.05e-231) tmp = x; elseif (z <= 3.8e-188) tmp = Float64(Float64(y * t) / a); elseif (z <= 2.4e+139) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z * -y) / a; tmp = 0.0; if (z <= -6e+115) tmp = t_1; elseif (z <= -1.55e-103) tmp = x; elseif (z <= -1.4e-163) tmp = t * (y / a); elseif (z <= -2.05e-231) tmp = x; elseif (z <= 3.8e-188) tmp = (y * t) / a; elseif (z <= 2.4e+139) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z * (-y)), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -6e+115], t$95$1, If[LessEqual[z, -1.55e-103], x, If[LessEqual[z, -1.4e-163], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.05e-231], x, If[LessEqual[z, 3.8e-188], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, 2.4e+139], x, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z \cdot \left(-y\right)}{a}\\
\mathbf{if}\;z \leq -6 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-103}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.4 \cdot 10^{-163}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;z \leq -2.05 \cdot 10^{-231}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-188}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{+139}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.0000000000000001e115 or 2.40000000000000008e139 < z Initial program 93.8%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in y around 0 93.8%
associate-*l/95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in z around inf 69.5%
associate-*r/69.5%
mul-1-neg69.5%
distribute-rgt-neg-out69.5%
Simplified69.5%
if -6.0000000000000001e115 < z < -1.5500000000000001e-103 or -1.4e-163 < z < -2.0500000000000001e-231 or 3.8e-188 < z < 2.40000000000000008e139Initial program 96.9%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in x around inf 54.1%
if -1.5500000000000001e-103 < z < -1.4e-163Initial program 93.3%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in t around inf 59.1%
*-commutative59.1%
Simplified59.1%
*-commutative59.1%
associate-/l*79.2%
*-commutative79.2%
Applied egg-rr79.2%
if -2.0500000000000001e-231 < z < 3.8e-188Initial program 99.8%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in t around inf 70.3%
*-commutative70.3%
Simplified70.3%
Final simplification62.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* y t) a))) (t_2 (/ (* z (- y)) a)))
(if (<= z -1.2e+118)
t_2
(if (<= z 1.6e+33)
t_1
(if (<= z 1.95e+48) (* z (/ y (- a))) (if (<= z 3.1e+139) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * t) / a);
double t_2 = (z * -y) / a;
double tmp;
if (z <= -1.2e+118) {
tmp = t_2;
} else if (z <= 1.6e+33) {
tmp = t_1;
} else if (z <= 1.95e+48) {
tmp = z * (y / -a);
} else if (z <= 3.1e+139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y * t) / a)
t_2 = (z * -y) / a
if (z <= (-1.2d+118)) then
tmp = t_2
else if (z <= 1.6d+33) then
tmp = t_1
else if (z <= 1.95d+48) then
tmp = z * (y / -a)
else if (z <= 3.1d+139) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * t) / a);
double t_2 = (z * -y) / a;
double tmp;
if (z <= -1.2e+118) {
tmp = t_2;
} else if (z <= 1.6e+33) {
tmp = t_1;
} else if (z <= 1.95e+48) {
tmp = z * (y / -a);
} else if (z <= 3.1e+139) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y * t) / a) t_2 = (z * -y) / a tmp = 0 if z <= -1.2e+118: tmp = t_2 elif z <= 1.6e+33: tmp = t_1 elif z <= 1.95e+48: tmp = z * (y / -a) elif z <= 3.1e+139: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * t) / a)) t_2 = Float64(Float64(z * Float64(-y)) / a) tmp = 0.0 if (z <= -1.2e+118) tmp = t_2; elseif (z <= 1.6e+33) tmp = t_1; elseif (z <= 1.95e+48) tmp = Float64(z * Float64(y / Float64(-a))); elseif (z <= 3.1e+139) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y * t) / a); t_2 = (z * -y) / a; tmp = 0.0; if (z <= -1.2e+118) tmp = t_2; elseif (z <= 1.6e+33) tmp = t_1; elseif (z <= 1.95e+48) tmp = z * (y / -a); elseif (z <= 3.1e+139) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * (-y)), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -1.2e+118], t$95$2, If[LessEqual[z, 1.6e+33], t$95$1, If[LessEqual[z, 1.95e+48], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e+139], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot t}{a}\\
t_2 := \frac{z \cdot \left(-y\right)}{a}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+118}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+48}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+139}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -1.2e118 or 3.1e139 < z Initial program 93.8%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in y around 0 93.8%
associate-*l/95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in z around inf 69.5%
associate-*r/69.5%
mul-1-neg69.5%
distribute-rgt-neg-out69.5%
Simplified69.5%
if -1.2e118 < z < 1.60000000000000009e33 or 1.95e48 < z < 3.1e139Initial program 97.7%
sub-neg97.7%
distribute-frac-neg297.7%
+-commutative97.7%
associate-/l*96.6%
fma-define96.6%
distribute-frac-neg296.6%
distribute-neg-frac96.6%
sub-neg96.6%
distribute-neg-in96.6%
remove-double-neg96.6%
+-commutative96.6%
sub-neg96.6%
Simplified96.6%
Taylor expanded in z around 0 82.5%
if 1.60000000000000009e33 < z < 1.95e48Initial program 84.6%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around 0 84.6%
associate-*l/100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 84.6%
mul-1-neg84.6%
distribute-neg-frac284.6%
*-commutative84.6%
associate-*r/100.0%
Simplified100.0%
Final simplification79.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -9.5e-43)
x
(if (or (<= a 1.25e-78) (and (not (<= a 240.0)) (<= a 1.22e+59)))
(* y (/ t a))
x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -9.5e-43) {
tmp = x;
} else if ((a <= 1.25e-78) || (!(a <= 240.0) && (a <= 1.22e+59))) {
tmp = y * (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 (a <= (-9.5d-43)) then
tmp = x
else if ((a <= 1.25d-78) .or. (.not. (a <= 240.0d0)) .and. (a <= 1.22d+59)) then
tmp = y * (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 (a <= -9.5e-43) {
tmp = x;
} else if ((a <= 1.25e-78) || (!(a <= 240.0) && (a <= 1.22e+59))) {
tmp = y * (t / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -9.5e-43: tmp = x elif (a <= 1.25e-78) or (not (a <= 240.0) and (a <= 1.22e+59)): tmp = y * (t / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -9.5e-43) tmp = x; elseif ((a <= 1.25e-78) || (!(a <= 240.0) && (a <= 1.22e+59))) tmp = Float64(y * Float64(t / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -9.5e-43) tmp = x; elseif ((a <= 1.25e-78) || (~((a <= 240.0)) && (a <= 1.22e+59))) tmp = y * (t / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -9.5e-43], x, If[Or[LessEqual[a, 1.25e-78], And[N[Not[LessEqual[a, 240.0]], $MachinePrecision], LessEqual[a, 1.22e+59]]], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -9.5 \cdot 10^{-43}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-78} \lor \neg \left(a \leq 240\right) \land a \leq 1.22 \cdot 10^{+59}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -9.50000000000000044e-43 or 1.2499999999999999e-78 < a < 240 or 1.22e59 < a Initial program 92.9%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in x around inf 65.3%
if -9.50000000000000044e-43 < a < 1.2499999999999999e-78 or 240 < a < 1.22e59Initial program 99.8%
associate-/l*90.7%
Simplified90.7%
Taylor expanded in t around inf 50.4%
*-commutative50.4%
associate-/l*45.8%
Simplified45.8%
Final simplification56.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -3e-42)
x
(if (or (<= a 1.45e-78) (and (not (<= a 200.0)) (<= a 4.6e+58)))
(* t (/ y a))
x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3e-42) {
tmp = x;
} else if ((a <= 1.45e-78) || (!(a <= 200.0) && (a <= 4.6e+58))) {
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 <= (-3d-42)) then
tmp = x
else if ((a <= 1.45d-78) .or. (.not. (a <= 200.0d0)) .and. (a <= 4.6d+58)) 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 <= -3e-42) {
tmp = x;
} else if ((a <= 1.45e-78) || (!(a <= 200.0) && (a <= 4.6e+58))) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3e-42: tmp = x elif (a <= 1.45e-78) or (not (a <= 200.0) and (a <= 4.6e+58)): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3e-42) tmp = x; elseif ((a <= 1.45e-78) || (!(a <= 200.0) && (a <= 4.6e+58))) 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 <= -3e-42) tmp = x; elseif ((a <= 1.45e-78) || (~((a <= 200.0)) && (a <= 4.6e+58))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3e-42], x, If[Or[LessEqual[a, 1.45e-78], And[N[Not[LessEqual[a, 200.0]], $MachinePrecision], LessEqual[a, 4.6e+58]]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3 \cdot 10^{-42}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{-78} \lor \neg \left(a \leq 200\right) \land a \leq 4.6 \cdot 10^{+58}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.00000000000000027e-42 or 1.45e-78 < a < 200 or 4.60000000000000005e58 < a Initial program 92.9%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in x around inf 65.3%
if -3.00000000000000027e-42 < a < 1.45e-78 or 200 < a < 4.60000000000000005e58Initial program 99.8%
associate-/l*90.7%
Simplified90.7%
Taylor expanded in t around inf 50.4%
*-commutative50.4%
Simplified50.4%
*-commutative50.4%
associate-/l*54.4%
*-commutative54.4%
Applied egg-rr54.4%
Final simplification60.1%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.85e-43)
x
(if (<= a 1.15e-78)
(* t (/ y a))
(if (<= a 55.0) x (if (<= a 1.06e+59) (/ t (/ a y)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.85e-43) {
tmp = x;
} else if (a <= 1.15e-78) {
tmp = t * (y / a);
} else if (a <= 55.0) {
tmp = x;
} else if (a <= 1.06e+59) {
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 (a <= (-1.85d-43)) then
tmp = x
else if (a <= 1.15d-78) then
tmp = t * (y / a)
else if (a <= 55.0d0) then
tmp = x
else if (a <= 1.06d+59) 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 (a <= -1.85e-43) {
tmp = x;
} else if (a <= 1.15e-78) {
tmp = t * (y / a);
} else if (a <= 55.0) {
tmp = x;
} else if (a <= 1.06e+59) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.85e-43: tmp = x elif a <= 1.15e-78: tmp = t * (y / a) elif a <= 55.0: tmp = x elif a <= 1.06e+59: tmp = t / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.85e-43) tmp = x; elseif (a <= 1.15e-78) tmp = Float64(t * Float64(y / a)); elseif (a <= 55.0) tmp = x; elseif (a <= 1.06e+59) 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 (a <= -1.85e-43) tmp = x; elseif (a <= 1.15e-78) tmp = t * (y / a); elseif (a <= 55.0) tmp = x; elseif (a <= 1.06e+59) tmp = t / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.85e-43], x, If[LessEqual[a, 1.15e-78], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 55.0], x, If[LessEqual[a, 1.06e+59], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{-43}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-78}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq 55:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.06 \cdot 10^{+59}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.85e-43 or 1.1500000000000001e-78 < a < 55 or 1.0600000000000001e59 < a Initial program 92.9%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in x around inf 65.3%
if -1.85e-43 < a < 1.1500000000000001e-78Initial program 99.8%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in t around inf 48.5%
*-commutative48.5%
Simplified48.5%
*-commutative48.5%
associate-/l*53.0%
*-commutative53.0%
Applied egg-rr53.0%
if 55 < a < 1.0600000000000001e59Initial program 99.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 64.8%
*-commutative64.8%
Simplified64.8%
associate-/l*64.7%
*-commutative64.7%
Applied egg-rr64.7%
associate-/r/65.0%
Applied egg-rr65.0%
Final simplification60.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ (* y t) a))))
(if (<= t -4.9e+61)
t_1
(if (<= t 4.6e-129)
(- x (* y (/ z a)))
(if (<= t 1.6e+86) (- x (* z (/ y a))) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + ((y * t) / a);
double tmp;
if (t <= -4.9e+61) {
tmp = t_1;
} else if (t <= 4.6e-129) {
tmp = x - (y * (z / a));
} else if (t <= 1.6e+86) {
tmp = x - (z * (y / a));
} 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 * t) / a)
if (t <= (-4.9d+61)) then
tmp = t_1
else if (t <= 4.6d-129) then
tmp = x - (y * (z / a))
else if (t <= 1.6d+86) then
tmp = x - (z * (y / a))
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 * t) / a);
double tmp;
if (t <= -4.9e+61) {
tmp = t_1;
} else if (t <= 4.6e-129) {
tmp = x - (y * (z / a));
} else if (t <= 1.6e+86) {
tmp = x - (z * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + ((y * t) / a) tmp = 0 if t <= -4.9e+61: tmp = t_1 elif t <= 4.6e-129: tmp = x - (y * (z / a)) elif t <= 1.6e+86: tmp = x - (z * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(Float64(y * t) / a)) tmp = 0.0 if (t <= -4.9e+61) tmp = t_1; elseif (t <= 4.6e-129) tmp = Float64(x - Float64(y * Float64(z / a))); elseif (t <= 1.6e+86) tmp = Float64(x - Float64(z * Float64(y / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + ((y * t) / a); tmp = 0.0; if (t <= -4.9e+61) tmp = t_1; elseif (t <= 4.6e-129) tmp = x - (y * (z / a)); elseif (t <= 1.6e+86) tmp = x - (z * (y / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.9e+61], t$95$1, If[LessEqual[t, 4.6e-129], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e+86], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot t}{a}\\
\mathbf{if}\;t \leq -4.9 \cdot 10^{+61}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{-129}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+86}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.90000000000000025e61 or 1.6e86 < t Initial program 95.2%
sub-neg95.2%
distribute-frac-neg295.2%
+-commutative95.2%
associate-/l*93.4%
fma-define93.5%
distribute-frac-neg293.5%
distribute-neg-frac93.5%
sub-neg93.5%
distribute-neg-in93.5%
remove-double-neg93.5%
+-commutative93.5%
sub-neg93.5%
Simplified93.5%
Taylor expanded in z around 0 88.6%
if -4.90000000000000025e61 < t < 4.5999999999999999e-129Initial program 98.1%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in z around inf 91.4%
associate-/l*91.4%
Simplified91.4%
if 4.5999999999999999e-129 < t < 1.6e86Initial program 94.0%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in y around 0 94.0%
associate-*l/98.0%
*-commutative98.0%
Simplified98.0%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in z around inf 78.0%
associate-*l/88.0%
*-commutative88.0%
Simplified88.0%
Final simplification89.6%
(FPCore (x y z t a)
:precision binary64
(if (<= t -1.55e+62)
(+ x (/ y (/ a t)))
(if (<= t 2e-130)
(- x (* y (/ z a)))
(if (<= t 5.1e+84) (- x (* z (/ y a))) (+ x (/ (* y t) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.55e+62) {
tmp = x + (y / (a / t));
} else if (t <= 2e-130) {
tmp = x - (y * (z / a));
} else if (t <= 5.1e+84) {
tmp = x - (z * (y / a));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.55d+62)) then
tmp = x + (y / (a / t))
else if (t <= 2d-130) then
tmp = x - (y * (z / a))
else if (t <= 5.1d+84) then
tmp = x - (z * (y / a))
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.55e+62) {
tmp = x + (y / (a / t));
} else if (t <= 2e-130) {
tmp = x - (y * (z / a));
} else if (t <= 5.1e+84) {
tmp = x - (z * (y / a));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.55e+62: tmp = x + (y / (a / t)) elif t <= 2e-130: tmp = x - (y * (z / a)) elif t <= 5.1e+84: tmp = x - (z * (y / a)) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.55e+62) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (t <= 2e-130) tmp = Float64(x - Float64(y * Float64(z / a))); elseif (t <= 5.1e+84) tmp = Float64(x - Float64(z * Float64(y / a))); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.55e+62) tmp = x + (y / (a / t)); elseif (t <= 2e-130) tmp = x - (y * (z / a)); elseif (t <= 5.1e+84) tmp = x - (z * (y / a)); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.55e+62], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-130], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.1e+84], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+62}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-130}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{+84}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if t < -1.55000000000000007e62Initial program 94.3%
associate-/l*98.1%
Simplified98.1%
Taylor expanded in y around 0 94.3%
associate-*l/98.1%
*-commutative98.1%
Simplified98.1%
clear-num98.1%
un-div-inv98.1%
Applied egg-rr98.1%
Taylor expanded in z around 0 90.4%
mul-1-neg90.4%
associate-*r/95.9%
*-commutative95.9%
associate-/r/94.0%
distribute-neg-frac294.0%
Simplified94.0%
if -1.55000000000000007e62 < t < 2.0000000000000002e-130Initial program 98.1%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in z around inf 91.4%
associate-/l*91.4%
Simplified91.4%
if 2.0000000000000002e-130 < t < 5.1000000000000001e84Initial program 94.0%
associate-/l*94.1%
Simplified94.1%
Taylor expanded in y around 0 94.0%
associate-*l/98.0%
*-commutative98.0%
Simplified98.0%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in z around inf 78.0%
associate-*l/88.0%
*-commutative88.0%
Simplified88.0%
if 5.1000000000000001e84 < t Initial program 96.1%
sub-neg96.1%
distribute-frac-neg296.1%
+-commutative96.1%
associate-/l*88.9%
fma-define89.0%
distribute-frac-neg289.0%
distribute-neg-frac89.0%
sub-neg89.0%
distribute-neg-in89.0%
remove-double-neg89.0%
+-commutative89.0%
sub-neg89.0%
Simplified89.0%
Taylor expanded in z around 0 86.8%
Final simplification90.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -2.6e+62) (not (<= t 6e+87))) (+ x (/ (* y t) a)) (- x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -2.6e+62) || !(t <= 6e+87)) {
tmp = x + ((y * 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 ((t <= (-2.6d+62)) .or. (.not. (t <= 6d+87))) then
tmp = x + ((y * 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 ((t <= -2.6e+62) || !(t <= 6e+87)) {
tmp = x + ((y * t) / a);
} else {
tmp = x - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -2.6e+62) or not (t <= 6e+87): tmp = x + ((y * t) / a) else: tmp = x - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -2.6e+62) || !(t <= 6e+87)) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = Float64(x - Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -2.6e+62) || ~((t <= 6e+87))) tmp = x + ((y * t) / a); else tmp = x - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.6e+62], N[Not[LessEqual[t, 6e+87]], $MachinePrecision]], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+62} \lor \neg \left(t \leq 6 \cdot 10^{+87}\right):\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -2.59999999999999984e62 or 5.9999999999999998e87 < t Initial program 95.2%
sub-neg95.2%
distribute-frac-neg295.2%
+-commutative95.2%
associate-/l*93.4%
fma-define93.5%
distribute-frac-neg293.5%
distribute-neg-frac93.5%
sub-neg93.5%
distribute-neg-in93.5%
remove-double-neg93.5%
+-commutative93.5%
sub-neg93.5%
Simplified93.5%
Taylor expanded in z around 0 88.6%
if -2.59999999999999984e62 < t < 5.9999999999999998e87Initial program 96.9%
associate-/l*96.2%
Simplified96.2%
Taylor expanded in z around inf 87.3%
associate-/l*87.3%
Simplified87.3%
Final simplification87.8%
(FPCore (x y z t a) :precision binary64 (if (<= t 2e-130) (+ x (* y (/ (- t z) a))) (- x (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2e-130) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - ((z - t) * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= 2d-130) then
tmp = x + (y * ((t - z) / a))
else
tmp = x - ((z - t) * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= 2e-130) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - ((z - t) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= 2e-130: tmp = x + (y * ((t - z) / a)) else: tmp = x - ((z - t) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= 2e-130) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x - Float64(Float64(z - t) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= 2e-130) tmp = x + (y * ((t - z) / a)); else tmp = x - ((z - t) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, 2e-130], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 2 \cdot 10^{-130}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < 2.0000000000000002e-130Initial program 96.9%
associate-/l*97.5%
Simplified97.5%
if 2.0000000000000002e-130 < t Initial program 95.1%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in y around 0 95.1%
associate-*l/98.0%
*-commutative98.0%
Simplified98.0%
Final simplification97.7%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- t z) a))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((t - z) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((t - z) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((t - z) / a));
}
def code(x, y, z, t, a): return x + (y * ((t - z) / a))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(t - z) / a))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((t - z) / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{t - z}{a}
\end{array}
Initial program 96.2%
associate-/l*95.1%
Simplified95.1%
Final simplification95.1%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.2%
associate-/l*95.1%
Simplified95.1%
Taylor expanded in x around inf 39.3%
Final simplification39.3%
(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 2024095
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:alt
(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)))