
(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 (+ 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 92.1%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in y around 0 92.1%
associate-*l/97.0%
*-commutative97.0%
Simplified97.0%
Final simplification97.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= t -6.2e+137)
t_1
(if (<= t 3.3e-65)
(- x (/ (* z y) a))
(if (<= t 5.2e-21)
(+ x (/ y (/ a t)))
(if (<= t 1.8e+16) (- x (* y (/ z a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (t <= -6.2e+137) {
tmp = t_1;
} else if (t <= 3.3e-65) {
tmp = x - ((z * y) / a);
} else if (t <= 5.2e-21) {
tmp = x + (y / (a / t));
} else if (t <= 1.8e+16) {
tmp = x - (y * (z / 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 + (t * (y / a))
if (t <= (-6.2d+137)) then
tmp = t_1
else if (t <= 3.3d-65) then
tmp = x - ((z * y) / a)
else if (t <= 5.2d-21) then
tmp = x + (y / (a / t))
else if (t <= 1.8d+16) then
tmp = x - (y * (z / 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 + (t * (y / a));
double tmp;
if (t <= -6.2e+137) {
tmp = t_1;
} else if (t <= 3.3e-65) {
tmp = x - ((z * y) / a);
} else if (t <= 5.2e-21) {
tmp = x + (y / (a / t));
} else if (t <= 1.8e+16) {
tmp = x - (y * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if t <= -6.2e+137: tmp = t_1 elif t <= 3.3e-65: tmp = x - ((z * y) / a) elif t <= 5.2e-21: tmp = x + (y / (a / t)) elif t <= 1.8e+16: tmp = x - (y * (z / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (t <= -6.2e+137) tmp = t_1; elseif (t <= 3.3e-65) tmp = Float64(x - Float64(Float64(z * y) / a)); elseif (t <= 5.2e-21) tmp = Float64(x + Float64(y / Float64(a / t))); elseif (t <= 1.8e+16) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (t <= -6.2e+137) tmp = t_1; elseif (t <= 3.3e-65) tmp = x - ((z * y) / a); elseif (t <= 5.2e-21) tmp = x + (y / (a / t)); elseif (t <= 1.8e+16) tmp = x - (y * (z / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+137], t$95$1, If[LessEqual[t, 3.3e-65], N[(x - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-21], N[(x + N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+16], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-65}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-21}:\\
\;\;\;\;x + \frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+16}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.1999999999999999e137 or 1.8e16 < t Initial program 85.6%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in y around 0 85.6%
associate-*l/97.9%
*-commutative97.9%
Simplified97.9%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 75.2%
associate-*l/82.0%
associate-*r*82.0%
neg-mul-182.0%
cancel-sign-sub82.0%
associate-*l/75.2%
associate-*r/87.6%
Simplified87.6%
if -6.1999999999999999e137 < t < 3.3000000000000001e-65Initial program 96.5%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in z around inf 89.2%
if 3.3000000000000001e-65 < t < 5.20000000000000035e-21Initial program 99.4%
associate-/l*99.7%
Simplified99.7%
clear-num99.7%
un-div-inv99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 99.8%
associate-*r/99.8%
neg-mul-199.8%
Simplified99.8%
if 5.20000000000000035e-21 < t < 1.8e16Initial program 87.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 76.1%
associate-/l*88.0%
Simplified88.0%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= t -5.2e+138)
t_1
(if (<= t 2e-65)
(- x (/ (* z y) a))
(if (<= t 3.5e-21)
(+ x (* y (/ t a)))
(if (<= t 5.5e+16) (- x (* y (/ z a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (t <= -5.2e+138) {
tmp = t_1;
} else if (t <= 2e-65) {
tmp = x - ((z * y) / a);
} else if (t <= 3.5e-21) {
tmp = x + (y * (t / a));
} else if (t <= 5.5e+16) {
tmp = x - (y * (z / 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 + (t * (y / a))
if (t <= (-5.2d+138)) then
tmp = t_1
else if (t <= 2d-65) then
tmp = x - ((z * y) / a)
else if (t <= 3.5d-21) then
tmp = x + (y * (t / a))
else if (t <= 5.5d+16) then
tmp = x - (y * (z / 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 + (t * (y / a));
double tmp;
if (t <= -5.2e+138) {
tmp = t_1;
} else if (t <= 2e-65) {
tmp = x - ((z * y) / a);
} else if (t <= 3.5e-21) {
tmp = x + (y * (t / a));
} else if (t <= 5.5e+16) {
tmp = x - (y * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if t <= -5.2e+138: tmp = t_1 elif t <= 2e-65: tmp = x - ((z * y) / a) elif t <= 3.5e-21: tmp = x + (y * (t / a)) elif t <= 5.5e+16: tmp = x - (y * (z / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (t <= -5.2e+138) tmp = t_1; elseif (t <= 2e-65) tmp = Float64(x - Float64(Float64(z * y) / a)); elseif (t <= 3.5e-21) tmp = Float64(x + Float64(y * Float64(t / a))); elseif (t <= 5.5e+16) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (t <= -5.2e+138) tmp = t_1; elseif (t <= 2e-65) tmp = x - ((z * y) / a); elseif (t <= 3.5e-21) tmp = x + (y * (t / a)); elseif (t <= 5.5e+16) tmp = x - (y * (z / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+138], t$95$1, If[LessEqual[t, 2e-65], N[(x - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.5e-21], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+16], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2 \cdot 10^{-65}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{-21}:\\
\;\;\;\;x + y \cdot \frac{t}{a}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+16}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.2000000000000002e138 or 5.5e16 < t Initial program 85.6%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in y around 0 85.6%
associate-*l/97.9%
*-commutative97.9%
Simplified97.9%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 75.2%
associate-*l/82.0%
associate-*r*82.0%
neg-mul-182.0%
cancel-sign-sub82.0%
associate-*l/75.2%
associate-*r/87.6%
Simplified87.6%
if -5.2000000000000002e138 < t < 1.99999999999999985e-65Initial program 96.5%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in z around inf 89.2%
if 1.99999999999999985e-65 < t < 3.5000000000000003e-21Initial program 99.4%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in z around 0 99.4%
associate-*r/99.4%
mul-1-neg99.4%
distribute-lft-neg-out99.4%
*-commutative99.4%
associate-/l*99.7%
distribute-neg-frac99.7%
distribute-neg-frac299.7%
Simplified99.7%
if 3.5000000000000003e-21 < t < 5.5e16Initial program 87.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 76.1%
associate-/l*88.0%
Simplified88.0%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= t -6.2e+137)
t_1
(if (<= t 1.15e-65)
(- x (/ (* z y) a))
(if (<= t 1.9e-21)
(+ x (/ (* t y) a))
(if (<= t 2.2e+16) (- x (* y (/ z a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (t <= -6.2e+137) {
tmp = t_1;
} else if (t <= 1.15e-65) {
tmp = x - ((z * y) / a);
} else if (t <= 1.9e-21) {
tmp = x + ((t * y) / a);
} else if (t <= 2.2e+16) {
tmp = x - (y * (z / 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 + (t * (y / a))
if (t <= (-6.2d+137)) then
tmp = t_1
else if (t <= 1.15d-65) then
tmp = x - ((z * y) / a)
else if (t <= 1.9d-21) then
tmp = x + ((t * y) / a)
else if (t <= 2.2d+16) then
tmp = x - (y * (z / 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 + (t * (y / a));
double tmp;
if (t <= -6.2e+137) {
tmp = t_1;
} else if (t <= 1.15e-65) {
tmp = x - ((z * y) / a);
} else if (t <= 1.9e-21) {
tmp = x + ((t * y) / a);
} else if (t <= 2.2e+16) {
tmp = x - (y * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if t <= -6.2e+137: tmp = t_1 elif t <= 1.15e-65: tmp = x - ((z * y) / a) elif t <= 1.9e-21: tmp = x + ((t * y) / a) elif t <= 2.2e+16: tmp = x - (y * (z / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (t <= -6.2e+137) tmp = t_1; elseif (t <= 1.15e-65) tmp = Float64(x - Float64(Float64(z * y) / a)); elseif (t <= 1.9e-21) tmp = Float64(x + Float64(Float64(t * y) / a)); elseif (t <= 2.2e+16) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (t <= -6.2e+137) tmp = t_1; elseif (t <= 1.15e-65) tmp = x - ((z * y) / a); elseif (t <= 1.9e-21) tmp = x + ((t * y) / a); elseif (t <= 2.2e+16) tmp = x - (y * (z / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+137], t$95$1, If[LessEqual[t, 1.15e-65], N[(x - N[(N[(z * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-21], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.2e+16], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{-65}:\\
\;\;\;\;x - \frac{z \cdot y}{a}\\
\mathbf{elif}\;t \leq 1.9 \cdot 10^{-21}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+16}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.1999999999999999e137 or 2.2e16 < t Initial program 85.6%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in y around 0 85.6%
associate-*l/97.9%
*-commutative97.9%
Simplified97.9%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 75.2%
associate-*l/82.0%
associate-*r*82.0%
neg-mul-182.0%
cancel-sign-sub82.0%
associate-*l/75.2%
associate-*r/87.6%
Simplified87.6%
if -6.1999999999999999e137 < t < 1.15e-65Initial program 96.5%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in z around inf 89.2%
if 1.15e-65 < t < 1.8999999999999999e-21Initial program 99.4%
sub-neg99.4%
distribute-frac-neg299.4%
+-commutative99.4%
associate-/l*99.7%
fma-define99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 99.4%
if 1.8999999999999999e-21 < t < 2.2e16Initial program 87.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 76.1%
associate-/l*88.0%
Simplified88.0%
Final simplification88.9%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))))
(if (<= t -1.8e+138)
t_1
(if (<= t 3.3e-65)
(- x (/ y (/ a z)))
(if (<= t 1.65e-21)
(+ x (/ (* t y) a))
(if (<= t 1.12e+16) (- x (* y (/ z a))) t_1))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double tmp;
if (t <= -1.8e+138) {
tmp = t_1;
} else if (t <= 3.3e-65) {
tmp = x - (y / (a / z));
} else if (t <= 1.65e-21) {
tmp = x + ((t * y) / a);
} else if (t <= 1.12e+16) {
tmp = x - (y * (z / 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 + (t * (y / a))
if (t <= (-1.8d+138)) then
tmp = t_1
else if (t <= 3.3d-65) then
tmp = x - (y / (a / z))
else if (t <= 1.65d-21) then
tmp = x + ((t * y) / a)
else if (t <= 1.12d+16) then
tmp = x - (y * (z / 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 + (t * (y / a));
double tmp;
if (t <= -1.8e+138) {
tmp = t_1;
} else if (t <= 3.3e-65) {
tmp = x - (y / (a / z));
} else if (t <= 1.65e-21) {
tmp = x + ((t * y) / a);
} else if (t <= 1.12e+16) {
tmp = x - (y * (z / a));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) tmp = 0 if t <= -1.8e+138: tmp = t_1 elif t <= 3.3e-65: tmp = x - (y / (a / z)) elif t <= 1.65e-21: tmp = x + ((t * y) / a) elif t <= 1.12e+16: tmp = x - (y * (z / a)) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (t <= -1.8e+138) tmp = t_1; elseif (t <= 3.3e-65) tmp = Float64(x - Float64(y / Float64(a / z))); elseif (t <= 1.65e-21) tmp = Float64(x + Float64(Float64(t * y) / a)); elseif (t <= 1.12e+16) tmp = Float64(x - Float64(y * Float64(z / a))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); tmp = 0.0; if (t <= -1.8e+138) tmp = t_1; elseif (t <= 3.3e-65) tmp = x - (y / (a / z)); elseif (t <= 1.65e-21) tmp = x + ((t * y) / a); elseif (t <= 1.12e+16) tmp = x - (y * (z / a)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.8e+138], t$95$1, If[LessEqual[t, 3.3e-65], N[(x - N[(y / N[(a / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e-21], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.12e+16], N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -1.8 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-65}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z}}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-21}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\mathbf{elif}\;t \leq 1.12 \cdot 10^{+16}:\\
\;\;\;\;x - y \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.8000000000000001e138 or 1.12e16 < t Initial program 85.6%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in y around 0 85.6%
associate-*l/97.9%
*-commutative97.9%
Simplified97.9%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 75.2%
associate-*l/82.0%
associate-*r*82.0%
neg-mul-182.0%
cancel-sign-sub82.0%
associate-*l/75.2%
associate-*r/87.6%
Simplified87.6%
if -1.8000000000000001e138 < t < 3.3000000000000001e-65Initial program 96.5%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in z around inf 89.2%
associate-/l*87.9%
*-commutative87.9%
Applied egg-rr87.9%
*-commutative87.9%
clear-num87.8%
un-div-inv88.2%
Applied egg-rr88.2%
if 3.3000000000000001e-65 < t < 1.65000000000000004e-21Initial program 99.4%
sub-neg99.4%
distribute-frac-neg299.4%
+-commutative99.4%
associate-/l*99.7%
fma-define99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 99.4%
if 1.65000000000000004e-21 < t < 1.12e16Initial program 87.8%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 76.1%
associate-/l*88.0%
Simplified88.0%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ z a)))) (t_2 (+ x (* t (/ y a)))))
(if (<= t -6.2e+137)
t_2
(if (<= t 3.3e-65)
t_1
(if (<= t 1.65e-21) (+ x (/ (* t y) a)) (if (<= t 3.3e+16) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / a));
double t_2 = x + (t * (y / a));
double tmp;
if (t <= -6.2e+137) {
tmp = t_2;
} else if (t <= 3.3e-65) {
tmp = t_1;
} else if (t <= 1.65e-21) {
tmp = x + ((t * y) / a);
} else if (t <= 3.3e+16) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x - (y * (z / a))
t_2 = x + (t * (y / a))
if (t <= (-6.2d+137)) then
tmp = t_2
else if (t <= 3.3d-65) then
tmp = t_1
else if (t <= 1.65d-21) then
tmp = x + ((t * y) / a)
else if (t <= 3.3d+16) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / a));
double t_2 = x + (t * (y / a));
double tmp;
if (t <= -6.2e+137) {
tmp = t_2;
} else if (t <= 3.3e-65) {
tmp = t_1;
} else if (t <= 1.65e-21) {
tmp = x + ((t * y) / a);
} else if (t <= 3.3e+16) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (z / a)) t_2 = x + (t * (y / a)) tmp = 0 if t <= -6.2e+137: tmp = t_2 elif t <= 3.3e-65: tmp = t_1 elif t <= 1.65e-21: tmp = x + ((t * y) / a) elif t <= 3.3e+16: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(z / a))) t_2 = Float64(x + Float64(t * Float64(y / a))) tmp = 0.0 if (t <= -6.2e+137) tmp = t_2; elseif (t <= 3.3e-65) tmp = t_1; elseif (t <= 1.65e-21) tmp = Float64(x + Float64(Float64(t * y) / a)); elseif (t <= 3.3e+16) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (z / a)); t_2 = x + (t * (y / a)); tmp = 0.0; if (t <= -6.2e+137) tmp = t_2; elseif (t <= 3.3e-65) tmp = t_1; elseif (t <= 1.65e-21) tmp = x + ((t * y) / a); elseif (t <= 3.3e+16) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+137], t$95$2, If[LessEqual[t, 3.3e-65], t$95$1, If[LessEqual[t, 1.65e-21], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.3e+16], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{z}{a}\\
t_2 := x + t \cdot \frac{y}{a}\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+137}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-21}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\mathbf{elif}\;t \leq 3.3 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -6.1999999999999999e137 or 3.3e16 < t Initial program 85.6%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in y around 0 85.6%
associate-*l/97.9%
*-commutative97.9%
Simplified97.9%
clear-num97.9%
un-div-inv97.9%
Applied egg-rr97.9%
Taylor expanded in z around 0 75.2%
associate-*l/82.0%
associate-*r*82.0%
neg-mul-182.0%
cancel-sign-sub82.0%
associate-*l/75.2%
associate-*r/87.6%
Simplified87.6%
if -6.1999999999999999e137 < t < 3.3000000000000001e-65 or 1.65000000000000004e-21 < t < 3.3e16Initial program 96.0%
associate-/l*94.7%
Simplified94.7%
Taylor expanded in z around inf 88.5%
associate-/l*87.9%
Simplified87.9%
if 3.3000000000000001e-65 < t < 1.65000000000000004e-21Initial program 99.4%
sub-neg99.4%
distribute-frac-neg299.4%
+-commutative99.4%
associate-/l*99.7%
fma-define99.8%
distribute-frac-neg299.8%
distribute-neg-frac99.8%
sub-neg99.8%
distribute-neg-in99.8%
remove-double-neg99.8%
+-commutative99.8%
sub-neg99.8%
Simplified99.8%
Taylor expanded in z around 0 99.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (+ x (* t (/ y a)))) (t_2 (* z (/ (- y) a))))
(if (<= z -6.2e+65)
t_2
(if (<= z -2.3e-113)
t_1
(if (<= z -4.6e-257)
(+ x (/ (* t y) a))
(if (<= z 1.95e+158) t_1 t_2))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double t_2 = z * (-y / a);
double tmp;
if (z <= -6.2e+65) {
tmp = t_2;
} else if (z <= -2.3e-113) {
tmp = t_1;
} else if (z <= -4.6e-257) {
tmp = x + ((t * y) / a);
} else if (z <= 1.95e+158) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (t * (y / a))
t_2 = z * (-y / a)
if (z <= (-6.2d+65)) then
tmp = t_2
else if (z <= (-2.3d-113)) then
tmp = t_1
else if (z <= (-4.6d-257)) then
tmp = x + ((t * y) / a)
else if (z <= 1.95d+158) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x + (t * (y / a));
double t_2 = z * (-y / a);
double tmp;
if (z <= -6.2e+65) {
tmp = t_2;
} else if (z <= -2.3e-113) {
tmp = t_1;
} else if (z <= -4.6e-257) {
tmp = x + ((t * y) / a);
} else if (z <= 1.95e+158) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x + (t * (y / a)) t_2 = z * (-y / a) tmp = 0 if z <= -6.2e+65: tmp = t_2 elif z <= -2.3e-113: tmp = t_1 elif z <= -4.6e-257: tmp = x + ((t * y) / a) elif z <= 1.95e+158: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(x + Float64(t * Float64(y / a))) t_2 = Float64(z * Float64(Float64(-y) / a)) tmp = 0.0 if (z <= -6.2e+65) tmp = t_2; elseif (z <= -2.3e-113) tmp = t_1; elseif (z <= -4.6e-257) tmp = Float64(x + Float64(Float64(t * y) / a)); elseif (z <= 1.95e+158) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x + (t * (y / a)); t_2 = z * (-y / a); tmp = 0.0; if (z <= -6.2e+65) tmp = t_2; elseif (z <= -2.3e-113) tmp = t_1; elseif (z <= -4.6e-257) tmp = x + ((t * y) / a); elseif (z <= 1.95e+158) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[((-y) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.2e+65], t$95$2, If[LessEqual[z, -2.3e-113], t$95$1, If[LessEqual[z, -4.6e-257], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.95e+158], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + t \cdot \frac{y}{a}\\
t_2 := z \cdot \frac{-y}{a}\\
\mathbf{if}\;z \leq -6.2 \cdot 10^{+65}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -2.3 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -4.6 \cdot 10^{-257}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+158}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -6.19999999999999981e65 or 1.95e158 < z Initial program 89.5%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in z around inf 65.0%
mul-1-neg65.0%
associate-/l*65.3%
distribute-rgt-neg-in65.3%
distribute-neg-frac265.3%
Simplified65.3%
associate-*r/65.0%
distribute-frac-neg265.0%
*-commutative65.0%
associate-/l*70.7%
Applied egg-rr70.7%
if -6.19999999999999981e65 < z < -2.30000000000000008e-113 or -4.6e-257 < z < 1.95e158Initial program 91.9%
associate-/l*95.3%
Simplified95.3%
Taylor expanded in y around 0 91.9%
associate-*l/99.2%
*-commutative99.2%
Simplified99.2%
clear-num99.2%
un-div-inv99.2%
Applied egg-rr99.2%
Taylor expanded in z around 0 75.8%
associate-*l/80.5%
associate-*r*80.5%
neg-mul-180.5%
cancel-sign-sub80.5%
associate-*l/75.8%
associate-*r/84.4%
Simplified84.4%
if -2.30000000000000008e-113 < z < -4.6e-257Initial program 99.8%
sub-neg99.8%
distribute-frac-neg299.8%
+-commutative99.8%
associate-/l*90.9%
fma-define90.9%
distribute-frac-neg290.9%
distribute-neg-frac90.9%
sub-neg90.9%
distribute-neg-in90.9%
remove-double-neg90.9%
+-commutative90.9%
sub-neg90.9%
Simplified90.9%
Taylor expanded in z around 0 96.8%
Final simplification81.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* z (/ (- y) a))))
(if (<= a -9e+26)
x
(if (<= a -1.95e-255)
t_1
(if (<= a 3.5e-266) (/ (* t y) a) (if (<= a 3.7e-51) t_1 x))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = z * (-y / a);
double tmp;
if (a <= -9e+26) {
tmp = x;
} else if (a <= -1.95e-255) {
tmp = t_1;
} else if (a <= 3.5e-266) {
tmp = (t * y) / a;
} else if (a <= 3.7e-51) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = z * (-y / a)
if (a <= (-9d+26)) then
tmp = x
else if (a <= (-1.95d-255)) then
tmp = t_1
else if (a <= 3.5d-266) then
tmp = (t * y) / a
else if (a <= 3.7d-51) then
tmp = t_1
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = z * (-y / a);
double tmp;
if (a <= -9e+26) {
tmp = x;
} else if (a <= -1.95e-255) {
tmp = t_1;
} else if (a <= 3.5e-266) {
tmp = (t * y) / a;
} else if (a <= 3.7e-51) {
tmp = t_1;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = z * (-y / a) tmp = 0 if a <= -9e+26: tmp = x elif a <= -1.95e-255: tmp = t_1 elif a <= 3.5e-266: tmp = (t * y) / a elif a <= 3.7e-51: tmp = t_1 else: tmp = x return tmp
function code(x, y, z, t, a) t_1 = Float64(z * Float64(Float64(-y) / a)) tmp = 0.0 if (a <= -9e+26) tmp = x; elseif (a <= -1.95e-255) tmp = t_1; elseif (a <= 3.5e-266) tmp = Float64(Float64(t * y) / a); elseif (a <= 3.7e-51) tmp = t_1; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = z * (-y / a); tmp = 0.0; if (a <= -9e+26) tmp = x; elseif (a <= -1.95e-255) tmp = t_1; elseif (a <= 3.5e-266) tmp = (t * y) / a; elseif (a <= 3.7e-51) tmp = t_1; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(z * N[((-y) / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -9e+26], x, If[LessEqual[a, -1.95e-255], t$95$1, If[LessEqual[a, 3.5e-266], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, 3.7e-51], t$95$1, x]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{-y}{a}\\
\mathbf{if}\;a \leq -9 \cdot 10^{+26}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq -1.95 \cdot 10^{-255}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.5 \cdot 10^{-266}:\\
\;\;\;\;\frac{t \cdot y}{a}\\
\mathbf{elif}\;a \leq 3.7 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.99999999999999957e26 or 3.69999999999999973e-51 < a Initial program 84.6%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in x around inf 62.1%
if -8.99999999999999957e26 < a < -1.95e-255 or 3.50000000000000029e-266 < a < 3.69999999999999973e-51Initial program 99.8%
associate-/l*88.2%
Simplified88.2%
Taylor expanded in z around inf 51.7%
mul-1-neg51.7%
associate-/l*47.6%
distribute-rgt-neg-in47.6%
distribute-neg-frac247.6%
Simplified47.6%
associate-*r/51.7%
distribute-frac-neg251.7%
*-commutative51.7%
associate-/l*55.4%
Applied egg-rr55.4%
if -1.95e-255 < a < 3.50000000000000029e-266Initial program 99.8%
associate-/l*74.8%
Simplified74.8%
Taylor expanded in t around inf 65.2%
*-commutative65.2%
Simplified65.2%
Final simplification59.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -7.1e+65) (not (<= z 3.7e+158))) (* z (/ (- y) a)) (+ x (* t (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.1e+65) || !(z <= 3.7e+158)) {
tmp = z * (-y / a);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-7.1d+65)) .or. (.not. (z <= 3.7d+158))) then
tmp = z * (-y / a)
else
tmp = x + (t * (y / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -7.1e+65) || !(z <= 3.7e+158)) {
tmp = z * (-y / a);
} else {
tmp = x + (t * (y / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -7.1e+65) or not (z <= 3.7e+158): tmp = z * (-y / a) else: tmp = x + (t * (y / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -7.1e+65) || !(z <= 3.7e+158)) tmp = Float64(z * Float64(Float64(-y) / a)); else tmp = Float64(x + Float64(t * Float64(y / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -7.1e+65) || ~((z <= 3.7e+158))) tmp = z * (-y / a); else tmp = x + (t * (y / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -7.1e+65], N[Not[LessEqual[z, 3.7e+158]], $MachinePrecision]], N[(z * N[((-y) / a), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.1 \cdot 10^{+65} \lor \neg \left(z \leq 3.7 \cdot 10^{+158}\right):\\
\;\;\;\;z \cdot \frac{-y}{a}\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if z < -7.1000000000000003e65 or 3.70000000000000011e158 < z Initial program 89.5%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in z around inf 65.0%
mul-1-neg65.0%
associate-/l*65.3%
distribute-rgt-neg-in65.3%
distribute-neg-frac265.3%
Simplified65.3%
associate-*r/65.0%
distribute-frac-neg265.0%
*-commutative65.0%
associate-/l*70.7%
Applied egg-rr70.7%
if -7.1000000000000003e65 < z < 3.70000000000000011e158Initial program 93.3%
associate-/l*94.5%
Simplified94.5%
Taylor expanded in y around 0 93.3%
associate-*l/96.7%
*-commutative96.7%
Simplified96.7%
clear-num96.7%
un-div-inv96.8%
Applied egg-rr96.8%
Taylor expanded in z around 0 79.6%
associate-*l/81.9%
associate-*r*81.9%
neg-mul-181.9%
cancel-sign-sub81.9%
associate-*l/79.6%
associate-*r/84.0%
Simplified84.0%
Final simplification79.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= t -1.85e+163) (not (<= t 1.1e+96))) (* t (/ y a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((t <= -1.85e+163) || !(t <= 1.1e+96)) {
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 <= (-1.85d+163)) .or. (.not. (t <= 1.1d+96))) 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 <= -1.85e+163) || !(t <= 1.1e+96)) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (t <= -1.85e+163) or not (t <= 1.1e+96): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((t <= -1.85e+163) || !(t <= 1.1e+96)) 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 <= -1.85e+163) || ~((t <= 1.1e+96))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -1.85e+163], N[Not[LessEqual[t, 1.1e+96]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.85 \cdot 10^{+163} \lor \neg \left(t \leq 1.1 \cdot 10^{+96}\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.84999999999999996e163 or 1.0999999999999999e96 < t Initial program 81.3%
associate-/l*87.6%
Simplified87.6%
Taylor expanded in y around 0 81.3%
associate-*l/97.3%
*-commutative97.3%
Simplified97.3%
Taylor expanded in t around inf 56.9%
associate-/l*66.9%
Simplified66.9%
if -1.84999999999999996e163 < t < 1.0999999999999999e96Initial program 96.7%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in x around inf 47.4%
Final simplification53.2%
(FPCore (x y z t a) :precision binary64 (+ x (* y (/ (- t z) a))))
double code(double x, double y, double z, double t, double a) {
return x + (y * ((t - z) / a));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x + (y * ((t - z) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
return x + (y * ((t - z) / a));
}
def code(x, y, z, t, a): return x + (y * ((t - z) / a))
function code(x, y, z, t, a) return Float64(x + Float64(y * Float64(Float64(t - z) / a))) end
function tmp = code(x, y, z, t, a) tmp = x + (y * ((t - z) / a)); end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + y \cdot \frac{t - z}{a}
\end{array}
Initial program 92.1%
associate-/l*92.9%
Simplified92.9%
Final simplification92.9%
(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 92.1%
associate-/l*92.9%
Simplified92.9%
Taylor expanded in x around inf 40.5%
(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 2024086
(FPCore (x y z t a)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, F"
:precision binary64
:alt
(if (< y -1.0761266216389975e-10) (- x (/ 1.0 (/ (/ a (- z t)) y))) (if (< y 2.894426862792089e-49) (- x (/ (* y (- z t)) a)) (- x (/ y (/ a (- z t))))))
(- x (/ (* y (- z t)) a)))