
(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 (+ x (/ (- z t) (/ a y))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) / (a / y));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((z - t) / (a / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) / (a / y));
}
def code(x, y, z, t, a): return x + ((z - t) / (a / y))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) / Float64(a / y))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) / (a / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{z - t}{\frac{a}{y}}
\end{array}
Initial program 93.6%
associate-*l/96.8%
Simplified96.8%
*-commutative96.8%
clear-num96.8%
un-div-inv97.1%
Applied egg-rr97.1%
Final simplification97.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y) a))))
(if (<= y -2.1e+49)
t_1
(if (<= y 2.9e-161)
x
(if (<= y 1.3e-126)
(/ (* z y) a)
(if (<= y 2e-89)
x
(if (<= y 2.25e+51)
t_1
(if (<= y 2.8e+134)
(* y (/ z a))
(if (<= y 7e+225) t_1 (* z (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (-y / a);
double tmp;
if (y <= -2.1e+49) {
tmp = t_1;
} else if (y <= 2.9e-161) {
tmp = x;
} else if (y <= 1.3e-126) {
tmp = (z * y) / a;
} else if (y <= 2e-89) {
tmp = x;
} else if (y <= 2.25e+51) {
tmp = t_1;
} else if (y <= 2.8e+134) {
tmp = y * (z / a);
} else if (y <= 7e+225) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * (-y / a)
if (y <= (-2.1d+49)) then
tmp = t_1
else if (y <= 2.9d-161) then
tmp = x
else if (y <= 1.3d-126) then
tmp = (z * y) / a
else if (y <= 2d-89) then
tmp = x
else if (y <= 2.25d+51) then
tmp = t_1
else if (y <= 2.8d+134) then
tmp = y * (z / a)
else if (y <= 7d+225) then
tmp = t_1
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 t_1 = t * (-y / a);
double tmp;
if (y <= -2.1e+49) {
tmp = t_1;
} else if (y <= 2.9e-161) {
tmp = x;
} else if (y <= 1.3e-126) {
tmp = (z * y) / a;
} else if (y <= 2e-89) {
tmp = x;
} else if (y <= 2.25e+51) {
tmp = t_1;
} else if (y <= 2.8e+134) {
tmp = y * (z / a);
} else if (y <= 7e+225) {
tmp = t_1;
} else {
tmp = z * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (-y / a) tmp = 0 if y <= -2.1e+49: tmp = t_1 elif y <= 2.9e-161: tmp = x elif y <= 1.3e-126: tmp = (z * y) / a elif y <= 2e-89: tmp = x elif y <= 2.25e+51: tmp = t_1 elif y <= 2.8e+134: tmp = y * (z / a) elif y <= 7e+225: tmp = t_1 else: tmp = z * (y / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(-y) / a)) tmp = 0.0 if (y <= -2.1e+49) tmp = t_1; elseif (y <= 2.9e-161) tmp = x; elseif (y <= 1.3e-126) tmp = Float64(Float64(z * y) / a); elseif (y <= 2e-89) tmp = x; elseif (y <= 2.25e+51) tmp = t_1; elseif (y <= 2.8e+134) tmp = Float64(y * Float64(z / a)); elseif (y <= 7e+225) tmp = t_1; else tmp = Float64(z * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (-y / a); tmp = 0.0; if (y <= -2.1e+49) tmp = t_1; elseif (y <= 2.9e-161) tmp = x; elseif (y <= 1.3e-126) tmp = (z * y) / a; elseif (y <= 2e-89) tmp = x; elseif (y <= 2.25e+51) tmp = t_1; elseif (y <= 2.8e+134) tmp = y * (z / a); elseif (y <= 7e+225) tmp = t_1; else tmp = z * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+49], t$95$1, If[LessEqual[y, 2.9e-161], x, If[LessEqual[y, 1.3e-126], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 2e-89], x, If[LessEqual[y, 2.25e+51], t$95$1, If[LessEqual[y, 2.8e+134], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+225], t$95$1, N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{-y}{a}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-161}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{-126}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-89}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{+134}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+225}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -2.10000000000000011e49 or 2.00000000000000008e-89 < y < 2.25e51 or 2.7999999999999999e134 < y < 7.0000000000000006e225Initial program 89.6%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in z around 0 66.4%
mul-1-neg66.4%
associate-*l/70.8%
distribute-rgt-neg-out70.8%
+-commutative70.8%
*-commutative70.8%
distribute-lft-neg-out70.8%
unsub-neg70.8%
Simplified70.8%
Taylor expanded in x around 0 52.5%
associate-*r/52.5%
*-commutative52.5%
neg-mul-152.5%
distribute-rgt-neg-out52.5%
associate-*r/56.8%
Simplified56.8%
if -2.10000000000000011e49 < y < 2.9e-161 or 1.3e-126 < y < 2.00000000000000008e-89Initial program 99.0%
associate-*l/98.8%
Simplified98.8%
Taylor expanded in x around inf 70.8%
if 2.9e-161 < y < 1.3e-126Initial program 99.6%
associate-*l/86.1%
Simplified86.1%
Taylor expanded in y around inf 44.3%
Taylor expanded in z around inf 72.9%
Taylor expanded in z around 0 85.8%
if 2.25e51 < y < 2.7999999999999999e134Initial program 87.5%
associate-*l/96.0%
Simplified96.0%
Taylor expanded in y around inf 70.8%
Taylor expanded in z around inf 55.2%
if 7.0000000000000006e225 < y Initial program 91.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 75.5%
Taylor expanded in z around inf 63.5%
Taylor expanded in z around 0 61.0%
associate-*l/68.8%
Simplified68.8%
Final simplification64.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y) (/ t a))))
(if (<= y -1.8e+49)
(* t (/ (- y) a))
(if (<= y 2.9e-161)
x
(if (<= y 9.5e-127)
(/ (* z y) a)
(if (<= y 4.4e-89)
x
(if (<= y 6.4e+47)
t_1
(if (<= y 1.65e+134)
(* y (/ z a))
(if (<= y 6.5e+225) t_1 (* z (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -y * (t / a);
double tmp;
if (y <= -1.8e+49) {
tmp = t * (-y / a);
} else if (y <= 2.9e-161) {
tmp = x;
} else if (y <= 9.5e-127) {
tmp = (z * y) / a;
} else if (y <= 4.4e-89) {
tmp = x;
} else if (y <= 6.4e+47) {
tmp = t_1;
} else if (y <= 1.65e+134) {
tmp = y * (z / a);
} else if (y <= 6.5e+225) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = -y * (t / a)
if (y <= (-1.8d+49)) then
tmp = t * (-y / a)
else if (y <= 2.9d-161) then
tmp = x
else if (y <= 9.5d-127) then
tmp = (z * y) / a
else if (y <= 4.4d-89) then
tmp = x
else if (y <= 6.4d+47) then
tmp = t_1
else if (y <= 1.65d+134) then
tmp = y * (z / a)
else if (y <= 6.5d+225) then
tmp = t_1
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 t_1 = -y * (t / a);
double tmp;
if (y <= -1.8e+49) {
tmp = t * (-y / a);
} else if (y <= 2.9e-161) {
tmp = x;
} else if (y <= 9.5e-127) {
tmp = (z * y) / a;
} else if (y <= 4.4e-89) {
tmp = x;
} else if (y <= 6.4e+47) {
tmp = t_1;
} else if (y <= 1.65e+134) {
tmp = y * (z / a);
} else if (y <= 6.5e+225) {
tmp = t_1;
} else {
tmp = z * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -y * (t / a) tmp = 0 if y <= -1.8e+49: tmp = t * (-y / a) elif y <= 2.9e-161: tmp = x elif y <= 9.5e-127: tmp = (z * y) / a elif y <= 4.4e-89: tmp = x elif y <= 6.4e+47: tmp = t_1 elif y <= 1.65e+134: tmp = y * (z / a) elif y <= 6.5e+225: tmp = t_1 else: tmp = z * (y / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-y) * Float64(t / a)) tmp = 0.0 if (y <= -1.8e+49) tmp = Float64(t * Float64(Float64(-y) / a)); elseif (y <= 2.9e-161) tmp = x; elseif (y <= 9.5e-127) tmp = Float64(Float64(z * y) / a); elseif (y <= 4.4e-89) tmp = x; elseif (y <= 6.4e+47) tmp = t_1; elseif (y <= 1.65e+134) tmp = Float64(y * Float64(z / a)); elseif (y <= 6.5e+225) tmp = t_1; else tmp = Float64(z * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -y * (t / a); tmp = 0.0; if (y <= -1.8e+49) tmp = t * (-y / a); elseif (y <= 2.9e-161) tmp = x; elseif (y <= 9.5e-127) tmp = (z * y) / a; elseif (y <= 4.4e-89) tmp = x; elseif (y <= 6.4e+47) tmp = t_1; elseif (y <= 1.65e+134) tmp = y * (z / a); elseif (y <= 6.5e+225) tmp = t_1; else tmp = z * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-y) * N[(t / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.8e+49], N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e-161], x, If[LessEqual[y, 9.5e-127], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 4.4e-89], x, If[LessEqual[y, 6.4e+47], t$95$1, If[LessEqual[y, 1.65e+134], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+225], t$95$1, N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot \frac{t}{a}\\
\mathbf{if}\;y \leq -1.8 \cdot 10^{+49}:\\
\;\;\;\;t \cdot \frac{-y}{a}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-161}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-127}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{-89}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+47}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+134}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+225}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -1.79999999999999998e49Initial program 88.9%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in z around 0 57.3%
mul-1-neg57.3%
associate-*l/64.7%
distribute-rgt-neg-out64.7%
+-commutative64.7%
*-commutative64.7%
distribute-lft-neg-out64.7%
unsub-neg64.7%
Simplified64.7%
Taylor expanded in x around 0 45.8%
associate-*r/45.8%
*-commutative45.8%
neg-mul-145.8%
distribute-rgt-neg-out45.8%
associate-*r/53.2%
Simplified53.2%
if -1.79999999999999998e49 < y < 2.9e-161 or 9.4999999999999997e-127 < y < 4.40000000000000024e-89Initial program 99.0%
associate-*l/98.8%
Simplified98.8%
Taylor expanded in x around inf 70.8%
if 2.9e-161 < y < 9.4999999999999997e-127Initial program 99.6%
associate-*l/86.1%
Simplified86.1%
Taylor expanded in y around inf 44.3%
Taylor expanded in z around inf 72.9%
Taylor expanded in z around 0 85.8%
if 4.40000000000000024e-89 < y < 6.4e47 or 1.65e134 < y < 6.5000000000000006e225Initial program 90.8%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in y around inf 81.0%
Taylor expanded in z around 0 66.9%
neg-mul-166.9%
distribute-neg-frac66.9%
Simplified66.9%
if 6.4e47 < y < 1.65e134Initial program 87.5%
associate-*l/96.0%
Simplified96.0%
Taylor expanded in y around inf 70.8%
Taylor expanded in z around inf 55.2%
if 6.5000000000000006e225 < y Initial program 91.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 75.5%
Taylor expanded in z around inf 63.5%
Taylor expanded in z around 0 61.0%
associate-*l/68.8%
Simplified68.8%
Final simplification64.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* (- y) (/ t a))))
(if (<= y -2.7e+49)
(/ t (/ a (- y)))
(if (<= y 2.9e-161)
x
(if (<= y 9.5e-127)
(/ (* z y) a)
(if (<= y 2.4e-89)
x
(if (<= y 4.3e+44)
t_1
(if (<= y 3.1e+134)
(* y (/ z a))
(if (<= y 7e+225) t_1 (* z (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = -y * (t / a);
double tmp;
if (y <= -2.7e+49) {
tmp = t / (a / -y);
} else if (y <= 2.9e-161) {
tmp = x;
} else if (y <= 9.5e-127) {
tmp = (z * y) / a;
} else if (y <= 2.4e-89) {
tmp = x;
} else if (y <= 4.3e+44) {
tmp = t_1;
} else if (y <= 3.1e+134) {
tmp = y * (z / a);
} else if (y <= 7e+225) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = -y * (t / a)
if (y <= (-2.7d+49)) then
tmp = t / (a / -y)
else if (y <= 2.9d-161) then
tmp = x
else if (y <= 9.5d-127) then
tmp = (z * y) / a
else if (y <= 2.4d-89) then
tmp = x
else if (y <= 4.3d+44) then
tmp = t_1
else if (y <= 3.1d+134) then
tmp = y * (z / a)
else if (y <= 7d+225) then
tmp = t_1
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 t_1 = -y * (t / a);
double tmp;
if (y <= -2.7e+49) {
tmp = t / (a / -y);
} else if (y <= 2.9e-161) {
tmp = x;
} else if (y <= 9.5e-127) {
tmp = (z * y) / a;
} else if (y <= 2.4e-89) {
tmp = x;
} else if (y <= 4.3e+44) {
tmp = t_1;
} else if (y <= 3.1e+134) {
tmp = y * (z / a);
} else if (y <= 7e+225) {
tmp = t_1;
} else {
tmp = z * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = -y * (t / a) tmp = 0 if y <= -2.7e+49: tmp = t / (a / -y) elif y <= 2.9e-161: tmp = x elif y <= 9.5e-127: tmp = (z * y) / a elif y <= 2.4e-89: tmp = x elif y <= 4.3e+44: tmp = t_1 elif y <= 3.1e+134: tmp = y * (z / a) elif y <= 7e+225: tmp = t_1 else: tmp = z * (y / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(-y) * Float64(t / a)) tmp = 0.0 if (y <= -2.7e+49) tmp = Float64(t / Float64(a / Float64(-y))); elseif (y <= 2.9e-161) tmp = x; elseif (y <= 9.5e-127) tmp = Float64(Float64(z * y) / a); elseif (y <= 2.4e-89) tmp = x; elseif (y <= 4.3e+44) tmp = t_1; elseif (y <= 3.1e+134) tmp = Float64(y * Float64(z / a)); elseif (y <= 7e+225) tmp = t_1; else tmp = Float64(z * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = -y * (t / a); tmp = 0.0; if (y <= -2.7e+49) tmp = t / (a / -y); elseif (y <= 2.9e-161) tmp = x; elseif (y <= 9.5e-127) tmp = (z * y) / a; elseif (y <= 2.4e-89) tmp = x; elseif (y <= 4.3e+44) tmp = t_1; elseif (y <= 3.1e+134) tmp = y * (z / a); elseif (y <= 7e+225) tmp = t_1; else tmp = z * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-y) * N[(t / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e+49], N[(t / N[(a / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.9e-161], x, If[LessEqual[y, 9.5e-127], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 2.4e-89], x, If[LessEqual[y, 4.3e+44], t$95$1, If[LessEqual[y, 3.1e+134], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+225], t$95$1, N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(-y\right) \cdot \frac{t}{a}\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+49}:\\
\;\;\;\;\frac{t}{\frac{a}{-y}}\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-161}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-127}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-89}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{+134}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+225}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -2.7000000000000001e49Initial program 88.9%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in z around 0 57.3%
mul-1-neg57.3%
associate-*l/64.7%
distribute-rgt-neg-out64.7%
+-commutative64.7%
*-commutative64.7%
distribute-lft-neg-out64.7%
unsub-neg64.7%
Simplified64.7%
Taylor expanded in x around 0 45.8%
associate-*r/45.8%
*-commutative45.8%
neg-mul-145.8%
distribute-rgt-neg-out45.8%
associate-/l*53.5%
Simplified53.5%
if -2.7000000000000001e49 < y < 2.9e-161 or 9.4999999999999997e-127 < y < 2.40000000000000016e-89Initial program 99.0%
associate-*l/98.8%
Simplified98.8%
Taylor expanded in x around inf 70.8%
if 2.9e-161 < y < 9.4999999999999997e-127Initial program 99.6%
associate-*l/86.1%
Simplified86.1%
Taylor expanded in y around inf 44.3%
Taylor expanded in z around inf 72.9%
Taylor expanded in z around 0 85.8%
if 2.40000000000000016e-89 < y < 4.29999999999999982e44 or 3.09999999999999982e134 < y < 7.0000000000000006e225Initial program 90.8%
associate-*l/95.1%
Simplified95.1%
Taylor expanded in y around inf 81.0%
Taylor expanded in z around 0 66.9%
neg-mul-166.9%
distribute-neg-frac66.9%
Simplified66.9%
if 4.29999999999999982e44 < y < 3.09999999999999982e134Initial program 87.5%
associate-*l/96.0%
Simplified96.0%
Taylor expanded in y around inf 70.8%
Taylor expanded in z around inf 55.2%
if 7.0000000000000006e225 < y Initial program 91.9%
associate-*l/99.9%
Simplified99.9%
Taylor expanded in y around inf 75.5%
Taylor expanded in z around inf 63.5%
Taylor expanded in z around 0 61.0%
associate-*l/68.8%
Simplified68.8%
Final simplification64.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) a))))
(if (<= y -2e-37)
t_1
(if (<= y -1e-115)
x
(if (<= y -1.3e-143)
t_1
(if (<= y 2.9e-161)
x
(if (<= y 1.25e-125) (/ (* z y) a) (if (<= y 1.5e-90) x t_1))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / a);
double tmp;
if (y <= -2e-37) {
tmp = t_1;
} else if (y <= -1e-115) {
tmp = x;
} else if (y <= -1.3e-143) {
tmp = t_1;
} else if (y <= 2.9e-161) {
tmp = x;
} else if (y <= 1.25e-125) {
tmp = (z * y) / a;
} else if (y <= 1.5e-90) {
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 - t) / a)
if (y <= (-2d-37)) then
tmp = t_1
else if (y <= (-1d-115)) then
tmp = x
else if (y <= (-1.3d-143)) then
tmp = t_1
else if (y <= 2.9d-161) then
tmp = x
else if (y <= 1.25d-125) then
tmp = (z * y) / a
else if (y <= 1.5d-90) 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 - t) / a);
double tmp;
if (y <= -2e-37) {
tmp = t_1;
} else if (y <= -1e-115) {
tmp = x;
} else if (y <= -1.3e-143) {
tmp = t_1;
} else if (y <= 2.9e-161) {
tmp = x;
} else if (y <= 1.25e-125) {
tmp = (z * y) / a;
} else if (y <= 1.5e-90) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / a) tmp = 0 if y <= -2e-37: tmp = t_1 elif y <= -1e-115: tmp = x elif y <= -1.3e-143: tmp = t_1 elif y <= 2.9e-161: tmp = x elif y <= 1.25e-125: tmp = (z * y) / a elif y <= 1.5e-90: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / a)) tmp = 0.0 if (y <= -2e-37) tmp = t_1; elseif (y <= -1e-115) tmp = x; elseif (y <= -1.3e-143) tmp = t_1; elseif (y <= 2.9e-161) tmp = x; elseif (y <= 1.25e-125) tmp = Float64(Float64(z * y) / a); elseif (y <= 1.5e-90) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / a); tmp = 0.0; if (y <= -2e-37) tmp = t_1; elseif (y <= -1e-115) tmp = x; elseif (y <= -1.3e-143) tmp = t_1; elseif (y <= 2.9e-161) tmp = x; elseif (y <= 1.25e-125) tmp = (z * y) / a; elseif (y <= 1.5e-90) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2e-37], t$95$1, If[LessEqual[y, -1e-115], x, If[LessEqual[y, -1.3e-143], t$95$1, If[LessEqual[y, 2.9e-161], x, If[LessEqual[y, 1.25e-125], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 1.5e-90], x, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a}\\
\mathbf{if}\;y \leq -2 \cdot 10^{-37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-115}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-143}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-161}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-125}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{-90}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -2.00000000000000013e-37 or -1.0000000000000001e-115 < y < -1.29999999999999994e-143 or 1.5000000000000001e-90 < y Initial program 90.8%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in y around inf 77.7%
Taylor expanded in z around 0 77.7%
neg-mul-177.7%
+-commutative77.7%
sub-neg77.7%
div-sub79.5%
Simplified79.5%
if -2.00000000000000013e-37 < y < -1.0000000000000001e-115 or -1.29999999999999994e-143 < y < 2.9e-161 or 1.24999999999999992e-125 < y < 1.5000000000000001e-90Initial program 98.7%
associate-*l/98.6%
Simplified98.6%
Taylor expanded in x around inf 78.8%
if 2.9e-161 < y < 1.24999999999999992e-125Initial program 99.6%
associate-*l/86.1%
Simplified86.1%
Taylor expanded in y around inf 44.3%
Taylor expanded in z around inf 72.9%
Taylor expanded in z around 0 85.8%
Final simplification79.5%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -3.6e+49)
(not
(or (<= y 4.5e-89) (and (not (<= y 1350000000.0)) (<= y 3.4e+134)))))
(* y (/ (- z t) a))
(+ x (/ y (/ a z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.6e+49) || !((y <= 4.5e-89) || (!(y <= 1350000000.0) && (y <= 3.4e+134)))) {
tmp = y * ((z - t) / a);
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-3.6d+49)) .or. (.not. (y <= 4.5d-89) .or. (.not. (y <= 1350000000.0d0)) .and. (y <= 3.4d+134))) then
tmp = y * ((z - t) / a)
else
tmp = x + (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.6e+49) || !((y <= 4.5e-89) || (!(y <= 1350000000.0) && (y <= 3.4e+134)))) {
tmp = y * ((z - t) / a);
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.6e+49) or not ((y <= 4.5e-89) or (not (y <= 1350000000.0) and (y <= 3.4e+134))): tmp = y * ((z - t) / a) else: tmp = x + (y / (a / z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.6e+49) || !((y <= 4.5e-89) || (!(y <= 1350000000.0) && (y <= 3.4e+134)))) tmp = Float64(y * Float64(Float64(z - t) / a)); else tmp = Float64(x + Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.6e+49) || ~(((y <= 4.5e-89) || (~((y <= 1350000000.0)) && (y <= 3.4e+134))))) tmp = y * ((z - t) / a); else tmp = x + (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.6e+49], N[Not[Or[LessEqual[y, 4.5e-89], And[N[Not[LessEqual[y, 1350000000.0]], $MachinePrecision], LessEqual[y, 3.4e+134]]]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+49} \lor \neg \left(y \leq 4.5 \cdot 10^{-89} \lor \neg \left(y \leq 1350000000\right) \land y \leq 3.4 \cdot 10^{+134}\right):\\
\;\;\;\;y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if y < -3.59999999999999996e49 or 4.4999999999999999e-89 < y < 1.35e9 or 3.40000000000000018e134 < y Initial program 90.4%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in y around inf 82.7%
Taylor expanded in z around 0 82.7%
neg-mul-182.7%
+-commutative82.7%
sub-neg82.7%
div-sub85.2%
Simplified85.2%
if -3.59999999999999996e49 < y < 4.4999999999999999e-89 or 1.35e9 < y < 3.40000000000000018e134Initial program 96.4%
associate-/l*87.4%
Simplified87.4%
Taylor expanded in z around inf 82.8%
Final simplification83.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) a))))
(if (<= y -2.15e+49)
t_1
(if (<= y 2.4e-89)
(+ x (* z (/ y a)))
(if (or (<= y 650000.0) (not (<= y 4.2e+134)))
t_1
(+ x (/ y (/ a z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / a);
double tmp;
if (y <= -2.15e+49) {
tmp = t_1;
} else if (y <= 2.4e-89) {
tmp = x + (z * (y / a));
} else if ((y <= 650000.0) || !(y <= 4.2e+134)) {
tmp = t_1;
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / a)
if (y <= (-2.15d+49)) then
tmp = t_1
else if (y <= 2.4d-89) then
tmp = x + (z * (y / a))
else if ((y <= 650000.0d0) .or. (.not. (y <= 4.2d+134))) then
tmp = t_1
else
tmp = x + (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / a);
double tmp;
if (y <= -2.15e+49) {
tmp = t_1;
} else if (y <= 2.4e-89) {
tmp = x + (z * (y / a));
} else if ((y <= 650000.0) || !(y <= 4.2e+134)) {
tmp = t_1;
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / a) tmp = 0 if y <= -2.15e+49: tmp = t_1 elif y <= 2.4e-89: tmp = x + (z * (y / a)) elif (y <= 650000.0) or not (y <= 4.2e+134): tmp = t_1 else: tmp = x + (y / (a / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / a)) tmp = 0.0 if (y <= -2.15e+49) tmp = t_1; elseif (y <= 2.4e-89) tmp = Float64(x + Float64(z * Float64(y / a))); elseif ((y <= 650000.0) || !(y <= 4.2e+134)) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / a); tmp = 0.0; if (y <= -2.15e+49) tmp = t_1; elseif (y <= 2.4e-89) tmp = x + (z * (y / a)); elseif ((y <= 650000.0) || ~((y <= 4.2e+134))) tmp = t_1; else tmp = x + (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.15e+49], t$95$1, If[LessEqual[y, 2.4e-89], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 650000.0], N[Not[LessEqual[y, 4.2e+134]], $MachinePrecision]], t$95$1, N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a}\\
\mathbf{if}\;y \leq -2.15 \cdot 10^{+49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-89}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{elif}\;y \leq 650000 \lor \neg \left(y \leq 4.2 \cdot 10^{+134}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if y < -2.15e49 or 2.40000000000000016e-89 < y < 6.5e5 or 4.2000000000000002e134 < y Initial program 90.4%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in y around inf 82.7%
Taylor expanded in z around 0 82.7%
neg-mul-182.7%
+-commutative82.7%
sub-neg82.7%
div-sub85.2%
Simplified85.2%
if -2.15e49 < y < 2.40000000000000016e-89Initial program 99.0%
associate-*l/98.0%
Simplified98.0%
Taylor expanded in t around 0 87.6%
associate-*l/86.8%
*-commutative86.8%
Simplified86.8%
if 6.5e5 < y < 4.2000000000000002e134Initial program 86.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 84.0%
Final simplification85.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ (- z t) a))))
(if (<= y -2.7e+49)
t_1
(if (<= y 1.15e-89)
(+ x (/ (* z y) a))
(if (or (<= y 32000000.0) (not (<= y 3.5e+134)))
t_1
(+ x (/ y (/ a z))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / a);
double tmp;
if (y <= -2.7e+49) {
tmp = t_1;
} else if (y <= 1.15e-89) {
tmp = x + ((z * y) / a);
} else if ((y <= 32000000.0) || !(y <= 3.5e+134)) {
tmp = t_1;
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * ((z - t) / a)
if (y <= (-2.7d+49)) then
tmp = t_1
else if (y <= 1.15d-89) then
tmp = x + ((z * y) / a)
else if ((y <= 32000000.0d0) .or. (.not. (y <= 3.5d+134))) then
tmp = t_1
else
tmp = x + (y / (a / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * ((z - t) / a);
double tmp;
if (y <= -2.7e+49) {
tmp = t_1;
} else if (y <= 1.15e-89) {
tmp = x + ((z * y) / a);
} else if ((y <= 32000000.0) || !(y <= 3.5e+134)) {
tmp = t_1;
} else {
tmp = x + (y / (a / z));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * ((z - t) / a) tmp = 0 if y <= -2.7e+49: tmp = t_1 elif y <= 1.15e-89: tmp = x + ((z * y) / a) elif (y <= 32000000.0) or not (y <= 3.5e+134): tmp = t_1 else: tmp = x + (y / (a / z)) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(Float64(z - t) / a)) tmp = 0.0 if (y <= -2.7e+49) tmp = t_1; elseif (y <= 1.15e-89) tmp = Float64(x + Float64(Float64(z * y) / a)); elseif ((y <= 32000000.0) || !(y <= 3.5e+134)) tmp = t_1; else tmp = Float64(x + Float64(y / Float64(a / z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * ((z - t) / a); tmp = 0.0; if (y <= -2.7e+49) tmp = t_1; elseif (y <= 1.15e-89) tmp = x + ((z * y) / a); elseif ((y <= 32000000.0) || ~((y <= 3.5e+134))) tmp = t_1; else tmp = x + (y / (a / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.7e+49], t$95$1, If[LessEqual[y, 1.15e-89], N[(x + N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 32000000.0], N[Not[LessEqual[y, 3.5e+134]], $MachinePrecision]], t$95$1, N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z - t}{a}\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+49}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{-89}:\\
\;\;\;\;x + \frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq 32000000 \lor \neg \left(y \leq 3.5 \cdot 10^{+134}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\end{array}
\end{array}
if y < -2.7000000000000001e49 or 1.15e-89 < y < 3.2e7 or 3.50000000000000003e134 < y Initial program 90.4%
associate-*l/95.9%
Simplified95.9%
Taylor expanded in y around inf 82.7%
Taylor expanded in z around 0 82.7%
neg-mul-182.7%
+-commutative82.7%
sub-neg82.7%
div-sub85.2%
Simplified85.2%
if -2.7000000000000001e49 < y < 1.15e-89Initial program 99.0%
associate-*l/98.0%
Simplified98.0%
Taylor expanded in t around 0 87.6%
if 3.2e7 < y < 3.50000000000000003e134Initial program 86.4%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 84.0%
Final simplification86.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z a))))
(if (<= y -3.8e+68)
t_1
(if (<= y 2.9e-161)
x
(if (<= y 9.5e-127) t_1 (if (<= y 1.55e+47) x (* z (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / a);
double tmp;
if (y <= -3.8e+68) {
tmp = t_1;
} else if (y <= 2.9e-161) {
tmp = x;
} else if (y <= 9.5e-127) {
tmp = t_1;
} else if (y <= 1.55e+47) {
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) :: t_1
real(8) :: tmp
t_1 = y * (z / a)
if (y <= (-3.8d+68)) then
tmp = t_1
else if (y <= 2.9d-161) then
tmp = x
else if (y <= 9.5d-127) then
tmp = t_1
else if (y <= 1.55d+47) 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 t_1 = y * (z / a);
double tmp;
if (y <= -3.8e+68) {
tmp = t_1;
} else if (y <= 2.9e-161) {
tmp = x;
} else if (y <= 9.5e-127) {
tmp = t_1;
} else if (y <= 1.55e+47) {
tmp = x;
} else {
tmp = z * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / a) tmp = 0 if y <= -3.8e+68: tmp = t_1 elif y <= 2.9e-161: tmp = x elif y <= 9.5e-127: tmp = t_1 elif y <= 1.55e+47: tmp = x else: tmp = z * (y / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / a)) tmp = 0.0 if (y <= -3.8e+68) tmp = t_1; elseif (y <= 2.9e-161) tmp = x; elseif (y <= 9.5e-127) tmp = t_1; elseif (y <= 1.55e+47) tmp = x; else tmp = Float64(z * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / a); tmp = 0.0; if (y <= -3.8e+68) tmp = t_1; elseif (y <= 2.9e-161) tmp = x; elseif (y <= 9.5e-127) tmp = t_1; elseif (y <= 1.55e+47) tmp = x; else tmp = z * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.8e+68], t$95$1, If[LessEqual[y, 2.9e-161], x, If[LessEqual[y, 9.5e-127], t$95$1, If[LessEqual[y, 1.55e+47], x, N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{a}\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-161}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{-127}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+47}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -3.8000000000000001e68 or 2.9e-161 < y < 9.4999999999999997e-127Initial program 89.2%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in y around inf 80.7%
Taylor expanded in z around inf 51.3%
if -3.8000000000000001e68 < y < 2.9e-161 or 9.4999999999999997e-127 < y < 1.55e47Initial program 98.4%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in x around inf 61.8%
if 1.55e47 < y Initial program 88.9%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in y around inf 77.5%
Taylor expanded in z around inf 48.6%
Taylor expanded in z around 0 42.4%
associate-*l/55.4%
Simplified55.4%
Final simplification57.5%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.28e+70)
(* y (/ z a))
(if (<= y 2.85e-161)
x
(if (<= y 1.2e-125) (/ (* z y) a) (if (<= y 7.8e+47) x (* z (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.28e+70) {
tmp = y * (z / a);
} else if (y <= 2.85e-161) {
tmp = x;
} else if (y <= 1.2e-125) {
tmp = (z * y) / a;
} else if (y <= 7.8e+47) {
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 (y <= (-1.28d+70)) then
tmp = y * (z / a)
else if (y <= 2.85d-161) then
tmp = x
else if (y <= 1.2d-125) then
tmp = (z * y) / a
else if (y <= 7.8d+47) 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 (y <= -1.28e+70) {
tmp = y * (z / a);
} else if (y <= 2.85e-161) {
tmp = x;
} else if (y <= 1.2e-125) {
tmp = (z * y) / a;
} else if (y <= 7.8e+47) {
tmp = x;
} else {
tmp = z * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.28e+70: tmp = y * (z / a) elif y <= 2.85e-161: tmp = x elif y <= 1.2e-125: tmp = (z * y) / a elif y <= 7.8e+47: tmp = x else: tmp = z * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.28e+70) tmp = Float64(y * Float64(z / a)); elseif (y <= 2.85e-161) tmp = x; elseif (y <= 1.2e-125) tmp = Float64(Float64(z * y) / a); elseif (y <= 7.8e+47) tmp = x; else tmp = Float64(z * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.28e+70) tmp = y * (z / a); elseif (y <= 2.85e-161) tmp = x; elseif (y <= 1.2e-125) tmp = (z * y) / a; elseif (y <= 7.8e+47) tmp = x; else tmp = z * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.28e+70], N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.85e-161], x, If[LessEqual[y, 1.2e-125], N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 7.8e+47], x, N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.28 \cdot 10^{+70}:\\
\;\;\;\;y \cdot \frac{z}{a}\\
\mathbf{elif}\;y \leq 2.85 \cdot 10^{-161}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-125}:\\
\;\;\;\;\frac{z \cdot y}{a}\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+47}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -1.27999999999999994e70Initial program 87.9%
associate-*l/94.6%
Simplified94.6%
Taylor expanded in y around inf 85.3%
Taylor expanded in z around inf 48.5%
if -1.27999999999999994e70 < y < 2.85000000000000011e-161 or 1.2000000000000001e-125 < y < 7.8000000000000005e47Initial program 98.4%
associate-*l/98.2%
Simplified98.2%
Taylor expanded in x around inf 61.8%
if 2.85000000000000011e-161 < y < 1.2000000000000001e-125Initial program 99.6%
associate-*l/86.1%
Simplified86.1%
Taylor expanded in y around inf 44.3%
Taylor expanded in z around inf 72.9%
Taylor expanded in z around 0 85.8%
if 7.8000000000000005e47 < y Initial program 88.9%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in y around inf 77.5%
Taylor expanded in z around inf 48.6%
Taylor expanded in z around 0 42.4%
associate-*l/55.4%
Simplified55.4%
Final simplification57.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2e+57) (not (<= z 2.2e-20))) (+ x (* z (/ y a))) (- x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2e+57) || !(z <= 2.2e-20)) {
tmp = x + (z * (y / a));
} else {
tmp = x - (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2d+57)) .or. (.not. (z <= 2.2d-20))) then
tmp = x + (z * (y / a))
else
tmp = x - (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2e+57) || !(z <= 2.2e-20)) {
tmp = x + (z * (y / a));
} else {
tmp = x - (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2e+57) or not (z <= 2.2e-20): tmp = x + (z * (y / a)) else: tmp = x - (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2e+57) || !(z <= 2.2e-20)) tmp = Float64(x + Float64(z * Float64(y / a))); else tmp = Float64(x - Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2e+57) || ~((z <= 2.2e-20))) tmp = x + (z * (y / a)); else tmp = x - (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2e+57], N[Not[LessEqual[z, 2.2e-20]], $MachinePrecision]], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+57} \lor \neg \left(z \leq 2.2 \cdot 10^{-20}\right):\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -2.0000000000000001e57 or 2.19999999999999991e-20 < z Initial program 91.0%
associate-*l/97.4%
Simplified97.4%
Taylor expanded in t around 0 86.6%
associate-*l/91.4%
*-commutative91.4%
Simplified91.4%
if -2.0000000000000001e57 < z < 2.19999999999999991e-20Initial program 95.8%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in z around 0 87.4%
mul-1-neg87.4%
associate-*l/89.9%
distribute-rgt-neg-out89.9%
+-commutative89.9%
*-commutative89.9%
distribute-lft-neg-out89.9%
unsub-neg89.9%
Simplified89.9%
Final simplification90.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3e+70) (not (<= y 3.7e+48))) (* z (/ y a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3e+70) || !(y <= 3.7e+48)) {
tmp = z * (y / a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-3d+70)) .or. (.not. (y <= 3.7d+48))) then
tmp = z * (y / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3e+70) || !(y <= 3.7e+48)) {
tmp = z * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3e+70) or not (y <= 3.7e+48): tmp = z * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3e+70) || !(y <= 3.7e+48)) tmp = Float64(z * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3e+70) || ~((y <= 3.7e+48))) tmp = z * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3e+70], N[Not[LessEqual[y, 3.7e+48]], $MachinePrecision]], N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{+70} \lor \neg \left(y \leq 3.7 \cdot 10^{+48}\right):\\
\;\;\;\;z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.99999999999999976e70 or 3.6999999999999999e48 < y Initial program 88.5%
associate-*l/96.1%
Simplified96.1%
Taylor expanded in y around inf 81.0%
Taylor expanded in z around inf 48.6%
Taylor expanded in z around 0 42.8%
associate-*l/52.2%
Simplified52.2%
if -2.99999999999999976e70 < y < 3.6999999999999999e48Initial program 98.4%
associate-*l/97.6%
Simplified97.6%
Taylor expanded in x around inf 59.4%
Final simplification55.9%
(FPCore (x y z t a) :precision binary64 (+ x (* (- z t) (/ y a))))
double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / 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 + ((z - t) * (y / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((z - t) * (y / a));
}
def code(x, y, z, t, a): return x + ((z - t) * (y / a))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(z - t) * Float64(y / a))) end
function tmp = code(x, y, z, t, a) tmp = x + ((z - t) * (y / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - t\right) \cdot \frac{y}{a}
\end{array}
Initial program 93.6%
associate-*l/96.8%
Simplified96.8%
Final simplification96.8%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 93.6%
associate-*l/96.8%
Simplified96.8%
Taylor expanded in x around inf 39.5%
Final simplification39.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(+ x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(+ x (/ (* y (- z t)) a))
(+ x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x + (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) / a);
} else {
tmp = x + (y / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = a / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x + (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x + ((y * (z - t)) / a)
else
tmp = x + (y / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x + (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x + ((y * (z - t)) / a);
} else {
tmp = x + (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x + (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x + ((y * (z - t)) / a) else: tmp = x + (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x + Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x + Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x + Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x + (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x + ((y * (z - t)) / a); else tmp = x + (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x + N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{1}{\frac{t_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x + \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{t_1}\\
\end{array}
\end{array}
herbie shell --seed 2023208
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
:precision binary64
:herbie-target
(if (< y -1.0761266216389975e-10) (+ x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (+ x (/ (* y (- z t)) a)) (+ x (/ y (/ a (- z t))))))
(+ x (/ (* y (- z t)) a)))