
(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 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a) :precision binary64 (+ x (* (/ y a) (- t z))))
double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y / a) * (t - z))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y / a) * (t - z));
}
def code(x, y, z, t, a): return x + ((y / a) * (t - z))
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y / a) * Float64(t - z))) end
function tmp = code(x, y, z, t, a) tmp = x + ((y / a) * (t - z)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{a} \cdot \left(t - z\right)
\end{array}
Initial program 93.4%
associate-*l/96.4%
Simplified96.4%
Final simplification96.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* (/ y a) z))))
(if (<= z -4.8e+107)
t_1
(if (<= z -2.5e+36)
(* (/ y a) (- t z))
(if (<= z -3400000.0)
t_1
(if (<= z -3.8e-195)
(+ x (* y (/ t a)))
(if (<= z 1.25e+64) (+ x (/ (* y t) a)) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y / a) * z);
double tmp;
if (z <= -4.8e+107) {
tmp = t_1;
} else if (z <= -2.5e+36) {
tmp = (y / a) * (t - z);
} else if (z <= -3400000.0) {
tmp = t_1;
} else if (z <= -3.8e-195) {
tmp = x + (y * (t / a));
} else if (z <= 1.25e+64) {
tmp = x + ((y * t) / a);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - ((y / a) * z)
if (z <= (-4.8d+107)) then
tmp = t_1
else if (z <= (-2.5d+36)) then
tmp = (y / a) * (t - z)
else if (z <= (-3400000.0d0)) then
tmp = t_1
else if (z <= (-3.8d-195)) then
tmp = x + (y * (t / a))
else if (z <= 1.25d+64) then
tmp = x + ((y * t) / a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - ((y / a) * z);
double tmp;
if (z <= -4.8e+107) {
tmp = t_1;
} else if (z <= -2.5e+36) {
tmp = (y / a) * (t - z);
} else if (z <= -3400000.0) {
tmp = t_1;
} else if (z <= -3.8e-195) {
tmp = x + (y * (t / a));
} else if (z <= 1.25e+64) {
tmp = x + ((y * t) / a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - ((y / a) * z) tmp = 0 if z <= -4.8e+107: tmp = t_1 elif z <= -2.5e+36: tmp = (y / a) * (t - z) elif z <= -3400000.0: tmp = t_1 elif z <= -3.8e-195: tmp = x + (y * (t / a)) elif z <= 1.25e+64: tmp = x + ((y * t) / a) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(Float64(y / a) * z)) tmp = 0.0 if (z <= -4.8e+107) tmp = t_1; elseif (z <= -2.5e+36) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif (z <= -3400000.0) tmp = t_1; elseif (z <= -3.8e-195) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (z <= 1.25e+64) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - ((y / a) * z); tmp = 0.0; if (z <= -4.8e+107) tmp = t_1; elseif (z <= -2.5e+36) tmp = (y / a) * (t - z); elseif (z <= -3400000.0) tmp = t_1; elseif (z <= -3.8e-195) tmp = x + (y * (t / a)); elseif (z <= 1.25e+64) tmp = x + ((y * t) / a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y / a), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e+107], t$95$1, If[LessEqual[z, -2.5e+36], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3400000.0], t$95$1, If[LessEqual[z, -3.8e-195], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.25e+64], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{y}{a} \cdot z\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{+107}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{+36}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;z \leq -3400000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{-195}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+64}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.8000000000000001e107 or -2.49999999999999988e36 < z < -3.4e6 or 1.25e64 < z Initial program 92.3%
associate-/l*88.1%
Simplified88.1%
associate-/l*92.3%
clear-num92.2%
associate-/r/92.3%
Applied egg-rr92.3%
Taylor expanded in z around inf 86.4%
associate-*l/92.0%
*-commutative92.0%
Simplified92.0%
if -4.8000000000000001e107 < z < -2.49999999999999988e36Initial program 95.6%
associate-/l*86.5%
Simplified86.5%
associate-/l*95.6%
clear-num95.6%
associate-/r/95.5%
Applied egg-rr95.5%
Taylor expanded in x around 0 76.2%
associate-*l/77.4%
sub-neg77.4%
distribute-lft-out63.1%
*-commutative63.1%
associate-*l/58.8%
distribute-lft-in58.8%
neg-mul-158.8%
sub-neg58.8%
cancel-sign-sub58.8%
+-commutative58.8%
mul-1-neg58.8%
sub-neg58.8%
associate-*l/63.1%
*-commutative63.1%
distribute-rgt-out--77.4%
Simplified77.4%
if -3.4e6 < z < -3.80000000000000013e-195Initial program 84.9%
associate-*l/93.3%
Simplified93.3%
Taylor expanded in z around 0 71.6%
sub-neg71.6%
mul-1-neg71.6%
remove-double-neg71.6%
+-commutative71.6%
associate-/l*88.7%
associate-/r/77.7%
Simplified77.7%
if -3.80000000000000013e-195 < z < 1.25e64Initial program 97.9%
associate-*l/94.4%
Simplified94.4%
Taylor expanded in z around 0 92.9%
sub-neg92.9%
mul-1-neg92.9%
remove-double-neg92.9%
+-commutative92.9%
associate-/l*87.8%
associate-/r/88.9%
Simplified88.9%
associate-*l/92.9%
*-commutative92.9%
Applied egg-rr92.9%
Final simplification88.7%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.7e+244)
(/ (- y) (/ a z))
(if (<= y -8e+61)
(* y (/ t a))
(if (<= y -7.4e-17)
x
(if (<= y -5.4e-98)
(/ (* y t) a)
(if (<= y 3.4e-59) x (/ y (/ a t))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.7e+244) {
tmp = -y / (a / z);
} else if (y <= -8e+61) {
tmp = y * (t / a);
} else if (y <= -7.4e-17) {
tmp = x;
} else if (y <= -5.4e-98) {
tmp = (y * t) / a;
} else if (y <= 3.4e-59) {
tmp = x;
} else {
tmp = y / (a / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.7d+244)) then
tmp = -y / (a / z)
else if (y <= (-8d+61)) then
tmp = y * (t / a)
else if (y <= (-7.4d-17)) then
tmp = x
else if (y <= (-5.4d-98)) then
tmp = (y * t) / a
else if (y <= 3.4d-59) then
tmp = x
else
tmp = y / (a / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.7e+244) {
tmp = -y / (a / z);
} else if (y <= -8e+61) {
tmp = y * (t / a);
} else if (y <= -7.4e-17) {
tmp = x;
} else if (y <= -5.4e-98) {
tmp = (y * t) / a;
} else if (y <= 3.4e-59) {
tmp = x;
} else {
tmp = y / (a / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.7e+244: tmp = -y / (a / z) elif y <= -8e+61: tmp = y * (t / a) elif y <= -7.4e-17: tmp = x elif y <= -5.4e-98: tmp = (y * t) / a elif y <= 3.4e-59: tmp = x else: tmp = y / (a / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.7e+244) tmp = Float64(Float64(-y) / Float64(a / z)); elseif (y <= -8e+61) tmp = Float64(y * Float64(t / a)); elseif (y <= -7.4e-17) tmp = x; elseif (y <= -5.4e-98) tmp = Float64(Float64(y * t) / a); elseif (y <= 3.4e-59) tmp = x; else tmp = Float64(y / Float64(a / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.7e+244) tmp = -y / (a / z); elseif (y <= -8e+61) tmp = y * (t / a); elseif (y <= -7.4e-17) tmp = x; elseif (y <= -5.4e-98) tmp = (y * t) / a; elseif (y <= 3.4e-59) tmp = x; else tmp = y / (a / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.7e+244], N[((-y) / N[(a / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -8e+61], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.4e-17], x, If[LessEqual[y, -5.4e-98], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 3.4e-59], x, N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+244}:\\
\;\;\;\;\frac{-y}{\frac{a}{z}}\\
\mathbf{elif}\;y \leq -8 \cdot 10^{+61}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;y \leq -7.4 \cdot 10^{-17}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{-98}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-59}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if y < -1.70000000000000005e244Initial program 64.9%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 52.9%
mul-1-neg52.9%
associate-/l*88.0%
Simplified88.0%
if -1.70000000000000005e244 < y < -7.9999999999999996e61Initial program 87.3%
associate-*l/92.1%
Simplified92.1%
Taylor expanded in t around inf 54.6%
associate-/l*59.3%
associate-/r/64.7%
Simplified64.7%
if -7.9999999999999996e61 < y < -7.3999999999999995e-17 or -5.3999999999999997e-98 < y < 3.40000000000000018e-59Initial program 98.6%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in x around inf 62.7%
if -7.3999999999999995e-17 < y < -5.3999999999999997e-98Initial program 99.9%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in t around inf 64.7%
if 3.40000000000000018e-59 < y Initial program 89.3%
associate-/l*98.0%
Simplified98.0%
associate-/l*89.3%
clear-num89.2%
associate-/r/89.3%
Applied egg-rr89.3%
Taylor expanded in t around inf 46.7%
*-commutative46.7%
associate-/l*51.7%
Simplified51.7%
Final simplification60.8%
(FPCore (x y z t a)
:precision binary64
(if (or (<= z -8.5e+172)
(not (or (<= z -8e+108) (and (not (<= z -3.4e-25)) (<= z 5.2)))))
(* (/ y a) (- t z))
(+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -8.5e+172) || !((z <= -8e+108) || (!(z <= -3.4e-25) && (z <= 5.2)))) {
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 ((z <= (-8.5d+172)) .or. (.not. (z <= (-8d+108)) .or. (.not. (z <= (-3.4d-25))) .and. (z <= 5.2d0))) 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 ((z <= -8.5e+172) || !((z <= -8e+108) || (!(z <= -3.4e-25) && (z <= 5.2)))) {
tmp = (y / a) * (t - z);
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -8.5e+172) or not ((z <= -8e+108) or (not (z <= -3.4e-25) and (z <= 5.2))): tmp = (y / a) * (t - z) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -8.5e+172) || !((z <= -8e+108) || (!(z <= -3.4e-25) && (z <= 5.2)))) 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 ((z <= -8.5e+172) || ~(((z <= -8e+108) || (~((z <= -3.4e-25)) && (z <= 5.2))))) 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[z, -8.5e+172], N[Not[Or[LessEqual[z, -8e+108], And[N[Not[LessEqual[z, -3.4e-25]], $MachinePrecision], LessEqual[z, 5.2]]]], $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}\;z \leq -8.5 \cdot 10^{+172} \lor \neg \left(z \leq -8 \cdot 10^{+108} \lor \neg \left(z \leq -3.4 \cdot 10^{-25}\right) \land z \leq 5.2\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -8.50000000000000053e172 or -8.0000000000000003e108 < z < -3.40000000000000002e-25 or 5.20000000000000018 < z Initial program 92.7%
associate-/l*85.2%
Simplified85.2%
associate-/l*92.7%
clear-num92.6%
associate-/r/92.7%
Applied egg-rr92.7%
Taylor expanded in x around 0 69.1%
associate-*l/75.5%
sub-neg75.5%
distribute-lft-out66.9%
*-commutative66.9%
associate-*l/61.5%
distribute-lft-in61.5%
neg-mul-161.5%
sub-neg61.5%
cancel-sign-sub61.5%
+-commutative61.5%
mul-1-neg61.5%
sub-neg61.5%
associate-*l/66.9%
*-commutative66.9%
distribute-rgt-out--75.5%
Simplified75.5%
if -8.50000000000000053e172 < z < -8.0000000000000003e108 or -3.40000000000000002e-25 < z < 5.20000000000000018Initial program 93.9%
associate-*l/94.2%
Simplified94.2%
Taylor expanded in z around 0 87.6%
sub-neg87.6%
mul-1-neg87.6%
remove-double-neg87.6%
+-commutative87.6%
associate-/l*89.4%
associate-/r/88.1%
Simplified88.1%
Final simplification82.3%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -4.1e+142)
(and (not (<= y -1.7e+16)) (or (<= y -9e-74) (not (<= y 5.6e-34)))))
(* (/ y a) (- t z))
(+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -4.1e+142) || (!(y <= -1.7e+16) && ((y <= -9e-74) || !(y <= 5.6e-34)))) {
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 <= (-4.1d+142)) .or. (.not. (y <= (-1.7d+16))) .and. (y <= (-9d-74)) .or. (.not. (y <= 5.6d-34))) 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 <= -4.1e+142) || (!(y <= -1.7e+16) && ((y <= -9e-74) || !(y <= 5.6e-34)))) {
tmp = (y / a) * (t - z);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -4.1e+142) or (not (y <= -1.7e+16) and ((y <= -9e-74) or not (y <= 5.6e-34))): 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 <= -4.1e+142) || (!(y <= -1.7e+16) && ((y <= -9e-74) || !(y <= 5.6e-34)))) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -4.1e+142) || (~((y <= -1.7e+16)) && ((y <= -9e-74) || ~((y <= 5.6e-34))))) 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, -4.1e+142], And[N[Not[LessEqual[y, -1.7e+16]], $MachinePrecision], Or[LessEqual[y, -9e-74], N[Not[LessEqual[y, 5.6e-34]], $MachinePrecision]]]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.1 \cdot 10^{+142} \lor \neg \left(y \leq -1.7 \cdot 10^{+16}\right) \land \left(y \leq -9 \cdot 10^{-74} \lor \neg \left(y \leq 5.6 \cdot 10^{-34}\right)\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if y < -4.09999999999999982e142 or -1.7e16 < y < -8.9999999999999998e-74 or 5.59999999999999994e-34 < y Initial program 86.9%
associate-/l*99.0%
Simplified99.0%
associate-/l*86.9%
clear-num86.8%
associate-/r/86.9%
Applied egg-rr86.9%
Taylor expanded in x around 0 76.5%
associate-*l/85.1%
sub-neg85.1%
distribute-lft-out74.6%
*-commutative74.6%
associate-*l/70.9%
distribute-lft-in70.9%
neg-mul-170.9%
sub-neg70.9%
cancel-sign-sub70.9%
+-commutative70.9%
mul-1-neg70.9%
sub-neg70.9%
associate-*l/74.6%
*-commutative74.6%
distribute-rgt-out--85.1%
Simplified85.1%
if -4.09999999999999982e142 < y < -1.7e16 or -8.9999999999999998e-74 < y < 5.59999999999999994e-34Initial program 98.6%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in z around 0 81.3%
sub-neg81.3%
mul-1-neg81.3%
remove-double-neg81.3%
+-commutative81.3%
associate-/l*78.5%
associate-/r/72.0%
Simplified72.0%
associate-*l/81.3%
*-commutative81.3%
Applied egg-rr81.3%
Final simplification83.0%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -6e+66)
(not (or (<= y -4.8e-15) (and (not (<= y -1.9e-98)) (<= y 7e-60)))))
(* (/ y a) t)
x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -6e+66) || !((y <= -4.8e-15) || (!(y <= -1.9e-98) && (y <= 7e-60)))) {
tmp = (y / a) * t;
} 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 <= (-6d+66)) .or. (.not. (y <= (-4.8d-15)) .or. (.not. (y <= (-1.9d-98))) .and. (y <= 7d-60))) then
tmp = (y / a) * t
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 <= -6e+66) || !((y <= -4.8e-15) || (!(y <= -1.9e-98) && (y <= 7e-60)))) {
tmp = (y / a) * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -6e+66) or not ((y <= -4.8e-15) or (not (y <= -1.9e-98) and (y <= 7e-60))): tmp = (y / a) * t else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -6e+66) || !((y <= -4.8e-15) || (!(y <= -1.9e-98) && (y <= 7e-60)))) tmp = Float64(Float64(y / a) * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -6e+66) || ~(((y <= -4.8e-15) || (~((y <= -1.9e-98)) && (y <= 7e-60))))) tmp = (y / a) * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -6e+66], N[Not[Or[LessEqual[y, -4.8e-15], And[N[Not[LessEqual[y, -1.9e-98]], $MachinePrecision], LessEqual[y, 7e-60]]]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+66} \lor \neg \left(y \leq -4.8 \cdot 10^{-15} \lor \neg \left(y \leq -1.9 \cdot 10^{-98}\right) \land y \leq 7 \cdot 10^{-60}\right):\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -6.00000000000000005e66 or -4.7999999999999999e-15 < y < -1.9000000000000002e-98 or 6.99999999999999952e-60 < y Initial program 88.1%
associate-*l/93.6%
Simplified93.6%
Taylor expanded in t around inf 48.5%
associate-*l/53.0%
div-inv53.0%
associate-*l*53.0%
associate-*l/53.0%
*-un-lft-identity53.0%
Applied egg-rr53.0%
if -6.00000000000000005e66 < y < -4.7999999999999999e-15 or -1.9000000000000002e-98 < y < 6.99999999999999952e-60Initial program 98.6%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in x around inf 62.7%
Final simplification57.9%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.8e+62)
(* y (/ t a))
(if (or (<= y -1.9e-20) (and (not (<= y -3.6e-97)) (<= y 3.2e-59)))
x
(* (/ y a) t))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.8e+62) {
tmp = y * (t / a);
} else if ((y <= -1.9e-20) || (!(y <= -3.6e-97) && (y <= 3.2e-59))) {
tmp = x;
} else {
tmp = (y / a) * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.8d+62)) then
tmp = y * (t / a)
else if ((y <= (-1.9d-20)) .or. (.not. (y <= (-3.6d-97))) .and. (y <= 3.2d-59)) then
tmp = x
else
tmp = (y / a) * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.8e+62) {
tmp = y * (t / a);
} else if ((y <= -1.9e-20) || (!(y <= -3.6e-97) && (y <= 3.2e-59))) {
tmp = x;
} else {
tmp = (y / a) * t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.8e+62: tmp = y * (t / a) elif (y <= -1.9e-20) or (not (y <= -3.6e-97) and (y <= 3.2e-59)): tmp = x else: tmp = (y / a) * t return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.8e+62) tmp = Float64(y * Float64(t / a)); elseif ((y <= -1.9e-20) || (!(y <= -3.6e-97) && (y <= 3.2e-59))) tmp = x; else tmp = Float64(Float64(y / a) * t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.8e+62) tmp = y * (t / a); elseif ((y <= -1.9e-20) || (~((y <= -3.6e-97)) && (y <= 3.2e-59))) tmp = x; else tmp = (y / a) * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.8e+62], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -1.9e-20], And[N[Not[LessEqual[y, -3.6e-97]], $MachinePrecision], LessEqual[y, 3.2e-59]]], x, N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+62}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-20} \lor \neg \left(y \leq -3.6 \cdot 10^{-97}\right) \land y \leq 3.2 \cdot 10^{-59}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\end{array}
\end{array}
if y < -1.8e62Initial program 83.2%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in t around inf 47.3%
associate-/l*53.3%
associate-/r/55.6%
Simplified55.6%
if -1.8e62 < y < -1.8999999999999999e-20 or -3.59999999999999997e-97 < y < 3.1999999999999999e-59Initial program 98.6%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in x around inf 62.7%
if -1.8999999999999999e-20 < y < -3.59999999999999997e-97 or 3.1999999999999999e-59 < y Initial program 90.7%
associate-*l/93.7%
Simplified93.7%
Taylor expanded in t around inf 49.1%
associate-*l/51.6%
div-inv51.6%
associate-*l*52.8%
associate-*l/52.9%
*-un-lft-identity52.9%
Applied egg-rr52.9%
Final simplification58.3%
(FPCore (x y z t a)
:precision binary64
(if (<= y -7.4e+62)
(* y (/ t a))
(if (<= y -2.5e-14)
x
(if (<= y -1.4e-97) (* (/ y a) t) (if (<= y 1.38e-58) x (/ y (/ a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7.4e+62) {
tmp = y * (t / a);
} else if (y <= -2.5e-14) {
tmp = x;
} else if (y <= -1.4e-97) {
tmp = (y / a) * t;
} else if (y <= 1.38e-58) {
tmp = x;
} else {
tmp = y / (a / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-7.4d+62)) then
tmp = y * (t / a)
else if (y <= (-2.5d-14)) then
tmp = x
else if (y <= (-1.4d-97)) then
tmp = (y / a) * t
else if (y <= 1.38d-58) then
tmp = x
else
tmp = y / (a / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -7.4e+62) {
tmp = y * (t / a);
} else if (y <= -2.5e-14) {
tmp = x;
} else if (y <= -1.4e-97) {
tmp = (y / a) * t;
} else if (y <= 1.38e-58) {
tmp = x;
} else {
tmp = y / (a / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -7.4e+62: tmp = y * (t / a) elif y <= -2.5e-14: tmp = x elif y <= -1.4e-97: tmp = (y / a) * t elif y <= 1.38e-58: tmp = x else: tmp = y / (a / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -7.4e+62) tmp = Float64(y * Float64(t / a)); elseif (y <= -2.5e-14) tmp = x; elseif (y <= -1.4e-97) tmp = Float64(Float64(y / a) * t); elseif (y <= 1.38e-58) tmp = x; else tmp = Float64(y / Float64(a / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -7.4e+62) tmp = y * (t / a); elseif (y <= -2.5e-14) tmp = x; elseif (y <= -1.4e-97) tmp = (y / a) * t; elseif (y <= 1.38e-58) tmp = x; else tmp = y / (a / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -7.4e+62], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.5e-14], x, If[LessEqual[y, -1.4e-97], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], If[LessEqual[y, 1.38e-58], x, N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+62}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;y \leq -2.5 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.4 \cdot 10^{-97}:\\
\;\;\;\;\frac{y}{a} \cdot t\\
\mathbf{elif}\;y \leq 1.38 \cdot 10^{-58}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if y < -7.40000000000000028e62Initial program 83.2%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in t around inf 47.3%
associate-/l*53.3%
associate-/r/55.6%
Simplified55.6%
if -7.40000000000000028e62 < y < -2.5000000000000001e-14 or -1.4000000000000001e-97 < y < 1.37999999999999996e-58Initial program 98.6%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in x around inf 62.7%
if -2.5000000000000001e-14 < y < -1.4000000000000001e-97Initial program 99.9%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in t around inf 64.7%
associate-*l/56.5%
div-inv56.4%
associate-*l*61.7%
associate-*l/61.8%
*-un-lft-identity61.8%
Applied egg-rr61.8%
if 1.37999999999999996e-58 < y Initial program 89.3%
associate-/l*98.0%
Simplified98.0%
associate-/l*89.3%
clear-num89.2%
associate-/r/89.3%
Applied egg-rr89.3%
Taylor expanded in t around inf 46.7%
*-commutative46.7%
associate-/l*51.7%
Simplified51.7%
Final simplification58.3%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.15e+64)
(* y (/ t a))
(if (<= y -2.8e-22)
x
(if (<= y -3.6e-97) (/ (* y t) a) (if (<= y 1.25e-58) x (/ y (/ a t)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.15e+64) {
tmp = y * (t / a);
} else if (y <= -2.8e-22) {
tmp = x;
} else if (y <= -3.6e-97) {
tmp = (y * t) / a;
} else if (y <= 1.25e-58) {
tmp = x;
} else {
tmp = y / (a / t);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= (-1.15d+64)) then
tmp = y * (t / a)
else if (y <= (-2.8d-22)) then
tmp = x
else if (y <= (-3.6d-97)) then
tmp = (y * t) / a
else if (y <= 1.25d-58) then
tmp = x
else
tmp = y / (a / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.15e+64) {
tmp = y * (t / a);
} else if (y <= -2.8e-22) {
tmp = x;
} else if (y <= -3.6e-97) {
tmp = (y * t) / a;
} else if (y <= 1.25e-58) {
tmp = x;
} else {
tmp = y / (a / t);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.15e+64: tmp = y * (t / a) elif y <= -2.8e-22: tmp = x elif y <= -3.6e-97: tmp = (y * t) / a elif y <= 1.25e-58: tmp = x else: tmp = y / (a / t) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.15e+64) tmp = Float64(y * Float64(t / a)); elseif (y <= -2.8e-22) tmp = x; elseif (y <= -3.6e-97) tmp = Float64(Float64(y * t) / a); elseif (y <= 1.25e-58) tmp = x; else tmp = Float64(y / Float64(a / t)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.15e+64) tmp = y * (t / a); elseif (y <= -2.8e-22) tmp = x; elseif (y <= -3.6e-97) tmp = (y * t) / a; elseif (y <= 1.25e-58) tmp = x; else tmp = y / (a / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.15e+64], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2.8e-22], x, If[LessEqual[y, -3.6e-97], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 1.25e-58], x, N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+64}:\\
\;\;\;\;y \cdot \frac{t}{a}\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-22}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -3.6 \cdot 10^{-97}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-58}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\end{array}
\end{array}
if y < -1.15e64Initial program 83.2%
associate-*l/93.5%
Simplified93.5%
Taylor expanded in t around inf 47.3%
associate-/l*53.3%
associate-/r/55.6%
Simplified55.6%
if -1.15e64 < y < -2.79999999999999995e-22 or -3.59999999999999997e-97 < y < 1.24999999999999994e-58Initial program 98.6%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in x around inf 62.7%
if -2.79999999999999995e-22 < y < -3.59999999999999997e-97Initial program 99.9%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in t around inf 64.7%
if 1.24999999999999994e-58 < y Initial program 89.3%
associate-/l*98.0%
Simplified98.0%
associate-/l*89.3%
clear-num89.2%
associate-/r/89.3%
Applied egg-rr89.3%
Taylor expanded in t around inf 46.7%
*-commutative46.7%
associate-/l*51.7%
Simplified51.7%
Final simplification58.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -3.8e-107) (not (<= y 4.5e-85))) (* (/ y a) (- t z)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -3.8e-107) || !(y <= 4.5e-85)) {
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 <= (-3.8d-107)) .or. (.not. (y <= 4.5d-85))) 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 <= -3.8e-107) || !(y <= 4.5e-85)) {
tmp = (y / a) * (t - z);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -3.8e-107) or not (y <= 4.5e-85): tmp = (y / a) * (t - z) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -3.8e-107) || !(y <= 4.5e-85)) 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 <= -3.8e-107) || ~((y <= 4.5e-85))) tmp = (y / a) * (t - z); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -3.8e-107], N[Not[LessEqual[y, 4.5e-85]], $MachinePrecision]], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{-107} \lor \neg \left(y \leq 4.5 \cdot 10^{-85}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -3.8000000000000002e-107 or 4.50000000000000004e-85 < y Initial program 89.7%
associate-/l*97.7%
Simplified97.7%
associate-/l*89.7%
clear-num89.6%
associate-/r/89.7%
Applied egg-rr89.7%
Taylor expanded in x around 0 74.2%
associate-*l/78.8%
sub-neg78.8%
distribute-lft-out69.8%
*-commutative69.8%
associate-*l/67.0%
distribute-lft-in67.0%
neg-mul-167.0%
sub-neg67.0%
cancel-sign-sub67.0%
+-commutative67.0%
mul-1-neg67.0%
sub-neg67.0%
associate-*l/69.8%
*-commutative69.8%
distribute-rgt-out--78.8%
Simplified78.8%
if -3.8000000000000002e-107 < y < 4.50000000000000004e-85Initial program 98.3%
associate-*l/99.0%
Simplified99.0%
Taylor expanded in x around inf 65.7%
Final simplification73.2%
(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/96.4%
Simplified96.4%
Taylor expanded in x around inf 38.2%
Final simplification38.2%
(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 2024027
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:herbie-target
(if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))
(- x (/ (* y (- z t)) a)))