
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a) :precision binary64 (if (<= a -3.1e-52) (- x (/ y (/ a (- z t)))) (if (<= a 1.05e-62) (+ x (/ (* y (- t z)) a)) (+ x (* y (/ (- t z) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.1e-52) {
tmp = x - (y / (a / (z - t)));
} else if (a <= 1.05e-62) {
tmp = x + ((y * (t - z)) / 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) :: tmp
if (a <= (-3.1d-52)) then
tmp = x - (y / (a / (z - t)))
else if (a <= 1.05d-62) then
tmp = x + ((y * (t - z)) / 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 tmp;
if (a <= -3.1e-52) {
tmp = x - (y / (a / (z - t)));
} else if (a <= 1.05e-62) {
tmp = x + ((y * (t - z)) / a);
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.1e-52: tmp = x - (y / (a / (z - t))) elif a <= 1.05e-62: tmp = x + ((y * (t - z)) / a) else: tmp = x + (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.1e-52) tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); elseif (a <= 1.05e-62) tmp = Float64(x + Float64(Float64(y * Float64(t - z)) / 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) tmp = 0.0; if (a <= -3.1e-52) tmp = x - (y / (a / (z - t))); elseif (a <= 1.05e-62) tmp = x + ((y * (t - z)) / a); else tmp = x + (y * ((t - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.1e-52], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.05e-62], N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{-52}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\mathbf{elif}\;a \leq 1.05 \cdot 10^{-62}:\\
\;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if a < -3.0999999999999999e-52Initial program 88.0%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -3.0999999999999999e-52 < a < 1.05e-62Initial program 99.4%
if 1.05e-62 < a Initial program 90.4%
associate-/l*100.0%
Simplified100.0%
Final simplification99.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ t a))) (t_2 (* t (/ y a))))
(if (<= y -1.9e+255)
t_2
(if (<= y -7e+96)
(* y (/ z (- a)))
(if (<= y -5.7e-7)
t_1
(if (<= y 2.5e-10)
x
(if (<= y 1.35e+95) t_1 (if (<= y 4.5e+197) x t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / a);
double t_2 = t * (y / a);
double tmp;
if (y <= -1.9e+255) {
tmp = t_2;
} else if (y <= -7e+96) {
tmp = y * (z / -a);
} else if (y <= -5.7e-7) {
tmp = t_1;
} else if (y <= 2.5e-10) {
tmp = x;
} else if (y <= 1.35e+95) {
tmp = t_1;
} else if (y <= 4.5e+197) {
tmp = x;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (t / a)
t_2 = t * (y / a)
if (y <= (-1.9d+255)) then
tmp = t_2
else if (y <= (-7d+96)) then
tmp = y * (z / -a)
else if (y <= (-5.7d-7)) then
tmp = t_1
else if (y <= 2.5d-10) then
tmp = x
else if (y <= 1.35d+95) then
tmp = t_1
else if (y <= 4.5d+197) then
tmp = x
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / a);
double t_2 = t * (y / a);
double tmp;
if (y <= -1.9e+255) {
tmp = t_2;
} else if (y <= -7e+96) {
tmp = y * (z / -a);
} else if (y <= -5.7e-7) {
tmp = t_1;
} else if (y <= 2.5e-10) {
tmp = x;
} else if (y <= 1.35e+95) {
tmp = t_1;
} else if (y <= 4.5e+197) {
tmp = x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / a) t_2 = t * (y / a) tmp = 0 if y <= -1.9e+255: tmp = t_2 elif y <= -7e+96: tmp = y * (z / -a) elif y <= -5.7e-7: tmp = t_1 elif y <= 2.5e-10: tmp = x elif y <= 1.35e+95: tmp = t_1 elif y <= 4.5e+197: tmp = x else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / a)) t_2 = Float64(t * Float64(y / a)) tmp = 0.0 if (y <= -1.9e+255) tmp = t_2; elseif (y <= -7e+96) tmp = Float64(y * Float64(z / Float64(-a))); elseif (y <= -5.7e-7) tmp = t_1; elseif (y <= 2.5e-10) tmp = x; elseif (y <= 1.35e+95) tmp = t_1; elseif (y <= 4.5e+197) tmp = x; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / a); t_2 = t * (y / a); tmp = 0.0; if (y <= -1.9e+255) tmp = t_2; elseif (y <= -7e+96) tmp = y * (z / -a); elseif (y <= -5.7e-7) tmp = t_1; elseif (y <= 2.5e-10) tmp = x; elseif (y <= 1.35e+95) tmp = t_1; elseif (y <= 4.5e+197) tmp = x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.9e+255], t$95$2, If[LessEqual[y, -7e+96], N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.7e-7], t$95$1, If[LessEqual[y, 2.5e-10], x, If[LessEqual[y, 1.35e+95], t$95$1, If[LessEqual[y, 4.5e+197], x, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a}\\
t_2 := t \cdot \frac{y}{a}\\
\mathbf{if}\;y \leq -1.9 \cdot 10^{+255}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -7 \cdot 10^{+96}:\\
\;\;\;\;y \cdot \frac{z}{-a}\\
\mathbf{elif}\;y \leq -5.7 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-10}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+197}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.9e255 or 4.5000000000000003e197 < y Initial program 84.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 84.0%
associate-*r/84.0%
neg-mul-184.0%
*-commutative84.0%
distribute-lft-neg-in84.0%
associate-*r/97.5%
*-commutative97.5%
neg-sub097.5%
sub-neg97.5%
+-commutative97.5%
associate--r+97.5%
neg-sub097.5%
remove-double-neg97.5%
Simplified97.5%
Taylor expanded in t around inf 80.1%
if -1.9e255 < y < -6.9999999999999998e96Initial program 85.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 54.3%
mul-1-neg54.3%
associate-/l*62.2%
distribute-rgt-neg-in62.2%
distribute-frac-neg262.2%
Simplified62.2%
if -6.9999999999999998e96 < y < -5.7000000000000005e-7 or 2.50000000000000016e-10 < y < 1.35e95Initial program 95.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 65.5%
*-commutative65.5%
associate-/l*65.7%
Simplified65.7%
if -5.7000000000000005e-7 < y < 2.50000000000000016e-10 or 1.35e95 < y < 4.5000000000000003e197Initial program 97.4%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in x around inf 64.9%
Final simplification67.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ t a))) (t_2 (* t (/ y a))))
(if (<= y -1.7e+256)
t_2
(if (<= y -4.8e+97)
(/ z (/ a (- y)))
(if (<= y -9.2e-12)
t_1
(if (<= y 2.6e-10)
x
(if (<= y 1.4e+95) t_1 (if (<= y 4.5e+197) x t_2))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / a);
double t_2 = t * (y / a);
double tmp;
if (y <= -1.7e+256) {
tmp = t_2;
} else if (y <= -4.8e+97) {
tmp = z / (a / -y);
} else if (y <= -9.2e-12) {
tmp = t_1;
} else if (y <= 2.6e-10) {
tmp = x;
} else if (y <= 1.4e+95) {
tmp = t_1;
} else if (y <= 4.5e+197) {
tmp = x;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (t / a)
t_2 = t * (y / a)
if (y <= (-1.7d+256)) then
tmp = t_2
else if (y <= (-4.8d+97)) then
tmp = z / (a / -y)
else if (y <= (-9.2d-12)) then
tmp = t_1
else if (y <= 2.6d-10) then
tmp = x
else if (y <= 1.4d+95) then
tmp = t_1
else if (y <= 4.5d+197) then
tmp = x
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (t / a);
double t_2 = t * (y / a);
double tmp;
if (y <= -1.7e+256) {
tmp = t_2;
} else if (y <= -4.8e+97) {
tmp = z / (a / -y);
} else if (y <= -9.2e-12) {
tmp = t_1;
} else if (y <= 2.6e-10) {
tmp = x;
} else if (y <= 1.4e+95) {
tmp = t_1;
} else if (y <= 4.5e+197) {
tmp = x;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (t / a) t_2 = t * (y / a) tmp = 0 if y <= -1.7e+256: tmp = t_2 elif y <= -4.8e+97: tmp = z / (a / -y) elif y <= -9.2e-12: tmp = t_1 elif y <= 2.6e-10: tmp = x elif y <= 1.4e+95: tmp = t_1 elif y <= 4.5e+197: tmp = x else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(t / a)) t_2 = Float64(t * Float64(y / a)) tmp = 0.0 if (y <= -1.7e+256) tmp = t_2; elseif (y <= -4.8e+97) tmp = Float64(z / Float64(a / Float64(-y))); elseif (y <= -9.2e-12) tmp = t_1; elseif (y <= 2.6e-10) tmp = x; elseif (y <= 1.4e+95) tmp = t_1; elseif (y <= 4.5e+197) tmp = x; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (t / a); t_2 = t * (y / a); tmp = 0.0; if (y <= -1.7e+256) tmp = t_2; elseif (y <= -4.8e+97) tmp = z / (a / -y); elseif (y <= -9.2e-12) tmp = t_1; elseif (y <= 2.6e-10) tmp = x; elseif (y <= 1.4e+95) tmp = t_1; elseif (y <= 4.5e+197) tmp = x; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.7e+256], t$95$2, If[LessEqual[y, -4.8e+97], N[(z / N[(a / (-y)), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.2e-12], t$95$1, If[LessEqual[y, 2.6e-10], x, If[LessEqual[y, 1.4e+95], t$95$1, If[LessEqual[y, 4.5e+197], x, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{t}{a}\\
t_2 := t \cdot \frac{y}{a}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+256}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -4.8 \cdot 10^{+97}:\\
\;\;\;\;\frac{z}{\frac{a}{-y}}\\
\mathbf{elif}\;y \leq -9.2 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-10}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 1.4 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+197}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -1.69999999999999992e256 or 4.5000000000000003e197 < y Initial program 84.0%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 84.0%
associate-*r/84.0%
neg-mul-184.0%
*-commutative84.0%
distribute-lft-neg-in84.0%
associate-*r/97.5%
*-commutative97.5%
neg-sub097.5%
sub-neg97.5%
+-commutative97.5%
associate--r+97.5%
neg-sub097.5%
remove-double-neg97.5%
Simplified97.5%
Taylor expanded in t around inf 80.1%
if -1.69999999999999992e256 < y < -4.8e97Initial program 85.8%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around 0 74.4%
associate-*r/74.4%
neg-mul-174.4%
*-commutative74.4%
distribute-lft-neg-in74.4%
associate-*r/82.4%
*-commutative82.4%
neg-sub082.4%
sub-neg82.4%
+-commutative82.4%
associate--r+82.4%
neg-sub082.4%
remove-double-neg82.4%
Simplified82.4%
Taylor expanded in t around 0 62.1%
neg-mul-162.1%
Simplified62.1%
Taylor expanded in y around 0 54.3%
mul-1-neg54.3%
associate-*r/62.2%
*-commutative62.2%
associate-/r/62.0%
Simplified62.0%
if -4.8e97 < y < -9.19999999999999957e-12 or 2.59999999999999981e-10 < y < 1.3999999999999999e95Initial program 95.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 65.5%
*-commutative65.5%
associate-/l*65.7%
Simplified65.7%
if -9.19999999999999957e-12 < y < 2.59999999999999981e-10 or 1.3999999999999999e95 < y < 4.5000000000000003e197Initial program 97.4%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in x around inf 64.9%
Final simplification67.1%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= y -8.2e-7)
t_1
(if (<= y 1.85e-10)
x
(if (<= y 7.2e+94) (* y (/ t a)) (if (<= y 4.5e+197) x t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (y <= -8.2e-7) {
tmp = t_1;
} else if (y <= 1.85e-10) {
tmp = x;
} else if (y <= 7.2e+94) {
tmp = y * (t / a);
} else if (y <= 4.5e+197) {
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 = t * (y / a)
if (y <= (-8.2d-7)) then
tmp = t_1
else if (y <= 1.85d-10) then
tmp = x
else if (y <= 7.2d+94) then
tmp = y * (t / a)
else if (y <= 4.5d+197) 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 = t * (y / a);
double tmp;
if (y <= -8.2e-7) {
tmp = t_1;
} else if (y <= 1.85e-10) {
tmp = x;
} else if (y <= 7.2e+94) {
tmp = y * (t / a);
} else if (y <= 4.5e+197) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if y <= -8.2e-7: tmp = t_1 elif y <= 1.85e-10: tmp = x elif y <= 7.2e+94: tmp = y * (t / a) elif y <= 4.5e+197: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (y <= -8.2e-7) tmp = t_1; elseif (y <= 1.85e-10) tmp = x; elseif (y <= 7.2e+94) tmp = Float64(y * Float64(t / a)); elseif (y <= 4.5e+197) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (y <= -8.2e-7) tmp = t_1; elseif (y <= 1.85e-10) tmp = x; elseif (y <= 7.2e+94) tmp = y * (t / a); elseif (y <= 4.5e+197) tmp = x; else tmp = t_1; 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, -8.2e-7], t$95$1, If[LessEqual[y, 1.85e-10], x, If[LessEqual[y, 7.2e+94], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+197], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;y \leq -8.2 \cdot 10^{-7}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{-10}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{+94}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+197}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -8.1999999999999998e-7 or 4.5000000000000003e197 < y Initial program 86.4%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 79.5%
associate-*r/79.5%
neg-mul-179.5%
*-commutative79.5%
distribute-lft-neg-in79.5%
associate-*r/89.6%
*-commutative89.6%
neg-sub089.6%
sub-neg89.6%
+-commutative89.6%
associate--r+89.6%
neg-sub089.6%
remove-double-neg89.6%
Simplified89.6%
Taylor expanded in t around inf 59.6%
if -8.1999999999999998e-7 < y < 1.85000000000000007e-10 or 7.19999999999999985e94 < y < 4.5000000000000003e197Initial program 97.4%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in x around inf 64.9%
if 1.85000000000000007e-10 < y < 7.19999999999999985e94Initial program 96.2%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in t around inf 61.5%
*-commutative61.5%
associate-/l*61.6%
Simplified61.6%
Final simplification62.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -14500000000.0) (not (<= t 6.5e-120))) (+ x (* t (/ y a))) (- x (/ (* y z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -14500000000.0) || !(t <= 6.5e-120)) {
tmp = x + (t * (y / 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 <= (-14500000000.0d0)) .or. (.not. (t <= 6.5d-120))) then
tmp = x + (t * (y / 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 <= -14500000000.0) || !(t <= 6.5e-120)) {
tmp = x + (t * (y / a));
} else {
tmp = x - ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -14500000000.0) or not (t <= 6.5e-120): tmp = x + (t * (y / a)) else: tmp = x - ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -14500000000.0) || !(t <= 6.5e-120)) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x - Float64(Float64(y * z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -14500000000.0) || ~((t <= 6.5e-120))) tmp = x + (t * (y / a)); else tmp = x - ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -14500000000.0], N[Not[LessEqual[t, 6.5e-120]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -14500000000 \lor \neg \left(t \leq 6.5 \cdot 10^{-120}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if t < -1.45e10 or 6.50000000000000029e-120 < t Initial program 91.2%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in z around 0 82.7%
associate-*r/82.7%
mul-1-neg82.7%
distribute-lft-neg-out82.7%
*-commutative82.7%
Simplified82.7%
sub-neg82.7%
distribute-neg-frac282.7%
associate-*r/82.1%
frac-2neg82.1%
+-commutative82.1%
*-commutative82.1%
associate-*l/82.7%
associate-/l*85.3%
Applied egg-rr85.3%
if -1.45e10 < t < 6.50000000000000029e-120Initial program 96.6%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in z around inf 90.2%
Final simplification87.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1020000000.0) (not (<= t 1.85e-75))) (+ x (* t (/ y a))) (- x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1020000000.0) || !(t <= 1.85e-75)) {
tmp = x + (t * (y / 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 <= (-1020000000.0d0)) .or. (.not. (t <= 1.85d-75))) then
tmp = x + (t * (y / 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 <= -1020000000.0) || !(t <= 1.85e-75)) {
tmp = x + (t * (y / a));
} else {
tmp = x - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1020000000.0) or not (t <= 1.85e-75): tmp = x + (t * (y / a)) else: tmp = x - (y * (z / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1020000000.0) || !(t <= 1.85e-75)) tmp = Float64(x + Float64(t * Float64(y / 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 <= -1020000000.0) || ~((t <= 1.85e-75))) tmp = x + (t * (y / a)); else tmp = x - (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1020000000.0], N[Not[LessEqual[t, 1.85e-75]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1020000000 \lor \neg \left(t \leq 1.85 \cdot 10^{-75}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -1.02e9 or 1.85000000000000012e-75 < t Initial program 91.8%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in z around 0 84.0%
associate-*r/84.0%
mul-1-neg84.0%
distribute-lft-neg-out84.0%
*-commutative84.0%
Simplified84.0%
sub-neg84.0%
distribute-neg-frac284.0%
associate-*r/83.3%
frac-2neg83.3%
+-commutative83.3%
*-commutative83.3%
associate-*l/84.0%
associate-/l*86.8%
Applied egg-rr86.8%
if -1.02e9 < t < 1.85000000000000012e-75Initial program 95.3%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in z around inf 87.6%
associate-/l*86.8%
Simplified86.8%
Final simplification86.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.25e+27) (not (<= y 1.5e+199))) (* (/ y a) (- t z)) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.25e+27) || !(y <= 1.5e+199)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-2.25d+27)) .or. (.not. (y <= 1.5d+199))) then
tmp = (y / a) * (t - z)
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.25e+27) || !(y <= 1.5e+199)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.25e+27) or not (y <= 1.5e+199): tmp = (y / a) * (t - z) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.25e+27) || !(y <= 1.5e+199)) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -2.25e+27) || ~((y <= 1.5e+199))) tmp = (y / a) * (t - z); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.25e+27], N[Not[LessEqual[y, 1.5e+199]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+27} \lor \neg \left(y \leq 1.5 \cdot 10^{+199}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -2.25e27 or 1.5e199 < y Initial program 85.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 79.3%
associate-*r/79.3%
neg-mul-179.3%
*-commutative79.3%
distribute-lft-neg-in79.3%
associate-*r/90.1%
*-commutative90.1%
neg-sub090.1%
sub-neg90.1%
+-commutative90.1%
associate--r+90.1%
neg-sub090.1%
remove-double-neg90.1%
Simplified90.1%
if -2.25e27 < y < 1.5e199Initial program 97.3%
associate-/l*91.6%
Simplified91.6%
Taylor expanded in z around 0 81.4%
associate-*r/81.4%
mul-1-neg81.4%
distribute-lft-neg-out81.4%
*-commutative81.4%
Simplified81.4%
sub-neg81.4%
distribute-neg-frac281.4%
associate-*r/78.3%
frac-2neg78.3%
+-commutative78.3%
*-commutative78.3%
associate-*l/81.4%
associate-/l*79.6%
Applied egg-rr79.6%
Final simplification83.0%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.3e+25) (not (<= y 6.2e+198))) (* (/ y a) (- t z)) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.3e+25) || !(y <= 6.2e+198)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-3.3d+25)) .or. (.not. (y <= 6.2d+198))) then
tmp = (y / a) * (t - z)
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.3e+25) || !(y <= 6.2e+198)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.3e+25) or not (y <= 6.2e+198): tmp = (y / a) * (t - z) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.3e+25) || !(y <= 6.2e+198)) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = Float64(x + Float64(y * Float64(t / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -3.3e+25) || ~((y <= 6.2e+198))) tmp = (y / a) * (t - z); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.3e+25], N[Not[LessEqual[y, 6.2e+198]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+25} \lor \neg \left(y \leq 6.2 \cdot 10^{+198}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if y < -3.3000000000000001e25 or 6.1999999999999995e198 < y Initial program 85.5%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 79.3%
associate-*r/79.3%
neg-mul-179.3%
*-commutative79.3%
distribute-lft-neg-in79.3%
associate-*r/90.1%
*-commutative90.1%
neg-sub090.1%
sub-neg90.1%
+-commutative90.1%
associate--r+90.1%
neg-sub090.1%
remove-double-neg90.1%
Simplified90.1%
if -3.3000000000000001e25 < y < 6.1999999999999995e198Initial program 97.3%
associate-/l*91.6%
Simplified91.6%
clear-num91.6%
un-div-inv92.7%
Applied egg-rr92.7%
Taylor expanded in z around 0 81.4%
cancel-sign-sub-inv81.4%
metadata-eval81.4%
*-commutative81.4%
associate-*r/78.3%
*-lft-identity78.3%
Simplified78.3%
Final simplification82.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9.2e-64) (not (<= y 1.7e-14))) (* (/ y a) (- t z)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.2e-64) || !(y <= 1.7e-14)) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-9.2d-64)) .or. (.not. (y <= 1.7d-14))) then
tmp = (y / a) * (t - z)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9.2e-64) || !(y <= 1.7e-14)) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9.2e-64) or not (y <= 1.7e-14): tmp = (y / a) * (t - z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9.2e-64) || !(y <= 1.7e-14)) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -9.2e-64) || ~((y <= 1.7e-14))) tmp = (y / a) * (t - z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9.2e-64], N[Not[LessEqual[y, 1.7e-14]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9.2 \cdot 10^{-64} \lor \neg \left(y \leq 1.7 \cdot 10^{-14}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -9.2000000000000006e-64 or 1.70000000000000001e-14 < y Initial program 89.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around 0 72.8%
associate-*r/72.8%
neg-mul-172.8%
*-commutative72.8%
distribute-lft-neg-in72.8%
associate-*r/77.6%
*-commutative77.6%
neg-sub077.6%
sub-neg77.6%
+-commutative77.6%
associate--r+77.6%
neg-sub077.6%
remove-double-neg77.6%
Simplified77.6%
if -9.2000000000000006e-64 < y < 1.70000000000000001e-14Initial program 99.4%
associate-/l*86.5%
Simplified86.5%
Taylor expanded in x around inf 69.5%
Final simplification74.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -7e-9) (not (<= y 2.9e-10))) (* y (/ t a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7e-9) || !(y <= 2.9e-10)) {
tmp = y * (t / a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-7d-9)) .or. (.not. (y <= 2.9d-10))) then
tmp = y * (t / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -7e-9) || !(y <= 2.9e-10)) {
tmp = y * (t / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -7e-9) or not (y <= 2.9e-10): tmp = y * (t / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -7e-9) || !(y <= 2.9e-10)) tmp = Float64(y * Float64(t / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -7e-9) || ~((y <= 2.9e-10))) tmp = y * (t / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -7e-9], N[Not[LessEqual[y, 2.9e-10]], $MachinePrecision]], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7 \cdot 10^{-9} \lor \neg \left(y \leq 2.9 \cdot 10^{-10}\right):\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.9999999999999998e-9 or 2.89999999999999981e-10 < y Initial program 88.2%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in t around inf 49.4%
*-commutative49.4%
associate-/l*52.2%
Simplified52.2%
if -6.9999999999999998e-9 < y < 2.89999999999999981e-10Initial program 99.4%
associate-/l*87.9%
Simplified87.9%
Taylor expanded in x around inf 66.3%
Final simplification58.7%
(FPCore (x y z t a) :precision binary64 (+ x (/ y (/ a (- t z)))))
double code(double x, double y, double z, double t, double a) {
return x + (y / (a / (t - z)));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y / (a / (t - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y / (a / (t - z)));
}
def code(x, y, z, t, a): return x + (y / (a / (t - z)))
function code(x, y, z, t, a) return Float64(x + Float64(y / Float64(a / Float64(t - z)))) end
function tmp = code(x, y, z, t, a) tmp = x + (y / (a / (t - z))); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{\frac{a}{t - z}}
\end{array}
Initial program 93.4%
associate-/l*94.4%
Simplified94.4%
clear-num94.3%
un-div-inv95.1%
Applied egg-rr95.1%
Final simplification95.1%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- t z) a))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((t - z) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((t - z) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((t - z) / a));
}
def code(x, y, z, t, a): return x + (y * ((t - z) / a))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(t - z) / a))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((t - z) / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{t - z}{a}
\end{array}
Initial program 93.4%
associate-/l*94.4%
Simplified94.4%
Final simplification94.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 93.4%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in x around inf 40.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ a (- z t))))
(if (< y -1.0761266216389975e-10)
(- x (/ 1.0 (/ t_1 y)))
(if (< y 2.894426862792089e-49)
(- x (/ (* y (- z t)) a))
(- x (/ y t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = a / (z - t)
if (y < (-1.0761266216389975d-10)) then
tmp = x - (1.0d0 / (t_1 / y))
else if (y < 2.894426862792089d-49) then
tmp = x - ((y * (z - t)) / a)
else
tmp = x - (y / t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = a / (z - t);
double tmp;
if (y < -1.0761266216389975e-10) {
tmp = x - (1.0 / (t_1 / y));
} else if (y < 2.894426862792089e-49) {
tmp = x - ((y * (z - t)) / a);
} else {
tmp = x - (y / t_1);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = a / (z - t) tmp = 0 if y < -1.0761266216389975e-10: tmp = x - (1.0 / (t_1 / y)) elif y < 2.894426862792089e-49: tmp = x - ((y * (z - t)) / a) else: tmp = x - (y / t_1) return tmp
function code(x, y, z, t, a) t_1 = Float64(a / Float64(z - t)) tmp = 0.0 if (y < -1.0761266216389975e-10) tmp = Float64(x - Float64(1.0 / Float64(t_1 / y))); elseif (y < 2.894426862792089e-49) tmp = Float64(x - Float64(Float64(y * Float64(z - t)) / a)); else tmp = Float64(x - Float64(y / t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = a / (z - t); tmp = 0.0; if (y < -1.0761266216389975e-10) tmp = x - (1.0 / (t_1 / y)); elseif (y < 2.894426862792089e-49) tmp = x - ((y * (z - t)) / a); else tmp = x - (y / t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Less[y, -1.0761266216389975e-10], N[(x - N[(1.0 / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[y, 2.894426862792089e-49], N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{z - t}\\
\mathbf{if}\;y < -1.0761266216389975 \cdot 10^{-10}:\\
\;\;\;\;x - \frac{1}{\frac{t\_1}{y}}\\
\mathbf{elif}\;y < 2.894426862792089 \cdot 10^{-49}:\\
\;\;\;\;x - \frac{y \cdot \left(z - t\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{t\_1}\\
\end{array}
\end{array}
herbie shell --seed 2024170
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:alt
(! :herbie-platform default (if (< y -430450648655599/4000000000000000000000000) (- x (/ 1 (/ (/ a (- z t)) y))) (if (< y 2894426862792089/10000000000000000000000000000000000000000000000000000000000000000) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t)))))))
(- x (/ (* y (- z t)) a)))