
(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 14 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 (if (<= a -3.1e-60) (+ x (* y (/ (- t z) a))) (- x (/ (- z t) (/ a y)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (a <= -3.1e-60) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - ((z - 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 (a <= (-3.1d-60)) then
tmp = x + (y * ((t - z) / a))
else
tmp = x - ((z - 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 (a <= -3.1e-60) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - ((z - t) / (a / y));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if a <= -3.1e-60: tmp = x + (y * ((t - z) / a)) else: tmp = x - ((z - t) / (a / y)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (a <= -3.1e-60) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); else tmp = Float64(x - Float64(Float64(z - t) / Float64(a / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (a <= -3.1e-60) tmp = x + (y * ((t - z) / a)); else tmp = x - ((z - t) / (a / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.1e-60], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z - t), $MachinePrecision] / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.1 \cdot 10^{-60}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{z - t}{\frac{a}{y}}\\
\end{array}
\end{array}
if a < -3.09999999999999988e-60Initial program 88.8%
associate-/l*99.9%
Simplified99.9%
if -3.09999999999999988e-60 < a Initial program 97.7%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in y around 0 97.7%
associate-*l/98.3%
*-commutative98.3%
Simplified98.3%
clear-num98.2%
un-div-inv98.9%
Applied egg-rr98.9%
Final simplification99.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (* y (/ z (- a)))))
(if (<= y -0.072)
t_1
(if (<= y -1e-30)
x
(if (<= y -1.52e-58)
t_1
(if (<= y -6.6e-93)
(/ t (/ a y))
(if (<= y 2050000000000.0)
x
(if (<= y 3.5e+130)
(/ (* y t) a)
(if (<= y 6e+150) t_1 (* t (/ y a)))))))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = y * (z / -a);
double tmp;
if (y <= -0.072) {
tmp = t_1;
} else if (y <= -1e-30) {
tmp = x;
} else if (y <= -1.52e-58) {
tmp = t_1;
} else if (y <= -6.6e-93) {
tmp = t / (a / y);
} else if (y <= 2050000000000.0) {
tmp = x;
} else if (y <= 3.5e+130) {
tmp = (y * t) / a;
} else if (y <= 6e+150) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = y * (z / -a)
if (y <= (-0.072d0)) then
tmp = t_1
else if (y <= (-1d-30)) then
tmp = x
else if (y <= (-1.52d-58)) then
tmp = t_1
else if (y <= (-6.6d-93)) then
tmp = t / (a / y)
else if (y <= 2050000000000.0d0) then
tmp = x
else if (y <= 3.5d+130) then
tmp = (y * t) / a
else if (y <= 6d+150) then
tmp = t_1
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 t_1 = y * (z / -a);
double tmp;
if (y <= -0.072) {
tmp = t_1;
} else if (y <= -1e-30) {
tmp = x;
} else if (y <= -1.52e-58) {
tmp = t_1;
} else if (y <= -6.6e-93) {
tmp = t / (a / y);
} else if (y <= 2050000000000.0) {
tmp = x;
} else if (y <= 3.5e+130) {
tmp = (y * t) / a;
} else if (y <= 6e+150) {
tmp = t_1;
} else {
tmp = t * (y / a);
}
return tmp;
}
def code(x, y, z, t, a): t_1 = y * (z / -a) tmp = 0 if y <= -0.072: tmp = t_1 elif y <= -1e-30: tmp = x elif y <= -1.52e-58: tmp = t_1 elif y <= -6.6e-93: tmp = t / (a / y) elif y <= 2050000000000.0: tmp = x elif y <= 3.5e+130: tmp = (y * t) / a elif y <= 6e+150: tmp = t_1 else: tmp = t * (y / a) return tmp
function code(x, y, z, t, a) t_1 = Float64(y * Float64(z / Float64(-a))) tmp = 0.0 if (y <= -0.072) tmp = t_1; elseif (y <= -1e-30) tmp = x; elseif (y <= -1.52e-58) tmp = t_1; elseif (y <= -6.6e-93) tmp = Float64(t / Float64(a / y)); elseif (y <= 2050000000000.0) tmp = x; elseif (y <= 3.5e+130) tmp = Float64(Float64(y * t) / a); elseif (y <= 6e+150) tmp = t_1; else tmp = Float64(t * Float64(y / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = y * (z / -a); tmp = 0.0; if (y <= -0.072) tmp = t_1; elseif (y <= -1e-30) tmp = x; elseif (y <= -1.52e-58) tmp = t_1; elseif (y <= -6.6e-93) tmp = t / (a / y); elseif (y <= 2050000000000.0) tmp = x; elseif (y <= 3.5e+130) tmp = (y * t) / a; elseif (y <= 6e+150) tmp = t_1; else tmp = t * (y / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.072], t$95$1, If[LessEqual[y, -1e-30], x, If[LessEqual[y, -1.52e-58], t$95$1, If[LessEqual[y, -6.6e-93], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2050000000000.0], x, If[LessEqual[y, 3.5e+130], N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, 6e+150], t$95$1, N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{-a}\\
\mathbf{if}\;y \leq -0.072:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1 \cdot 10^{-30}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq -1.52 \cdot 10^{-58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.6 \cdot 10^{-93}:\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{elif}\;y \leq 2050000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{+130}:\\
\;\;\;\;\frac{y \cdot t}{a}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+150}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \frac{y}{a}\\
\end{array}
\end{array}
if y < -0.0719999999999999946 or -1e-30 < y < -1.51999999999999993e-58 or 3.5000000000000001e130 < y < 6.00000000000000025e150Initial program 85.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in z around inf 55.5%
mul-1-neg55.5%
associate-/l*66.4%
distribute-rgt-neg-in66.4%
distribute-neg-frac266.4%
Simplified66.4%
if -0.0719999999999999946 < y < -1e-30 or -6.6000000000000003e-93 < y < 2.05e12Initial program 99.8%
associate-/l*89.4%
Simplified89.4%
Taylor expanded in x around inf 64.8%
if -1.51999999999999993e-58 < y < -6.6000000000000003e-93Initial program 100.0%
associate-/l*76.8%
Simplified76.8%
Taylor expanded in y around 0 100.0%
associate-*l/99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around inf 51.4%
associate-/l*51.1%
Simplified51.1%
clear-num51.1%
div-inv51.4%
Applied egg-rr51.4%
if 2.05e12 < y < 3.5000000000000001e130Initial program 96.2%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t around inf 62.0%
*-commutative62.0%
Simplified62.0%
if 6.00000000000000025e150 < y Initial program 93.8%
associate-/l*99.9%
Simplified99.9%
Taylor expanded in y around 0 93.8%
associate-*l/90.7%
*-commutative90.7%
Simplified90.7%
Taylor expanded in t around inf 63.5%
associate-/l*67.1%
Simplified67.1%
Final simplification64.7%
(FPCore (x y z t a)
:precision binary64
(if (or (<= y -1.3e-190)
(not (or (<= y 2.4e-164) (and (not (<= y 6e-149)) (<= y 1.85e-78)))))
(* y (/ (- t z) a))
x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -1.3e-190) || !((y <= 2.4e-164) || (!(y <= 6e-149) && (y <= 1.85e-78)))) {
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 <= (-1.3d-190)) .or. (.not. (y <= 2.4d-164) .or. (.not. (y <= 6d-149)) .and. (y <= 1.85d-78))) 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 <= -1.3e-190) || !((y <= 2.4e-164) || (!(y <= 6e-149) && (y <= 1.85e-78)))) {
tmp = y * ((t - z) / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -1.3e-190) or not ((y <= 2.4e-164) or (not (y <= 6e-149) and (y <= 1.85e-78))): tmp = y * ((t - z) / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -1.3e-190) || !((y <= 2.4e-164) || (!(y <= 6e-149) && (y <= 1.85e-78)))) 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 <= -1.3e-190) || ~(((y <= 2.4e-164) || (~((y <= 6e-149)) && (y <= 1.85e-78))))) tmp = y * ((t - z) / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.3e-190], N[Not[Or[LessEqual[y, 2.4e-164], And[N[Not[LessEqual[y, 6e-149]], $MachinePrecision], LessEqual[y, 1.85e-78]]]], $MachinePrecision]], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{-190} \lor \neg \left(y \leq 2.4 \cdot 10^{-164} \lor \neg \left(y \leq 6 \cdot 10^{-149}\right) \land y \leq 1.85 \cdot 10^{-78}\right):\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.2999999999999999e-190 or 2.39999999999999983e-164 < y < 6.0000000000000003e-149 or 1.85000000000000003e-78 < y Initial program 93.0%
associate-/l*97.8%
Simplified97.8%
Taylor expanded in x around 0 70.1%
mul-1-neg70.1%
distribute-frac-neg270.1%
sub-neg70.1%
+-commutative70.1%
neg-sub070.1%
associate--r-70.1%
neg-sub070.1%
associate-*r/74.3%
distribute-neg-frac74.3%
distribute-neg-frac274.3%
remove-double-neg74.3%
Simplified74.3%
if -1.2999999999999999e-190 < y < 2.39999999999999983e-164 or 6.0000000000000003e-149 < y < 1.85000000000000003e-78Initial program 99.9%
associate-/l*85.2%
Simplified85.2%
Taylor expanded in x around inf 80.0%
Final simplification76.1%
(FPCore (x y z t a)
:precision binary64
(if (<= y -1.25e-190)
(* (/ y a) (- t z))
(if (or (<= y 2.6e-164) (and (not (<= y 6e-149)) (<= y 8e-79)))
x
(* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= -1.25e-190) {
tmp = (y / a) * (t - z);
} else if ((y <= 2.6e-164) || (!(y <= 6e-149) && (y <= 8e-79))) {
tmp = x;
} 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) :: tmp
if (y <= (-1.25d-190)) then
tmp = (y / a) * (t - z)
else if ((y <= 2.6d-164) .or. (.not. (y <= 6d-149)) .and. (y <= 8d-79)) then
tmp = x
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 tmp;
if (y <= -1.25e-190) {
tmp = (y / a) * (t - z);
} else if ((y <= 2.6e-164) || (!(y <= 6e-149) && (y <= 8e-79))) {
tmp = x;
} else {
tmp = y * ((t - z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= -1.25e-190: tmp = (y / a) * (t - z) elif (y <= 2.6e-164) or (not (y <= 6e-149) and (y <= 8e-79)): tmp = x else: tmp = y * ((t - z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= -1.25e-190) tmp = Float64(Float64(y / a) * Float64(t - z)); elseif ((y <= 2.6e-164) || (!(y <= 6e-149) && (y <= 8e-79))) tmp = x; else tmp = Float64(y * Float64(Float64(t - z) / a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= -1.25e-190) tmp = (y / a) * (t - z); elseif ((y <= 2.6e-164) || (~((y <= 6e-149)) && (y <= 8e-79))) tmp = x; else tmp = y * ((t - z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.25e-190], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.6e-164], And[N[Not[LessEqual[y, 6e-149]], $MachinePrecision], LessEqual[y, 8e-79]]], x, N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{-190}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{-164} \lor \neg \left(y \leq 6 \cdot 10^{-149}\right) \land y \leq 8 \cdot 10^{-79}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if y < -1.25000000000000009e-190Initial program 92.7%
associate-/l*96.9%
Simplified96.9%
Taylor expanded in y around 0 92.7%
associate-*l/98.8%
*-commutative98.8%
Simplified98.8%
Taylor expanded in x around 0 64.1%
mul-1-neg64.1%
*-commutative64.1%
associate-*r/70.1%
*-commutative70.1%
distribute-rgt-neg-in70.1%
neg-sub070.1%
associate--r-70.1%
neg-sub070.1%
+-commutative70.1%
sub-neg70.1%
Simplified70.1%
if -1.25000000000000009e-190 < y < 2.6000000000000002e-164 or 6.0000000000000003e-149 < y < 8e-79Initial program 99.9%
associate-/l*85.2%
Simplified85.2%
Taylor expanded in x around inf 80.0%
if 2.6000000000000002e-164 < y < 6.0000000000000003e-149 or 8e-79 < y Initial program 93.2%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in x around 0 76.6%
mul-1-neg76.6%
distribute-frac-neg276.6%
sub-neg76.6%
+-commutative76.6%
neg-sub076.6%
associate--r-76.6%
neg-sub076.6%
associate-*r/81.0%
distribute-neg-frac81.0%
distribute-neg-frac281.0%
remove-double-neg81.0%
Simplified81.0%
Final simplification76.8%
(FPCore (x y z t a)
:precision binary64
(if (<= z -5.6e-58)
(* y (/ z (- a)))
(if (<= z 1.65e-250)
x
(if (<= z 2.25e-175)
(/ y (/ a t))
(if (<= z 25500000000.0) x (* z (/ y (- a))))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.6e-58) {
tmp = y * (z / -a);
} else if (z <= 1.65e-250) {
tmp = x;
} else if (z <= 2.25e-175) {
tmp = y / (a / t);
} else if (z <= 25500000000.0) {
tmp = x;
} else {
tmp = z * (y / -a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-5.6d-58)) then
tmp = y * (z / -a)
else if (z <= 1.65d-250) then
tmp = x
else if (z <= 2.25d-175) then
tmp = y / (a / t)
else if (z <= 25500000000.0d0) then
tmp = x
else
tmp = z * (y / -a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -5.6e-58) {
tmp = y * (z / -a);
} else if (z <= 1.65e-250) {
tmp = x;
} else if (z <= 2.25e-175) {
tmp = y / (a / t);
} else if (z <= 25500000000.0) {
tmp = x;
} else {
tmp = z * (y / -a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -5.6e-58: tmp = y * (z / -a) elif z <= 1.65e-250: tmp = x elif z <= 2.25e-175: tmp = y / (a / t) elif z <= 25500000000.0: tmp = x else: tmp = z * (y / -a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -5.6e-58) tmp = Float64(y * Float64(z / Float64(-a))); elseif (z <= 1.65e-250) tmp = x; elseif (z <= 2.25e-175) tmp = Float64(y / Float64(a / t)); elseif (z <= 25500000000.0) tmp = x; else tmp = Float64(z * Float64(y / Float64(-a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -5.6e-58) tmp = y * (z / -a); elseif (z <= 1.65e-250) tmp = x; elseif (z <= 2.25e-175) tmp = y / (a / t); elseif (z <= 25500000000.0) tmp = x; else tmp = z * (y / -a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.6e-58], N[(y * N[(z / (-a)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-250], x, If[LessEqual[z, 2.25e-175], N[(y / N[(a / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 25500000000.0], x, N[(z * N[(y / (-a)), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{-58}:\\
\;\;\;\;y \cdot \frac{z}{-a}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-250}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-175}:\\
\;\;\;\;\frac{y}{\frac{a}{t}}\\
\mathbf{elif}\;z \leq 25500000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{y}{-a}\\
\end{array}
\end{array}
if z < -5.6000000000000001e-58Initial program 90.2%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in z around inf 52.7%
mul-1-neg52.7%
associate-/l*57.2%
distribute-rgt-neg-in57.2%
distribute-neg-frac257.2%
Simplified57.2%
if -5.6000000000000001e-58 < z < 1.65e-250 or 2.24999999999999999e-175 < z < 2.55e10Initial program 99.9%
associate-/l*98.2%
Simplified98.2%
Taylor expanded in x around inf 63.9%
if 1.65e-250 < z < 2.24999999999999999e-175Initial program 93.7%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in t around inf 67.7%
*-commutative67.7%
Simplified67.7%
associate-/l*67.6%
*-commutative67.6%
Applied egg-rr67.6%
*-commutative67.6%
clear-num67.6%
un-div-inv71.4%
Applied egg-rr71.4%
if 2.55e10 < z Initial program 93.5%
associate-/l*87.0%
Simplified87.0%
Taylor expanded in y around 0 93.5%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around inf 53.2%
mul-1-neg53.2%
associate-*l/56.2%
distribute-rgt-neg-in56.2%
Simplified56.2%
Final simplification60.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (* y (/ z a)))))
(if (<= z -5.8e-60)
t_1
(if (<= z 0.00086)
(+ x (/ (* y t) a))
(if (<= z 1.22e+207) (* (/ y a) (- t z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / a));
double tmp;
if (z <= -5.8e-60) {
tmp = t_1;
} else if (z <= 0.00086) {
tmp = x + ((y * t) / a);
} else if (z <= 1.22e+207) {
tmp = (y / a) * (t - z);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = x - (y * (z / a))
if (z <= (-5.8d-60)) then
tmp = t_1
else if (z <= 0.00086d0) then
tmp = x + ((y * t) / a)
else if (z <= 1.22d+207) then
tmp = (y / a) * (t - z)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * (z / a));
double tmp;
if (z <= -5.8e-60) {
tmp = t_1;
} else if (z <= 0.00086) {
tmp = x + ((y * t) / a);
} else if (z <= 1.22e+207) {
tmp = (y / a) * (t - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (y * (z / a)) tmp = 0 if z <= -5.8e-60: tmp = t_1 elif z <= 0.00086: tmp = x + ((y * t) / a) elif z <= 1.22e+207: tmp = (y / a) * (t - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * Float64(z / a))) tmp = 0.0 if (z <= -5.8e-60) tmp = t_1; elseif (z <= 0.00086) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 1.22e+207) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (y * (z / a)); tmp = 0.0; if (z <= -5.8e-60) tmp = t_1; elseif (z <= 0.00086) tmp = x + ((y * t) / a); elseif (z <= 1.22e+207) tmp = (y / a) * (t - z); else tmp = t_1; 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]}, If[LessEqual[z, -5.8e-60], t$95$1, If[LessEqual[z, 0.00086], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.22e+207], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot \frac{z}{a}\\
\mathbf{if}\;z \leq -5.8 \cdot 10^{-60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.00086:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 1.22 \cdot 10^{+207}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -5.7999999999999999e-60 or 1.21999999999999993e207 < z Initial program 90.8%
associate-/l*91.8%
Simplified91.8%
Taylor expanded in z around inf 82.8%
associate-/l*81.5%
Simplified81.5%
if -5.7999999999999999e-60 < z < 8.59999999999999979e-4Initial program 99.1%
sub-neg99.1%
distribute-frac-neg299.1%
+-commutative99.1%
associate-/l*97.6%
fma-define97.6%
distribute-frac-neg297.6%
distribute-neg-frac97.6%
sub-neg97.6%
distribute-neg-in97.6%
remove-double-neg97.6%
+-commutative97.6%
sub-neg97.6%
Simplified97.6%
Taylor expanded in z around 0 94.2%
if 8.59999999999999979e-4 < z < 1.21999999999999993e207Initial program 93.9%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in y around 0 93.9%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 81.8%
mul-1-neg81.8%
*-commutative81.8%
associate-*r/87.8%
*-commutative87.8%
distribute-rgt-neg-in87.8%
neg-sub087.8%
associate--r-87.8%
neg-sub087.8%
+-commutative87.8%
sub-neg87.8%
Simplified87.8%
Final simplification88.2%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- x (/ z (/ a y)))))
(if (<= z -3.5e-44)
t_1
(if (<= z 38.0)
(+ x (/ (* y t) a))
(if (<= z 3.8e+206) (* (/ y a) (- t z)) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (z / (a / y));
double tmp;
if (z <= -3.5e-44) {
tmp = t_1;
} else if (z <= 38.0) {
tmp = x + ((y * t) / a);
} else if (z <= 3.8e+206) {
tmp = (y / a) * (t - z);
} 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 - (z / (a / y))
if (z <= (-3.5d-44)) then
tmp = t_1
else if (z <= 38.0d0) then
tmp = x + ((y * t) / a)
else if (z <= 3.8d+206) then
tmp = (y / a) * (t - z)
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 - (z / (a / y));
double tmp;
if (z <= -3.5e-44) {
tmp = t_1;
} else if (z <= 38.0) {
tmp = x + ((y * t) / a);
} else if (z <= 3.8e+206) {
tmp = (y / a) * (t - z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = x - (z / (a / y)) tmp = 0 if z <= -3.5e-44: tmp = t_1 elif z <= 38.0: tmp = x + ((y * t) / a) elif z <= 3.8e+206: tmp = (y / a) * (t - z) else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(x - Float64(z / Float64(a / y))) tmp = 0.0 if (z <= -3.5e-44) tmp = t_1; elseif (z <= 38.0) tmp = Float64(x + Float64(Float64(y * t) / a)); elseif (z <= 3.8e+206) tmp = Float64(Float64(y / a) * Float64(t - z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = x - (z / (a / y)); tmp = 0.0; if (z <= -3.5e-44) tmp = t_1; elseif (z <= 38.0) tmp = x + ((y * t) / a); elseif (z <= 3.8e+206) tmp = (y / a) * (t - z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(z / N[(a / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e-44], t$95$1, If[LessEqual[z, 38.0], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e+206], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - \frac{z}{\frac{a}{y}}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 38:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+206}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.4999999999999998e-44 or 3.7999999999999999e206 < z Initial program 90.5%
associate-/l*91.5%
Simplified91.5%
Taylor expanded in z around inf 83.1%
associate-/l*81.8%
Simplified81.8%
*-commutative81.8%
associate-/r/88.7%
Applied egg-rr88.7%
if -3.4999999999999998e-44 < z < 38Initial program 99.1%
sub-neg99.1%
distribute-frac-neg299.1%
+-commutative99.1%
associate-/l*97.7%
fma-define97.7%
distribute-frac-neg297.7%
distribute-neg-frac97.7%
sub-neg97.7%
distribute-neg-in97.7%
remove-double-neg97.7%
+-commutative97.7%
sub-neg97.7%
Simplified97.7%
Taylor expanded in z around 0 93.6%
if 38 < z < 3.7999999999999999e206Initial program 93.9%
associate-/l*87.8%
Simplified87.8%
Taylor expanded in y around 0 93.9%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 81.8%
mul-1-neg81.8%
*-commutative81.8%
associate-*r/87.8%
*-commutative87.8%
distribute-rgt-neg-in87.8%
neg-sub087.8%
associate--r-87.8%
neg-sub087.8%
+-commutative87.8%
sub-neg87.8%
Simplified87.8%
Final simplification90.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -2.9e-189) (not (<= y 1.2e-203))) (+ x (* y (/ (- t z) a))) (- x (/ (* y z) a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -2.9e-189) || !(y <= 1.2e-203)) {
tmp = x + (y * ((t - z) / 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 ((y <= (-2.9d-189)) .or. (.not. (y <= 1.2d-203))) then
tmp = x + (y * ((t - z) / 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 ((y <= -2.9e-189) || !(y <= 1.2e-203)) {
tmp = x + (y * ((t - z) / a));
} else {
tmp = x - ((y * z) / a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -2.9e-189) or not (y <= 1.2e-203): tmp = x + (y * ((t - z) / a)) else: tmp = x - ((y * z) / a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -2.9e-189) || !(y <= 1.2e-203)) tmp = Float64(x + Float64(y * Float64(Float64(t - z) / 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 ((y <= -2.9e-189) || ~((y <= 1.2e-203))) tmp = x + (y * ((t - z) / a)); else tmp = x - ((y * z) / a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -2.9e-189], N[Not[LessEqual[y, 1.2e-203]], $MachinePrecision]], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.9 \cdot 10^{-189} \lor \neg \left(y \leq 1.2 \cdot 10^{-203}\right):\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y \cdot z}{a}\\
\end{array}
\end{array}
if y < -2.9e-189 or 1.1999999999999999e-203 < y Initial program 93.9%
associate-/l*97.6%
Simplified97.6%
if -2.9e-189 < y < 1.1999999999999999e-203Initial program 99.9%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in z around inf 96.0%
Final simplification97.3%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.45e-57) (* y (/ (- t z) a)) (if (<= z 0.92) (+ x (/ (* y t) a)) (* (/ y a) (- t z)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.45e-57) {
tmp = y * ((t - z) / a);
} else if (z <= 0.92) {
tmp = x + ((y * t) / a);
} else {
tmp = (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 (z <= (-2.45d-57)) then
tmp = y * ((t - z) / a)
else if (z <= 0.92d0) then
tmp = x + ((y * t) / a)
else
tmp = (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 (z <= -2.45e-57) {
tmp = y * ((t - z) / a);
} else if (z <= 0.92) {
tmp = x + ((y * t) / a);
} else {
tmp = (y / a) * (t - z);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.45e-57: tmp = y * ((t - z) / a) elif z <= 0.92: tmp = x + ((y * t) / a) else: tmp = (y / a) * (t - z) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.45e-57) tmp = Float64(y * Float64(Float64(t - z) / a)); elseif (z <= 0.92) tmp = Float64(x + Float64(Float64(y * t) / a)); else tmp = Float64(Float64(y / a) * Float64(t - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.45e-57) tmp = y * ((t - z) / a); elseif (z <= 0.92) tmp = x + ((y * t) / a); else tmp = (y / a) * (t - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.45e-57], N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.92], N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{-57}:\\
\;\;\;\;y \cdot \frac{t - z}{a}\\
\mathbf{elif}\;z \leq 0.92:\\
\;\;\;\;x + \frac{y \cdot t}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a} \cdot \left(t - z\right)\\
\end{array}
\end{array}
if z < -2.44999999999999994e-57Initial program 90.2%
associate-/l*93.9%
Simplified93.9%
Taylor expanded in x around 0 63.2%
mul-1-neg63.2%
distribute-frac-neg263.2%
sub-neg63.2%
+-commutative63.2%
neg-sub063.2%
associate--r-63.2%
neg-sub063.2%
associate-*r/69.5%
distribute-neg-frac69.5%
distribute-neg-frac269.5%
remove-double-neg69.5%
Simplified69.5%
if -2.44999999999999994e-57 < z < 0.92000000000000004Initial program 99.1%
sub-neg99.1%
distribute-frac-neg299.1%
+-commutative99.1%
associate-/l*97.6%
fma-define97.6%
distribute-frac-neg297.6%
distribute-neg-frac97.6%
sub-neg97.6%
distribute-neg-in97.6%
remove-double-neg97.6%
+-commutative97.6%
sub-neg97.6%
Simplified97.6%
Taylor expanded in z around 0 94.2%
if 0.92000000000000004 < z Initial program 93.5%
associate-/l*87.0%
Simplified87.0%
Taylor expanded in y around 0 93.5%
associate-*l/99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 71.5%
mul-1-neg71.5%
*-commutative71.5%
associate-*r/77.8%
*-commutative77.8%
distribute-rgt-neg-in77.8%
neg-sub077.8%
associate--r-77.8%
neg-sub077.8%
+-commutative77.8%
sub-neg77.8%
Simplified77.8%
Final simplification82.8%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.5e+45) (not (<= y 50000000000000.0))) (* t (/ y a)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.5e+45) || !(y <= 50000000000000.0)) {
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 ((y <= (-5.5d+45)) .or. (.not. (y <= 50000000000000.0d0))) 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 ((y <= -5.5e+45) || !(y <= 50000000000000.0)) {
tmp = t * (y / a);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.5e+45) or not (y <= 50000000000000.0): tmp = t * (y / a) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.5e+45) || !(y <= 50000000000000.0)) 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 ((y <= -5.5e+45) || ~((y <= 50000000000000.0))) tmp = t * (y / a); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.5e+45], N[Not[LessEqual[y, 50000000000000.0]], $MachinePrecision]], N[(t * N[(y / a), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+45} \lor \neg \left(y \leq 50000000000000\right):\\
\;\;\;\;t \cdot \frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.5000000000000001e45 or 5e13 < y Initial program 88.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 88.3%
associate-*l/96.3%
*-commutative96.3%
Simplified96.3%
Taylor expanded in t around inf 48.7%
associate-/l*53.4%
Simplified53.4%
if -5.5000000000000001e45 < y < 5e13Initial program 99.8%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in x around inf 60.7%
Final simplification57.7%
(FPCore (x y z t a) :precision binary64 (if (or (<= y -5.8e+41) (not (<= y 25000000.0))) (/ t (/ a y)) x))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((y <= -5.8e+41) || !(y <= 25000000.0)) {
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 <= (-5.8d+41)) .or. (.not. (y <= 25000000.0d0))) 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 <= -5.8e+41) || !(y <= 25000000.0)) {
tmp = t / (a / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (y <= -5.8e+41) or not (y <= 25000000.0): tmp = t / (a / y) else: tmp = x return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((y <= -5.8e+41) || !(y <= 25000000.0)) tmp = Float64(t / Float64(a / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((y <= -5.8e+41) || ~((y <= 25000000.0))) tmp = t / (a / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.8e+41], N[Not[LessEqual[y, 25000000.0]], $MachinePrecision]], N[(t / N[(a / y), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+41} \lor \neg \left(y \leq 25000000\right):\\
\;\;\;\;\frac{t}{\frac{a}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -5.79999999999999977e41 or 2.5e7 < y Initial program 88.3%
associate-/l*99.8%
Simplified99.8%
Taylor expanded in y around 0 88.3%
associate-*l/96.3%
*-commutative96.3%
Simplified96.3%
Taylor expanded in t around inf 48.7%
associate-/l*53.4%
Simplified53.4%
clear-num53.4%
div-inv53.5%
Applied egg-rr53.5%
if -5.79999999999999977e41 < y < 2.5e7Initial program 99.8%
associate-/l*89.9%
Simplified89.9%
Taylor expanded in x around inf 60.7%
Final simplification57.7%
(FPCore (x y z t a) :precision binary64 (if (<= y 1.2e-136) (+ x (* (/ y a) (- t z))) (+ x (* y (/ (- t z) a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.2e-136) {
tmp = x + ((y / a) * (t - z));
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= 1.2d-136) then
tmp = x + ((y / a) * (t - z))
else
tmp = x + (y * ((t - z) / a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.2e-136) {
tmp = x + ((y / a) * (t - z));
} else {
tmp = x + (y * ((t - z) / a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1.2e-136: tmp = x + ((y / a) * (t - z)) else: tmp = x + (y * ((t - z) / a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1.2e-136) tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); else tmp = Float64(x + Float64(y * Float64(Float64(t - z) / a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 1.2e-136) tmp = x + ((y / a) * (t - z)); else tmp = x + (y * ((t - z) / a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.2e-136], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(N[(t - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.2 \cdot 10^{-136}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{t - z}{a}\\
\end{array}
\end{array}
if y < 1.1999999999999999e-136Initial program 95.7%
associate-/l*90.6%
Simplified90.6%
Taylor expanded in y around 0 95.7%
associate-*l/98.4%
*-commutative98.4%
Simplified98.4%
if 1.1999999999999999e-136 < y Initial program 93.8%
associate-/l*99.8%
Simplified99.8%
Final simplification98.9%
(FPCore (x y z t a) :precision binary64 (if (<= y 1.36e-114) (+ x (* (/ y a) (- t z))) (- x (/ y (/ a (- z t))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.36e-114) {
tmp = x + ((y / a) * (t - z));
} else {
tmp = x - (y / (a / (z - t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (y <= 1.36d-114) then
tmp = x + ((y / a) * (t - z))
else
tmp = x - (y / (a / (z - t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (y <= 1.36e-114) {
tmp = x + ((y / a) * (t - z));
} else {
tmp = x - (y / (a / (z - t)));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if y <= 1.36e-114: tmp = x + ((y / a) * (t - z)) else: tmp = x - (y / (a / (z - t))) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (y <= 1.36e-114) tmp = Float64(x + Float64(Float64(y / a) * Float64(t - z))); else tmp = Float64(x - Float64(y / Float64(a / Float64(z - t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (y <= 1.36e-114) tmp = x + ((y / a) * (t - z)); else tmp = x - (y / (a / (z - t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[y, 1.36e-114], N[(x + N[(N[(y / a), $MachinePrecision] * N[(t - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(y / N[(a / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.36 \cdot 10^{-114}:\\
\;\;\;\;x + \frac{y}{a} \cdot \left(t - z\right)\\
\mathbf{else}:\\
\;\;\;\;x - \frac{y}{\frac{a}{z - t}}\\
\end{array}
\end{array}
if y < 1.3599999999999999e-114Initial program 95.8%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in y around 0 95.8%
associate-*l/98.4%
*-commutative98.4%
Simplified98.4%
if 1.3599999999999999e-114 < y Initial program 93.6%
associate-/l*99.8%
Simplified99.8%
clear-num99.7%
un-div-inv99.9%
Applied egg-rr99.9%
Final simplification98.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 95.0%
associate-/l*94.0%
Simplified94.0%
Taylor expanded in x around inf 41.7%
Final simplification41.7%
(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 2024066
(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)))