
(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 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (- x (/ (* y (- z t)) a)))
double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x - ((y * (z - t)) / a)
end function
public static double code(double x, double y, double z, double t, double a) {
return x - ((y * (z - t)) / a);
}
def code(x, y, z, t, a): return x - ((y * (z - t)) / a)
function code(x, y, z, t, a) return Float64(x - Float64(Float64(y * Float64(z - t)) / a)) end
function tmp = code(x, y, z, t, a) tmp = x - ((y * (z - t)) / a); end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \frac{y \cdot \left(z - t\right)}{a}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))))
(if (<= t_1 -5e+224)
(+ x (/ y (/ a (- t z))))
(if (<= t_1 2e+253) (- x (/ 1.0 (/ a t_1))) (* y (/ (- t z) a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -5e+224) {
tmp = x + (y / (a / (t - z)));
} else if (t_1 <= 2e+253) {
tmp = x - (1.0 / (a / t_1));
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z - t)
if (t_1 <= (-5d+224)) then
tmp = x + (y / (a / (t - z)))
else if (t_1 <= 2d+253) then
tmp = x - (1.0d0 / (a / t_1))
else
tmp = y * ((t - z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -5e+224) {
tmp = x + (y / (a / (t - z)));
} else if (t_1 <= 2e+253) {
tmp = x - (1.0 / (a / t_1));
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if t_1 <= -5e+224: tmp = x + (y / (a / (t - z))) elif t_1 <= 2e+253: tmp = x - (1.0 / (a / t_1)) else: tmp = y * ((t - z) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if (t_1 <= -5e+224) tmp = Float64(x + Float64(y / Float64(a / Float64(t - z)))); elseif (t_1 <= 2e+253) tmp = Float64(x - Float64(1.0 / Float64(a / t_1))); else tmp = Float64(y * Float64(Float64(t - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if (t_1 <= -5e+224) tmp = x + (y / (a / (t - z))); elseif (t_1 <= 2e+253) tmp = x - (1.0 / (a / t_1)); else tmp = y * ((t - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+224], N[(x + N[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+253], N[(x - N[(1.0 / N[(a / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+224}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - z}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+253}:\\
\;\;\;\;x - \frac{1}{\frac{a}{t\_1}}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -4.99999999999999964e224Initial program 81.9%
associate-/l*99.7%
Simplified99.7%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -4.99999999999999964e224 < (*.f64 y (-.f64 z t)) < 1.9999999999999999e253Initial program 99.8%
associate-/l*90.6%
Simplified90.6%
associate-*r/99.8%
clear-num99.8%
Applied egg-rr99.8%
if 1.9999999999999999e253 < (*.f64 y (-.f64 z t)) Initial program 80.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around 0 80.3%
associate-*r/80.3%
neg-mul-180.3%
distribute-rgt-neg-in80.3%
sub-neg80.3%
distribute-neg-in80.3%
remove-double-neg80.3%
+-commutative80.3%
sub-neg80.3%
associate-*r/100.0%
Simplified100.0%
Final simplification99.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (- z t))))
(if (<= t_1 -5e+224)
(+ x (/ y (/ a (- t z))))
(if (<= t_1 2e+253) (+ x (/ (* y (- t z)) a)) (* y (/ (- t z) a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -5e+224) {
tmp = x + (y / (a / (t - z)));
} else if (t_1 <= 2e+253) {
tmp = x + ((y * (t - z)) / a);
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = y * (z - t)
if (t_1 <= (-5d+224)) then
tmp = x + (y / (a / (t - z)))
else if (t_1 <= 2d+253) then
tmp = x + ((y * (t - z)) / a)
else
tmp = y * ((t - z) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z - t);
double tmp;
if (t_1 <= -5e+224) {
tmp = x + (y / (a / (t - z)));
} else if (t_1 <= 2e+253) {
tmp = x + ((y * (t - z)) / a);
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z - t) tmp = 0 if t_1 <= -5e+224: tmp = x + (y / (a / (t - z))) elif t_1 <= 2e+253: tmp = x + ((y * (t - z)) / a) else: tmp = y * ((t - z) / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z - t)) tmp = 0.0 if (t_1 <= -5e+224) tmp = Float64(x + Float64(y / Float64(a / Float64(t - z)))); elseif (t_1 <= 2e+253) tmp = Float64(x + Float64(Float64(y * Float64(t - z)) / a)); else tmp = Float64(y * Float64(Float64(t - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z - t); tmp = 0.0; if (t_1 <= -5e+224) tmp = x + (y / (a / (t - z))); elseif (t_1 <= 2e+253) tmp = x + ((y * (t - z)) / a); else tmp = y * ((t - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -5e+224], N[(x + N[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+253], N[(x + N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(z - t\right)\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+224}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - z}}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+253}:\\
\;\;\;\;x + \frac{y \cdot \left(t - z\right)}{a}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if (*.f64 y (-.f64 z t)) < -4.99999999999999964e224Initial program 81.9%
associate-/l*99.7%
Simplified99.7%
clear-num99.8%
un-div-inv99.9%
Applied egg-rr99.9%
if -4.99999999999999964e224 < (*.f64 y (-.f64 z t)) < 1.9999999999999999e253Initial program 99.8%
if 1.9999999999999999e253 < (*.f64 y (-.f64 z t)) Initial program 80.3%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in x around 0 80.3%
associate-*r/80.3%
neg-mul-180.3%
distribute-rgt-neg-in80.3%
sub-neg80.3%
distribute-neg-in80.3%
remove-double-neg80.3%
+-commutative80.3%
sub-neg80.3%
associate-*r/100.0%
Simplified100.0%
Final simplification99.8%
(FPCore (x y z t a)
:precision binary64
(if (<= t -9e-20)
(* t (* y (/ 1.0 a)))
(if (<= t -2.15e-60)
x
(if (<= t -1.3e-159)
(/ (* y (- z)) a)
(if (<= t 6e+118) x (* t (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -9e-20) {
tmp = t * (y * (1.0 / a));
} else if (t <= -2.15e-60) {
tmp = x;
} else if (t <= -1.3e-159) {
tmp = (y * -z) / a;
} else if (t <= 6e+118) {
tmp = x;
} else {
tmp = 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 (t <= (-9d-20)) then
tmp = t * (y * (1.0d0 / a))
else if (t <= (-2.15d-60)) then
tmp = x
else if (t <= (-1.3d-159)) then
tmp = (y * -z) / a
else if (t <= 6d+118) then
tmp = x
else
tmp = 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 (t <= -9e-20) {
tmp = t * (y * (1.0 / a));
} else if (t <= -2.15e-60) {
tmp = x;
} else if (t <= -1.3e-159) {
tmp = (y * -z) / a;
} else if (t <= 6e+118) {
tmp = x;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -9e-20: tmp = t * (y * (1.0 / a)) elif t <= -2.15e-60: tmp = x elif t <= -1.3e-159: tmp = (y * -z) / a elif t <= 6e+118: tmp = x else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -9e-20) tmp = Float64(t * Float64(y * Float64(1.0 / a))); elseif (t <= -2.15e-60) tmp = x; elseif (t <= -1.3e-159) tmp = Float64(Float64(y * Float64(-z)) / a); elseif (t <= 6e+118) tmp = x; else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -9e-20) tmp = t * (y * (1.0 / a)); elseif (t <= -2.15e-60) tmp = x; elseif (t <= -1.3e-159) tmp = (y * -z) / a; elseif (t <= 6e+118) tmp = x; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -9e-20], N[(t * N[(y * N[(1.0 / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.15e-60], x, If[LessEqual[t, -1.3e-159], N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 6e+118], x, N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{-20}:\\
\;\;\;\;t \cdot \left(y \cdot \frac{1}{a}\right)\\
\mathbf{elif}\;t \leq -2.15 \cdot 10^{-60}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -1.3 \cdot 10^{-159}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{+118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if t < -9.0000000000000003e-20Initial program 89.5%
associate-/l*91.8%
Simplified91.8%
Taylor expanded in t around inf 57.9%
associate-/l*60.0%
Simplified60.0%
*-un-lft-identity60.0%
associate-*l/60.1%
Applied egg-rr60.1%
if -9.0000000000000003e-20 < t < -2.15e-60 or -1.2999999999999999e-159 < t < 6e118Initial program 95.8%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in x around inf 58.5%
if -2.15e-60 < t < -1.2999999999999999e-159Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 66.3%
mul-1-neg66.3%
associate-/l*66.1%
distribute-rgt-neg-in66.1%
distribute-neg-frac266.1%
Simplified66.1%
*-commutative66.1%
distribute-frac-neg266.1%
distribute-frac-neg66.1%
associate-*l/66.3%
Applied egg-rr66.3%
if 6e118 < t Initial program 88.5%
associate-/l*88.3%
Simplified88.3%
Taylor expanded in t around inf 65.5%
associate-/l*69.4%
Simplified69.4%
Final simplification60.7%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= t -2.05e-19)
t_1
(if (<= t -1e-60)
x
(if (<= t -1.12e-159) (/ (* y (- z)) a) (if (<= t 7.4e+118) x t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (t <= -2.05e-19) {
tmp = t_1;
} else if (t <= -1e-60) {
tmp = x;
} else if (t <= -1.12e-159) {
tmp = (y * -z) / a;
} else if (t <= 7.4e+118) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * (y / a)
if (t <= (-2.05d-19)) then
tmp = t_1
else if (t <= (-1d-60)) then
tmp = x
else if (t <= (-1.12d-159)) then
tmp = (y * -z) / a
else if (t <= 7.4d+118) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (t <= -2.05e-19) {
tmp = t_1;
} else if (t <= -1e-60) {
tmp = x;
} else if (t <= -1.12e-159) {
tmp = (y * -z) / a;
} else if (t <= 7.4e+118) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if t <= -2.05e-19: tmp = t_1 elif t <= -1e-60: tmp = x elif t <= -1.12e-159: tmp = (y * -z) / a elif t <= 7.4e+118: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (t <= -2.05e-19) tmp = t_1; elseif (t <= -1e-60) tmp = x; elseif (t <= -1.12e-159) tmp = Float64(Float64(y * Float64(-z)) / a); elseif (t <= 7.4e+118) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (t <= -2.05e-19) tmp = t_1; elseif (t <= -1e-60) tmp = x; elseif (t <= -1.12e-159) tmp = (y * -z) / a; elseif (t <= 7.4e+118) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.05e-19], t$95$1, If[LessEqual[t, -1e-60], x, If[LessEqual[t, -1.12e-159], N[(N[(y * (-z)), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 7.4e+118], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -2.05 \cdot 10^{-19}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-60}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-159}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{a}\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{+118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.04999999999999993e-19 or 7.39999999999999973e118 < t Initial program 89.2%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in t around inf 59.8%
associate-/l*62.3%
Simplified62.3%
if -2.04999999999999993e-19 < t < -9.9999999999999997e-61 or -1.12000000000000006e-159 < t < 7.39999999999999973e118Initial program 95.8%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in x around inf 58.5%
if -9.9999999999999997e-61 < t < -1.12000000000000006e-159Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 66.3%
mul-1-neg66.3%
associate-/l*66.1%
distribute-rgt-neg-in66.1%
distribute-neg-frac266.1%
Simplified66.1%
*-commutative66.1%
distribute-frac-neg266.1%
distribute-frac-neg66.1%
associate-*l/66.3%
Applied egg-rr66.3%
Final simplification60.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* t (/ y a))))
(if (<= t -1.2e-28)
t_1
(if (<= t -1.05e-58)
x
(if (<= t -9.5e-160) (* y (/ z (- a))) (if (<= t 5.8e+118) x t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (t <= -1.2e-28) {
tmp = t_1;
} else if (t <= -1.05e-58) {
tmp = x;
} else if (t <= -9.5e-160) {
tmp = y * (z / -a);
} else if (t <= 5.8e+118) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = t * (y / a)
if (t <= (-1.2d-28)) then
tmp = t_1
else if (t <= (-1.05d-58)) then
tmp = x
else if (t <= (-9.5d-160)) then
tmp = y * (z / -a)
else if (t <= 5.8d+118) then
tmp = x
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t * (y / a);
double tmp;
if (t <= -1.2e-28) {
tmp = t_1;
} else if (t <= -1.05e-58) {
tmp = x;
} else if (t <= -9.5e-160) {
tmp = y * (z / -a);
} else if (t <= 5.8e+118) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t * (y / a) tmp = 0 if t <= -1.2e-28: tmp = t_1 elif t <= -1.05e-58: tmp = x elif t <= -9.5e-160: tmp = y * (z / -a) elif t <= 5.8e+118: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(t * Float64(y / a)) tmp = 0.0 if (t <= -1.2e-28) tmp = t_1; elseif (t <= -1.05e-58) tmp = x; elseif (t <= -9.5e-160) tmp = Float64(y * Float64(z / Float64(-a))); elseif (t <= 5.8e+118) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t * (y / a); tmp = 0.0; if (t <= -1.2e-28) tmp = t_1; elseif (t <= -1.05e-58) tmp = x; elseif (t <= -9.5e-160) tmp = y * (z / -a); elseif (t <= 5.8e+118) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.2e-28], t$95$1, If[LessEqual[t, -1.05e-58], x, If[LessEqual[t, -9.5e-160], N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.8e+118], x, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.05 \cdot 10^{-58}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -9.5 \cdot 10^{-160}:\\
\;\;\;\;y \cdot \frac{z}{-a}\\
\mathbf{elif}\;t \leq 5.8 \cdot 10^{+118}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.2000000000000001e-28 or 5.80000000000000032e118 < t Initial program 89.2%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in t around inf 59.8%
associate-/l*62.3%
Simplified62.3%
if -1.2000000000000001e-28 < t < -1.04999999999999994e-58 or -9.5000000000000002e-160 < t < 5.80000000000000032e118Initial program 95.8%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in x around inf 58.5%
if -1.04999999999999994e-58 < t < -9.5000000000000002e-160Initial program 99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around inf 66.3%
mul-1-neg66.3%
associate-/l*66.1%
distribute-rgt-neg-in66.1%
distribute-neg-frac266.1%
Simplified66.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -3.2e+29) (not (<= z 7.5e-69))) (- x (* z (/ y a))) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.2e+29) || !(z <= 7.5e-69)) {
tmp = x - (z * (y / a));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-3.2d+29)) .or. (.not. (z <= 7.5d-69))) then
tmp = x - (z * (y / a))
else
tmp = x + (y * (t / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -3.2e+29) || !(z <= 7.5e-69)) {
tmp = x - (z * (y / a));
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -3.2e+29) or not (z <= 7.5e-69): tmp = x - (z * (y / a)) else: tmp = x + (y * (t / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -3.2e+29) || !(z <= 7.5e-69)) tmp = Float64(x - Float64(z * Float64(y / a))); 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 <= -3.2e+29) || ~((z <= 7.5e-69))) tmp = x - (z * (y / a)); else tmp = x + (y * (t / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.2e+29], N[Not[LessEqual[z, 7.5e-69]], $MachinePrecision]], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+29} \lor \neg \left(z \leq 7.5 \cdot 10^{-69}\right):\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -3.19999999999999987e29 or 7.5e-69 < z Initial program 91.4%
associate-/l*91.4%
Simplified91.4%
Taylor expanded in y around 0 91.4%
associate-*l/95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in z around inf 74.0%
associate-*l/78.4%
*-commutative78.4%
Simplified78.4%
if -3.19999999999999987e29 < z < 7.5e-69Initial program 96.1%
sub-neg96.1%
distribute-frac-neg296.1%
+-commutative96.1%
associate-/l*96.1%
fma-define96.2%
distribute-frac-neg296.2%
distribute-neg-frac96.2%
sub-neg96.2%
distribute-neg-in96.2%
remove-double-neg96.2%
+-commutative96.2%
sub-neg96.2%
Simplified96.2%
Taylor expanded in z around 0 92.3%
associate-*l/92.4%
Applied egg-rr92.4%
Final simplification85.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -9e+119) (not (<= y 3.5e+51))) (* y (/ (- t z) a)) (+ x (/ (* y t) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9e+119) || !(y <= 3.5e+51)) {
tmp = y * ((t - z) / a);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-9d+119)) .or. (.not. (y <= 3.5d+51))) then
tmp = y * ((t - z) / a)
else
tmp = x + ((y * t) / a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -9e+119) || !(y <= 3.5e+51)) {
tmp = y * ((t - z) / a);
} else {
tmp = x + ((y * t) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -9e+119) or not (y <= 3.5e+51): tmp = y * ((t - z) / a) else: tmp = x + ((y * t) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -9e+119) || !(y <= 3.5e+51)) tmp = Float64(y * Float64(Float64(t - z) / a)); else tmp = Float64(x + Float64(Float64(y * t) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -9e+119) || ~((y <= 3.5e+51))) tmp = y * ((t - z) / a); else tmp = x + ((y * t) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -9e+119], N[Not[LessEqual[y, 3.5e+51]], $MachinePrecision]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+119} \lor \neg \left(y \leq 3.5 \cdot 10^{+51}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\end{array}
\end{array}
if y < -9.00000000000000039e119 or 3.5e51 < y Initial program 87.7%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in x around 0 74.9%
associate-*r/74.9%
neg-mul-174.9%
distribute-rgt-neg-in74.9%
sub-neg74.9%
distribute-neg-in74.9%
remove-double-neg74.9%
+-commutative74.9%
sub-neg74.9%
associate-*r/84.5%
Simplified84.5%
if -9.00000000000000039e119 < y < 3.5e51Initial program 98.0%
sub-neg98.0%
distribute-frac-neg298.0%
+-commutative98.0%
associate-/l*90.4%
fma-define90.4%
distribute-frac-neg290.4%
distribute-neg-frac90.4%
sub-neg90.4%
distribute-neg-in90.4%
remove-double-neg90.4%
+-commutative90.4%
sub-neg90.4%
Simplified90.4%
Taylor expanded in z around 0 83.7%
Final simplification84.1%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.85e+37) (not (<= z 1.1e+38))) (* (/ y a) (- t z)) (+ x (* y (/ t a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.85e+37) || !(z <= 1.1e+38)) {
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 <= (-1.85d+37)) .or. (.not. (z <= 1.1d+38))) 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 <= -1.85e+37) || !(z <= 1.1e+38)) {
tmp = (y / a) * (t - z);
} else {
tmp = x + (y * (t / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.85e+37) or not (z <= 1.1e+38): 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 <= -1.85e+37) || !(z <= 1.1e+38)) 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 <= -1.85e+37) || ~((z <= 1.1e+38))) 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, -1.85e+37], N[Not[LessEqual[z, 1.1e+38]], $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 -1.85 \cdot 10^{+37} \lor \neg \left(z \leq 1.1 \cdot 10^{+38}\right):\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\end{array}
\end{array}
if z < -1.85e37 or 1.10000000000000003e38 < z Initial program 89.8%
associate-/l*89.8%
Simplified89.8%
Taylor expanded in y around 0 89.8%
associate-*l/95.0%
*-commutative95.0%
Simplified95.0%
Taylor expanded in x around 0 67.5%
mul-1-neg67.5%
*-commutative67.5%
associate-*r/70.9%
*-commutative70.9%
distribute-rgt-neg-in70.9%
neg-sub070.9%
associate--r-70.9%
neg-sub070.9%
+-commutative70.9%
sub-neg70.9%
Simplified70.9%
if -1.85e37 < z < 1.10000000000000003e38Initial program 96.6%
sub-neg96.6%
distribute-frac-neg296.6%
+-commutative96.6%
associate-/l*96.7%
fma-define96.7%
distribute-frac-neg296.7%
distribute-neg-frac96.7%
sub-neg96.7%
distribute-neg-in96.7%
remove-double-neg96.7%
+-commutative96.7%
sub-neg96.7%
Simplified96.7%
Taylor expanded in z around 0 89.4%
associate-*l/89.5%
Applied egg-rr89.5%
Final simplification81.4%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -1e-52) (not (<= y 2.15e-44))) (* y (/ (- t z) a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1e-52) || !(y <= 2.15e-44)) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((y <= (-1d-52)) .or. (.not. (y <= 2.15d-44))) then
tmp = y * ((t - z) / a)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1e-52) || !(y <= 2.15e-44)) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1e-52) or not (y <= 2.15e-44): tmp = y * ((t - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1e-52) || !(y <= 2.15e-44)) tmp = Float64(y * Float64(Float64(t - z) / a)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -1e-52) || ~((y <= 2.15e-44))) tmp = y * ((t - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1e-52], N[Not[LessEqual[y, 2.15e-44]], $MachinePrecision]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-52} \lor \neg \left(y \leq 2.15 \cdot 10^{-44}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1e-52 or 2.15000000000000007e-44 < y Initial program 89.7%
associate-/l*98.7%
Simplified98.7%
Taylor expanded in x around 0 69.1%
associate-*r/69.1%
neg-mul-169.1%
distribute-rgt-neg-in69.1%
sub-neg69.1%
distribute-neg-in69.1%
remove-double-neg69.1%
+-commutative69.1%
sub-neg69.1%
associate-*r/76.1%
Simplified76.1%
if -1e-52 < y < 2.15000000000000007e-44Initial program 99.8%
associate-/l*85.8%
Simplified85.8%
Taylor expanded in x around inf 69.2%
Final simplification73.4%
(FPCore (x y z t a) :precision binary64 (if (<= z -9e+120) (- x (/ z (/ a y))) (if (<= z 2.1e+20) (+ x (/ t (/ a y))) (- x (* z (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -9e+120) {
tmp = x - (z / (a / y));
} else if (z <= 2.1e+20) {
tmp = x + (t / (a / y));
} 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 (z <= (-9d+120)) then
tmp = x - (z / (a / y))
else if (z <= 2.1d+20) then
tmp = x + (t / (a / y))
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 (z <= -9e+120) {
tmp = x - (z / (a / y));
} else if (z <= 2.1e+20) {
tmp = x + (t / (a / y));
} else {
tmp = x - (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -9e+120: tmp = x - (z / (a / y)) elif z <= 2.1e+20: tmp = x + (t / (a / y)) else: tmp = x - (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -9e+120) tmp = Float64(x - Float64(z / Float64(a / y))); elseif (z <= 2.1e+20) tmp = Float64(x + Float64(t / Float64(a / y))); 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 (z <= -9e+120) tmp = x - (z / (a / y)); elseif (z <= 2.1e+20) tmp = x + (t / (a / y)); else tmp = x - (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9e+120], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e+20], N[(x + N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+120}:\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{+20}:\\
\;\;\;\;x + \frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -8.99999999999999953e120Initial program 86.7%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in y around 0 86.7%
associate-*l/94.5%
*-commutative94.5%
Simplified94.5%
clear-num94.4%
un-div-inv94.5%
Applied egg-rr94.5%
Taylor expanded in z around inf 81.0%
if -8.99999999999999953e120 < z < 2.1e20Initial program 95.7%
associate-/l*95.8%
Simplified95.8%
Taylor expanded in y around 0 95.7%
associate-*l/96.3%
*-commutative96.3%
Simplified96.3%
clear-num96.3%
un-div-inv96.6%
Applied egg-rr96.6%
Taylor expanded in z around 0 89.3%
neg-mul-189.3%
Simplified89.3%
if 2.1e20 < z Initial program 92.5%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in y around 0 92.5%
associate-*l/94.4%
*-commutative94.4%
Simplified94.4%
Taylor expanded in z around inf 77.2%
associate-*l/80.6%
*-commutative80.6%
Simplified80.6%
Final simplification86.0%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.7e+25) (- x (/ z (/ a y))) (if (<= z 1.3e+20) (+ x (* t (/ y a))) (- x (* z (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.7e+25) {
tmp = x - (z / (a / y));
} else if (z <= 1.3e+20) {
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 (z <= (-1.7d+25)) then
tmp = x - (z / (a / y))
else if (z <= 1.3d+20) 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 (z <= -1.7e+25) {
tmp = x - (z / (a / y));
} else if (z <= 1.3e+20) {
tmp = x + (t * (y / a));
} else {
tmp = x - (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.7e+25: tmp = x - (z / (a / y)) elif z <= 1.3e+20: tmp = x + (t * (y / a)) else: tmp = x - (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.7e+25) tmp = Float64(x - Float64(z / Float64(a / y))); elseif (z <= 1.3e+20) 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 (z <= -1.7e+25) tmp = x - (z / (a / y)); elseif (z <= 1.3e+20) tmp = x + (t * (y / a)); else tmp = x - (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.7e+25], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.3e+20], 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}\;z \leq -1.7 \cdot 10^{+25}:\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+20}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -1.69999999999999992e25Initial program 87.6%
associate-/l*89.3%
Simplified89.3%
Taylor expanded in y around 0 87.6%
associate-*l/96.3%
*-commutative96.3%
Simplified96.3%
clear-num96.3%
un-div-inv96.3%
Applied egg-rr96.3%
Taylor expanded in z around inf 76.7%
if -1.69999999999999992e25 < z < 1.3e20Initial program 96.5%
associate-/l*96.6%
Simplified96.6%
Taylor expanded in y around 0 96.5%
associate-*l/95.9%
*-commutative95.9%
Simplified95.9%
Taylor expanded in z around 0 89.8%
mul-1-neg89.8%
associate-/l*91.8%
distribute-lft-neg-out91.8%
*-commutative91.8%
Simplified91.8%
if 1.3e20 < z Initial program 92.5%
associate-/l*90.9%
Simplified90.9%
Taylor expanded in y around 0 92.5%
associate-*l/94.4%
*-commutative94.4%
Simplified94.4%
Taylor expanded in z around inf 77.2%
associate-*l/80.6%
*-commutative80.6%
Simplified80.6%
Final simplification85.9%
(FPCore (x y z t a) :precision binary64 (if (<= z -7e+29) (- x (/ z (/ a y))) (if (<= z 2.1e-68) (+ x (* y (/ t a))) (- x (* z (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -7e+29) {
tmp = x - (z / (a / y));
} else if (z <= 2.1e-68) {
tmp = x + (y * (t / 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 (z <= (-7d+29)) then
tmp = x - (z / (a / y))
else if (z <= 2.1d-68) then
tmp = x + (y * (t / 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 (z <= -7e+29) {
tmp = x - (z / (a / y));
} else if (z <= 2.1e-68) {
tmp = x + (y * (t / a));
} else {
tmp = x - (z * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -7e+29: tmp = x - (z / (a / y)) elif z <= 2.1e-68: tmp = x + (y * (t / a)) else: tmp = x - (z * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -7e+29) tmp = Float64(x - Float64(z / Float64(a / y))); elseif (z <= 2.1e-68) tmp = Float64(x + Float64(y * Float64(t / 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 (z <= -7e+29) tmp = x - (z / (a / y)); elseif (z <= 2.1e-68) tmp = x + (y * (t / a)); else tmp = x - (z * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -7e+29], N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.1e-68], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+29}:\\
\;\;\;\;x - \frac{z}{\frac{a}{y}}\\
\mathbf{elif}\;z \leq 2.1 \cdot 10^{-68}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -6.99999999999999958e29Initial program 87.6%
associate-/l*89.3%
Simplified89.3%
Taylor expanded in y around 0 87.6%
associate-*l/96.3%
*-commutative96.3%
Simplified96.3%
clear-num96.3%
un-div-inv96.3%
Applied egg-rr96.3%
Taylor expanded in z around inf 76.7%
if -6.99999999999999958e29 < z < 2.10000000000000008e-68Initial program 96.1%
sub-neg96.1%
distribute-frac-neg296.1%
+-commutative96.1%
associate-/l*96.1%
fma-define96.2%
distribute-frac-neg296.2%
distribute-neg-frac96.2%
sub-neg96.2%
distribute-neg-in96.2%
remove-double-neg96.2%
+-commutative96.2%
sub-neg96.2%
Simplified96.2%
Taylor expanded in z around 0 92.3%
associate-*l/92.4%
Applied egg-rr92.4%
if 2.10000000000000008e-68 < z Initial program 94.0%
associate-/l*92.7%
Simplified92.7%
Taylor expanded in y around 0 94.0%
associate-*l/95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in z around inf 76.9%
associate-*l/79.6%
*-commutative79.6%
Simplified79.6%
Final simplification85.1%
(FPCore (x y z t a) :precision binary64 (if (<= y -9500000000000.0) (/ t (/ a y)) (if (<= y 2e+48) x (* (/ y a) (- z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9500000000000.0) {
tmp = t / (a / y);
} else if (y <= 2e+48) {
tmp = x;
} else {
tmp = (y / a) * -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 (y <= (-9500000000000.0d0)) then
tmp = t / (a / y)
else if (y <= 2d+48) then
tmp = x
else
tmp = (y / a) * -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -9500000000000.0) {
tmp = t / (a / y);
} else if (y <= 2e+48) {
tmp = x;
} else {
tmp = (y / a) * -z;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -9500000000000.0: tmp = t / (a / y) elif y <= 2e+48: tmp = x else: tmp = (y / a) * -z return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -9500000000000.0) tmp = Float64(t / Float64(a / y)); elseif (y <= 2e+48) tmp = x; else tmp = Float64(Float64(y / a) * Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -9500000000000.0) tmp = t / (a / y); elseif (y <= 2e+48) tmp = x; else tmp = (y / a) * -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -9500000000000.0], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2e+48], x, N[(N[(y / a), $MachinePrecision] * (-z)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -9500000000000:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{+48}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(-z\right)\\
\end{array}
\end{array}
if y < -9.5e12Initial program 92.9%
associate-/l*97.3%
Simplified97.3%
Taylor expanded in t around inf 49.3%
associate-/l*50.8%
Simplified50.8%
clear-num50.8%
div-inv51.1%
Applied egg-rr51.1%
if -9.5e12 < y < 2.00000000000000009e48Initial program 98.4%
associate-/l*88.9%
Simplified88.9%
Taylor expanded in x around inf 62.0%
if 2.00000000000000009e48 < y Initial program 84.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 46.6%
mul-1-neg46.6%
associate-/l*53.7%
distribute-rgt-neg-in53.7%
distribute-neg-frac253.7%
Simplified53.7%
associate-*r/46.6%
distribute-frac-neg246.6%
*-commutative46.6%
add-sqr-sqrt29.2%
sqrt-unprod33.2%
sqr-neg33.2%
sqrt-unprod3.9%
add-sqr-sqrt6.4%
associate-*l/6.6%
div-inv6.6%
associate-*l*8.1%
add-sqr-sqrt5.6%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod29.2%
add-sqr-sqrt53.9%
*-commutative53.9%
div-inv53.9%
Applied egg-rr53.9%
Final simplification57.2%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -5e-21) (not (<= t 2e+120))) (* t (/ y a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -5e-21) || !(t <= 2e+120)) {
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 ((t <= (-5d-21)) .or. (.not. (t <= 2d+120))) 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 ((t <= -5e-21) || !(t <= 2e+120)) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -5e-21) or not (t <= 2e+120): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -5e-21) || !(t <= 2e+120)) 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 ((t <= -5e-21) || ~((t <= 2e+120))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5e-21], N[Not[LessEqual[t, 2e+120]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-21} \lor \neg \left(t \leq 2 \cdot 10^{+120}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -4.99999999999999973e-21 or 2e120 < t Initial program 89.2%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in t around inf 59.8%
associate-/l*62.3%
Simplified62.3%
if -4.99999999999999973e-21 < t < 2e120Initial program 96.4%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in x around inf 51.7%
Final simplification55.7%
(FPCore (x y z t a) :precision binary64 (if (<= t -2e-174) (+ x (/ y (/ a (- t z)))) (+ x (* (/ y a) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -2e-174) {
tmp = x + (y / (a / (t - z)));
} 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 <= (-2d-174)) then
tmp = x + (y / (a / (t - z)))
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 <= -2e-174) {
tmp = x + (y / (a / (t - z)));
} else {
tmp = x + ((y / a) * (t - z));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -2e-174: tmp = x + (y / (a / (t - z))) else: tmp = x + ((y / a) * (t - z)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -2e-174) tmp = Float64(x + Float64(y / Float64(a / Float64(t - z)))); else tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -2e-174) tmp = x + (y / (a / (t - z))); else tmp = x + ((y / a) * (t - z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -2e-174], N[(x + N[(y / N[(a / N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-174}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t - z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if t < -2e-174Initial program 92.5%
associate-/l*94.1%
Simplified94.1%
clear-num94.1%
un-div-inv97.8%
Applied egg-rr97.8%
if -2e-174 < t Initial program 94.4%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in y around 0 94.4%
associate-*l/97.5%
*-commutative97.5%
Simplified97.5%
Final simplification97.6%
(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.7%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in y around 0 93.7%
associate-*l/95.6%
*-commutative95.6%
Simplified95.6%
Final simplification95.6%
(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 93.7%
associate-/l*93.7%
Simplified93.7%
(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.7%
associate-/l*93.7%
Simplified93.7%
Taylor expanded in x around inf 41.4%
(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 2024186
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:alt
(! :herbie-platform default (if (< y -430450648655599/4000000000000000000000000) (- x (/ 1 (/ (/ a (- z t)) y))) (if (< y 2894426862792089/10000000000000000000000000000000000000000000000000000000000000000) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t)))))))
(- x (/ (* y (- z t)) a)))