
(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 12 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 (<= t_1 -4e+242)
(+ x (/ (- t z) (/ a y)))
(if (<= t_1 2e+216) (- x (/ t_1 a)) (+ x (* y (/ (- t z) a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -4e+242) {
tmp = x + ((t - z) / (a / y));
} else if (t_1 <= 2e+216) {
tmp = x - (t_1 / a);
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z - t)
if (t_1 <= (-4d+242)) then
tmp = x + ((t - z) / (a / y))
else if (t_1 <= 2d+216) then
tmp = x - (t_1 / a)
else
tmp = x + (y * ((t - z) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -4e+242) {
tmp = x + ((t - z) / (a / y));
} else if (t_1 <= 2e+216) {
tmp = x - (t_1 / a);
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if t_1 <= -4e+242: tmp = x + ((t - z) / (a / y)) elif t_1 <= 2e+216: tmp = x - (t_1 / a) else: tmp = x + (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if (t_1 <= -4e+242) tmp = Float64(x + Float64(Float64(t - z) / Float64(a / y))); elseif (t_1 <= 2e+216) tmp = Float64(x - Float64(t_1 / a)); else tmp = Float64(x + Float64(y * Float64(Float64(t - z) / 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 <= -4e+242) tmp = x + ((t - z) / (a / y)); elseif (t_1 <= 2e+216) tmp = x - (t_1 / a); else tmp = x + (y * ((t - z) / a)); 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, -4e+242], N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+216], N[(x - N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -4 \cdot 10^{+242}:\\
\;\;\;\;x + \frac{t - z}{\frac{a}{y}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+216}:\\
\;\;\;\;x - \frac{t\_1}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -4.0000000000000002e242Initial program 67.5%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in y around 0 67.5%
*-lft-identity67.5%
associate-*l/67.6%
associate-*r*99.7%
associate-/r/99.9%
associate-*l/100.0%
*-lft-identity100.0%
Simplified100.0%
if -4.0000000000000002e242 < (*.f64 y (-.f64 z t)) < 2e216Initial program 99.9%
if 2e216 < (*.f64 y (-.f64 z t)) Initial program 89.9%
associate-/l*100.0%
Simplified100.0%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (/ a y))) (t_2 (* y (/ (- z) a))))
(if (<= a -8.5e+22)
x
(if (<= a -1.15e-47)
(* t (/ y a))
(if (<= a -8e-74)
x
(if (<= a 7e-247)
t_1
(if (<= a 1.4e-183)
t_2
(if (<= a 1.3e-138)
t_1
(if (<= a 1.2e-87) t_2 (if (<= a 1.45) t_1 x))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double t_2 = y * (-z / a);
double tmp;
if (a <= -8.5e+22) {
tmp = x;
} else if (a <= -1.15e-47) {
tmp = t * (y / a);
} else if (a <= -8e-74) {
tmp = x;
} else if (a <= 7e-247) {
tmp = t_1;
} else if (a <= 1.4e-183) {
tmp = t_2;
} else if (a <= 1.3e-138) {
tmp = t_1;
} else if (a <= 1.2e-87) {
tmp = t_2;
} else if (a <= 1.45) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t / (a / y)
t_2 = y * (-z / a)
if (a <= (-8.5d+22)) then
tmp = x
else if (a <= (-1.15d-47)) then
tmp = t * (y / a)
else if (a <= (-8d-74)) then
tmp = x
else if (a <= 7d-247) then
tmp = t_1
else if (a <= 1.4d-183) then
tmp = t_2
else if (a <= 1.3d-138) then
tmp = t_1
else if (a <= 1.2d-87) then
tmp = t_2
else if (a <= 1.45d0) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double t_2 = y * (-z / a);
double tmp;
if (a <= -8.5e+22) {
tmp = x;
} else if (a <= -1.15e-47) {
tmp = t * (y / a);
} else if (a <= -8e-74) {
tmp = x;
} else if (a <= 7e-247) {
tmp = t_1;
} else if (a <= 1.4e-183) {
tmp = t_2;
} else if (a <= 1.3e-138) {
tmp = t_1;
} else if (a <= 1.2e-87) {
tmp = t_2;
} else if (a <= 1.45) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t / (a / y) t_2 = y * (-z / a) tmp = 0 if a <= -8.5e+22: tmp = x elif a <= -1.15e-47: tmp = t * (y / a) elif a <= -8e-74: tmp = x elif a <= 7e-247: tmp = t_1 elif a <= 1.4e-183: tmp = t_2 elif a <= 1.3e-138: tmp = t_1 elif a <= 1.2e-87: tmp = t_2 elif a <= 1.45: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t / Float64(a / y)) t_2 = Float64(y * Float64(Float64(-z) / a)) tmp = 0.0 if (a <= -8.5e+22) tmp = x; elseif (a <= -1.15e-47) tmp = Float64(t * Float64(y / a)); elseif (a <= -8e-74) tmp = x; elseif (a <= 7e-247) tmp = t_1; elseif (a <= 1.4e-183) tmp = t_2; elseif (a <= 1.3e-138) tmp = t_1; elseif (a <= 1.2e-87) tmp = t_2; elseif (a <= 1.45) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t / (a / y); t_2 = y * (-z / a); tmp = 0.0; if (a <= -8.5e+22) tmp = x; elseif (a <= -1.15e-47) tmp = t * (y / a); elseif (a <= -8e-74) tmp = x; elseif (a <= 7e-247) tmp = t_1; elseif (a <= 1.4e-183) tmp = t_2; elseif (a <= 1.3e-138) tmp = t_1; elseif (a <= 1.2e-87) tmp = t_2; elseif (a <= 1.45) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[((-z) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.5e+22], x, If[LessEqual[a, -1.15e-47], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8e-74], x, If[LessEqual[a, 7e-247], t$95$1, If[LessEqual[a, 1.4e-183], t$95$2, If[LessEqual[a, 1.3e-138], t$95$1, If[LessEqual[a, 1.2e-87], t$95$2, If[LessEqual[a, 1.45], t$95$1, x]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a}{y}}\\
t_2 := y \cdot \frac{-z}{a}\\
\mathbf{if}\;a \leq -8.5 \cdot 10^{+22}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.15 \cdot 10^{-47}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq -8 \cdot 10^{-74}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 7 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-183}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-87}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.45:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.49999999999999979e22 or -1.14999999999999991e-47 < a < -7.99999999999999966e-74 or 1.44999999999999996 < a Initial program 91.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 81.2%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in x around inf 68.1%
if -8.49999999999999979e22 < a < -1.14999999999999991e-47Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 70.6%
associate-*r/70.6%
mul-1-neg70.6%
distribute-lft-neg-out70.6%
*-commutative70.6%
associate-/l*70.9%
distribute-neg-frac70.9%
distribute-neg-frac270.9%
Simplified70.9%
Taylor expanded in x around 0 51.6%
associate-*r/51.9%
Simplified51.9%
if -7.99999999999999966e-74 < a < 6.9999999999999998e-247 or 1.39999999999999992e-183 < a < 1.3e-138 or 1.2e-87 < a < 1.44999999999999996Initial program 99.8%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in z around 0 73.8%
associate-*r/73.8%
mul-1-neg73.8%
distribute-lft-neg-out73.8%
*-commutative73.8%
associate-/l*66.0%
distribute-neg-frac66.0%
distribute-neg-frac266.0%
Simplified66.0%
Taylor expanded in x around 0 63.2%
associate-*r/64.5%
Simplified64.5%
clear-num64.5%
un-div-inv64.6%
Applied egg-rr64.6%
if 6.9999999999999998e-247 < a < 1.39999999999999992e-183 or 1.3e-138 < a < 1.2e-87Initial program 99.9%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in z around inf 92.3%
associate-/l*85.0%
Simplified85.0%
*-commutative85.0%
associate-/r/85.1%
Applied egg-rr85.1%
Taylor expanded in x around 0 73.9%
mul-1-neg73.9%
associate-*r/66.6%
distribute-rgt-neg-in66.6%
distribute-neg-frac266.6%
Simplified66.6%
Final simplification65.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (/ a y))))
(if (<= a -8.5e+22)
x
(if (<= a -5.8e-49)
(* t (/ y a))
(if (<= a -1.02e-73)
x
(if (<= a 2.75e-247)
t_1
(if (<= a 3.9e-82) (* z (/ y (- a))) (if (<= a 0.8) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double tmp;
if (a <= -8.5e+22) {
tmp = x;
} else if (a <= -5.8e-49) {
tmp = t * (y / a);
} else if (a <= -1.02e-73) {
tmp = x;
} else if (a <= 2.75e-247) {
tmp = t_1;
} else if (a <= 3.9e-82) {
tmp = z * (y / -a);
} else if (a <= 0.8) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t / (a / y)
if (a <= (-8.5d+22)) then
tmp = x
else if (a <= (-5.8d-49)) then
tmp = t * (y / a)
else if (a <= (-1.02d-73)) then
tmp = x
else if (a <= 2.75d-247) then
tmp = t_1
else if (a <= 3.9d-82) then
tmp = z * (y / -a)
else if (a <= 0.8d0) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double tmp;
if (a <= -8.5e+22) {
tmp = x;
} else if (a <= -5.8e-49) {
tmp = t * (y / a);
} else if (a <= -1.02e-73) {
tmp = x;
} else if (a <= 2.75e-247) {
tmp = t_1;
} else if (a <= 3.9e-82) {
tmp = z * (y / -a);
} else if (a <= 0.8) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t / (a / y) tmp = 0 if a <= -8.5e+22: tmp = x elif a <= -5.8e-49: tmp = t * (y / a) elif a <= -1.02e-73: tmp = x elif a <= 2.75e-247: tmp = t_1 elif a <= 3.9e-82: tmp = z * (y / -a) elif a <= 0.8: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t / Float64(a / y)) tmp = 0.0 if (a <= -8.5e+22) tmp = x; elseif (a <= -5.8e-49) tmp = Float64(t * Float64(y / a)); elseif (a <= -1.02e-73) tmp = x; elseif (a <= 2.75e-247) tmp = t_1; elseif (a <= 3.9e-82) tmp = Float64(z * Float64(y / Float64(-a))); elseif (a <= 0.8) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t / (a / y); tmp = 0.0; if (a <= -8.5e+22) tmp = x; elseif (a <= -5.8e-49) tmp = t * (y / a); elseif (a <= -1.02e-73) tmp = x; elseif (a <= 2.75e-247) tmp = t_1; elseif (a <= 3.9e-82) tmp = z * (y / -a); elseif (a <= 0.8) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.5e+22], x, If[LessEqual[a, -5.8e-49], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.02e-73], x, If[LessEqual[a, 2.75e-247], t$95$1, If[LessEqual[a, 3.9e-82], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.8], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -8.5 \cdot 10^{+22}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{-49}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq -1.02 \cdot 10^{-73}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 2.75 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-82}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{elif}\;a \leq 0.8:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.49999999999999979e22 or -5.8e-49 < a < -1.0199999999999999e-73 or 0.80000000000000004 < a Initial program 91.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 81.2%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in x around inf 68.1%
if -8.49999999999999979e22 < a < -5.8e-49Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 70.6%
associate-*r/70.6%
mul-1-neg70.6%
distribute-lft-neg-out70.6%
*-commutative70.6%
associate-/l*70.9%
distribute-neg-frac70.9%
distribute-neg-frac270.9%
Simplified70.9%
Taylor expanded in x around 0 51.6%
associate-*r/51.9%
Simplified51.9%
if -1.0199999999999999e-73 < a < 2.74999999999999997e-247 or 3.89999999999999973e-82 < a < 0.80000000000000004Initial program 99.8%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in z around 0 74.1%
associate-*r/74.1%
mul-1-neg74.1%
distribute-lft-neg-out74.1%
*-commutative74.1%
associate-/l*66.6%
distribute-neg-frac66.6%
distribute-neg-frac266.6%
Simplified66.6%
Taylor expanded in x around 0 63.5%
associate-*r/63.5%
Simplified63.5%
clear-num63.5%
un-div-inv63.6%
Applied egg-rr63.6%
if 2.74999999999999997e-247 < a < 3.89999999999999973e-82Initial program 99.9%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in z around inf 81.1%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in x around 0 65.1%
associate-*r/65.1%
*-commutative65.1%
neg-mul-165.1%
distribute-lft-neg-in65.1%
associate-*r/59.9%
*-commutative59.9%
Simplified59.9%
Final simplification64.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (/ a y))))
(if (<= a -9e+24)
x
(if (<= a -3.6e-49)
(* t (/ y a))
(if (<= a -2.3e-74)
x
(if (<= a 3.5e-247)
t_1
(if (<= a 1.7e-85) (/ (* y z) (- a)) (if (<= a 0.11) t_1 x))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double tmp;
if (a <= -9e+24) {
tmp = x;
} else if (a <= -3.6e-49) {
tmp = t * (y / a);
} else if (a <= -2.3e-74) {
tmp = x;
} else if (a <= 3.5e-247) {
tmp = t_1;
} else if (a <= 1.7e-85) {
tmp = (y * z) / -a;
} else if (a <= 0.11) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t / (a / y)
if (a <= (-9d+24)) then
tmp = x
else if (a <= (-3.6d-49)) then
tmp = t * (y / a)
else if (a <= (-2.3d-74)) then
tmp = x
else if (a <= 3.5d-247) then
tmp = t_1
else if (a <= 1.7d-85) then
tmp = (y * z) / -a
else if (a <= 0.11d0) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / y);
double tmp;
if (a <= -9e+24) {
tmp = x;
} else if (a <= -3.6e-49) {
tmp = t * (y / a);
} else if (a <= -2.3e-74) {
tmp = x;
} else if (a <= 3.5e-247) {
tmp = t_1;
} else if (a <= 1.7e-85) {
tmp = (y * z) / -a;
} else if (a <= 0.11) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t / (a / y) tmp = 0 if a <= -9e+24: tmp = x elif a <= -3.6e-49: tmp = t * (y / a) elif a <= -2.3e-74: tmp = x elif a <= 3.5e-247: tmp = t_1 elif a <= 1.7e-85: tmp = (y * z) / -a elif a <= 0.11: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(t / Float64(a / y)) tmp = 0.0 if (a <= -9e+24) tmp = x; elseif (a <= -3.6e-49) tmp = Float64(t * Float64(y / a)); elseif (a <= -2.3e-74) tmp = x; elseif (a <= 3.5e-247) tmp = t_1; elseif (a <= 1.7e-85) tmp = Float64(Float64(y * z) / Float64(-a)); elseif (a <= 0.11) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t / (a / y); tmp = 0.0; if (a <= -9e+24) tmp = x; elseif (a <= -3.6e-49) tmp = t * (y / a); elseif (a <= -2.3e-74) tmp = x; elseif (a <= 3.5e-247) tmp = t_1; elseif (a <= 1.7e-85) tmp = (y * z) / -a; elseif (a <= 0.11) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9e+24], x, If[LessEqual[a, -3.6e-49], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.3e-74], x, If[LessEqual[a, 3.5e-247], t$95$1, If[LessEqual[a, 1.7e-85], N[(N[(y * z), $MachinePrecision] / (-a)), $MachinePrecision], If[LessEqual[a, 0.11], t$95$1, x]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t}{\frac{a}{y}}\\
\mathbf{if}\;a \leq -9 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -3.6 \cdot 10^{-49}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq -2.3 \cdot 10^{-74}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{-247}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.7 \cdot 10^{-85}:\\
\;\;\;\;\frac{y \cdot z}{-a}\\
\mathbf{elif}\;a \leq 0.11:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -9.00000000000000039e24 or -3.5999999999999997e-49 < a < -2.2999999999999998e-74 or 0.110000000000000001 < a Initial program 91.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 81.2%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in x around inf 68.1%
if -9.00000000000000039e24 < a < -3.5999999999999997e-49Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 70.6%
associate-*r/70.6%
mul-1-neg70.6%
distribute-lft-neg-out70.6%
*-commutative70.6%
associate-/l*70.9%
distribute-neg-frac70.9%
distribute-neg-frac270.9%
Simplified70.9%
Taylor expanded in x around 0 51.6%
associate-*r/51.9%
Simplified51.9%
if -2.2999999999999998e-74 < a < 3.4999999999999999e-247 or 1.7e-85 < a < 0.110000000000000001Initial program 99.8%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in z around 0 74.1%
associate-*r/74.1%
mul-1-neg74.1%
distribute-lft-neg-out74.1%
*-commutative74.1%
associate-/l*66.6%
distribute-neg-frac66.6%
distribute-neg-frac266.6%
Simplified66.6%
Taylor expanded in x around 0 63.5%
associate-*r/63.5%
Simplified63.5%
clear-num63.5%
un-div-inv63.6%
Applied egg-rr63.6%
if 3.4999999999999999e-247 < a < 1.7e-85Initial program 99.9%
associate-/l*81.6%
Simplified81.6%
Taylor expanded in z around inf 81.1%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in x around 0 65.1%
associate-*r/65.1%
*-commutative65.1%
neg-mul-165.1%
distribute-lft-neg-in65.1%
associate-*r/59.9%
*-commutative59.9%
Simplified59.9%
associate-*l/65.1%
frac-2neg65.1%
add-sqr-sqrt36.3%
sqrt-unprod29.1%
sqr-neg29.1%
sqrt-unprod0.4%
add-sqr-sqrt1.0%
distribute-rgt-neg-out1.0%
*-commutative1.0%
add-sqr-sqrt0.6%
sqrt-unprod15.7%
sqr-neg15.7%
sqrt-unprod28.6%
add-sqr-sqrt65.1%
Applied egg-rr65.1%
Final simplification65.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))))
(if (or (<= t_1 -2e+79) (not (<= t_1 2e+216)))
(+ x (* y (/ (- t z) a)))
(- 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+79) || !(t_1 <= 2e+216)) {
tmp = x + (y * ((t - z) / a));
} 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+79)) .or. (.not. (t_1 <= 2d+216))) then
tmp = x + (y * ((t - z) / a))
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+79) || !(t_1 <= 2e+216)) {
tmp = x + (y * ((t - z) / a));
} 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+79) or not (t_1 <= 2e+216): tmp = x + (y * ((t - z) / a)) 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+79) || !(t_1 <= 2e+216)) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); 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+79) || ~((t_1 <= 2e+216))) tmp = x + (y * ((t - z) / a)); 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+79], N[Not[LessEqual[t$95$1, 2e+216]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $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^{+79} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+216}\right):\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{t\_1}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -1.99999999999999993e79 or 2e216 < (*.f64 y (-.f64 z t)) Initial program 87.4%
associate-/l*99.9%
Simplified99.9%
if -1.99999999999999993e79 < (*.f64 y (-.f64 z t)) < 2e216Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(if (<= a -2.2e+24)
x
(if (or (<= a -1.7e-47) (and (not (<= a -1.08e-72)) (<= a 0.74)))
(* t (/ y a))
x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.2e+24) {
tmp = x;
} else if ((a <= -1.7e-47) || (!(a <= -1.08e-72) && (a <= 0.74))) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-2.2d+24)) then
tmp = x
else if ((a <= (-1.7d-47)) .or. (.not. (a <= (-1.08d-72))) .and. (a <= 0.74d0)) then
tmp = t * (y / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -2.2e+24) {
tmp = x;
} else if ((a <= -1.7e-47) || (!(a <= -1.08e-72) && (a <= 0.74))) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -2.2e+24: tmp = x elif (a <= -1.7e-47) or (not (a <= -1.08e-72) and (a <= 0.74)): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -2.2e+24) tmp = x; elseif ((a <= -1.7e-47) || (!(a <= -1.08e-72) && (a <= 0.74))) tmp = Float64(t * Float64(y / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -2.2e+24) tmp = x; elseif ((a <= -1.7e-47) || (~((a <= -1.08e-72)) && (a <= 0.74))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.2e+24], x, If[Or[LessEqual[a, -1.7e-47], And[N[Not[LessEqual[a, -1.08e-72]], $MachinePrecision], LessEqual[a, 0.74]]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.7 \cdot 10^{-47} \lor \neg \left(a \leq -1.08 \cdot 10^{-72}\right) \land a \leq 0.74:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.20000000000000002e24 or -1.7000000000000001e-47 < a < -1.07999999999999998e-72 or 0.73999999999999999 < a Initial program 91.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 81.2%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in x around inf 68.1%
if -2.20000000000000002e24 < a < -1.7000000000000001e-47 or -1.07999999999999998e-72 < a < 0.73999999999999999Initial program 99.8%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around 0 64.9%
associate-*r/64.9%
mul-1-neg64.9%
distribute-lft-neg-out64.9%
*-commutative64.9%
associate-/l*58.6%
distribute-neg-frac58.6%
distribute-neg-frac258.6%
Simplified58.6%
Taylor expanded in x around 0 51.1%
associate-*r/52.6%
Simplified52.6%
Final simplification61.0%
(FPCore (x y z t a)
:precision binary64
(if (<= a -1.8e+24)
x
(if (<= a -3.1e-48)
(* t (/ y a))
(if (<= a -2.7e-73) x (if (<= a 0.245) (/ t (/ a y)) x)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.8e+24) {
tmp = x;
} else if (a <= -3.1e-48) {
tmp = t * (y / a);
} else if (a <= -2.7e-73) {
tmp = x;
} else if (a <= 0.245) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (a <= (-1.8d+24)) then
tmp = x
else if (a <= (-3.1d-48)) then
tmp = t * (y / a)
else if (a <= (-2.7d-73)) then
tmp = x
else if (a <= 0.245d0) then
tmp = t / (a / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.8e+24) {
tmp = x;
} else if (a <= -3.1e-48) {
tmp = t * (y / a);
} else if (a <= -2.7e-73) {
tmp = x;
} else if (a <= 0.245) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.8e+24: tmp = x elif a <= -3.1e-48: tmp = t * (y / a) elif a <= -2.7e-73: tmp = x elif a <= 0.245: tmp = t / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.8e+24) tmp = x; elseif (a <= -3.1e-48) tmp = Float64(t * Float64(y / a)); elseif (a <= -2.7e-73) tmp = x; elseif (a <= 0.245) tmp = Float64(t / Float64(a / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -1.8e+24) tmp = x; elseif (a <= -3.1e-48) tmp = t * (y / a); elseif (a <= -2.7e-73) tmp = x; elseif (a <= 0.245) tmp = t / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.8e+24], x, If[LessEqual[a, -3.1e-48], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.7e-73], x, If[LessEqual[a, 0.245], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+24}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -3.1 \cdot 10^{-48}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{-73}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 0.245:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.79999999999999992e24 or -3.10000000000000016e-48 < a < -2.69999999999999994e-73 or 0.245 < a Initial program 91.2%
associate-/l*99.1%
Simplified99.1%
Taylor expanded in z around inf 81.2%
associate-/l*86.4%
Simplified86.4%
Taylor expanded in x around inf 68.1%
if -1.79999999999999992e24 < a < -3.10000000000000016e-48Initial program 99.7%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in z around 0 70.6%
associate-*r/70.6%
mul-1-neg70.6%
distribute-lft-neg-out70.6%
*-commutative70.6%
associate-/l*70.9%
distribute-neg-frac70.9%
distribute-neg-frac270.9%
Simplified70.9%
Taylor expanded in x around 0 51.6%
associate-*r/51.9%
Simplified51.9%
if -2.69999999999999994e-73 < a < 0.245Initial program 99.9%
associate-/l*87.2%
Simplified87.2%
Taylor expanded in z around 0 63.8%
associate-*r/63.8%
mul-1-neg63.8%
distribute-lft-neg-out63.8%
*-commutative63.8%
associate-/l*56.1%
distribute-neg-frac56.1%
distribute-neg-frac256.1%
Simplified56.1%
Taylor expanded in x around 0 50.9%
associate-*r/52.8%
Simplified52.8%
clear-num52.8%
un-div-inv52.9%
Applied egg-rr52.9%
Final simplification61.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.7e+139) (not (<= z 2e+212))) (* z (/ y (- a))) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.7e+139) || !(z <= 2e+212)) {
tmp = z * (y / -a);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.7d+139)) .or. (.not. (z <= 2d+212))) then
tmp = z * (y / -a)
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.7e+139) || !(z <= 2e+212)) {
tmp = z * (y / -a);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.7e+139) or not (z <= 2e+212): tmp = z * (y / -a) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.7e+139) || !(z <= 2e+212)) tmp = Float64(z * Float64(y / Float64(-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 ((z <= -1.7e+139) || ~((z <= 2e+212))) tmp = z * (y / -a); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.7e+139], N[Not[LessEqual[z, 2e+212]], $MachinePrecision]], N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+139} \lor \neg \left(z \leq 2 \cdot 10^{+212}\right):\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if z < -1.7000000000000001e139 or 1.9999999999999998e212 < z Initial program 83.3%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around inf 79.8%
associate-/l*84.3%
Simplified84.3%
Taylor expanded in x around 0 60.3%
associate-*r/60.3%
*-commutative60.3%
neg-mul-160.3%
distribute-lft-neg-in60.3%
associate-*r/70.2%
*-commutative70.2%
Simplified70.2%
if -1.7000000000000001e139 < z < 1.9999999999999998e212Initial program 98.4%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in z around 0 82.0%
associate-*r/82.0%
mul-1-neg82.0%
distribute-lft-neg-out82.0%
*-commutative82.0%
associate-/l*79.3%
distribute-neg-frac79.3%
distribute-neg-frac279.3%
Simplified79.3%
Taylor expanded in x around 0 82.0%
Final simplification79.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.5e-70) (not (<= t 9.5e+43))) (+ x (/ (* y t) a)) (- x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.5e-70) || !(t <= 9.5e+43)) {
tmp = x + ((y * t) / a);
} else {
tmp = x - (y * (z / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((t <= (-4.5d-70)) .or. (.not. (t <= 9.5d+43))) then
tmp = x + ((y * t) / a)
else
tmp = x - (y * (z / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.5e-70) || !(t <= 9.5e+43)) {
tmp = x + ((y * t) / a);
} else {
tmp = x - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.5e-70) or not (t <= 9.5e+43): tmp = x + ((y * t) / a) else: tmp = x - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.5e-70) || !(t <= 9.5e+43)) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = Float64(x - Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -4.5e-70) || ~((t <= 9.5e+43))) tmp = x + ((y * t) / a); else tmp = x - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.5e-70], N[Not[LessEqual[t, 9.5e+43]], $MachinePrecision]], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-70} \lor \neg \left(t \leq 9.5 \cdot 10^{+43}\right):\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -4.50000000000000022e-70 or 9.5000000000000004e43 < t Initial program 93.9%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in z around 0 83.4%
associate-*r/83.4%
mul-1-neg83.4%
distribute-lft-neg-out83.4%
*-commutative83.4%
associate-/l*81.3%
distribute-neg-frac81.3%
distribute-neg-frac281.3%
Simplified81.3%
Taylor expanded in x around 0 83.4%
if -4.50000000000000022e-70 < t < 9.5000000000000004e43Initial program 96.3%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around inf 90.6%
associate-/l*92.6%
Simplified92.6%
Final simplification88.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.9e-70) (+ x (* y (/ t a))) (if (<= t 6.9e+44) (- x (* y (/ z a))) (+ x (/ (* y t) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.9e-70) {
tmp = x + (y * (t / a));
} else if (t <= 6.9e+44) {
tmp = x - (y * (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 (t <= (-1.9d-70)) then
tmp = x + (y * (t / a))
else if (t <= 6.9d+44) then
tmp = x - (y * (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 (t <= -1.9e-70) {
tmp = x + (y * (t / a));
} else if (t <= 6.9e+44) {
tmp = x - (y * (z / a));
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.9e-70: tmp = x + (y * (t / a)) elif t <= 6.9e+44: tmp = x - (y * (z / a)) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.9e-70) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (t <= 6.9e+44) tmp = Float64(x - Float64(y * Float64(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 (t <= -1.9e-70) tmp = x + (y * (t / a)); elseif (t <= 6.9e+44) tmp = x - (y * (z / a)); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.9e-70], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.9e+44], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-70}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;t \leq 6.9 \cdot 10^{+44}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if t < -1.8999999999999999e-70Initial program 92.6%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in z around 0 80.6%
associate-*r/80.6%
mul-1-neg80.6%
distribute-lft-neg-out80.6%
*-commutative80.6%
associate-/l*81.9%
distribute-neg-frac81.9%
distribute-neg-frac281.9%
Simplified81.9%
if -1.8999999999999999e-70 < t < 6.8999999999999997e44Initial program 96.3%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in z around inf 90.6%
associate-/l*92.6%
Simplified92.6%
if 6.8999999999999997e44 < t Initial program 95.9%
associate-/l*84.4%
Simplified84.4%
Taylor expanded in z around 0 87.9%
associate-*r/87.9%
mul-1-neg87.9%
distribute-lft-neg-out87.9%
*-commutative87.9%
associate-/l*80.4%
distribute-neg-frac80.4%
distribute-neg-frac280.4%
Simplified80.4%
Taylor expanded in x around 0 87.9%
Final simplification88.5%
(FPCore (x y z t a) :precision binary64 (if (<= z 6.1e+221) (+ x (* y (/ (- t z) a))) (- x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 6.1e+221) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - (z / (a / y));
}
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 <= 6.1d+221) then
tmp = x + (y * ((t - z) / a))
else
tmp = x - (z / (a / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= 6.1e+221) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= 6.1e+221: tmp = x + (y * ((t - z) / a)) else: tmp = x - (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= 6.1e+221) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x - Float64(z / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= 6.1e+221) tmp = x + (y * ((t - z) / a)); else tmp = x - (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, 6.1e+221], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 6.1 \cdot 10^{+221}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if z < 6.0999999999999998e221Initial program 97.0%
associate-/l*96.2%
Simplified96.2%
if 6.0999999999999998e221 < z Initial program 74.6%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in z around inf 74.6%
associate-/l*77.9%
Simplified77.9%
*-commutative77.9%
associate-/r/98.0%
Applied egg-rr98.0%
Final simplification96.4%
(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 95.1%
associate-/l*94.7%
Simplified94.7%
Taylor expanded in z around inf 70.7%
associate-/l*71.7%
Simplified71.7%
Taylor expanded in x around inf 44.1%
Final simplification44.1%
(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 2024053
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:alt
(if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))
(- x (/ (* y (- z t)) a)))