
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
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)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
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)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (+ y (* a (+ b (/ t z))))))))
(if (<= z -1.12e-86)
t_1
(if (<= z 1e+87) (+ x (+ (* y z) (* a (+ t (* z b))))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (y + (a * (b + (t / z)))));
double tmp;
if (z <= -1.12e-86) {
tmp = t_1;
} else if (z <= 1e+87) {
tmp = x + ((y * z) + (a * (t + (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 = x + (z * (y + (a * (b + (t / z)))))
if (z <= (-1.12d-86)) then
tmp = t_1
else if (z <= 1d+87) then
tmp = x + ((y * z) + (a * (t + (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 = x + (z * (y + (a * (b + (t / z)))));
double tmp;
if (z <= -1.12e-86) {
tmp = t_1;
} else if (z <= 1e+87) {
tmp = x + ((y * z) + (a * (t + (z * b))));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (y + (a * (b + (t / z))))) tmp = 0 if z <= -1.12e-86: tmp = t_1 elif z <= 1e+87: tmp = x + ((y * z) + (a * (t + (z * b)))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(y + Float64(a * Float64(b + Float64(t / z)))))) tmp = 0.0 if (z <= -1.12e-86) tmp = t_1; elseif (z <= 1e+87) tmp = Float64(x + Float64(Float64(y * z) + Float64(a * Float64(t + Float64(z * b))))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * (y + (a * (b + (t / z))))); tmp = 0.0; if (z <= -1.12e-86) tmp = t_1; elseif (z <= 1e+87) tmp = x + ((y * z) + (a * (t + (z * b)))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(y + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.12e-86], t$95$1, If[LessEqual[z, 1e+87], N[(x + N[(N[(y * z), $MachinePrecision] + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(y + a \cdot \left(b + \frac{t}{z}\right)\right)\\
\mathbf{if}\;z \leq -1.12 \cdot 10^{-86}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 10^{+87}:\\
\;\;\;\;x + \left(y \cdot z + a \cdot \left(t + z \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.12e-86 or 9.9999999999999996e86 < z Initial program 85.6%
Taylor expanded in z around inf
associate-+r+N/A
+-commutativeN/A
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
+-lowering-+.f64N/A
Simplified99.9%
if -1.12e-86 < z < 9.9999999999999996e86Initial program 98.4%
associate-+l+N/A
+-commutativeN/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64100.0%
Applied egg-rr100.0%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (* (* z a) b) (+ (* t a) (+ x (* y z)))))) (if (<= t_1 5e+304) t_1 (+ x (* z (+ y (* a (+ b (/ t z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((z * a) * b) + ((t * a) + (x + (y * z)));
double tmp;
if (t_1 <= 5e+304) {
tmp = t_1;
} else {
tmp = x + (z * (y + (a * (b + (t / z)))));
}
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 = ((z * a) * b) + ((t * a) + (x + (y * z)))
if (t_1 <= 5d+304) then
tmp = t_1
else
tmp = x + (z * (y + (a * (b + (t / z)))))
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 = ((z * a) * b) + ((t * a) + (x + (y * z)));
double tmp;
if (t_1 <= 5e+304) {
tmp = t_1;
} else {
tmp = x + (z * (y + (a * (b + (t / z)))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((z * a) * b) + ((t * a) + (x + (y * z))) tmp = 0 if t_1 <= 5e+304: tmp = t_1 else: tmp = x + (z * (y + (a * (b + (t / z))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(z * a) * b) + Float64(Float64(t * a) + Float64(x + Float64(y * z)))) tmp = 0.0 if (t_1 <= 5e+304) tmp = t_1; else tmp = Float64(x + Float64(z * Float64(y + Float64(a * Float64(b + Float64(t / z)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((z * a) * b) + ((t * a) + (x + (y * z))); tmp = 0.0; if (t_1 <= 5e+304) tmp = t_1; else tmp = x + (z * (y + (a * (b + (t / z))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+304], t$95$1, N[(x + N[(z * N[(y + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot a\right) \cdot b + \left(t \cdot a + \left(x + y \cdot z\right)\right)\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot \left(b + \frac{t}{z}\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 4.9999999999999997e304Initial program 98.6%
if 4.9999999999999997e304 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 67.0%
Taylor expanded in z around inf
associate-+r+N/A
+-commutativeN/A
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
+-lowering-+.f64N/A
Simplified99.9%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* a b))))
(if (<= z -2.6e+113)
(/ z (/ 1.0 t_1))
(if (<= z 8.2e-13)
(+ (* t a) (+ x (* y z)))
(if (<= z 3.1e+186) (+ x (+ (* y z) (* a (* z b)))) (* z t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (a * b);
double tmp;
if (z <= -2.6e+113) {
tmp = z / (1.0 / t_1);
} else if (z <= 8.2e-13) {
tmp = (t * a) + (x + (y * z));
} else if (z <= 3.1e+186) {
tmp = x + ((y * z) + (a * (z * b)));
} else {
tmp = z * 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 = y + (a * b)
if (z <= (-2.6d+113)) then
tmp = z / (1.0d0 / t_1)
else if (z <= 8.2d-13) then
tmp = (t * a) + (x + (y * z))
else if (z <= 3.1d+186) then
tmp = x + ((y * z) + (a * (z * b)))
else
tmp = z * 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 = y + (a * b);
double tmp;
if (z <= -2.6e+113) {
tmp = z / (1.0 / t_1);
} else if (z <= 8.2e-13) {
tmp = (t * a) + (x + (y * z));
} else if (z <= 3.1e+186) {
tmp = x + ((y * z) + (a * (z * b)));
} else {
tmp = z * t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (a * b) tmp = 0 if z <= -2.6e+113: tmp = z / (1.0 / t_1) elif z <= 8.2e-13: tmp = (t * a) + (x + (y * z)) elif z <= 3.1e+186: tmp = x + ((y * z) + (a * (z * b))) else: tmp = z * t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(a * b)) tmp = 0.0 if (z <= -2.6e+113) tmp = Float64(z / Float64(1.0 / t_1)); elseif (z <= 8.2e-13) tmp = Float64(Float64(t * a) + Float64(x + Float64(y * z))); elseif (z <= 3.1e+186) tmp = Float64(x + Float64(Float64(y * z) + Float64(a * Float64(z * b)))); else tmp = Float64(z * t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (a * b); tmp = 0.0; if (z <= -2.6e+113) tmp = z / (1.0 / t_1); elseif (z <= 8.2e-13) tmp = (t * a) + (x + (y * z)); elseif (z <= 3.1e+186) tmp = x + ((y * z) + (a * (z * b))); else tmp = z * t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.6e+113], N[(z / N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-13], N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.1e+186], N[(x + N[(N[(y * z), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + a \cdot b\\
\mathbf{if}\;z \leq -2.6 \cdot 10^{+113}:\\
\;\;\;\;\frac{z}{\frac{1}{t\_1}}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-13}:\\
\;\;\;\;t \cdot a + \left(x + y \cdot z\right)\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{+186}:\\
\;\;\;\;x + \left(y \cdot z + a \cdot \left(z \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\_1\\
\end{array}
\end{array}
if z < -2.5999999999999999e113Initial program 81.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6487.4%
Simplified87.4%
flip-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6487.5%
Applied egg-rr87.5%
if -2.5999999999999999e113 < z < 8.2000000000000004e-13Initial program 99.3%
Taylor expanded in b around 0
Simplified92.0%
if 8.2000000000000004e-13 < z < 3.1000000000000001e186Initial program 89.0%
associate-+l+N/A
+-commutativeN/A
+-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6495.7%
Applied egg-rr95.7%
Taylor expanded in t around 0
*-commutativeN/A
*-lowering-*.f6489.1%
Simplified89.1%
if 3.1000000000000001e186 < z Initial program 78.3%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6495.9%
Simplified95.9%
Final simplification91.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -4.2e-28)
(* y z)
(if (<= z -2.5e-141)
x
(if (<= z 5.4e-289) (* t a) (if (<= z 6.8e-110) x (* y z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.2e-28) {
tmp = y * z;
} else if (z <= -2.5e-141) {
tmp = x;
} else if (z <= 5.4e-289) {
tmp = t * a;
} else if (z <= 6.8e-110) {
tmp = x;
} else {
tmp = y * z;
}
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 <= (-4.2d-28)) then
tmp = y * z
else if (z <= (-2.5d-141)) then
tmp = x
else if (z <= 5.4d-289) then
tmp = t * a
else if (z <= 6.8d-110) then
tmp = x
else
tmp = y * z
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 <= -4.2e-28) {
tmp = y * z;
} else if (z <= -2.5e-141) {
tmp = x;
} else if (z <= 5.4e-289) {
tmp = t * a;
} else if (z <= 6.8e-110) {
tmp = x;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4.2e-28: tmp = y * z elif z <= -2.5e-141: tmp = x elif z <= 5.4e-289: tmp = t * a elif z <= 6.8e-110: tmp = x else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.2e-28) tmp = Float64(y * z); elseif (z <= -2.5e-141) tmp = x; elseif (z <= 5.4e-289) tmp = Float64(t * a); elseif (z <= 6.8e-110) tmp = x; else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4.2e-28) tmp = y * z; elseif (z <= -2.5e-141) tmp = x; elseif (z <= 5.4e-289) tmp = t * a; elseif (z <= 6.8e-110) tmp = x; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.2e-28], N[(y * z), $MachinePrecision], If[LessEqual[z, -2.5e-141], x, If[LessEqual[z, 5.4e-289], N[(t * a), $MachinePrecision], If[LessEqual[z, 6.8e-110], x, N[(y * z), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{-28}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -2.5 \cdot 10^{-141}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.4 \cdot 10^{-289}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-110}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if z < -4.20000000000000013e-28 or 6.8000000000000002e-110 < z Initial program 87.8%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6446.6%
Simplified46.6%
if -4.20000000000000013e-28 < z < -2.5e-141 or 5.4e-289 < z < 6.8000000000000002e-110Initial program 99.9%
Taylor expanded in x around inf
Simplified53.5%
if -2.5e-141 < z < 5.4e-289Initial program 100.0%
Taylor expanded in t around inf
*-lowering-*.f6457.2%
Simplified57.2%
Final simplification49.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ x (* z (+ y (* a (+ b (/ t z)))))))) (if (<= z -1.95e-90) t_1 (if (<= z 7e-110) (+ (* t a) (+ x (* y z))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (y + (a * (b + (t / z)))));
double tmp;
if (z <= -1.95e-90) {
tmp = t_1;
} else if (z <= 7e-110) {
tmp = (t * a) + (x + (y * z));
} 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 + (z * (y + (a * (b + (t / z)))))
if (z <= (-1.95d-90)) then
tmp = t_1
else if (z <= 7d-110) then
tmp = (t * a) + (x + (y * 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 b) {
double t_1 = x + (z * (y + (a * (b + (t / z)))));
double tmp;
if (z <= -1.95e-90) {
tmp = t_1;
} else if (z <= 7e-110) {
tmp = (t * a) + (x + (y * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (y + (a * (b + (t / z))))) tmp = 0 if z <= -1.95e-90: tmp = t_1 elif z <= 7e-110: tmp = (t * a) + (x + (y * z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(y + Float64(a * Float64(b + Float64(t / z)))))) tmp = 0.0 if (z <= -1.95e-90) tmp = t_1; elseif (z <= 7e-110) tmp = Float64(Float64(t * a) + Float64(x + Float64(y * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * (y + (a * (b + (t / z))))); tmp = 0.0; if (z <= -1.95e-90) tmp = t_1; elseif (z <= 7e-110) tmp = (t * a) + (x + (y * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(y + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.95e-90], t$95$1, If[LessEqual[z, 7e-110], N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(y + a \cdot \left(b + \frac{t}{z}\right)\right)\\
\mathbf{if}\;z \leq -1.95 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 7 \cdot 10^{-110}:\\
\;\;\;\;t \cdot a + \left(x + y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.95000000000000002e-90 or 6.99999999999999947e-110 < z Initial program 88.4%
Taylor expanded in z around inf
associate-+r+N/A
+-commutativeN/A
associate-+r+N/A
distribute-lft-inN/A
*-commutativeN/A
associate-*l/N/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
+-lowering-+.f64N/A
Simplified98.8%
if -1.95000000000000002e-90 < z < 6.99999999999999947e-110Initial program 100.0%
Taylor expanded in b around 0
Simplified97.5%
Final simplification98.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))))
(if (<= z -1.3e+194)
(* z (* a b))
(if (<= z -6.2e-28) t_1 (if (<= z 6.8e-110) (+ x (* t a)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (z <= -1.3e+194) {
tmp = z * (a * b);
} else if (z <= -6.2e-28) {
tmp = t_1;
} else if (z <= 6.8e-110) {
tmp = x + (t * a);
} 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 + (y * z)
if (z <= (-1.3d+194)) then
tmp = z * (a * b)
else if (z <= (-6.2d-28)) then
tmp = t_1
else if (z <= 6.8d-110) then
tmp = x + (t * a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (z <= -1.3e+194) {
tmp = z * (a * b);
} else if (z <= -6.2e-28) {
tmp = t_1;
} else if (z <= 6.8e-110) {
tmp = x + (t * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) tmp = 0 if z <= -1.3e+194: tmp = z * (a * b) elif z <= -6.2e-28: tmp = t_1 elif z <= 6.8e-110: tmp = x + (t * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) tmp = 0.0 if (z <= -1.3e+194) tmp = Float64(z * Float64(a * b)); elseif (z <= -6.2e-28) tmp = t_1; elseif (z <= 6.8e-110) tmp = Float64(x + Float64(t * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); tmp = 0.0; if (z <= -1.3e+194) tmp = z * (a * b); elseif (z <= -6.2e-28) tmp = t_1; elseif (z <= 6.8e-110) tmp = x + (t * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+194], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.2e-28], t$95$1, If[LessEqual[z, 6.8e-110], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{+194}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq -6.2 \cdot 10^{-28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-110}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.2999999999999999e194Initial program 77.3%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f6436.0%
Simplified36.0%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6454.4%
Applied egg-rr54.4%
if -1.2999999999999999e194 < z < -6.19999999999999984e-28 or 6.8000000000000002e-110 < z Initial program 90.2%
Taylor expanded in a around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6465.4%
Simplified65.4%
if -6.19999999999999984e-28 < z < 6.8000000000000002e-110Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6486.9%
Simplified86.9%
Final simplification72.1%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.05e+194) (* z (* a b)) (if (<= z -6.5e-24) (* y z) (if (<= z 4.5e+65) (+ x (* t a)) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.05e+194) {
tmp = z * (a * b);
} else if (z <= -6.5e-24) {
tmp = y * z;
} else if (z <= 4.5e+65) {
tmp = x + (t * a);
} else {
tmp = y * z;
}
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 <= (-1.05d+194)) then
tmp = z * (a * b)
else if (z <= (-6.5d-24)) then
tmp = y * z
else if (z <= 4.5d+65) then
tmp = x + (t * a)
else
tmp = y * z
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 <= -1.05e+194) {
tmp = z * (a * b);
} else if (z <= -6.5e-24) {
tmp = y * z;
} else if (z <= 4.5e+65) {
tmp = x + (t * a);
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.05e+194: tmp = z * (a * b) elif z <= -6.5e-24: tmp = y * z elif z <= 4.5e+65: tmp = x + (t * a) else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.05e+194) tmp = Float64(z * Float64(a * b)); elseif (z <= -6.5e-24) tmp = Float64(y * z); elseif (z <= 4.5e+65) tmp = Float64(x + Float64(t * a)); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.05e+194) tmp = z * (a * b); elseif (z <= -6.5e-24) tmp = y * z; elseif (z <= 4.5e+65) tmp = x + (t * a); else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.05e+194], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.5e-24], N[(y * z), $MachinePrecision], If[LessEqual[z, 4.5e+65], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(y * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+194}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq -6.5 \cdot 10^{-24}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{+65}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if z < -1.05000000000000008e194Initial program 77.3%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f6436.0%
Simplified36.0%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6454.4%
Applied egg-rr54.4%
if -1.05000000000000008e194 < z < -6.5e-24 or 4.5e65 < z Initial program 88.3%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6455.9%
Simplified55.9%
if -6.5e-24 < z < 4.5e65Initial program 98.4%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6474.3%
Simplified74.3%
Final simplification65.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (* a b))))
(if (<= z -2.9e+113)
(/ z (/ 1.0 t_1))
(if (<= z 9.6e+91) (+ (* t a) (+ x (* y z))) (* z t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (a * b);
double tmp;
if (z <= -2.9e+113) {
tmp = z / (1.0 / t_1);
} else if (z <= 9.6e+91) {
tmp = (t * a) + (x + (y * z));
} else {
tmp = z * 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 = y + (a * b)
if (z <= (-2.9d+113)) then
tmp = z / (1.0d0 / t_1)
else if (z <= 9.6d+91) then
tmp = (t * a) + (x + (y * z))
else
tmp = z * 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 = y + (a * b);
double tmp;
if (z <= -2.9e+113) {
tmp = z / (1.0 / t_1);
} else if (z <= 9.6e+91) {
tmp = (t * a) + (x + (y * z));
} else {
tmp = z * t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (a * b) tmp = 0 if z <= -2.9e+113: tmp = z / (1.0 / t_1) elif z <= 9.6e+91: tmp = (t * a) + (x + (y * z)) else: tmp = z * t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(a * b)) tmp = 0.0 if (z <= -2.9e+113) tmp = Float64(z / Float64(1.0 / t_1)); elseif (z <= 9.6e+91) tmp = Float64(Float64(t * a) + Float64(x + Float64(y * z))); else tmp = Float64(z * t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (a * b); tmp = 0.0; if (z <= -2.9e+113) tmp = z / (1.0 / t_1); elseif (z <= 9.6e+91) tmp = (t * a) + (x + (y * z)); else tmp = z * t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+113], N[(z / N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.6e+91], N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + a \cdot b\\
\mathbf{if}\;z \leq -2.9 \cdot 10^{+113}:\\
\;\;\;\;\frac{z}{\frac{1}{t\_1}}\\
\mathbf{elif}\;z \leq 9.6 \cdot 10^{+91}:\\
\;\;\;\;t \cdot a + \left(x + y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot t\_1\\
\end{array}
\end{array}
if z < -2.89999999999999984e113Initial program 81.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6487.4%
Simplified87.4%
flip-+N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip-+N/A
/-lowering-/.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6487.5%
Applied egg-rr87.5%
if -2.89999999999999984e113 < z < 9.59999999999999932e91Initial program 98.2%
Taylor expanded in b around 0
Simplified89.3%
if 9.59999999999999932e91 < z Initial program 80.6%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6488.2%
Simplified88.2%
Final simplification88.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -1.35e+115)
t_1
(if (<= z 1.2e+88) (+ (* t a) (+ x (* y z))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -1.35e+115) {
tmp = t_1;
} else if (z <= 1.2e+88) {
tmp = (t * a) + (x + (y * z));
} 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 = z * (y + (a * b))
if (z <= (-1.35d+115)) then
tmp = t_1
else if (z <= 1.2d+88) then
tmp = (t * a) + (x + (y * 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 b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -1.35e+115) {
tmp = t_1;
} else if (z <= 1.2e+88) {
tmp = (t * a) + (x + (y * z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -1.35e+115: tmp = t_1 elif z <= 1.2e+88: tmp = (t * a) + (x + (y * z)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -1.35e+115) tmp = t_1; elseif (z <= 1.2e+88) tmp = Float64(Float64(t * a) + Float64(x + Float64(y * z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -1.35e+115) tmp = t_1; elseif (z <= 1.2e+88) tmp = (t * a) + (x + (y * z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.35e+115], t$95$1, If[LessEqual[z, 1.2e+88], N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{+88}:\\
\;\;\;\;t \cdot a + \left(x + y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.35000000000000002e115 or 1.2e88 < z Initial program 80.8%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6487.8%
Simplified87.8%
if -1.35000000000000002e115 < z < 1.2e88Initial program 98.2%
Taylor expanded in b around 0
Simplified89.3%
Final simplification88.8%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* z (+ y (* a b))))) (if (<= z -1.3e-24) t_1 (if (<= z 8.5e-13) (+ x (* t a)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -1.3e-24) {
tmp = t_1;
} else if (z <= 8.5e-13) {
tmp = x + (t * a);
} 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 = z * (y + (a * b))
if (z <= (-1.3d-24)) then
tmp = t_1
else if (z <= 8.5d-13) then
tmp = x + (t * a)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -1.3e-24) {
tmp = t_1;
} else if (z <= 8.5e-13) {
tmp = x + (t * a);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -1.3e-24: tmp = t_1 elif z <= 8.5e-13: tmp = x + (t * a) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -1.3e-24) tmp = t_1; elseif (z <= 8.5e-13) tmp = Float64(x + Float64(t * a)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -1.3e-24) tmp = t_1; elseif (z <= 8.5e-13) tmp = x + (t * a); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e-24], t$95$1, If[LessEqual[z, 8.5e-13], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -1.3 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-13}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.3e-24 or 8.5000000000000001e-13 < z Initial program 86.0%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6481.4%
Simplified81.4%
if -1.3e-24 < z < 8.5000000000000001e-13Initial program 99.9%
Taylor expanded in z around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6480.3%
Simplified80.3%
Final simplification80.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* a (+ t (* z b))))) (if (<= a -1.3e+50) t_1 (if (<= a 6.8e-40) (+ x (* y z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (z * b));
double tmp;
if (a <= -1.3e+50) {
tmp = t_1;
} else if (a <= 6.8e-40) {
tmp = x + (y * z);
} 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 = a * (t + (z * b))
if (a <= (-1.3d+50)) then
tmp = t_1
else if (a <= 6.8d-40) then
tmp = x + (y * 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 b) {
double t_1 = a * (t + (z * b));
double tmp;
if (a <= -1.3e+50) {
tmp = t_1;
} else if (a <= 6.8e-40) {
tmp = x + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + (z * b)) tmp = 0 if a <= -1.3e+50: tmp = t_1 elif a <= 6.8e-40: tmp = x + (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t + Float64(z * b))) tmp = 0.0 if (a <= -1.3e+50) tmp = t_1; elseif (a <= 6.8e-40) tmp = Float64(x + Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t + (z * b)); tmp = 0.0; if (a <= -1.3e+50) tmp = t_1; elseif (a <= 6.8e-40) tmp = x + (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.3e+50], t$95$1, If[LessEqual[a, 6.8e-40], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + z \cdot b\right)\\
\mathbf{if}\;a \leq -1.3 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{-40}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.3000000000000001e50 or 6.79999999999999968e-40 < a Initial program 86.8%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6474.1%
Simplified74.1%
if -1.3000000000000001e50 < a < 6.79999999999999968e-40Initial program 97.0%
Taylor expanded in a around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6481.3%
Simplified81.3%
Final simplification78.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a -6.2e+49) (* z (* a b)) (if (<= a 4.1e+30) (* y z) (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6.2e+49) {
tmp = z * (a * b);
} else if (a <= 4.1e+30) {
tmp = y * z;
} else {
tmp = t * a;
}
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 (a <= (-6.2d+49)) then
tmp = z * (a * b)
else if (a <= 4.1d+30) then
tmp = y * z
else
tmp = t * a
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 (a <= -6.2e+49) {
tmp = z * (a * b);
} else if (a <= 4.1e+30) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6.2e+49: tmp = z * (a * b) elif a <= 4.1e+30: tmp = y * z else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6.2e+49) tmp = Float64(z * Float64(a * b)); elseif (a <= 4.1e+30) tmp = Float64(y * z); else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -6.2e+49) tmp = z * (a * b); elseif (a <= 4.1e+30) tmp = y * z; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6.2e+49], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.1e+30], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.2 \cdot 10^{+49}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{+30}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -6.19999999999999985e49Initial program 85.0%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f6449.3%
Simplified49.3%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6453.5%
Applied egg-rr53.5%
if -6.19999999999999985e49 < a < 4.10000000000000005e30Initial program 96.6%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6444.6%
Simplified44.6%
if 4.10000000000000005e30 < a Initial program 86.6%
Taylor expanded in t around inf
*-lowering-*.f6449.8%
Simplified49.8%
Final simplification47.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a -5.5e+49) (* a (* z b)) (if (<= a 1.45e+29) (* y z) (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5.5e+49) {
tmp = a * (z * b);
} else if (a <= 1.45e+29) {
tmp = y * z;
} else {
tmp = t * a;
}
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 (a <= (-5.5d+49)) then
tmp = a * (z * b)
else if (a <= 1.45d+29) then
tmp = y * z
else
tmp = t * a
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 (a <= -5.5e+49) {
tmp = a * (z * b);
} else if (a <= 1.45e+29) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -5.5e+49: tmp = a * (z * b) elif a <= 1.45e+29: tmp = y * z else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -5.5e+49) tmp = Float64(a * Float64(z * b)); elseif (a <= 1.45e+29) tmp = Float64(y * z); else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -5.5e+49) tmp = a * (z * b); elseif (a <= 1.45e+29) tmp = y * z; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -5.5e+49], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.45e+29], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5.5 \cdot 10^{+49}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;a \leq 1.45 \cdot 10^{+29}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -5.50000000000000042e49Initial program 85.0%
Taylor expanded in b around inf
*-lowering-*.f64N/A
*-lowering-*.f6449.3%
Simplified49.3%
if -5.50000000000000042e49 < a < 1.45e29Initial program 96.6%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6444.6%
Simplified44.6%
if 1.45e29 < a Initial program 86.6%
Taylor expanded in t around inf
*-lowering-*.f6449.8%
Simplified49.8%
Final simplification46.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a -5e+121) (* t a) (if (<= a 1.65e+15) x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -5e+121) {
tmp = t * a;
} else if (a <= 1.65e+15) {
tmp = x;
} else {
tmp = t * a;
}
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 (a <= (-5d+121)) then
tmp = t * a
else if (a <= 1.65d+15) then
tmp = x
else
tmp = t * a
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 (a <= -5e+121) {
tmp = t * a;
} else if (a <= 1.65e+15) {
tmp = x;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -5e+121: tmp = t * a elif a <= 1.65e+15: tmp = x else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -5e+121) tmp = Float64(t * a); elseif (a <= 1.65e+15) tmp = x; else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -5e+121) tmp = t * a; elseif (a <= 1.65e+15) tmp = x; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -5e+121], N[(t * a), $MachinePrecision], If[LessEqual[a, 1.65e+15], x, N[(t * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{+121}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{+15}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -5.00000000000000007e121 or 1.65e15 < a Initial program 85.9%
Taylor expanded in t around inf
*-lowering-*.f6447.8%
Simplified47.8%
if -5.00000000000000007e121 < a < 1.65e15Initial program 96.2%
Taylor expanded in x around inf
Simplified34.3%
Final simplification39.4%
(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 92.3%
Taylor expanded in x around inf
Simplified26.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(if (< z -11820553527347888000.0)
t_1
(if (< z 4.7589743188364287e-122)
(+ (* (+ (* b z) t) a) (+ (* z y) x))
t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + 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 = (z * ((b * a) + y)) + (x + (t * a))
if (z < (-11820553527347888000.0d0)) then
tmp = t_1
else if (z < 4.7589743188364287d-122) then
tmp = (((b * z) + t) * a) + ((z * y) + 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 = (z * ((b * a) + y)) + (x + (t * a));
double tmp;
if (z < -11820553527347888000.0) {
tmp = t_1;
} else if (z < 4.7589743188364287e-122) {
tmp = (((b * z) + t) * a) + ((z * y) + x);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * ((b * a) + y)) + (x + (t * a)) tmp = 0 if z < -11820553527347888000.0: tmp = t_1 elif z < 4.7589743188364287e-122: tmp = (((b * z) + t) * a) + ((z * y) + x) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * Float64(Float64(b * a) + y)) + Float64(x + Float64(t * a))) tmp = 0.0 if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = Float64(Float64(Float64(Float64(b * z) + t) * a) + Float64(Float64(z * y) + x)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * ((b * a) + y)) + (x + (t * a)); tmp = 0.0; if (z < -11820553527347888000.0) tmp = t_1; elseif (z < 4.7589743188364287e-122) tmp = (((b * z) + t) * a) + ((z * y) + x); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(N[(b * a), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision] + N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -11820553527347888000.0], t$95$1, If[Less[z, 4.7589743188364287e-122], N[(N[(N[(N[(b * z), $MachinePrecision] + t), $MachinePrecision] * a), $MachinePrecision] + N[(N[(z * y), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(b \cdot a + y\right) + \left(x + t \cdot a\right)\\
\mathbf{if}\;z < -11820553527347888000:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z < 4.7589743188364287 \cdot 10^{-122}:\\
\;\;\;\;\left(b \cdot z + t\right) \cdot a + \left(z \cdot y + x\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024191
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:alt
(! :herbie-platform default (if (< z -11820553527347888000) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 47589743188364287/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a))))))
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))