
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 12 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (+ x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x + ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x + ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x + Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x + ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))))
(if (or (<= t_1 -2e+261) (not (<= t_1 5e+273)))
(+ x (/ y (/ a (- z t))))
(+ x (/ t_1 a)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 <= -2e+261) || !(t_1 <= 5e+273)) {
tmp = x + (y / (a / (z - t)));
} else {
tmp = x + (t_1 / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z - t)
if ((t_1 <= (-2d+261)) .or. (.not. (t_1 <= 5d+273))) then
tmp = x + (y / (a / (z - t)))
else
tmp = x + (t_1 / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if ((t_1 <= -2e+261) || !(t_1 <= 5e+273)) {
tmp = x + (y / (a / (z - t)));
} else {
tmp = x + (t_1 / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if (t_1 <= -2e+261) or not (t_1 <= 5e+273): tmp = x + (y / (a / (z - t))) else: tmp = x + (t_1 / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if ((t_1 <= -2e+261) || !(t_1 <= 5e+273)) tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); else tmp = Float64(x + Float64(t_1 / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if ((t_1 <= -2e+261) || ~((t_1 <= 5e+273))) tmp = x + (y / (a / (z - t))); else tmp = x + (t_1 / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -2e+261], N[Not[LessEqual[t$95$1, 5e+273]], $MachinePrecision]], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t$95$1 / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{+261} \lor \neg \left(t\_1 \leq 5 \cdot 10^{+273}\right):\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{t\_1}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -1.9999999999999999e261 or 4.99999999999999961e273 < (*.f64 y (-.f64 z t)) Initial program 72.1%
associate-/l*99.9%
Simplified99.9%
clear-num99.9%
un-div-inv100.0%
Applied egg-rr100.0%
if -1.9999999999999999e261 < (*.f64 y (-.f64 z t)) < 4.99999999999999961e273Initial program 99.2%
Final simplification99.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y) a))))
(if (<= t -5e+218)
t_1
(if (<= t -1.85e+146)
(+ x (/ (* y z) a))
(if (<= t -2.3e+108)
t_1
(if (<= t 1.8e-184)
(+ x (* y (/ z a)))
(if (<= t 1.05e+114) (+ x (* z (/ y a))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (-y / a);
double tmp;
if (t <= -5e+218) {
tmp = t_1;
} else if (t <= -1.85e+146) {
tmp = x + ((y * z) / a);
} else if (t <= -2.3e+108) {
tmp = t_1;
} else if (t <= 1.8e-184) {
tmp = x + (y * (z / a));
} else if (t <= 1.05e+114) {
tmp = x + (z * (y / 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 = t * (-y / a)
if (t <= (-5d+218)) then
tmp = t_1
else if (t <= (-1.85d+146)) then
tmp = x + ((y * z) / a)
else if (t <= (-2.3d+108)) then
tmp = t_1
else if (t <= 1.8d-184) then
tmp = x + (y * (z / a))
else if (t <= 1.05d+114) then
tmp = x + (z * (y / 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 = t * (-y / a);
double tmp;
if (t <= -5e+218) {
tmp = t_1;
} else if (t <= -1.85e+146) {
tmp = x + ((y * z) / a);
} else if (t <= -2.3e+108) {
tmp = t_1;
} else if (t <= 1.8e-184) {
tmp = x + (y * (z / a));
} else if (t <= 1.05e+114) {
tmp = x + (z * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (-y / a) tmp = 0 if t <= -5e+218: tmp = t_1 elif t <= -1.85e+146: tmp = x + ((y * z) / a) elif t <= -2.3e+108: tmp = t_1 elif t <= 1.8e-184: tmp = x + (y * (z / a)) elif t <= 1.05e+114: tmp = x + (z * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(-y) / a)) tmp = 0.0 if (t <= -5e+218) tmp = t_1; elseif (t <= -1.85e+146) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif (t <= -2.3e+108) tmp = t_1; elseif (t <= 1.8e-184) tmp = Float64(x + Float64(y * Float64(z / a))); elseif (t <= 1.05e+114) tmp = Float64(x + Float64(z * Float64(y / a))); 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 (t <= -5e+218) tmp = t_1; elseif (t <= -1.85e+146) tmp = x + ((y * z) / a); elseif (t <= -2.3e+108) tmp = t_1; elseif (t <= 1.8e-184) tmp = x + (y * (z / a)); elseif (t <= 1.05e+114) tmp = x + (z * (y / a)); 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[t, -5e+218], t$95$1, If[LessEqual[t, -1.85e+146], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.3e+108], t$95$1, If[LessEqual[t, 1.8e-184], N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.05e+114], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{-y}{a}\\
\mathbf{if}\;t \leq -5 \cdot 10^{+218}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.85 \cdot 10^{+146}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-184}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+114}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.99999999999999983e218 or -1.85000000000000002e146 < t < -2.2999999999999999e108 or 1.05e114 < t Initial program 79.6%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in y around 0 79.6%
associate-*l/96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in z around 0 77.8%
associate-*r/93.2%
neg-mul-193.2%
distribute-lft-neg-in93.2%
cancel-sign-sub-inv93.2%
Simplified93.2%
*-commutative93.2%
add-sqr-sqrt47.6%
sqrt-unprod42.9%
sqr-neg42.9%
sqrt-unprod5.7%
add-sqr-sqrt13.5%
associate-/r/13.4%
add-sqr-sqrt5.6%
sqrt-unprod42.8%
sqr-neg42.8%
sqrt-unprod45.4%
add-sqr-sqrt91.1%
Applied egg-rr91.1%
Taylor expanded in x around 0 63.7%
mul-1-neg63.7%
associate-*r/80.5%
*-commutative80.5%
distribute-rgt-neg-out80.5%
Simplified80.5%
if -4.99999999999999983e218 < t < -1.85000000000000002e146Initial program 99.7%
associate-/l*84.6%
Simplified84.6%
Taylor expanded in z around inf 83.5%
if -2.2999999999999999e108 < t < 1.8000000000000001e-184Initial program 94.5%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in t around 0 80.2%
+-commutative80.2%
associate-/l*81.7%
Simplified81.7%
if 1.8000000000000001e-184 < t < 1.05e114Initial program 94.2%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in t around 0 77.9%
+-commutative77.9%
associate-/l*77.0%
Simplified77.0%
clear-num76.4%
un-div-inv77.3%
Applied egg-rr77.3%
associate-/r/82.1%
Applied egg-rr82.1%
Final simplification81.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y) a))))
(if (<= t -5e+218)
t_1
(if (<= t -2.4e+146)
(+ x (/ (* y z) a))
(if (<= t -1.05e+108)
t_1
(if (<= t 7e-184)
(+ x (/ y (/ a z)))
(if (<= t 7.5e+113) (+ x (* z (/ y a))) t_1)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (-y / a);
double tmp;
if (t <= -5e+218) {
tmp = t_1;
} else if (t <= -2.4e+146) {
tmp = x + ((y * z) / a);
} else if (t <= -1.05e+108) {
tmp = t_1;
} else if (t <= 7e-184) {
tmp = x + (y / (a / z));
} else if (t <= 7.5e+113) {
tmp = x + (z * (y / 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 = t * (-y / a)
if (t <= (-5d+218)) then
tmp = t_1
else if (t <= (-2.4d+146)) then
tmp = x + ((y * z) / a)
else if (t <= (-1.05d+108)) then
tmp = t_1
else if (t <= 7d-184) then
tmp = x + (y / (a / z))
else if (t <= 7.5d+113) then
tmp = x + (z * (y / 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 = t * (-y / a);
double tmp;
if (t <= -5e+218) {
tmp = t_1;
} else if (t <= -2.4e+146) {
tmp = x + ((y * z) / a);
} else if (t <= -1.05e+108) {
tmp = t_1;
} else if (t <= 7e-184) {
tmp = x + (y / (a / z));
} else if (t <= 7.5e+113) {
tmp = x + (z * (y / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (-y / a) tmp = 0 if t <= -5e+218: tmp = t_1 elif t <= -2.4e+146: tmp = x + ((y * z) / a) elif t <= -1.05e+108: tmp = t_1 elif t <= 7e-184: tmp = x + (y / (a / z)) elif t <= 7.5e+113: tmp = x + (z * (y / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(-y) / a)) tmp = 0.0 if (t <= -5e+218) tmp = t_1; elseif (t <= -2.4e+146) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif (t <= -1.05e+108) tmp = t_1; elseif (t <= 7e-184) tmp = Float64(x + Float64(y / Float64(a / z))); elseif (t <= 7.5e+113) tmp = Float64(x + Float64(z * Float64(y / a))); 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 (t <= -5e+218) tmp = t_1; elseif (t <= -2.4e+146) tmp = x + ((y * z) / a); elseif (t <= -1.05e+108) tmp = t_1; elseif (t <= 7e-184) tmp = x + (y / (a / z)); elseif (t <= 7.5e+113) tmp = x + (z * (y / a)); 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[t, -5e+218], t$95$1, If[LessEqual[t, -2.4e+146], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.05e+108], t$95$1, If[LessEqual[t, 7e-184], N[(x + N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.5e+113], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{-y}{a}\\
\mathbf{if}\;t \leq -5 \cdot 10^{+218}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{+146}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{+108}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-184}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{+113}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.99999999999999983e218 or -2.4000000000000002e146 < t < -1.05000000000000005e108 or 7.5000000000000001e113 < t Initial program 79.6%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in y around 0 79.6%
associate-*l/96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in z around 0 77.8%
associate-*r/93.2%
neg-mul-193.2%
distribute-lft-neg-in93.2%
cancel-sign-sub-inv93.2%
Simplified93.2%
*-commutative93.2%
add-sqr-sqrt47.6%
sqrt-unprod42.9%
sqr-neg42.9%
sqrt-unprod5.7%
add-sqr-sqrt13.5%
associate-/r/13.4%
add-sqr-sqrt5.6%
sqrt-unprod42.8%
sqr-neg42.8%
sqrt-unprod45.4%
add-sqr-sqrt91.1%
Applied egg-rr91.1%
Taylor expanded in x around 0 63.7%
mul-1-neg63.7%
associate-*r/80.5%
*-commutative80.5%
distribute-rgt-neg-out80.5%
Simplified80.5%
if -4.99999999999999983e218 < t < -2.4000000000000002e146Initial program 99.7%
associate-/l*84.6%
Simplified84.6%
Taylor expanded in z around inf 83.5%
if -1.05000000000000005e108 < t < 6.99999999999999962e-184Initial program 94.5%
associate-/l*96.7%
Simplified96.7%
Taylor expanded in t around 0 80.2%
+-commutative80.2%
associate-/l*81.7%
Simplified81.7%
clear-num81.7%
un-div-inv81.7%
Applied egg-rr81.7%
if 6.99999999999999962e-184 < t < 7.5000000000000001e113Initial program 94.2%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in t around 0 77.9%
+-commutative77.9%
associate-/l*77.0%
Simplified77.0%
clear-num76.4%
un-div-inv77.3%
Applied egg-rr77.3%
associate-/r/82.1%
Applied egg-rr82.1%
Final simplification81.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ (- y) a))))
(if (<= t -5e+218)
t_1
(if (<= t -2.3e+146)
(+ x (/ (* y z) a))
(if (or (<= t -2.7e+106) (not (<= t 5.8e+113)))
t_1
(+ x (* y (/ z a))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (-y / a);
double tmp;
if (t <= -5e+218) {
tmp = t_1;
} else if (t <= -2.3e+146) {
tmp = x + ((y * z) / a);
} else if ((t <= -2.7e+106) || !(t <= 5.8e+113)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = t * (-y / a)
if (t <= (-5d+218)) then
tmp = t_1
else if (t <= (-2.3d+146)) then
tmp = x + ((y * z) / a)
else if ((t <= (-2.7d+106)) .or. (.not. (t <= 5.8d+113))) then
tmp = t_1
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 t_1 = t * (-y / a);
double tmp;
if (t <= -5e+218) {
tmp = t_1;
} else if (t <= -2.3e+146) {
tmp = x + ((y * z) / a);
} else if ((t <= -2.7e+106) || !(t <= 5.8e+113)) {
tmp = t_1;
} else {
tmp = x + (y * (z / a));
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (-y / a) tmp = 0 if t <= -5e+218: tmp = t_1 elif t <= -2.3e+146: tmp = x + ((y * z) / a) elif (t <= -2.7e+106) or not (t <= 5.8e+113): tmp = t_1 else: tmp = x + (y * (z / a)) return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(Float64(-y) / a)) tmp = 0.0 if (t <= -5e+218) tmp = t_1; elseif (t <= -2.3e+146) tmp = Float64(x + Float64(Float64(y * z) / a)); elseif ((t <= -2.7e+106) || !(t <= 5.8e+113)) tmp = t_1; else tmp = Float64(x + Float64(y * Float64(z / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (-y / a); tmp = 0.0; if (t <= -5e+218) tmp = t_1; elseif (t <= -2.3e+146) tmp = x + ((y * z) / a); elseif ((t <= -2.7e+106) || ~((t <= 5.8e+113))) tmp = t_1; else tmp = x + (y * (z / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e+218], t$95$1, If[LessEqual[t, -2.3e+146], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -2.7e+106], N[Not[LessEqual[t, 5.8e+113]], $MachinePrecision]], t$95$1, N[(x + N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{-y}{a}\\
\mathbf{if}\;t \leq -5 \cdot 10^{+218}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.3 \cdot 10^{+146}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{+106} \lor \neg \left(t \leq 5.8 \cdot 10^{+113}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{a}\\
\end{array}
\end{array}
if t < -4.99999999999999983e218 or -2.3e146 < t < -2.70000000000000006e106 or 5.79999999999999968e113 < t Initial program 79.6%
associate-/l*93.0%
Simplified93.0%
Taylor expanded in y around 0 79.6%
associate-*l/96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in z around 0 77.8%
associate-*r/93.2%
neg-mul-193.2%
distribute-lft-neg-in93.2%
cancel-sign-sub-inv93.2%
Simplified93.2%
*-commutative93.2%
add-sqr-sqrt47.6%
sqrt-unprod42.9%
sqr-neg42.9%
sqrt-unprod5.7%
add-sqr-sqrt13.5%
associate-/r/13.4%
add-sqr-sqrt5.6%
sqrt-unprod42.8%
sqr-neg42.8%
sqrt-unprod45.4%
add-sqr-sqrt91.1%
Applied egg-rr91.1%
Taylor expanded in x around 0 63.7%
mul-1-neg63.7%
associate-*r/80.5%
*-commutative80.5%
distribute-rgt-neg-out80.5%
Simplified80.5%
if -4.99999999999999983e218 < t < -2.3e146Initial program 99.7%
associate-/l*84.6%
Simplified84.6%
Taylor expanded in z around inf 83.5%
if -2.70000000000000006e106 < t < 5.79999999999999968e113Initial program 94.4%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in t around 0 79.4%
+-commutative79.4%
associate-/l*80.1%
Simplified80.1%
Final simplification80.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.9e+219) (not (<= t 1e+114))) (* t (/ (- y) a)) (+ x (/ (* y z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.9e+219) || !(t <= 1e+114)) {
tmp = 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 <= (-1.9d+219)) .or. (.not. (t <= 1d+114))) then
tmp = 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 <= -1.9e+219) || !(t <= 1e+114)) {
tmp = t * (-y / a);
} else {
tmp = x + ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.9e+219) or not (t <= 1e+114): tmp = t * (-y / a) else: tmp = x + ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.9e+219) || !(t <= 1e+114)) tmp = Float64(t * Float64(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 <= -1.9e+219) || ~((t <= 1e+114))) tmp = t * (-y / a); else tmp = x + ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.9e+219], N[Not[LessEqual[t, 1e+114]], $MachinePrecision]], N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+219} \lor \neg \left(t \leq 10^{+114}\right):\\
\;\;\;\;t \cdot \frac{-y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if t < -1.89999999999999998e219 or 1e114 < t Initial program 81.7%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in y around 0 81.7%
associate-*l/96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in z around 0 79.8%
associate-*r/92.7%
neg-mul-192.7%
distribute-lft-neg-in92.7%
cancel-sign-sub-inv92.7%
Simplified92.7%
*-commutative92.7%
add-sqr-sqrt47.5%
sqrt-unprod44.2%
sqr-neg44.2%
sqrt-unprod6.1%
add-sqr-sqrt14.5%
associate-/r/14.5%
add-sqr-sqrt6.0%
sqrt-unprod44.0%
sqr-neg44.0%
sqrt-unprod46.9%
add-sqr-sqrt92.2%
Applied egg-rr92.2%
Taylor expanded in x around 0 64.6%
mul-1-neg64.6%
associate-*r/79.0%
*-commutative79.0%
distribute-rgt-neg-out79.0%
Simplified79.0%
if -1.89999999999999998e219 < t < 1e114Initial program 93.9%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in z around inf 78.1%
Final simplification78.3%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.2e+43) (not (<= t 1.3e+90))) (- x (* t (/ y a))) (+ x (* z (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.2e+43) || !(t <= 1.3e+90)) {
tmp = x - (t * (y / a));
} else {
tmp = x + (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 ((t <= (-1.2d+43)) .or. (.not. (t <= 1.3d+90))) then
tmp = x - (t * (y / a))
else
tmp = x + (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 ((t <= -1.2e+43) || !(t <= 1.3e+90)) {
tmp = x - (t * (y / a));
} else {
tmp = x + (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.2e+43) or not (t <= 1.3e+90): tmp = x - (t * (y / a)) else: tmp = x + (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.2e+43) || !(t <= 1.3e+90)) tmp = Float64(x - Float64(t * Float64(y / a))); else tmp = Float64(x + Float64(z * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((t <= -1.2e+43) || ~((t <= 1.3e+90))) tmp = x - (t * (y / a)); else tmp = x + (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.2e+43], N[Not[LessEqual[t, 1.3e+90]], $MachinePrecision]], N[(x - N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+43} \lor \neg \left(t \leq 1.3 \cdot 10^{+90}\right):\\
\;\;\;\;x - t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -1.20000000000000012e43 or 1.2999999999999999e90 < t Initial program 83.4%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in y around 0 83.4%
associate-*l/96.1%
*-commutative96.1%
Simplified96.1%
Taylor expanded in z around 0 77.9%
associate-*r/88.5%
neg-mul-188.5%
distribute-lft-neg-in88.5%
cancel-sign-sub-inv88.5%
Simplified88.5%
if -1.20000000000000012e43 < t < 1.2999999999999999e90Initial program 95.8%
associate-/l*94.9%
Simplified94.9%
Taylor expanded in t around 0 83.3%
+-commutative83.3%
associate-/l*83.0%
Simplified83.0%
clear-num82.8%
un-div-inv83.1%
Applied egg-rr83.1%
associate-/r/84.5%
Applied egg-rr84.5%
Final simplification85.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1.45e+75) (not (<= y 11.8))) (* (/ t a) (- y)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.45e+75) || !(y <= 11.8)) {
tmp = (t / a) * -y;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1.45d+75)) .or. (.not. (y <= 11.8d0))) then
tmp = (t / a) * -y
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.45e+75) || !(y <= 11.8)) {
tmp = (t / a) * -y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.45e+75) or not (y <= 11.8): tmp = (t / a) * -y else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.45e+75) || !(y <= 11.8)) tmp = Float64(Float64(t / a) * Float64(-y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1.45e+75) || ~((y <= 11.8))) tmp = (t / a) * -y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.45e+75], N[Not[LessEqual[y, 11.8]], $MachinePrecision]], N[(N[(t / a), $MachinePrecision] * (-y)), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.45 \cdot 10^{+75} \lor \neg \left(y \leq 11.8\right):\\
\;\;\;\;\frac{t}{a} \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.4499999999999999e75 or 11.800000000000001 < y Initial program 84.6%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in y around 0 84.6%
associate-*l/94.0%
*-commutative94.0%
Simplified94.0%
Taylor expanded in z around 0 54.0%
associate-*r/60.4%
neg-mul-160.4%
distribute-lft-neg-in60.4%
cancel-sign-sub-inv60.4%
Simplified60.4%
*-commutative60.4%
add-sqr-sqrt32.3%
sqrt-unprod38.5%
sqr-neg38.5%
sqrt-unprod9.9%
add-sqr-sqrt20.1%
associate-/r/17.2%
add-sqr-sqrt8.5%
sqrt-unprod38.5%
sqr-neg38.5%
sqrt-unprod31.5%
add-sqr-sqrt61.2%
Applied egg-rr61.2%
Taylor expanded in x around 0 40.8%
mul-1-neg40.8%
associate-*l/48.0%
distribute-lft-neg-in48.0%
*-commutative48.0%
distribute-neg-frac248.0%
Simplified48.0%
if -1.4499999999999999e75 < y < 11.800000000000001Initial program 98.2%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in x around inf 54.6%
Final simplification51.3%
(FPCore (x y z t a) :precision binary64 (if (<= y -2.65e+76) (* t (/ (- y) a)) (if (<= y 9.0) x (* (/ t a) (- y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -2.65e+76) {
tmp = t * (-y / a);
} else if (y <= 9.0) {
tmp = x;
} else {
tmp = (t / 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 (y <= (-2.65d+76)) then
tmp = t * (-y / a)
else if (y <= 9.0d0) then
tmp = x
else
tmp = (t / 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 (y <= -2.65e+76) {
tmp = t * (-y / a);
} else if (y <= 9.0) {
tmp = x;
} else {
tmp = (t / a) * -y;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -2.65e+76: tmp = t * (-y / a) elif y <= 9.0: tmp = x else: tmp = (t / a) * -y return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -2.65e+76) tmp = Float64(t * Float64(Float64(-y) / a)); elseif (y <= 9.0) tmp = x; else tmp = Float64(Float64(t / a) * Float64(-y)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -2.65e+76) tmp = t * (-y / a); elseif (y <= 9.0) tmp = x; else tmp = (t / a) * -y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -2.65e+76], N[(t * N[((-y) / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.0], x, N[(N[(t / a), $MachinePrecision] * (-y)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.65 \cdot 10^{+76}:\\
\;\;\;\;t \cdot \frac{-y}{a}\\
\mathbf{elif}\;y \leq 9:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{a} \cdot \left(-y\right)\\
\end{array}
\end{array}
if y < -2.65000000000000008e76Initial program 83.6%
associate-/l*96.3%
Simplified96.3%
Taylor expanded in y around 0 83.6%
associate-*l/90.0%
*-commutative90.0%
Simplified90.0%
Taylor expanded in z around 0 51.7%
associate-*r/59.6%
neg-mul-159.6%
distribute-lft-neg-in59.6%
cancel-sign-sub-inv59.6%
Simplified59.6%
*-commutative59.6%
add-sqr-sqrt36.1%
sqrt-unprod35.3%
sqr-neg35.3%
sqrt-unprod5.8%
add-sqr-sqrt13.7%
associate-/r/12.1%
add-sqr-sqrt5.9%
sqrt-unprod36.9%
sqr-neg36.9%
sqrt-unprod32.7%
add-sqr-sqrt59.6%
Applied egg-rr59.6%
Taylor expanded in x around 0 43.2%
mul-1-neg43.2%
associate-*r/51.2%
*-commutative51.2%
distribute-rgt-neg-out51.2%
Simplified51.2%
if -2.65000000000000008e76 < y < 9Initial program 98.2%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in x around inf 54.6%
if 9 < y Initial program 85.4%
associate-/l*99.0%
Simplified99.0%
Taylor expanded in y around 0 85.4%
associate-*l/97.3%
*-commutative97.3%
Simplified97.3%
Taylor expanded in z around 0 55.8%
associate-*r/61.1%
neg-mul-161.1%
distribute-lft-neg-in61.1%
cancel-sign-sub-inv61.1%
Simplified61.1%
*-commutative61.1%
add-sqr-sqrt29.2%
sqrt-unprod41.1%
sqr-neg41.1%
sqrt-unprod13.3%
add-sqr-sqrt25.3%
associate-/r/21.2%
add-sqr-sqrt10.6%
sqrt-unprod39.8%
sqr-neg39.8%
sqrt-unprod30.5%
add-sqr-sqrt62.5%
Applied egg-rr62.5%
Taylor expanded in x around 0 38.9%
mul-1-neg38.9%
associate-*l/45.6%
distribute-lft-neg-in45.6%
*-commutative45.6%
distribute-neg-frac245.6%
Simplified45.6%
Final simplification51.4%
(FPCore (x y z t a) :precision binary64 (if (<= y -5e+159) (+ x (* y (/ (- z t) a))) (+ x (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -5e+159) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = x + ((z - 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 <= (-5d+159)) then
tmp = x + (y * ((z - t) / a))
else
tmp = x + ((z - 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 <= -5e+159) {
tmp = x + (y * ((z - t) / a));
} else {
tmp = x + ((z - t) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -5e+159: tmp = x + (y * ((z - t) / a)) else: tmp = x + ((z - t) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -5e+159) tmp = Float64(x + Float64(y * Float64(Float64(z - t) / a))); else tmp = Float64(x + Float64(Float64(z - t) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -5e+159) tmp = x + (y * ((z - t) / a)); else tmp = x + ((z - t) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5e+159], N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5 \cdot 10^{+159}:\\
\;\;\;\;x + y \cdot \frac{z - t}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -5.00000000000000003e159Initial program 80.5%
associate-/l*97.1%
Simplified97.1%
if -5.00000000000000003e159 < y Initial program 93.4%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in y around 0 93.4%
associate-*l/97.1%
*-commutative97.1%
Simplified97.1%
Final simplification97.1%
(FPCore (x y z t a) :precision binary64 (if (<= y -3.2e+159) (+ x (/ y (/ a (- z t)))) (+ x (* (- z t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -3.2e+159) {
tmp = x + (y / (a / (z - t)));
} else {
tmp = x + ((z - 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 <= (-3.2d+159)) then
tmp = x + (y / (a / (z - t)))
else
tmp = x + ((z - 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 <= -3.2e+159) {
tmp = x + (y / (a / (z - t)));
} else {
tmp = x + ((z - t) * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -3.2e+159: tmp = x + (y / (a / (z - t))) else: tmp = x + ((z - t) * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -3.2e+159) tmp = Float64(x + Float64(y / Float64(a / Float64(z - t)))); else tmp = Float64(x + Float64(Float64(z - t) * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -3.2e+159) tmp = x + (y / (a / (z - t))); else tmp = x + ((z - t) * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -3.2e+159], N[(x + N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(z - t), $MachinePrecision] * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+159}:\\
\;\;\;\;x + \frac{y}{\frac{a}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - t\right) \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -3.19999999999999985e159Initial program 80.5%
associate-/l*97.1%
Simplified97.1%
clear-num97.0%
un-div-inv97.3%
Applied egg-rr97.3%
if -3.19999999999999985e159 < y Initial program 93.4%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in y around 0 93.4%
associate-*l/97.1%
*-commutative97.1%
Simplified97.1%
Final simplification97.1%
(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(y * Float64(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[(y * N[(N[(z - t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{z - t}{a}
\end{array}
Initial program 91.5%
associate-/l*94.5%
Simplified94.5%
Final simplification94.5%
(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 91.5%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in x around inf 34.8%
Final simplification34.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 2024067
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, E"
: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)))