
(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 (* (- z t) y)))
(if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+108)))
(+ x (/ y (/ a (- t z))))
(+ x (/ (* y (- t z)) a)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * y;
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+108)) {
tmp = x + (y / (a / (t - z)));
} else {
tmp = x + ((y * (t - z)) / a);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (z - t) * y;
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+108)) {
tmp = x + (y / (a / (t - z)));
} else {
tmp = x + ((y * (t - z)) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (z - t) * y tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 1e+108): tmp = x + (y / (a / (t - z))) else: tmp = x + ((y * (t - z)) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(z - t) * y) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+108)) tmp = Float64(x + Float64(y / Float64(a / Float64(t - z)))); else tmp = Float64(x + Float64(Float64(y * Float64(t - z)) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (z - t) * y; tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 1e+108))) tmp = x + (y / (a / (t - z))); else tmp = x + ((y * (t - z)) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+108]], $MachinePrecision]], N[(x + N[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z - t\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+108}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{t - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -inf.0 or 1e108 < (*.f64 y (-.f64 z t)) Initial program 85.5%
associate-/l*99.8%
Simplified99.8%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -inf.0 < (*.f64 y (-.f64 z t)) < 1e108Initial program 99.3%
Final simplification99.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* y (/ t a)))))
(if (<= z -5.3e+141)
(/ (- z) (/ a y))
(if (<= z -3.2e+86)
t_1
(if (<= z -5.3e+57)
(* (/ z a) (- y))
(if (<= z 3.6e+125) t_1 (* (- z) (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y * (t / a));
double tmp;
if (z <= -5.3e+141) {
tmp = -z / (a / y);
} else if (z <= -3.2e+86) {
tmp = t_1;
} else if (z <= -5.3e+57) {
tmp = (z / a) * -y;
} else if (z <= 3.6e+125) {
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 = x + (y * (t / a))
if (z <= (-5.3d+141)) then
tmp = -z / (a / y)
else if (z <= (-3.2d+86)) then
tmp = t_1
else if (z <= (-5.3d+57)) then
tmp = (z / a) * -y
else if (z <= 3.6d+125) 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 = x + (y * (t / a));
double tmp;
if (z <= -5.3e+141) {
tmp = -z / (a / y);
} else if (z <= -3.2e+86) {
tmp = t_1;
} else if (z <= -5.3e+57) {
tmp = (z / a) * -y;
} else if (z <= 3.6e+125) {
tmp = t_1;
} else {
tmp = -z * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y * (t / a)) tmp = 0 if z <= -5.3e+141: tmp = -z / (a / y) elif z <= -3.2e+86: tmp = t_1 elif z <= -5.3e+57: tmp = (z / a) * -y elif z <= 3.6e+125: tmp = t_1 else: tmp = -z * (y / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y * Float64(t / a))) tmp = 0.0 if (z <= -5.3e+141) tmp = Float64(Float64(-z) / Float64(a / y)); elseif (z <= -3.2e+86) tmp = t_1; elseif (z <= -5.3e+57) tmp = Float64(Float64(z / a) * Float64(-y)); elseif (z <= 3.6e+125) tmp = t_1; else tmp = Float64(Float64(-z) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y * (t / a)); tmp = 0.0; if (z <= -5.3e+141) tmp = -z / (a / y); elseif (z <= -3.2e+86) tmp = t_1; elseif (z <= -5.3e+57) tmp = (z / a) * -y; elseif (z <= 3.6e+125) tmp = t_1; else tmp = -z * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.3e+141], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.2e+86], t$95$1, If[LessEqual[z, -5.3e+57], N[(N[(z / a), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[z, 3.6e+125], t$95$1, N[((-z) * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{t}{a}\\
\mathbf{if}\;z \leq -5.3 \cdot 10^{+141}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.3 \cdot 10^{+57}:\\
\;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -5.3e141Initial program 94.4%
associate-/l*89.2%
Simplified89.2%
Taylor expanded in z around inf 91.4%
associate-/l*83.6%
Simplified83.6%
*-commutative83.6%
associate-/r/94.0%
Applied egg-rr94.0%
Taylor expanded in x around 0 66.3%
associate-*r/58.4%
*-commutative58.4%
associate-*l*58.4%
*-commutative58.4%
associate-*r/58.4%
neg-mul-158.4%
Simplified58.4%
distribute-frac-neg58.4%
distribute-rgt-neg-out58.4%
*-commutative58.4%
/-rgt-identity58.4%
associate-/r/58.3%
associate-/l/66.4%
distribute-neg-frac266.4%
associate-*l/66.5%
*-un-lft-identity66.5%
Applied egg-rr66.5%
if -5.3e141 < z < -3.2e86 or -5.29999999999999986e57 < z < 3.6000000000000003e125Initial program 97.2%
associate-/l*93.5%
Simplified93.5%
Taylor expanded in z around 0 88.2%
mul-1-neg88.2%
associate-/l*90.2%
distribute-rgt-neg-in90.2%
distribute-neg-frac290.2%
Simplified90.2%
cancel-sign-sub-inv90.2%
associate-*r/88.2%
*-commutative88.2%
add-sqr-sqrt48.6%
sqrt-unprod64.9%
sqr-neg64.9%
sqrt-unprod26.1%
add-sqr-sqrt50.8%
associate-/l*50.8%
add-sqr-sqrt21.9%
sqrt-unprod58.7%
sqr-neg58.7%
sqrt-unprod48.9%
add-sqr-sqrt84.4%
Applied egg-rr84.4%
if -3.2e86 < z < -5.29999999999999986e57Initial program 72.4%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 58.1%
associate-/l*85.7%
Simplified85.7%
*-commutative85.7%
associate-/r/85.7%
Applied egg-rr85.7%
Taylor expanded in x around 0 58.1%
associate-*r/85.7%
*-commutative85.7%
associate-*l*85.7%
*-commutative85.7%
associate-*r/85.7%
neg-mul-185.7%
Simplified85.7%
if 3.6000000000000003e125 < z Initial program 89.4%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around inf 79.2%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in x around 0 60.5%
associate-*r/60.5%
*-commutative60.5%
neg-mul-160.5%
distribute-rgt-neg-out60.5%
associate-/l*65.5%
Simplified65.5%
Final simplification79.3%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (/ y (/ a t)))))
(if (<= z -4.4e+142)
(/ (- z) (/ a y))
(if (<= z -1.7e+86)
t_1
(if (<= z -1.5e+58)
(* (/ z a) (- y))
(if (<= z 2.6e+125) t_1 (* (- z) (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (y / (a / t));
double tmp;
if (z <= -4.4e+142) {
tmp = -z / (a / y);
} else if (z <= -1.7e+86) {
tmp = t_1;
} else if (z <= -1.5e+58) {
tmp = (z / a) * -y;
} else if (z <= 2.6e+125) {
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 = x + (y / (a / t))
if (z <= (-4.4d+142)) then
tmp = -z / (a / y)
else if (z <= (-1.7d+86)) then
tmp = t_1
else if (z <= (-1.5d+58)) then
tmp = (z / a) * -y
else if (z <= 2.6d+125) 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 = x + (y / (a / t));
double tmp;
if (z <= -4.4e+142) {
tmp = -z / (a / y);
} else if (z <= -1.7e+86) {
tmp = t_1;
} else if (z <= -1.5e+58) {
tmp = (z / a) * -y;
} else if (z <= 2.6e+125) {
tmp = t_1;
} else {
tmp = -z * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (y / (a / t)) tmp = 0 if z <= -4.4e+142: tmp = -z / (a / y) elif z <= -1.7e+86: tmp = t_1 elif z <= -1.5e+58: tmp = (z / a) * -y elif z <= 2.6e+125: tmp = t_1 else: tmp = -z * (y / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(y / Float64(a / t))) tmp = 0.0 if (z <= -4.4e+142) tmp = Float64(Float64(-z) / Float64(a / y)); elseif (z <= -1.7e+86) tmp = t_1; elseif (z <= -1.5e+58) tmp = Float64(Float64(z / a) * Float64(-y)); elseif (z <= 2.6e+125) tmp = t_1; else tmp = Float64(Float64(-z) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (y / (a / t)); tmp = 0.0; if (z <= -4.4e+142) tmp = -z / (a / y); elseif (z <= -1.7e+86) tmp = t_1; elseif (z <= -1.5e+58) tmp = (z / a) * -y; elseif (z <= 2.6e+125) tmp = t_1; else tmp = -z * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.4e+142], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.7e+86], t$95$1, If[LessEqual[z, -1.5e+58], N[(N[(z / a), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[z, 2.6e+125], t$95$1, N[((-z) * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y}{\frac{a}{t}}\\
\mathbf{if}\;z \leq -4.4 \cdot 10^{+142}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{+86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.5 \cdot 10^{+58}:\\
\;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{+125}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -4.39999999999999974e142Initial program 94.4%
associate-/l*89.2%
Simplified89.2%
Taylor expanded in z around inf 91.4%
associate-/l*83.6%
Simplified83.6%
*-commutative83.6%
associate-/r/94.0%
Applied egg-rr94.0%
Taylor expanded in x around 0 66.3%
associate-*r/58.4%
*-commutative58.4%
associate-*l*58.4%
*-commutative58.4%
associate-*r/58.4%
neg-mul-158.4%
Simplified58.4%
distribute-frac-neg58.4%
distribute-rgt-neg-out58.4%
*-commutative58.4%
/-rgt-identity58.4%
associate-/r/58.3%
associate-/l/66.4%
distribute-neg-frac266.4%
associate-*l/66.5%
*-un-lft-identity66.5%
Applied egg-rr66.5%
if -4.39999999999999974e142 < z < -1.6999999999999999e86 or -1.5000000000000001e58 < z < 2.60000000000000003e125Initial program 97.2%
associate-/l*93.5%
Simplified93.5%
Taylor expanded in z around 0 88.2%
mul-1-neg88.2%
associate-/l*90.2%
distribute-rgt-neg-in90.2%
distribute-neg-frac290.2%
Simplified90.2%
cancel-sign-sub-inv90.2%
associate-*r/88.2%
*-commutative88.2%
add-sqr-sqrt48.6%
sqrt-unprod64.9%
sqr-neg64.9%
sqrt-unprod26.1%
add-sqr-sqrt50.8%
associate-/l*50.8%
add-sqr-sqrt21.9%
sqrt-unprod58.7%
sqr-neg58.7%
sqrt-unprod48.9%
add-sqr-sqrt84.4%
Applied egg-rr84.4%
clear-num84.4%
un-div-inv84.5%
Applied egg-rr84.5%
if -1.6999999999999999e86 < z < -1.5000000000000001e58Initial program 72.4%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 58.1%
associate-/l*85.7%
Simplified85.7%
*-commutative85.7%
associate-/r/85.7%
Applied egg-rr85.7%
Taylor expanded in x around 0 58.1%
associate-*r/85.7%
*-commutative85.7%
associate-*l*85.7%
*-commutative85.7%
associate-*r/85.7%
neg-mul-185.7%
Simplified85.7%
if 2.60000000000000003e125 < z Initial program 89.4%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around inf 79.2%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in x around 0 60.5%
associate-*r/60.5%
*-commutative60.5%
neg-mul-160.5%
distribute-rgt-neg-out60.5%
associate-/l*65.5%
Simplified65.5%
Final simplification79.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.4e+141)
(/ (- z) (/ a y))
(if (<= z -1.8e+86)
(+ x (/ y (/ a t)))
(if (<= z -1.52e+58)
(* (/ z a) (- y))
(if (<= z 3.4e+125) (+ x (/ (* t y) a)) (* (- z) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.4e+141) {
tmp = -z / (a / y);
} else if (z <= -1.8e+86) {
tmp = x + (y / (a / t));
} else if (z <= -1.52e+58) {
tmp = (z / a) * -y;
} else if (z <= 3.4e+125) {
tmp = x + ((t * y) / a);
} else {
tmp = -z * (y / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5.4d+141)) then
tmp = -z / (a / y)
else if (z <= (-1.8d+86)) then
tmp = x + (y / (a / t))
else if (z <= (-1.52d+58)) then
tmp = (z / a) * -y
else if (z <= 3.4d+125) then
tmp = x + ((t * y) / a)
else
tmp = -z * (y / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.4e+141) {
tmp = -z / (a / y);
} else if (z <= -1.8e+86) {
tmp = x + (y / (a / t));
} else if (z <= -1.52e+58) {
tmp = (z / a) * -y;
} else if (z <= 3.4e+125) {
tmp = x + ((t * y) / a);
} else {
tmp = -z * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.4e+141: tmp = -z / (a / y) elif z <= -1.8e+86: tmp = x + (y / (a / t)) elif z <= -1.52e+58: tmp = (z / a) * -y elif z <= 3.4e+125: tmp = x + ((t * y) / a) else: tmp = -z * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.4e+141) tmp = Float64(Float64(-z) / Float64(a / y)); elseif (z <= -1.8e+86) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (z <= -1.52e+58) tmp = Float64(Float64(z / a) * Float64(-y)); elseif (z <= 3.4e+125) tmp = Float64(x + Float64(Float64(t * y) / a)); else tmp = Float64(Float64(-z) * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.4e+141) tmp = -z / (a / y); elseif (z <= -1.8e+86) tmp = x + (y / (a / t)); elseif (z <= -1.52e+58) tmp = (z / a) * -y; elseif (z <= 3.4e+125) tmp = x + ((t * y) / a); else tmp = -z * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.4e+141], N[((-z) / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.8e+86], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.52e+58], N[(N[(z / a), $MachinePrecision] * (-y)), $MachinePrecision], If[LessEqual[z, 3.4e+125], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[((-z) * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+141}:\\
\;\;\;\;\frac{-z}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{+86}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq -1.52 \cdot 10^{+58}:\\
\;\;\;\;\frac{z}{a} \cdot \left(-y\right)\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+125}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;\left(-z\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -5.4000000000000002e141Initial program 94.4%
associate-/l*89.2%
Simplified89.2%
Taylor expanded in z around inf 91.4%
associate-/l*83.6%
Simplified83.6%
*-commutative83.6%
associate-/r/94.0%
Applied egg-rr94.0%
Taylor expanded in x around 0 66.3%
associate-*r/58.4%
*-commutative58.4%
associate-*l*58.4%
*-commutative58.4%
associate-*r/58.4%
neg-mul-158.4%
Simplified58.4%
distribute-frac-neg58.4%
distribute-rgt-neg-out58.4%
*-commutative58.4%
/-rgt-identity58.4%
associate-/r/58.3%
associate-/l/66.4%
distribute-neg-frac266.4%
associate-*l/66.5%
*-un-lft-identity66.5%
Applied egg-rr66.5%
if -5.4000000000000002e141 < z < -1.80000000000000003e86Initial program 78.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around 0 68.2%
mul-1-neg68.2%
associate-/l*89.9%
distribute-rgt-neg-in89.9%
distribute-neg-frac289.9%
Simplified89.9%
cancel-sign-sub-inv89.9%
associate-*r/68.2%
*-commutative68.2%
add-sqr-sqrt44.8%
sqrt-unprod66.7%
sqr-neg66.7%
sqrt-unprod23.1%
add-sqr-sqrt45.4%
associate-/l*55.6%
add-sqr-sqrt22.3%
sqrt-unprod57.3%
sqr-neg57.3%
sqrt-unprod45.4%
add-sqr-sqrt89.7%
Applied egg-rr89.7%
clear-num89.9%
un-div-inv89.9%
Applied egg-rr89.9%
if -1.80000000000000003e86 < z < -1.5199999999999999e58Initial program 72.4%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in z around inf 58.1%
associate-/l*85.7%
Simplified85.7%
*-commutative85.7%
associate-/r/85.7%
Applied egg-rr85.7%
Taylor expanded in x around 0 58.1%
associate-*r/85.7%
*-commutative85.7%
associate-*l*85.7%
*-commutative85.7%
associate-*r/85.7%
neg-mul-185.7%
Simplified85.7%
if -1.5199999999999999e58 < z < 3.3999999999999999e125Initial program 98.2%
associate-/l*93.2%
Simplified93.2%
Taylor expanded in z around 0 89.3%
mul-1-neg89.3%
associate-/l*90.2%
distribute-rgt-neg-in90.2%
distribute-neg-frac290.2%
Simplified90.2%
Taylor expanded in t around 0 89.3%
if 3.3999999999999999e125 < z Initial program 89.4%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in z around inf 79.2%
associate-/l*81.8%
Simplified81.8%
Taylor expanded in x around 0 60.5%
associate-*r/60.5%
*-commutative60.5%
neg-mul-160.5%
distribute-rgt-neg-out60.5%
associate-/l*65.5%
Simplified65.5%
Final simplification82.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -3.9e+22) (not (<= t 7.2e-12))) (+ x (/ (* t y) a)) (- x (* y (/ z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -3.9e+22) || !(t <= 7.2e-12)) {
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 <= (-3.9d+22)) .or. (.not. (t <= 7.2d-12))) 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 <= -3.9e+22) || !(t <= 7.2e-12)) {
tmp = x + ((t * y) / a);
} else {
tmp = x - (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -3.9e+22) or not (t <= 7.2e-12): 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 <= -3.9e+22) || !(t <= 7.2e-12)) tmp = Float64(x + Float64(Float64(t * 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 <= -3.9e+22) || ~((t <= 7.2e-12))) 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, -3.9e+22], N[Not[LessEqual[t, 7.2e-12]], $MachinePrecision]], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.9 \cdot 10^{+22} \lor \neg \left(t \leq 7.2 \cdot 10^{-12}\right):\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -3.90000000000000021e22 or 7.2e-12 < t Initial program 94.4%
associate-/l*88.4%
Simplified88.4%
Taylor expanded in z around 0 87.0%
mul-1-neg87.0%
associate-/l*89.2%
distribute-rgt-neg-in89.2%
distribute-neg-frac289.2%
Simplified89.2%
Taylor expanded in t around 0 87.0%
if -3.90000000000000021e22 < t < 7.2e-12Initial program 95.6%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around inf 89.8%
associate-/l*90.6%
Simplified90.6%
Final simplification88.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -8.2e+23) (not (<= t 9.5e-13))) (+ x (/ (* t y) a)) (- x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -8.2e+23) || !(t <= 9.5e-13)) {
tmp = x + ((t * y) / 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 ((t <= (-8.2d+23)) .or. (.not. (t <= 9.5d-13))) then
tmp = x + ((t * y) / 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 ((t <= -8.2e+23) || !(t <= 9.5e-13)) {
tmp = x + ((t * y) / a);
} else {
tmp = x - (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -8.2e+23) or not (t <= 9.5e-13): tmp = x + ((t * y) / a) else: tmp = x - (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -8.2e+23) || !(t <= 9.5e-13)) tmp = Float64(x + Float64(Float64(t * y) / 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 ((t <= -8.2e+23) || ~((t <= 9.5e-13))) tmp = x + ((t * y) / a); else tmp = x - (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -8.2e+23], N[Not[LessEqual[t, 9.5e-13]], $MachinePrecision]], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+23} \lor \neg \left(t \leq 9.5 \cdot 10^{-13}\right):\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -8.19999999999999992e23 or 9.49999999999999991e-13 < t Initial program 94.4%
associate-/l*88.4%
Simplified88.4%
Taylor expanded in z around 0 87.0%
mul-1-neg87.0%
associate-/l*89.2%
distribute-rgt-neg-in89.2%
distribute-neg-frac289.2%
Simplified89.2%
Taylor expanded in t around 0 87.0%
if -8.19999999999999992e23 < t < 9.49999999999999991e-13Initial program 95.6%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around inf 89.8%
associate-/l*90.6%
Simplified90.6%
*-commutative90.6%
associate-/r/91.8%
Applied egg-rr91.8%
Final simplification89.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -4.6e+23) (not (<= t 2.15e-12))) (+ x (* t (/ y a))) (- x (/ z (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -4.6e+23) || !(t <= 2.15e-12)) {
tmp = x + (t * (y / 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 ((t <= (-4.6d+23)) .or. (.not. (t <= 2.15d-12))) then
tmp = x + (t * (y / 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 ((t <= -4.6e+23) || !(t <= 2.15e-12)) {
tmp = x + (t * (y / a));
} else {
tmp = x - (z / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -4.6e+23) or not (t <= 2.15e-12): tmp = x + (t * (y / a)) else: tmp = x - (z / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -4.6e+23) || !(t <= 2.15e-12)) tmp = Float64(x + Float64(t * Float64(y / 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 ((t <= -4.6e+23) || ~((t <= 2.15e-12))) tmp = x + (t * (y / a)); else tmp = x - (z / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -4.6e+23], N[Not[LessEqual[t, 2.15e-12]], $MachinePrecision]], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.6 \cdot 10^{+23} \lor \neg \left(t \leq 2.15 \cdot 10^{-12}\right):\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\end{array}
\end{array}
if t < -4.6000000000000001e23 or 2.14999999999999993e-12 < t Initial program 94.4%
associate-/l*88.4%
Simplified88.4%
Taylor expanded in z around 0 87.0%
mul-1-neg87.0%
associate-/l*89.2%
distribute-rgt-neg-in89.2%
distribute-neg-frac289.2%
Simplified89.2%
if -4.6000000000000001e23 < t < 2.14999999999999993e-12Initial program 95.6%
associate-/l*96.4%
Simplified96.4%
Taylor expanded in z around inf 89.8%
associate-/l*90.6%
Simplified90.6%
*-commutative90.6%
associate-/r/91.8%
Applied egg-rr91.8%
Final simplification90.6%
(FPCore (x y z t a) :precision binary64 (if (<= a -1.45e+20) x (if (<= a 5.2e-40) (* t (/ y a)) x)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -1.45e+20) {
tmp = x;
} else if (a <= 5.2e-40) {
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 <= (-1.45d+20)) then
tmp = x
else if (a <= 5.2d-40) 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 <= -1.45e+20) {
tmp = x;
} else if (a <= 5.2e-40) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -1.45e+20: tmp = x elif a <= 5.2e-40: tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -1.45e+20) tmp = x; elseif (a <= 5.2e-40) 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 <= -1.45e+20) tmp = x; elseif (a <= 5.2e-40) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.45e+20], x, If[LessEqual[a, 5.2e-40], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.45 \cdot 10^{+20}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{-40}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.45e20 or 5.2000000000000003e-40 < a Initial program 91.6%
associate-/l*99.2%
Simplified99.2%
Taylor expanded in z around inf 78.2%
associate-/l*83.2%
Simplified83.2%
Taylor expanded in x around inf 63.0%
if -1.45e20 < a < 5.2000000000000003e-40Initial program 99.0%
associate-/l*84.9%
Simplified84.9%
Taylor expanded in z around 0 68.7%
mul-1-neg68.7%
associate-/l*74.9%
distribute-rgt-neg-in74.9%
distribute-neg-frac274.9%
Simplified74.9%
Taylor expanded in x around 0 50.4%
associate-*r/56.6%
Simplified56.6%
Final simplification60.0%
(FPCore (x y z t a) :precision binary64 (if (<= t -7.1e+90) (+ x (* t (/ y a))) (+ x (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -7.1e+90) {
tmp = x + (t * (y / 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 (t <= (-7.1d+90)) then
tmp = x + (t * (y / 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 (t <= -7.1e+90) {
tmp = x + (t * (y / a));
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -7.1e+90: tmp = x + (t * (y / a)) else: tmp = x + (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -7.1e+90) tmp = Float64(x + Float64(t * Float64(y / 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 (t <= -7.1e+90) tmp = x + (t * (y / a)); else tmp = x + (y * ((t - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -7.1e+90], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.1 \cdot 10^{+90}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if t < -7.09999999999999975e90Initial program 95.1%
associate-/l*75.9%
Simplified75.9%
Taylor expanded in z around 0 85.2%
mul-1-neg85.2%
associate-/l*87.6%
distribute-rgt-neg-in87.6%
distribute-neg-frac287.6%
Simplified87.6%
if -7.09999999999999975e90 < t Initial program 95.0%
associate-/l*95.5%
Simplified95.5%
Final simplification94.3%
(FPCore (x y z t a) :precision binary64 (if (<= t -1.62e+91) (+ x (* t (/ y a))) (+ x (/ y (/ a (- t z))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -1.62e+91) {
tmp = x + (t * (y / a));
} else {
tmp = x + (y / (a / (t - 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 (t <= (-1.62d+91)) then
tmp = x + (t * (y / a))
else
tmp = x + (y / (a / (t - z)))
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.62e+91) {
tmp = x + (t * (y / a));
} else {
tmp = x + (y / (a / (t - z)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -1.62e+91: tmp = x + (t * (y / a)) else: tmp = x + (y / (a / (t - z))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -1.62e+91) tmp = Float64(x + Float64(t * Float64(y / a))); else tmp = Float64(x + Float64(y / Float64(a / Float64(t - z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -1.62e+91) tmp = x + (t * (y / a)); else tmp = x + (y / (a / (t - z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -1.62e+91], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.62 \cdot 10^{+91}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - z}}\\
\end{array}
\end{array}
if t < -1.62e91Initial program 95.1%
associate-/l*75.9%
Simplified75.9%
Taylor expanded in z around 0 85.2%
mul-1-neg85.2%
associate-/l*87.6%
distribute-rgt-neg-in87.6%
distribute-neg-frac287.6%
Simplified87.6%
if -1.62e91 < t Initial program 95.0%
associate-/l*95.5%
Simplified95.5%
clear-num95.5%
un-div-inv95.6%
Applied egg-rr95.6%
Final simplification94.3%
(FPCore (x y z t a) :precision binary64 (+ x (/ (- t z) (/ a y))))
double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / (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 + ((t - z) / (a / y))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((t - z) / (a / y));
}
def code(x, y, z, t, a): return x + ((t - z) / (a / y))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(t - z) / Float64(a / y))) end
function tmp = code(x, y, z, t, a) tmp = x + ((t - z) / (a / y)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(t - z), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{t - z}{\frac{a}{y}}
\end{array}
Initial program 95.0%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in y around 0 95.0%
*-lft-identity95.0%
associate-*l/95.0%
associate-*r*97.9%
associate-/r/97.8%
associate-*l/98.3%
*-lft-identity98.3%
Simplified98.3%
Final simplification98.3%
(FPCore (x y z t a) :precision binary64 x)
double code(double x, double y, double z, double t, double a) {
return x;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x
end function
public static double code(double x, double y, double z, double t, double a) {
return x;
}
def code(x, y, z, t, a): return x
function code(x, y, z, t, a) return x end
function tmp = code(x, y, z, t, a) tmp = x; end
code[x_, y_, z_, t_, a_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.0%
associate-/l*92.6%
Simplified92.6%
Taylor expanded in z around inf 69.3%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in x around inf 42.8%
Final simplification42.8%
(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 2024055
(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)))