
(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
(let* ((t_1 (* y (- z t))))
(if (or (<= t_1 -2e+292) (not (<= t_1 2e+246)))
(+ x (/ (- t z) (/ a y)))
(- x (/ t_1 a)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 <= -2e+292) || !(t_1 <= 2e+246)) {
tmp = x + ((t - z) / (a / y));
} else {
tmp = x - (t_1 / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z - t)
if ((t_1 <= (-2d+292)) .or. (.not. (t_1 <= 2d+246))) then
tmp = x + ((t - z) / (a / y))
else
tmp = x - (t_1 / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 <= -2e+292) || !(t_1 <= 2e+246)) {
tmp = x + ((t - z) / (a / y));
} else {
tmp = x - (t_1 / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if (t_1 <= -2e+292) or not (t_1 <= 2e+246): tmp = x + ((t - z) / (a / y)) else: tmp = x - (t_1 / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if ((t_1 <= -2e+292) || !(t_1 <= 2e+246)) tmp = Float64(x + Float64(Float64(t - z) / Float64(a / y))); else tmp = Float64(x - Float64(t_1 / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if ((t_1 <= -2e+292) || ~((t_1 <= 2e+246))) tmp = x + ((t - z) / (a / y)); else tmp = x - (t_1 / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+292], N[Not[LessEqual[t$95$1, 2e+246]], $MachinePrecision]], N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+292} \lor \neg \left(t_1 \leq 2 \cdot 10^{+246}\right):\\
\;\;\;\;x + \frac{t - z}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t_1}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -2e292 or 2.00000000000000014e246 < (*.f64 y (-.f64 z t)) Initial program 71.0%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in y around 0 71.0%
*-commutative71.0%
associate-/l*99.9%
Simplified99.9%
if -2e292 < (*.f64 y (-.f64 z t)) < 2.00000000000000014e246Initial program 99.3%
Final simplification99.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))))
(if (<= t_1 -2e+174)
(- x (* (- z t) (/ y a)))
(if (<= t_1 4e+260)
(+ x (/ (* y (- t z)) a))
(- x (/ y (/ a (- z t))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -2e+174) {
tmp = x - ((z - t) * (y / a));
} else if (t_1 <= 4e+260) {
tmp = x + ((y * (t - z)) / a);
} else {
tmp = x - (y / (a / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z - t)
if (t_1 <= (-2d+174)) then
tmp = x - ((z - t) * (y / a))
else if (t_1 <= 4d+260) then
tmp = x + ((y * (t - z)) / a)
else
tmp = x - (y / (a / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -2e+174) {
tmp = x - ((z - t) * (y / a));
} else if (t_1 <= 4e+260) {
tmp = x + ((y * (t - z)) / a);
} else {
tmp = x - (y / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if t_1 <= -2e+174: tmp = x - ((z - t) * (y / a)) elif t_1 <= 4e+260: tmp = x + ((y * (t - z)) / a) else: tmp = x - (y / (a / (z - t))) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if (t_1 <= -2e+174) tmp = Float64(x - Float64(Float64(z - t) * Float64(y / a))); elseif (t_1 <= 4e+260) tmp = Float64(x + Float64(Float64(y * Float64(t - z)) / a)); else tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if (t_1 <= -2e+174) tmp = x - ((z - t) * (y / a)); elseif (t_1 <= 4e+260) tmp = x + ((y * (t - z)) / a); else tmp = x - (y / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+174], N[(x - N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+260], N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+174}:\\
\;\;\;\;x - \left(z - t\right) \cdot \frac{y}{a}\\
\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+260}:\\
\;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -2.00000000000000014e174Initial program 83.4%
associate-*l/99.8%
Simplified99.8%
if -2.00000000000000014e174 < (*.f64 y (-.f64 z t)) < 4.00000000000000026e260Initial program 99.2%
if 4.00000000000000026e260 < (*.f64 y (-.f64 z t)) Initial program 71.7%
associate-/l*99.9%
Simplified99.9%
Final simplification99.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (/ z a) (- y))))
(if (<= t -1.26e+60)
(/ t (/ a y))
(if (<= t -2.5e-110)
x
(if (<= t 1.4e-174)
t_1
(if (<= t 5.2e-62)
x
(if (<= t 5.4e-46) t_1 (if (<= t 1.15e-12) x (* t (/ y a))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z / a) * -y;
double tmp;
if (t <= -1.26e+60) {
tmp = t / (a / y);
} else if (t <= -2.5e-110) {
tmp = x;
} else if (t <= 1.4e-174) {
tmp = t_1;
} else if (t <= 5.2e-62) {
tmp = x;
} else if (t <= 5.4e-46) {
tmp = t_1;
} else if (t <= 1.15e-12) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (z / a) * -y
if (t <= (-1.26d+60)) then
tmp = t / (a / y)
else if (t <= (-2.5d-110)) then
tmp = x
else if (t <= 1.4d-174) then
tmp = t_1
else if (t <= 5.2d-62) then
tmp = x
else if (t <= 5.4d-46) then
tmp = t_1
else if (t <= 1.15d-12) then
tmp = x
else
tmp = t * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z / a) * -y;
double tmp;
if (t <= -1.26e+60) {
tmp = t / (a / y);
} else if (t <= -2.5e-110) {
tmp = x;
} else if (t <= 1.4e-174) {
tmp = t_1;
} else if (t <= 5.2e-62) {
tmp = x;
} else if (t <= 5.4e-46) {
tmp = t_1;
} else if (t <= 1.15e-12) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z / a) * -y tmp = 0 if t <= -1.26e+60: tmp = t / (a / y) elif t <= -2.5e-110: tmp = x elif t <= 1.4e-174: tmp = t_1 elif t <= 5.2e-62: tmp = x elif t <= 5.4e-46: tmp = t_1 elif t <= 1.15e-12: tmp = x else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z / a) * Float64(-y)) tmp = 0.0 if (t <= -1.26e+60) tmp = Float64(t / Float64(a / y)); elseif (t <= -2.5e-110) tmp = x; elseif (t <= 1.4e-174) tmp = t_1; elseif (t <= 5.2e-62) tmp = x; elseif (t <= 5.4e-46) tmp = t_1; elseif (t <= 1.15e-12) tmp = x; else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z / a) * -y; tmp = 0.0; if (t <= -1.26e+60) tmp = t / (a / y); elseif (t <= -2.5e-110) tmp = x; elseif (t <= 1.4e-174) tmp = t_1; elseif (t <= 5.2e-62) tmp = x; elseif (t <= 5.4e-46) tmp = t_1; elseif (t <= 1.15e-12) tmp = x; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z / a), $MachinePrecision] * (-y)), $MachinePrecision]}, If[LessEqual[t, -1.26e+60], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.5e-110], x, If[LessEqual[t, 1.4e-174], t$95$1, If[LessEqual[t, 5.2e-62], x, If[LessEqual[t, 5.4e-46], t$95$1, If[LessEqual[t, 1.15e-12], x, N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{a} \cdot \left(-y\right)\\
\mathbf{if}\;t \leq -1.26 \cdot 10^{+60}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{-110}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.4 \cdot 10^{-174}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-62}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 5.4 \cdot 10^{-46}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-12}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -1.26e60Initial program 89.9%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in t around inf 70.4%
associate-/l*74.3%
Simplified74.3%
if -1.26e60 < t < -2.5e-110 or 1.39999999999999999e-174 < t < 5.1999999999999999e-62 or 5.4e-46 < t < 1.14999999999999995e-12Initial program 92.5%
associate-*l/96.9%
Simplified96.9%
Taylor expanded in x around inf 62.9%
if -2.5e-110 < t < 1.39999999999999999e-174 or 5.1999999999999999e-62 < t < 5.4e-46Initial program 89.1%
associate-*l/90.7%
Simplified90.7%
associate-/r/95.1%
div-inv95.2%
associate-/r*90.7%
Applied egg-rr90.7%
Taylor expanded in z around inf 55.8%
mul-1-neg55.8%
associate-*r/63.9%
distribute-rgt-neg-in63.9%
distribute-neg-frac63.9%
Simplified63.9%
if 1.14999999999999995e-12 < t Initial program 91.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in t around inf 52.5%
associate-*r/57.9%
Simplified57.9%
Final simplification64.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -6e+59)
(/ t (/ a y))
(if (<= t -3.3e-110)
x
(if (<= t 4.7e-175)
(* (/ z a) (- y))
(if (<= t 2.3e-61)
x
(if (<= t 5.2e-42)
(* z (/ y (- a)))
(if (<= t 1.12e-11) x (* t (/ y a)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e+59) {
tmp = t / (a / y);
} else if (t <= -3.3e-110) {
tmp = x;
} else if (t <= 4.7e-175) {
tmp = (z / a) * -y;
} else if (t <= 2.3e-61) {
tmp = x;
} else if (t <= 5.2e-42) {
tmp = z * (y / -a);
} else if (t <= 1.12e-11) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-6d+59)) then
tmp = t / (a / y)
else if (t <= (-3.3d-110)) then
tmp = x
else if (t <= 4.7d-175) then
tmp = (z / a) * -y
else if (t <= 2.3d-61) then
tmp = x
else if (t <= 5.2d-42) then
tmp = z * (y / -a)
else if (t <= 1.12d-11) then
tmp = x
else
tmp = t * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6e+59) {
tmp = t / (a / y);
} else if (t <= -3.3e-110) {
tmp = x;
} else if (t <= 4.7e-175) {
tmp = (z / a) * -y;
} else if (t <= 2.3e-61) {
tmp = x;
} else if (t <= 5.2e-42) {
tmp = z * (y / -a);
} else if (t <= 1.12e-11) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6e+59: tmp = t / (a / y) elif t <= -3.3e-110: tmp = x elif t <= 4.7e-175: tmp = (z / a) * -y elif t <= 2.3e-61: tmp = x elif t <= 5.2e-42: tmp = z * (y / -a) elif t <= 1.12e-11: tmp = x else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6e+59) tmp = Float64(t / Float64(a / y)); elseif (t <= -3.3e-110) tmp = x; elseif (t <= 4.7e-175) tmp = Float64(Float64(z / a) * Float64(-y)); elseif (t <= 2.3e-61) tmp = x; elseif (t <= 5.2e-42) tmp = Float64(z * Float64(y / Float64(-a))); elseif (t <= 1.12e-11) tmp = x; else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6e+59) tmp = t / (a / y); elseif (t <= -3.3e-110) tmp = x; elseif (t <= 4.7e-175) tmp = (z / a) * -y; elseif (t <= 2.3e-61) tmp = x; elseif (t <= 5.2e-42) tmp = z * (y / -a); elseif (t <= 1.12e-11) tmp = x; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6e+59], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.3e-110], x, If[LessEqual[t, 4.7e-175], N[(N[(z / a), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[t, 2.3e-61], x, If[LessEqual[t, 5.2e-42], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.12e-11], x, N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{+59}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{-110}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{-175}:\\
\;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-61}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-42}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{-11}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -6.0000000000000001e59Initial program 89.9%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in t around inf 70.4%
associate-/l*74.3%
Simplified74.3%
if -6.0000000000000001e59 < t < -3.2999999999999999e-110 or 4.69999999999999998e-175 < t < 2.29999999999999992e-61 or 5.2e-42 < t < 1.1200000000000001e-11Initial program 92.5%
associate-*l/96.9%
Simplified96.9%
Taylor expanded in x around inf 62.9%
if -3.2999999999999999e-110 < t < 4.69999999999999998e-175Initial program 89.8%
associate-*l/90.0%
Simplified90.0%
associate-/r/94.7%
div-inv94.8%
associate-/r*90.0%
Applied egg-rr90.0%
Taylor expanded in z around inf 53.9%
mul-1-neg53.9%
associate-*r/61.2%
distribute-rgt-neg-in61.2%
distribute-neg-frac61.2%
Simplified61.2%
if 2.29999999999999992e-61 < t < 5.2e-42Initial program 80.5%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in z around inf 80.5%
mul-1-neg80.5%
associate-*l/98.9%
*-commutative98.9%
distribute-rgt-neg-in98.9%
*-lft-identity98.9%
associate-*l/98.9%
remove-double-neg98.9%
neg-mul-198.9%
associate-*r*98.9%
*-commutative98.9%
associate-*r/98.9%
metadata-eval98.9%
metadata-eval98.9%
associate-/r*98.9%
neg-mul-198.9%
*-commutative98.9%
associate-*r/98.9%
*-rgt-identity98.9%
distribute-frac-neg98.9%
remove-double-neg98.9%
Simplified98.9%
if 1.1200000000000001e-11 < t Initial program 91.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in t around inf 52.5%
associate-*r/57.9%
Simplified57.9%
Final simplification64.3%
(FPCore (x y z t a)
:precision binary64
(if (<= t -3e+59)
(/ t (/ a y))
(if (<= t -8.4e-109)
x
(if (<= t 1.2e-174)
(/ y (/ (- a) z))
(if (<= t 6.6e-62)
x
(if (<= t 4e-39)
(* z (/ y (- a)))
(if (<= t 1.32e-11) x (* t (/ y a)))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3e+59) {
tmp = t / (a / y);
} else if (t <= -8.4e-109) {
tmp = x;
} else if (t <= 1.2e-174) {
tmp = y / (-a / z);
} else if (t <= 6.6e-62) {
tmp = x;
} else if (t <= 4e-39) {
tmp = z * (y / -a);
} else if (t <= 1.32e-11) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-3d+59)) then
tmp = t / (a / y)
else if (t <= (-8.4d-109)) then
tmp = x
else if (t <= 1.2d-174) then
tmp = y / (-a / z)
else if (t <= 6.6d-62) then
tmp = x
else if (t <= 4d-39) then
tmp = z * (y / -a)
else if (t <= 1.32d-11) then
tmp = x
else
tmp = t * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -3e+59) {
tmp = t / (a / y);
} else if (t <= -8.4e-109) {
tmp = x;
} else if (t <= 1.2e-174) {
tmp = y / (-a / z);
} else if (t <= 6.6e-62) {
tmp = x;
} else if (t <= 4e-39) {
tmp = z * (y / -a);
} else if (t <= 1.32e-11) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -3e+59: tmp = t / (a / y) elif t <= -8.4e-109: tmp = x elif t <= 1.2e-174: tmp = y / (-a / z) elif t <= 6.6e-62: tmp = x elif t <= 4e-39: tmp = z * (y / -a) elif t <= 1.32e-11: tmp = x else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -3e+59) tmp = Float64(t / Float64(a / y)); elseif (t <= -8.4e-109) tmp = x; elseif (t <= 1.2e-174) tmp = Float64(y / Float64(Float64(-a) / z)); elseif (t <= 6.6e-62) tmp = x; elseif (t <= 4e-39) tmp = Float64(z * Float64(y / Float64(-a))); elseif (t <= 1.32e-11) tmp = x; else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -3e+59) tmp = t / (a / y); elseif (t <= -8.4e-109) tmp = x; elseif (t <= 1.2e-174) tmp = y / (-a / z); elseif (t <= 6.6e-62) tmp = x; elseif (t <= 4e-39) tmp = z * (y / -a); elseif (t <= 1.32e-11) tmp = x; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3e+59], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8.4e-109], x, If[LessEqual[t, 1.2e-174], N[(y / N[((-a) / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.6e-62], x, If[LessEqual[t, 4e-39], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.32e-11], x, N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+59}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq -8.4 \cdot 10^{-109}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-174}:\\
\;\;\;\;\frac{y}{\frac{-a}{z}}\\
\mathbf{elif}\;t \leq 6.6 \cdot 10^{-62}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 4 \cdot 10^{-39}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;t \leq 1.32 \cdot 10^{-11}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -3e59Initial program 89.9%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in t around inf 70.4%
associate-/l*74.3%
Simplified74.3%
if -3e59 < t < -8.39999999999999984e-109 or 1.2e-174 < t < 6.60000000000000009e-62 or 3.99999999999999972e-39 < t < 1.32e-11Initial program 92.5%
associate-*l/96.9%
Simplified96.9%
Taylor expanded in x around inf 62.9%
if -8.39999999999999984e-109 < t < 1.2e-174Initial program 89.8%
associate-*l/90.0%
Simplified90.0%
associate-/r/94.7%
div-inv94.8%
associate-/r*90.0%
Applied egg-rr90.0%
Taylor expanded in z around inf 53.9%
mul-1-neg53.9%
associate-*r/61.2%
distribute-rgt-neg-in61.2%
distribute-neg-frac61.2%
Simplified61.2%
frac-2neg61.2%
remove-double-neg61.2%
associate-*r/53.9%
Applied egg-rr53.9%
associate-/l*61.9%
Simplified61.9%
if 6.60000000000000009e-62 < t < 3.99999999999999972e-39Initial program 80.5%
associate-*l/99.7%
Simplified99.7%
Taylor expanded in z around inf 80.5%
mul-1-neg80.5%
associate-*l/98.9%
*-commutative98.9%
distribute-rgt-neg-in98.9%
*-lft-identity98.9%
associate-*l/98.9%
remove-double-neg98.9%
neg-mul-198.9%
associate-*r*98.9%
*-commutative98.9%
associate-*r/98.9%
metadata-eval98.9%
metadata-eval98.9%
associate-/r*98.9%
neg-mul-198.9%
*-commutative98.9%
associate-*r/98.9%
*-rgt-identity98.9%
distribute-frac-neg98.9%
remove-double-neg98.9%
Simplified98.9%
if 1.32e-11 < t Initial program 91.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in t around inf 52.5%
associate-*r/57.9%
Simplified57.9%
Final simplification64.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= t -1.02e+60)
t_1
(if (<= t 78.0)
(- x (* y (/ z a)))
(if (<= t 2.3e+119) (* (/ y a) (- t z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (t <= -1.02e+60) {
tmp = t_1;
} else if (t <= 78.0) {
tmp = x - (y * (z / a));
} else if (t <= 2.3e+119) {
tmp = (y / a) * (t - z);
} 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 + (t * (y / a))
if (t <= (-1.02d+60)) then
tmp = t_1
else if (t <= 78.0d0) then
tmp = x - (y * (z / a))
else if (t <= 2.3d+119) then
tmp = (y / a) * (t - z)
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 + (t * (y / a));
double tmp;
if (t <= -1.02e+60) {
tmp = t_1;
} else if (t <= 78.0) {
tmp = x - (y * (z / a));
} else if (t <= 2.3e+119) {
tmp = (y / a) * (t - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if t <= -1.02e+60: tmp = t_1 elif t <= 78.0: tmp = x - (y * (z / a)) elif t <= 2.3e+119: tmp = (y / a) * (t - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (t <= -1.02e+60) tmp = t_1; elseif (t <= 78.0) tmp = Float64(x - Float64(y * Float64(z / a))); elseif (t <= 2.3e+119) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (t <= -1.02e+60) tmp = t_1; elseif (t <= 78.0) tmp = x - (y * (z / a)); elseif (t <= 2.3e+119) tmp = (y / a) * (t - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.02e+60], t$95$1, If[LessEqual[t, 78.0], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e+119], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -1.02 \cdot 10^{+60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 78:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{+119}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -1.0200000000000001e60 or 2.3000000000000001e119 < t Initial program 89.9%
associate-*l/98.9%
Simplified98.9%
Taylor expanded in z around 0 84.3%
sub-neg84.3%
mul-1-neg84.3%
remove-double-neg84.3%
+-commutative84.3%
associate-*r/91.6%
Simplified91.6%
if -1.0200000000000001e60 < t < 78Initial program 90.9%
associate-*l/93.8%
Simplified93.8%
associate-/r/97.4%
div-inv97.4%
associate-/r*93.7%
Applied egg-rr93.7%
Taylor expanded in z around inf 83.9%
associate-*r/89.2%
Simplified89.2%
if 78 < t < 2.3000000000000001e119Initial program 95.1%
associate-*l/99.9%
Simplified99.9%
associate-/r/94.2%
div-inv94.2%
associate-/r*99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 80.0%
associate-*l/84.9%
neg-mul-184.9%
sub-neg84.9%
distribute-lft-out48.0%
+-commutative48.0%
distribute-neg-in48.0%
distribute-rgt-neg-out48.0%
*-commutative48.0%
associate-*r/47.9%
associate-*l/43.0%
remove-double-neg43.0%
sub-neg43.0%
associate-*l/47.9%
associate-*r/48.0%
*-commutative48.0%
distribute-lft-out--84.9%
Simplified84.9%
Final simplification89.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.42e-70) (not (<= y 1.18e+109))) (* (/ y a) (- t z)) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.42e-70) || !(y <= 1.18e+109)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.42d-70)) .or. (.not. (y <= 1.18d+109))) then
tmp = (y / a) * (t - z)
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.42e-70) || !(y <= 1.18e+109)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.42e-70) or not (y <= 1.18e+109): tmp = (y / a) * (t - z) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.42e-70) || !(y <= 1.18e+109)) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.42e-70) || ~((y <= 1.18e+109))) tmp = (y / a) * (t - z); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.42e-70], N[Not[LessEqual[y, 1.18e+109]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.42 \cdot 10^{-70} \lor \neg \left(y \leq 1.18 \cdot 10^{+109}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -1.42000000000000002e-70 or 1.17999999999999998e109 < y Initial program 82.5%
associate-*l/93.9%
Simplified93.9%
associate-/r/99.8%
div-inv99.7%
associate-/r*93.9%
Applied egg-rr93.9%
Taylor expanded in x around 0 74.3%
associate-*l/83.5%
neg-mul-183.5%
sub-neg83.5%
distribute-lft-out67.7%
+-commutative67.7%
distribute-neg-in67.7%
distribute-rgt-neg-out67.7%
*-commutative67.7%
associate-*r/63.6%
associate-*l/69.5%
remove-double-neg69.5%
sub-neg69.5%
associate-*l/63.6%
associate-*r/67.7%
*-commutative67.7%
distribute-lft-out--83.5%
Simplified83.5%
if -1.42000000000000002e-70 < y < 1.17999999999999998e109Initial program 99.1%
associate-*l/98.6%
Simplified98.6%
Taylor expanded in z around 0 87.6%
sub-neg87.6%
mul-1-neg87.6%
remove-double-neg87.6%
+-commutative87.6%
associate-*r/86.9%
Simplified86.9%
Final simplification85.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.05e-70) (not (<= y 1.65e+107))) (* (/ y a) (- t z)) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.05e-70) || !(y <= 1.65e+107)) {
tmp = (y / a) * (t - 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 ((y <= (-2.05d-70)) .or. (.not. (y <= 1.65d+107))) then
tmp = (y / a) * (t - 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 ((y <= -2.05e-70) || !(y <= 1.65e+107)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.05e-70) or not (y <= 1.65e+107): tmp = (y / a) * (t - z) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.05e-70) || !(y <= 1.65e+107)) tmp = Float64(Float64(y / a) * Float64(t - z)); 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 ((y <= -2.05e-70) || ~((y <= 1.65e+107))) tmp = (y / a) * (t - z); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.05e-70], N[Not[LessEqual[y, 1.65e+107]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.05 \cdot 10^{-70} \lor \neg \left(y \leq 1.65 \cdot 10^{+107}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if y < -2.04999999999999989e-70 or 1.65000000000000016e107 < y Initial program 82.5%
associate-*l/93.9%
Simplified93.9%
associate-/r/99.8%
div-inv99.7%
associate-/r*93.9%
Applied egg-rr93.9%
Taylor expanded in x around 0 74.3%
associate-*l/83.5%
neg-mul-183.5%
sub-neg83.5%
distribute-lft-out67.7%
+-commutative67.7%
distribute-neg-in67.7%
distribute-rgt-neg-out67.7%
*-commutative67.7%
associate-*r/63.6%
associate-*l/69.5%
remove-double-neg69.5%
sub-neg69.5%
associate-*l/63.6%
associate-*r/67.7%
*-commutative67.7%
distribute-lft-out--83.5%
Simplified83.5%
if -2.04999999999999989e-70 < y < 1.65000000000000016e107Initial program 99.1%
associate-*l/98.6%
Simplified98.6%
Taylor expanded in z around 0 87.6%
sub-neg87.6%
mul-1-neg87.6%
remove-double-neg87.6%
+-commutative87.6%
associate-*r/86.9%
Simplified86.9%
associate-*r/87.6%
*-commutative87.6%
Applied egg-rr87.6%
Final simplification85.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.7e-70) (not (<= y 3.9e+107))) (/ y (/ a (- t z))) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.7e-70) || !(y <= 3.9e+107)) {
tmp = y / (a / (t - 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 ((y <= (-2.7d-70)) .or. (.not. (y <= 3.9d+107))) then
tmp = y / (a / (t - 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 ((y <= -2.7e-70) || !(y <= 3.9e+107)) {
tmp = y / (a / (t - z));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.7e-70) or not (y <= 3.9e+107): tmp = y / (a / (t - z)) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.7e-70) || !(y <= 3.9e+107)) tmp = Float64(y / Float64(a / Float64(t - z))); 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 ((y <= -2.7e-70) || ~((y <= 3.9e+107))) tmp = y / (a / (t - z)); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.7e-70], N[Not[LessEqual[y, 3.9e+107]], $MachinePrecision]], N[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-70} \lor \neg \left(y \leq 3.9 \cdot 10^{+107}\right):\\
\;\;\;\;\frac{y}{\frac{a}{t - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if y < -2.7000000000000001e-70 or 3.8999999999999998e107 < y Initial program 82.5%
associate-*l/93.9%
Simplified93.9%
associate-/r/99.8%
div-inv99.7%
associate-/r*93.9%
Applied egg-rr93.9%
Taylor expanded in x around 0 74.3%
associate-*l/83.5%
neg-mul-183.5%
sub-neg83.5%
distribute-lft-out67.7%
+-commutative67.7%
distribute-neg-in67.7%
distribute-rgt-neg-out67.7%
*-commutative67.7%
associate-*r/63.6%
associate-*l/69.5%
remove-double-neg69.5%
sub-neg69.5%
associate-*l/63.6%
associate-*r/67.7%
*-commutative67.7%
distribute-lft-out--83.5%
Simplified83.5%
Taylor expanded in y around 0 74.3%
associate-/l*89.4%
Simplified89.4%
if -2.7000000000000001e-70 < y < 3.8999999999999998e107Initial program 99.1%
associate-*l/98.6%
Simplified98.6%
Taylor expanded in z around 0 87.6%
sub-neg87.6%
mul-1-neg87.6%
remove-double-neg87.6%
+-commutative87.6%
associate-*r/86.9%
Simplified86.9%
associate-*r/87.6%
*-commutative87.6%
Applied egg-rr87.6%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.7e-70) (not (<= y 5.6e+108))) (* y (/ (- t z) a)) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.7e-70) || !(y <= 5.6e+108)) {
tmp = y * ((t - z) / 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 ((y <= (-2.7d-70)) .or. (.not. (y <= 5.6d+108))) then
tmp = y * ((t - z) / 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 ((y <= -2.7e-70) || !(y <= 5.6e+108)) {
tmp = y * ((t - z) / a);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.7e-70) or not (y <= 5.6e+108): tmp = y * ((t - z) / a) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.7e-70) || !(y <= 5.6e+108)) tmp = Float64(y * Float64(Float64(t - z) / 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 ((y <= -2.7e-70) || ~((y <= 5.6e+108))) tmp = y * ((t - z) / a); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.7e-70], N[Not[LessEqual[y, 5.6e+108]], $MachinePrecision]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-70} \lor \neg \left(y \leq 5.6 \cdot 10^{+108}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if y < -2.7000000000000001e-70 or 5.5999999999999996e108 < y Initial program 82.5%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in x around 0 74.3%
mul-1-neg74.3%
associate-*r/89.5%
distribute-rgt-neg-out89.5%
distribute-neg-frac89.5%
Simplified89.5%
if -2.7000000000000001e-70 < y < 5.5999999999999996e108Initial program 99.1%
associate-*l/98.6%
Simplified98.6%
Taylor expanded in z around 0 87.6%
sub-neg87.6%
mul-1-neg87.6%
remove-double-neg87.6%
+-commutative87.6%
associate-*r/86.9%
Simplified86.9%
associate-*r/87.6%
*-commutative87.6%
Applied egg-rr87.6%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (<= x -3.7e+223) x (if (<= x 1.52e+122) (* (/ y a) (- t z)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (x <= -3.7e+223) {
tmp = x;
} else if (x <= 1.52e+122) {
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 (x <= (-3.7d+223)) then
tmp = x
else if (x <= 1.52d+122) 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 (x <= -3.7e+223) {
tmp = x;
} else if (x <= 1.52e+122) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if x <= -3.7e+223: tmp = x elif x <= 1.52e+122: tmp = (y / a) * (t - z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (x <= -3.7e+223) tmp = x; elseif (x <= 1.52e+122) 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 (x <= -3.7e+223) tmp = x; elseif (x <= 1.52e+122) tmp = (y / a) * (t - z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.7e+223], x, If[LessEqual[x, 1.52e+122], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.7 \cdot 10^{+223}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.52 \cdot 10^{+122}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.7000000000000002e223 or 1.52e122 < x Initial program 91.7%
associate-*l/100.0%
Simplified100.0%
Taylor expanded in x around inf 69.4%
if -3.7000000000000002e223 < x < 1.52e122Initial program 90.5%
associate-*l/95.0%
Simplified95.0%
associate-/r/93.4%
div-inv93.3%
associate-/r*95.0%
Applied egg-rr95.0%
Taylor expanded in x around 0 68.2%
associate-*l/73.0%
neg-mul-173.0%
sub-neg73.0%
distribute-lft-out62.9%
+-commutative62.9%
distribute-neg-in62.9%
distribute-rgt-neg-out62.9%
*-commutative62.9%
associate-*r/60.8%
associate-*l/58.1%
remove-double-neg58.1%
sub-neg58.1%
associate-*l/60.8%
associate-*r/62.9%
*-commutative62.9%
distribute-lft-out--73.0%
Simplified73.0%
Final simplification72.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -6.2e+59) (not (<= t 1.02e-11))) (* t (/ y a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -6.2e+59) || !(t <= 1.02e-11)) {
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 ((t <= (-6.2d+59)) .or. (.not. (t <= 1.02d-11))) 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 ((t <= -6.2e+59) || !(t <= 1.02e-11)) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -6.2e+59) or not (t <= 1.02e-11): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -6.2e+59) || !(t <= 1.02e-11)) 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 ((t <= -6.2e+59) || ~((t <= 1.02e-11))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -6.2e+59], N[Not[LessEqual[t, 1.02e-11]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{+59} \lor \neg \left(t \leq 1.02 \cdot 10^{-11}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -6.20000000000000029e59 or 1.01999999999999994e-11 < t Initial program 90.9%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in t around inf 60.5%
associate-*r/65.2%
Simplified65.2%
if -6.20000000000000029e59 < t < 1.01999999999999994e-11Initial program 90.7%
associate-*l/93.6%
Simplified93.6%
Taylor expanded in x around inf 47.2%
Final simplification56.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.7e+60) (/ t (/ a y)) (if (<= t 4.1e-13) x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.7e+60) {
tmp = t / (a / y);
} else if (t <= 4.1e-13) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (t <= (-1.7d+60)) then
tmp = t / (a / y)
else if (t <= 4.1d-13) then
tmp = x
else
tmp = t * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.7e+60) {
tmp = t / (a / y);
} else if (t <= 4.1e-13) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.7e+60: tmp = t / (a / y) elif t <= 4.1e-13: tmp = x else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.7e+60) tmp = Float64(t / Float64(a / y)); elseif (t <= 4.1e-13) tmp = x; else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.7e+60) tmp = t / (a / y); elseif (t <= 4.1e-13) tmp = x; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.7e+60], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.1e-13], x, N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{+60}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;t \leq 4.1 \cdot 10^{-13}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -1.7e60Initial program 89.9%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in t around inf 70.4%
associate-/l*74.3%
Simplified74.3%
if -1.7e60 < t < 4.1000000000000002e-13Initial program 90.7%
associate-*l/93.6%
Simplified93.6%
Taylor expanded in x around inf 47.2%
if 4.1000000000000002e-13 < t Initial program 91.8%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in t around inf 52.5%
associate-*r/57.9%
Simplified57.9%
Final simplification56.0%
(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 90.8%
associate-*l/96.3%
Simplified96.3%
Final simplification96.3%
(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 90.8%
associate-*l/96.3%
Simplified96.3%
Taylor expanded in x around inf 34.9%
Final simplification34.9%
(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 2023310
(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)))