
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * y) + (z * (t - a))) / (y + (z * (b - y)));
}
def code(x, y, z, t, a, b): return ((x * y) + (z * (t - a))) / (y + (z * (b - y)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * y) + Float64(z * Float64(t - a))) / Float64(y + Float64(z * Float64(b - y)))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * y) + (z * (t - a))) / (y + (z * (b - y))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y + z \cdot \left(t - a\right)}{y + z \cdot \left(b - y\right)}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.55e+43)
t_1
(if (<= z 4.8e+65)
(/ (+ (* z (- t a)) (* y x)) (+ y (* z (- b y))))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.55e+43) {
tmp = t_1;
} else if (z <= 4.8e+65) {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.55d+43)) then
tmp = t_1
else if (z <= 4.8d+65) then
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)))
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 b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.55e+43) {
tmp = t_1;
} else if (z <= 4.8e+65) {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.55e+43: tmp = t_1 elif z <= 4.8e+65: tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.55e+43) tmp = t_1; elseif (z <= 4.8e+65) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.55e+43) tmp = t_1; elseif (z <= 4.8e+65) tmp = ((z * (t - a)) + (y * x)) / (y + (z * (b - y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.55e+43], t$95$1, If[LessEqual[z, 4.8e+65], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+65}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.5500000000000001e43 or 4.8000000000000003e65 < z Initial program 34.9%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6484.2%
Simplified84.2%
if -1.5500000000000001e43 < z < 4.8000000000000003e65Initial program 87.7%
Final simplification86.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))) (t_2 (+ y (* z b))))
(if (<= z -4.8e-14)
t_1
(if (<= z -7.6e-117)
(/ (* z a) (* y (+ z -1.0)))
(if (<= z 1.8e-271)
(* y (/ x t_2))
(if (<= z 1.35e-28) (/ (* y x) t_2) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double t_2 = y + (z * b);
double tmp;
if (z <= -4.8e-14) {
tmp = t_1;
} else if (z <= -7.6e-117) {
tmp = (z * a) / (y * (z + -1.0));
} else if (z <= 1.8e-271) {
tmp = y * (x / t_2);
} else if (z <= 1.35e-28) {
tmp = (y * x) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (t - a) / (b - y)
t_2 = y + (z * b)
if (z <= (-4.8d-14)) then
tmp = t_1
else if (z <= (-7.6d-117)) then
tmp = (z * a) / (y * (z + (-1.0d0)))
else if (z <= 1.8d-271) then
tmp = y * (x / t_2)
else if (z <= 1.35d-28) then
tmp = (y * x) / t_2
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 b) {
double t_1 = (t - a) / (b - y);
double t_2 = y + (z * b);
double tmp;
if (z <= -4.8e-14) {
tmp = t_1;
} else if (z <= -7.6e-117) {
tmp = (z * a) / (y * (z + -1.0));
} else if (z <= 1.8e-271) {
tmp = y * (x / t_2);
} else if (z <= 1.35e-28) {
tmp = (y * x) / t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) t_2 = y + (z * b) tmp = 0 if z <= -4.8e-14: tmp = t_1 elif z <= -7.6e-117: tmp = (z * a) / (y * (z + -1.0)) elif z <= 1.8e-271: tmp = y * (x / t_2) elif z <= 1.35e-28: tmp = (y * x) / t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) t_2 = Float64(y + Float64(z * b)) tmp = 0.0 if (z <= -4.8e-14) tmp = t_1; elseif (z <= -7.6e-117) tmp = Float64(Float64(z * a) / Float64(y * Float64(z + -1.0))); elseif (z <= 1.8e-271) tmp = Float64(y * Float64(x / t_2)); elseif (z <= 1.35e-28) tmp = Float64(Float64(y * x) / t_2); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); t_2 = y + (z * b); tmp = 0.0; if (z <= -4.8e-14) tmp = t_1; elseif (z <= -7.6e-117) tmp = (z * a) / (y * (z + -1.0)); elseif (z <= 1.8e-271) tmp = y * (x / t_2); elseif (z <= 1.35e-28) tmp = (y * x) / t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.8e-14], t$95$1, If[LessEqual[z, -7.6e-117], N[(N[(z * a), $MachinePrecision] / N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.8e-271], N[(y * N[(x / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-28], N[(N[(y * x), $MachinePrecision] / t$95$2), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
t_2 := y + z \cdot b\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-117}:\\
\;\;\;\;\frac{z \cdot a}{y \cdot \left(z + -1\right)}\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-271}:\\
\;\;\;\;y \cdot \frac{x}{t\_2}\\
\mathbf{elif}\;z \leq 1.35 \cdot 10^{-28}:\\
\;\;\;\;\frac{y \cdot x}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -4.8e-14 or 1.3499999999999999e-28 < z Initial program 45.6%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6479.2%
Simplified79.2%
if -4.8e-14 < z < -7.59999999999999945e-117Initial program 94.8%
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f6494.8%
Applied egg-rr94.8%
Taylor expanded in a around inf
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6454.5%
Simplified54.5%
Taylor expanded in y around -inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6454.4%
Simplified54.4%
if -7.59999999999999945e-117 < z < 1.7999999999999999e-271Initial program 83.8%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f6483.8%
Simplified83.8%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f6455.5%
Simplified55.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6466.4%
Applied egg-rr66.4%
if 1.7999999999999999e-271 < z < 1.3499999999999999e-28Initial program 94.3%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f6494.3%
Simplified94.3%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f6463.4%
Simplified63.4%
Final simplification71.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -7.5e-12)
t_1
(if (<= z -9.8e-141)
(/ (+ (* z (- t a)) (* y x)) y)
(if (<= z 3.9e-24) (/ (- (* y x) (* z a)) (+ y (* z b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -7.5e-12) {
tmp = t_1;
} else if (z <= -9.8e-141) {
tmp = ((z * (t - a)) + (y * x)) / y;
} else if (z <= 3.9e-24) {
tmp = ((y * x) - (z * a)) / (y + (z * b));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-7.5d-12)) then
tmp = t_1
else if (z <= (-9.8d-141)) then
tmp = ((z * (t - a)) + (y * x)) / y
else if (z <= 3.9d-24) then
tmp = ((y * x) - (z * a)) / (y + (z * b))
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 b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -7.5e-12) {
tmp = t_1;
} else if (z <= -9.8e-141) {
tmp = ((z * (t - a)) + (y * x)) / y;
} else if (z <= 3.9e-24) {
tmp = ((y * x) - (z * a)) / (y + (z * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -7.5e-12: tmp = t_1 elif z <= -9.8e-141: tmp = ((z * (t - a)) + (y * x)) / y elif z <= 3.9e-24: tmp = ((y * x) - (z * a)) / (y + (z * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -7.5e-12) tmp = t_1; elseif (z <= -9.8e-141) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / y); elseif (z <= 3.9e-24) tmp = Float64(Float64(Float64(y * x) - Float64(z * a)) / Float64(y + Float64(z * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -7.5e-12) tmp = t_1; elseif (z <= -9.8e-141) tmp = ((z * (t - a)) + (y * x)) / y; elseif (z <= 3.9e-24) tmp = ((y * x) - (z * a)) / (y + (z * b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e-12], t$95$1, If[LessEqual[z, -9.8e-141], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 3.9e-24], N[(N[(N[(y * x), $MachinePrecision] - N[(z * a), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -9.8 \cdot 10^{-141}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y}\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-24}:\\
\;\;\;\;\frac{y \cdot x - z \cdot a}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.5e-12 or 3.9e-24 < z Initial program 45.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6479.8%
Simplified79.8%
if -7.5e-12 < z < -9.80000000000000012e-141Initial program 95.8%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f6494.3%
Simplified94.3%
Taylor expanded in b around 0
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6486.1%
Simplified86.1%
if -9.80000000000000012e-141 < z < 3.9e-24Initial program 88.7%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f6488.7%
Simplified88.7%
Taylor expanded in t around 0
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6474.6%
Simplified74.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -7.2e-12)
t_1
(if (<= z -1.7e-158)
(/ (+ (* z (- t a)) (* y x)) y)
(if (<= z 4.9e-26) (* x (/ y (+ y (* z (- b y))))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -7.2e-12) {
tmp = t_1;
} else if (z <= -1.7e-158) {
tmp = ((z * (t - a)) + (y * x)) / y;
} else if (z <= 4.9e-26) {
tmp = x * (y / (y + (z * (b - y))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-7.2d-12)) then
tmp = t_1
else if (z <= (-1.7d-158)) then
tmp = ((z * (t - a)) + (y * x)) / y
else if (z <= 4.9d-26) then
tmp = x * (y / (y + (z * (b - y))))
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 b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -7.2e-12) {
tmp = t_1;
} else if (z <= -1.7e-158) {
tmp = ((z * (t - a)) + (y * x)) / y;
} else if (z <= 4.9e-26) {
tmp = x * (y / (y + (z * (b - y))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -7.2e-12: tmp = t_1 elif z <= -1.7e-158: tmp = ((z * (t - a)) + (y * x)) / y elif z <= 4.9e-26: tmp = x * (y / (y + (z * (b - y)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -7.2e-12) tmp = t_1; elseif (z <= -1.7e-158) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / y); elseif (z <= 4.9e-26) tmp = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -7.2e-12) tmp = t_1; elseif (z <= -1.7e-158) tmp = ((z * (t - a)) + (y * x)) / y; elseif (z <= 4.9e-26) tmp = x * (y / (y + (z * (b - y)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e-12], t$95$1, If[LessEqual[z, -1.7e-158], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[z, 4.9e-26], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{-12}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.7 \cdot 10^{-158}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-26}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.2e-12 or 4.8999999999999999e-26 < z Initial program 45.2%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6479.8%
Simplified79.8%
if -7.2e-12 < z < -1.7e-158Initial program 96.5%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f6495.3%
Simplified95.3%
Taylor expanded in b around 0
/-lowering-/.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6481.9%
Simplified81.9%
if -1.7e-158 < z < 4.8999999999999999e-26Initial program 88.2%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6459.8%
Simplified59.8%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
--lowering--.f6471.4%
Applied egg-rr71.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -3.5e-14)
t_1
(if (<= z -7.6e-117)
(/ (* z a) (* y (+ z -1.0)))
(if (<= z 5.4e-28) (* x (/ y (+ y (* z (- b y))))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.5e-14) {
tmp = t_1;
} else if (z <= -7.6e-117) {
tmp = (z * a) / (y * (z + -1.0));
} else if (z <= 5.4e-28) {
tmp = x * (y / (y + (z * (b - y))));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-3.5d-14)) then
tmp = t_1
else if (z <= (-7.6d-117)) then
tmp = (z * a) / (y * (z + (-1.0d0)))
else if (z <= 5.4d-28) then
tmp = x * (y / (y + (z * (b - y))))
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 b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.5e-14) {
tmp = t_1;
} else if (z <= -7.6e-117) {
tmp = (z * a) / (y * (z + -1.0));
} else if (z <= 5.4e-28) {
tmp = x * (y / (y + (z * (b - y))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -3.5e-14: tmp = t_1 elif z <= -7.6e-117: tmp = (z * a) / (y * (z + -1.0)) elif z <= 5.4e-28: tmp = x * (y / (y + (z * (b - y)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.5e-14) tmp = t_1; elseif (z <= -7.6e-117) tmp = Float64(Float64(z * a) / Float64(y * Float64(z + -1.0))); elseif (z <= 5.4e-28) tmp = Float64(x * Float64(y / Float64(y + Float64(z * Float64(b - y))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.5e-14) tmp = t_1; elseif (z <= -7.6e-117) tmp = (z * a) / (y * (z + -1.0)); elseif (z <= 5.4e-28) tmp = x * (y / (y + (z * (b - y)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e-14], t$95$1, If[LessEqual[z, -7.6e-117], N[(N[(z * a), $MachinePrecision] / N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.4e-28], N[(x * N[(y / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-117}:\\
\;\;\;\;\frac{z \cdot a}{y \cdot \left(z + -1\right)}\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-28}:\\
\;\;\;\;x \cdot \frac{y}{y + z \cdot \left(b - y\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.5000000000000002e-14 or 5.3999999999999998e-28 < z Initial program 45.6%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6479.2%
Simplified79.2%
if -3.5000000000000002e-14 < z < -7.59999999999999945e-117Initial program 94.8%
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f6494.8%
Applied egg-rr94.8%
Taylor expanded in a around inf
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6454.5%
Simplified54.5%
Taylor expanded in y around -inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6454.4%
Simplified54.4%
if -7.59999999999999945e-117 < z < 5.3999999999999998e-28Initial program 89.1%
Taylor expanded in x around inf
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6459.5%
Simplified59.5%
*-commutativeN/A
associate-/l*N/A
*-lowering-*.f64N/A
/-rgt-identityN/A
associate-/r/N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
associate-/r/N/A
/-rgt-identityN/A
*-lowering-*.f64N/A
--lowering--.f6469.3%
Applied egg-rr69.3%
Final simplification73.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.85e+23)
t_1
(if (<= z 4.8e+65) (/ (+ (* z (- t a)) (* y x)) (+ y (* z b))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.85e+23) {
tmp = t_1;
} else if (z <= 4.8e+65) {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.85d+23)) then
tmp = t_1
else if (z <= 4.8d+65) then
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b))
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 b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.85e+23) {
tmp = t_1;
} else if (z <= 4.8e+65) {
tmp = ((z * (t - a)) + (y * x)) / (y + (z * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.85e+23: tmp = t_1 elif z <= 4.8e+65: tmp = ((z * (t - a)) + (y * x)) / (y + (z * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.85e+23) tmp = t_1; elseif (z <= 4.8e+65) tmp = Float64(Float64(Float64(z * Float64(t - a)) + Float64(y * x)) / Float64(y + Float64(z * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.85e+23) tmp = t_1; elseif (z <= 4.8e+65) tmp = ((z * (t - a)) + (y * x)) / (y + (z * b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.85e+23], t$95$1, If[LessEqual[z, 4.8e+65], N[(N[(N[(z * N[(t - a), $MachinePrecision]), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{+65}:\\
\;\;\;\;\frac{z \cdot \left(t - a\right) + y \cdot x}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.85000000000000006e23 or 4.8000000000000003e65 < z Initial program 38.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6483.1%
Simplified83.1%
if -1.85000000000000006e23 < z < 4.8000000000000003e65Initial program 88.7%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f6486.6%
Simplified86.6%
Final simplification85.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -6.6e-14)
t_1
(if (<= z -7e-117)
(/ (* z a) (* y (+ z -1.0)))
(if (<= z 4.9e-27) (* y (/ x (+ y (* z b)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -6.6e-14) {
tmp = t_1;
} else if (z <= -7e-117) {
tmp = (z * a) / (y * (z + -1.0));
} else if (z <= 4.9e-27) {
tmp = y * (x / (y + (z * b)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-6.6d-14)) then
tmp = t_1
else if (z <= (-7d-117)) then
tmp = (z * a) / (y * (z + (-1.0d0)))
else if (z <= 4.9d-27) then
tmp = y * (x / (y + (z * b)))
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 b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -6.6e-14) {
tmp = t_1;
} else if (z <= -7e-117) {
tmp = (z * a) / (y * (z + -1.0));
} else if (z <= 4.9e-27) {
tmp = y * (x / (y + (z * b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -6.6e-14: tmp = t_1 elif z <= -7e-117: tmp = (z * a) / (y * (z + -1.0)) elif z <= 4.9e-27: tmp = y * (x / (y + (z * b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -6.6e-14) tmp = t_1; elseif (z <= -7e-117) tmp = Float64(Float64(z * a) / Float64(y * Float64(z + -1.0))); elseif (z <= 4.9e-27) tmp = Float64(y * Float64(x / Float64(y + Float64(z * b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -6.6e-14) tmp = t_1; elseif (z <= -7e-117) tmp = (z * a) / (y * (z + -1.0)); elseif (z <= 4.9e-27) tmp = y * (x / (y + (z * b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.6e-14], t$95$1, If[LessEqual[z, -7e-117], N[(N[(z * a), $MachinePrecision] / N[(y * N[(z + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.9e-27], N[(y * N[(x / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -6.6 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-117}:\\
\;\;\;\;\frac{z \cdot a}{y \cdot \left(z + -1\right)}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-27}:\\
\;\;\;\;y \cdot \frac{x}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.5999999999999996e-14 or 4.89999999999999976e-27 < z Initial program 45.6%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6479.2%
Simplified79.2%
if -6.5999999999999996e-14 < z < -6.9999999999999997e-117Initial program 94.8%
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f6494.8%
Applied egg-rr94.8%
Taylor expanded in a around inf
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6454.5%
Simplified54.5%
Taylor expanded in y around -inf
/-lowering-/.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-lowering-+.f6454.4%
Simplified54.4%
if -6.9999999999999997e-117 < z < 4.89999999999999976e-27Initial program 89.1%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f6489.1%
Simplified89.1%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f6459.5%
Simplified59.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6460.0%
Applied egg-rr60.0%
Final simplification69.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -3.5e-14)
t_1
(if (<= z -7.6e-117)
(- 0.0 (/ (* z a) y))
(if (<= z 3.8e-27) (* y (/ x (+ y (* z b)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.5e-14) {
tmp = t_1;
} else if (z <= -7.6e-117) {
tmp = 0.0 - ((z * a) / y);
} else if (z <= 3.8e-27) {
tmp = y * (x / (y + (z * b)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-3.5d-14)) then
tmp = t_1
else if (z <= (-7.6d-117)) then
tmp = 0.0d0 - ((z * a) / y)
else if (z <= 3.8d-27) then
tmp = y * (x / (y + (z * b)))
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 b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -3.5e-14) {
tmp = t_1;
} else if (z <= -7.6e-117) {
tmp = 0.0 - ((z * a) / y);
} else if (z <= 3.8e-27) {
tmp = y * (x / (y + (z * b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -3.5e-14: tmp = t_1 elif z <= -7.6e-117: tmp = 0.0 - ((z * a) / y) elif z <= 3.8e-27: tmp = y * (x / (y + (z * b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -3.5e-14) tmp = t_1; elseif (z <= -7.6e-117) tmp = Float64(0.0 - Float64(Float64(z * a) / y)); elseif (z <= 3.8e-27) tmp = Float64(y * Float64(x / Float64(y + Float64(z * b)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -3.5e-14) tmp = t_1; elseif (z <= -7.6e-117) tmp = 0.0 - ((z * a) / y); elseif (z <= 3.8e-27) tmp = y * (x / (y + (z * b))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.5e-14], t$95$1, If[LessEqual[z, -7.6e-117], N[(0.0 - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-27], N[(y * N[(x / N[(y + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-117}:\\
\;\;\;\;0 - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{-27}:\\
\;\;\;\;y \cdot \frac{x}{y + z \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.5000000000000002e-14 or 3.8e-27 < z Initial program 45.6%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6479.2%
Simplified79.2%
if -3.5000000000000002e-14 < z < -7.59999999999999945e-117Initial program 94.8%
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f6494.8%
Applied egg-rr94.8%
Taylor expanded in a around inf
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6454.5%
Simplified54.5%
Taylor expanded in z around 0
Simplified53.8%
if -7.59999999999999945e-117 < z < 3.8e-27Initial program 89.1%
Taylor expanded in b around inf
*-commutativeN/A
*-lowering-*.f6489.1%
Simplified89.1%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f6459.5%
Simplified59.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6460.0%
Applied egg-rr60.0%
Final simplification69.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- t a) (- b y))))
(if (<= z -1.3e-13)
t_1
(if (<= z -5.8e-126)
(- 0.0 (/ (* z a) y))
(if (<= z 1.2e-67) (+ x (* z x)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.3e-13) {
tmp = t_1;
} else if (z <= -5.8e-126) {
tmp = 0.0 - ((z * a) / y);
} else if (z <= 1.2e-67) {
tmp = x + (z * x);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (t - a) / (b - y)
if (z <= (-1.3d-13)) then
tmp = t_1
else if (z <= (-5.8d-126)) then
tmp = 0.0d0 - ((z * a) / y)
else if (z <= 1.2d-67) then
tmp = x + (z * 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 b) {
double t_1 = (t - a) / (b - y);
double tmp;
if (z <= -1.3e-13) {
tmp = t_1;
} else if (z <= -5.8e-126) {
tmp = 0.0 - ((z * a) / y);
} else if (z <= 1.2e-67) {
tmp = x + (z * x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (t - a) / (b - y) tmp = 0 if z <= -1.3e-13: tmp = t_1 elif z <= -5.8e-126: tmp = 0.0 - ((z * a) / y) elif z <= 1.2e-67: tmp = x + (z * x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(t - a) / Float64(b - y)) tmp = 0.0 if (z <= -1.3e-13) tmp = t_1; elseif (z <= -5.8e-126) tmp = Float64(0.0 - Float64(Float64(z * a) / y)); elseif (z <= 1.2e-67) tmp = Float64(x + Float64(z * x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (t - a) / (b - y); tmp = 0.0; if (z <= -1.3e-13) tmp = t_1; elseif (z <= -5.8e-126) tmp = 0.0 - ((z * a) / y); elseif (z <= 1.2e-67) tmp = x + (z * x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(t - a), $MachinePrecision] / N[(b - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e-13], t$95$1, If[LessEqual[z, -5.8e-126], N[(0.0 - N[(N[(z * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.2e-67], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t - a}{b - y}\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-126}:\\
\;\;\;\;0 - \frac{z \cdot a}{y}\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-67}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3e-13 or 1.2e-67 < z Initial program 49.8%
Taylor expanded in z around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
--lowering--.f6475.4%
Simplified75.4%
if -1.3e-13 < z < -5.79999999999999975e-126Initial program 95.1%
flip--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip--N/A
/-lowering-/.f64N/A
--lowering--.f6495.0%
Applied egg-rr95.0%
Taylor expanded in a around inf
associate-*r/N/A
/-lowering-/.f64N/A
mul-1-negN/A
neg-sub0N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f6451.9%
Simplified51.9%
Taylor expanded in z around 0
Simplified51.3%
if -5.79999999999999975e-126 < z < 1.2e-67Initial program 87.8%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6462.0%
Simplified62.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f6462.0%
Simplified62.0%
Final simplification68.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ x (- 1.0 z)))) (if (<= y -9e+40) t_1 (if (<= y 7.5e-28) (/ (- t a) b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -9e+40) {
tmp = t_1;
} else if (y <= 7.5e-28) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-9d+40)) then
tmp = t_1
else if (y <= 7.5d-28) then
tmp = (t - a) / b
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 b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -9e+40) {
tmp = t_1;
} else if (y <= 7.5e-28) {
tmp = (t - a) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -9e+40: tmp = t_1 elif y <= 7.5e-28: tmp = (t - a) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -9e+40) tmp = t_1; elseif (y <= 7.5e-28) tmp = Float64(Float64(t - a) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -9e+40) tmp = t_1; elseif (y <= 7.5e-28) tmp = (t - a) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e+40], t$95$1, If[LessEqual[y, 7.5e-28], N[(N[(t - a), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -9 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{-28}:\\
\;\;\;\;\frac{t - a}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.00000000000000064e40 or 7.5000000000000003e-28 < y Initial program 53.3%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6458.5%
Simplified58.5%
if -9.00000000000000064e40 < y < 7.5000000000000003e-28Initial program 81.1%
Taylor expanded in y around 0
/-lowering-/.f64N/A
--lowering--.f6457.9%
Simplified57.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ x (- 1.0 z)))) (if (<= y -8e-77) t_1 (if (<= y 3.5e-29) (/ t b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -8e-77) {
tmp = t_1;
} else if (y <= 3.5e-29) {
tmp = t / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 - z)
if (y <= (-8d-77)) then
tmp = t_1
else if (y <= 3.5d-29) then
tmp = t / b
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 b) {
double t_1 = x / (1.0 - z);
double tmp;
if (y <= -8e-77) {
tmp = t_1;
} else if (y <= 3.5e-29) {
tmp = t / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 - z) tmp = 0 if y <= -8e-77: tmp = t_1 elif y <= 3.5e-29: tmp = t / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 - z)) tmp = 0.0 if (y <= -8e-77) tmp = t_1; elseif (y <= 3.5e-29) tmp = Float64(t / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 - z); tmp = 0.0; if (y <= -8e-77) tmp = t_1; elseif (y <= 3.5e-29) tmp = t / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -8e-77], t$95$1, If[LessEqual[y, 3.5e-29], N[(t / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 - z}\\
\mathbf{if}\;y \leq -8 \cdot 10^{-77}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 3.5 \cdot 10^{-29}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -7.9999999999999994e-77 or 3.4999999999999997e-29 < y Initial program 57.6%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6452.6%
Simplified52.6%
if -7.9999999999999994e-77 < y < 3.4999999999999997e-29Initial program 82.4%
Taylor expanded in y around 0
associate--l+N/A
div-subN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified45.9%
Taylor expanded in b around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6474.1%
Simplified74.1%
Taylor expanded in t around inf
/-lowering-/.f6440.5%
Simplified40.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -8.8e-7) (/ t b) (if (<= z 5e-64) (+ x (* z x)) (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.8e-7) {
tmp = t / b;
} else if (z <= 5e-64) {
tmp = x + (z * x);
} else {
tmp = t / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (z <= (-8.8d-7)) then
tmp = t / b
else if (z <= 5d-64) then
tmp = x + (z * x)
else
tmp = t / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.8e-7) {
tmp = t / b;
} else if (z <= 5e-64) {
tmp = x + (z * x);
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -8.8e-7: tmp = t / b elif z <= 5e-64: tmp = x + (z * x) else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8.8e-7) tmp = Float64(t / b); elseif (z <= 5e-64) tmp = Float64(x + Float64(z * x)); else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -8.8e-7) tmp = t / b; elseif (z <= 5e-64) tmp = x + (z * x); else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.8e-7], N[(t / b), $MachinePrecision], If[LessEqual[z, 5e-64], N[(x + N[(z * x), $MachinePrecision]), $MachinePrecision], N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 5 \cdot 10^{-64}:\\
\;\;\;\;x + z \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -8.8000000000000004e-7 or 5.00000000000000033e-64 < z Initial program 49.5%
Taylor expanded in y around 0
associate--l+N/A
div-subN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified33.5%
Taylor expanded in b around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6451.2%
Simplified51.2%
Taylor expanded in t around inf
/-lowering-/.f6429.7%
Simplified29.7%
if -8.8000000000000004e-7 < z < 5.00000000000000033e-64Initial program 89.2%
Taylor expanded in y around inf
/-lowering-/.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f6455.2%
Simplified55.2%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f6455.2%
Simplified55.2%
Final simplification41.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.3e-8) (/ t b) (if (<= z 1.08e-63) x (/ t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.3e-8) {
tmp = t / b;
} else if (z <= 1.08e-63) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (z <= (-2.3d-8)) then
tmp = t / b
else if (z <= 1.08d-63) then
tmp = x
else
tmp = t / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.3e-8) {
tmp = t / b;
} else if (z <= 1.08e-63) {
tmp = x;
} else {
tmp = t / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.3e-8: tmp = t / b elif z <= 1.08e-63: tmp = x else: tmp = t / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.3e-8) tmp = Float64(t / b); elseif (z <= 1.08e-63) tmp = x; else tmp = Float64(t / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.3e-8) tmp = t / b; elseif (z <= 1.08e-63) tmp = x; else tmp = t / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.3e-8], N[(t / b), $MachinePrecision], If[LessEqual[z, 1.08e-63], x, N[(t / b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-8}:\\
\;\;\;\;\frac{t}{b}\\
\mathbf{elif}\;z \leq 1.08 \cdot 10^{-63}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{t}{b}\\
\end{array}
\end{array}
if z < -2.3000000000000001e-8 or 1.07999999999999994e-63 < z Initial program 49.5%
Taylor expanded in y around 0
associate--l+N/A
div-subN/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
Simplified33.5%
Taylor expanded in b around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-commutativeN/A
*-lowering-*.f6451.2%
Simplified51.2%
Taylor expanded in t around inf
/-lowering-/.f6429.7%
Simplified29.7%
if -2.3000000000000001e-8 < z < 1.07999999999999994e-63Initial program 89.2%
Taylor expanded in z around 0
Simplified55.2%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 67.3%
Taylor expanded in z around 0
Simplified27.2%
(FPCore (x y z t a b) :precision binary64 (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)));
}
def code(x, y, z, t, a, b): return (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z)))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(z * t) + Float64(y * x)) / Float64(y + Float64(z * Float64(b - y)))) - Float64(a / Float64(Float64(b - y) + Float64(y / z)))) end
function tmp = code(x, y, z, t, a, b) tmp = (((z * t) + (y * x)) / (y + (z * (b - y)))) - (a / ((b - y) + (y / z))); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(z * t), $MachinePrecision] + N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(y + N[(z * N[(b - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(a / N[(N[(b - y), $MachinePrecision] + N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{z \cdot t + y \cdot x}{y + z \cdot \left(b - y\right)} - \frac{a}{\left(b - y\right) + \frac{y}{z}}
\end{array}
herbie shell --seed 2024161
(FPCore (x y z t a b)
:name "Development.Shake.Progress:decay from shake-0.15.5"
:precision binary64
:alt
(! :herbie-platform default (- (/ (+ (* z t) (* y x)) (+ y (* z (- b y)))) (/ a (+ (- b y) (/ y z)))))
(/ (+ (* x y) (* z (- t a))) (+ y (* z (- b y)))))