
(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 13 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 (* z (+ y (+ (/ x z) (* a (+ b (/ t z))))))))
(if (<= z -2e+27)
t_1
(if (<= z 0.0005) (+ (+ x (* a (+ t (* z b)))) (* y z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + ((x / z) + (a * (b + (t / z)))));
double tmp;
if (z <= -2e+27) {
tmp = t_1;
} else if (z <= 0.0005) {
tmp = (x + (a * (t + (z * b)))) + (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 + ((x / z) + (a * (b + (t / z)))))
if (z <= (-2d+27)) then
tmp = t_1
else if (z <= 0.0005d0) then
tmp = (x + (a * (t + (z * b)))) + (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 + ((x / z) + (a * (b + (t / z)))));
double tmp;
if (z <= -2e+27) {
tmp = t_1;
} else if (z <= 0.0005) {
tmp = (x + (a * (t + (z * b)))) + (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + ((x / z) + (a * (b + (t / z))))) tmp = 0 if z <= -2e+27: tmp = t_1 elif z <= 0.0005: tmp = (x + (a * (t + (z * b)))) + (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z)))))) tmp = 0.0 if (z <= -2e+27) tmp = t_1; elseif (z <= 0.0005) tmp = Float64(Float64(x + Float64(a * Float64(t + Float64(z * b)))) + 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 + ((x / z) + (a * (b + (t / z))))); tmp = 0.0; if (z <= -2e+27) tmp = t_1; elseif (z <= 0.0005) tmp = (x + (a * (t + (z * b)))) + (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[(N[(x / z), $MachinePrecision] + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2e+27], t$95$1, If[LessEqual[z, 0.0005], N[(N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\
\mathbf{if}\;z \leq -2 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 0.0005:\\
\;\;\;\;\left(x + a \cdot \left(t + z \cdot b\right)\right) + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2e27 or 5.0000000000000001e-4 < z Initial program 83.9%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6483.1%
Simplified83.1%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-/l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f6499.9%
Simplified99.9%
if -2e27 < z < 5.0000000000000001e-4Initial program 98.6%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* (* z a) b)))) (if (<= t_1 1e+308) t_1 (* z (+ y (+ (/ x z) (* a (+ b (/ t z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= 1e+308) {
tmp = t_1;
} else {
tmp = z * (y + ((x / z) + (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 = ((x + (y * z)) + (t * a)) + ((z * a) * b)
if (t_1 <= 1d+308) then
tmp = t_1
else
tmp = z * (y + ((x / z) + (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 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= 1e+308) {
tmp = t_1;
} else {
tmp = z * (y + ((x / z) + (a * (b + (t / z)))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b) tmp = 0 if t_1 <= 1e+308: tmp = t_1 else: tmp = z * (y + ((x / z) + (a * (b + (t / z))))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(z * a) * b)) tmp = 0.0 if (t_1 <= 1e+308) tmp = t_1; else tmp = Float64(z * Float64(y + Float64(Float64(x / z) + Float64(a * Float64(b + Float64(t / z)))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b); tmp = 0.0; if (t_1 <= 1e+308) tmp = t_1; else tmp = z * (y + ((x / z) + (a * (b + (t / z))))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+308], t$95$1, N[(z * N[(y + N[(N[(x / z), $MachinePrecision] + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq 10^{+308}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + \left(\frac{x}{z} + a \cdot \left(b + \frac{t}{z}\right)\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 1e308Initial program 98.1%
if 1e308 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 66.7%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6480.4%
Simplified80.4%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
+-commutativeN/A
associate-+l+N/A
+-commutativeN/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
associate-/l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64100.0%
Simplified100.0%
Final simplification98.5%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.26e+61) (+ x (* y z)) (if (<= x 4.5e+113) (+ (* z (+ y (* a b))) (* t a)) (+ x (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.26e+61) {
tmp = x + (y * z);
} else if (x <= 4.5e+113) {
tmp = (z * (y + (a * b))) + (t * a);
} else {
tmp = x + (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 (x <= (-1.26d+61)) then
tmp = x + (y * z)
else if (x <= 4.5d+113) then
tmp = (z * (y + (a * b))) + (t * a)
else
tmp = x + (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 (x <= -1.26e+61) {
tmp = x + (y * z);
} else if (x <= 4.5e+113) {
tmp = (z * (y + (a * b))) + (t * a);
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.26e+61: tmp = x + (y * z) elif x <= 4.5e+113: tmp = (z * (y + (a * b))) + (t * a) else: tmp = x + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.26e+61) tmp = Float64(x + Float64(y * z)); elseif (x <= 4.5e+113) tmp = Float64(Float64(z * Float64(y + Float64(a * b))) + Float64(t * a)); else tmp = Float64(x + Float64(t * a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.26e+61) tmp = x + (y * z); elseif (x <= 4.5e+113) tmp = (z * (y + (a * b))) + (t * a); else tmp = x + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.26e+61], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+113], N[(N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.26 \cdot 10^{+61}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+113}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right) + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if x < -1.2600000000000001e61Initial program 96.2%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6498.2%
Simplified98.2%
Taylor expanded in x around inf
Simplified75.8%
if -1.2600000000000001e61 < x < 4.5000000000000001e113Initial program 90.0%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6490.0%
Simplified90.0%
Taylor expanded in x around 0
distribute-lft-inN/A
associate-+r+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6487.7%
Simplified87.7%
if 4.5000000000000001e113 < x Initial program 94.2%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6494.3%
Simplified94.3%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f6481.0%
Simplified81.0%
Final simplification84.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.8e+172)
(* y z)
(if (<= z -9.6e-33)
(* z (* a b))
(if (<= z 105000.0) (+ x (* t a)) (* (* z a) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.8e+172) {
tmp = y * z;
} else if (z <= -9.6e-33) {
tmp = z * (a * b);
} else if (z <= 105000.0) {
tmp = x + (t * a);
} else {
tmp = (z * a) * 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.8d+172)) then
tmp = y * z
else if (z <= (-9.6d-33)) then
tmp = z * (a * b)
else if (z <= 105000.0d0) then
tmp = x + (t * a)
else
tmp = (z * a) * 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.8e+172) {
tmp = y * z;
} else if (z <= -9.6e-33) {
tmp = z * (a * b);
} else if (z <= 105000.0) {
tmp = x + (t * a);
} else {
tmp = (z * a) * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.8e+172: tmp = y * z elif z <= -9.6e-33: tmp = z * (a * b) elif z <= 105000.0: tmp = x + (t * a) else: tmp = (z * a) * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.8e+172) tmp = Float64(y * z); elseif (z <= -9.6e-33) tmp = Float64(z * Float64(a * b)); elseif (z <= 105000.0) tmp = Float64(x + Float64(t * a)); else tmp = Float64(Float64(z * a) * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.8e+172) tmp = y * z; elseif (z <= -9.6e-33) tmp = z * (a * b); elseif (z <= 105000.0) tmp = x + (t * a); else tmp = (z * a) * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.8e+172], N[(y * z), $MachinePrecision], If[LessEqual[z, -9.6e-33], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 105000.0], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+172}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq -9.6 \cdot 10^{-33}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 105000:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\end{array}
\end{array}
if z < -2.8e172Initial program 88.6%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6488.5%
Simplified88.5%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6458.9%
Simplified58.9%
if -2.8e172 < z < -9.6e-33Initial program 83.6%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6486.2%
Simplified86.2%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6446.2%
Simplified46.2%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6451.1%
Applied egg-rr51.1%
if -9.6e-33 < z < 105000Initial program 98.5%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f6471.1%
Simplified71.1%
if 105000 < z Initial program 84.6%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6481.9%
Simplified81.9%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6455.3%
Simplified55.3%
Final simplification63.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6200.0) (* (* z a) b) (if (<= b 3.35e-267) x (if (<= b 6e+27) (* y z) (* z (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6200.0) {
tmp = (z * a) * b;
} else if (b <= 3.35e-267) {
tmp = x;
} else if (b <= 6e+27) {
tmp = y * z;
} else {
tmp = z * (a * 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 (b <= (-6200.0d0)) then
tmp = (z * a) * b
else if (b <= 3.35d-267) then
tmp = x
else if (b <= 6d+27) then
tmp = y * z
else
tmp = z * (a * 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 (b <= -6200.0) {
tmp = (z * a) * b;
} else if (b <= 3.35e-267) {
tmp = x;
} else if (b <= 6e+27) {
tmp = y * z;
} else {
tmp = z * (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6200.0: tmp = (z * a) * b elif b <= 3.35e-267: tmp = x elif b <= 6e+27: tmp = y * z else: tmp = z * (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6200.0) tmp = Float64(Float64(z * a) * b); elseif (b <= 3.35e-267) tmp = x; elseif (b <= 6e+27) tmp = Float64(y * z); else tmp = Float64(z * Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6200.0) tmp = (z * a) * b; elseif (b <= 3.35e-267) tmp = x; elseif (b <= 6e+27) tmp = y * z; else tmp = z * (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6200.0], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 3.35e-267], x, If[LessEqual[b, 6e+27], N[(y * z), $MachinePrecision], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6200:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\mathbf{elif}\;b \leq 3.35 \cdot 10^{-267}:\\
\;\;\;\;x\\
\mathbf{elif}\;b \leq 6 \cdot 10^{+27}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if b < -6200Initial program 90.2%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6486.2%
Simplified86.2%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.3%
Simplified49.3%
if -6200 < b < 3.3500000000000001e-267Initial program 98.6%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
Simplified43.5%
if 3.3500000000000001e-267 < b < 5.99999999999999953e27Initial program 88.4%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6496.5%
Simplified96.5%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6447.3%
Simplified47.3%
if 5.99999999999999953e27 < b Initial program 90.0%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6486.9%
Simplified86.9%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.1%
Simplified64.1%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6467.3%
Applied egg-rr67.3%
Final simplification51.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* z a) b)))
(if (<= b -15500.0)
t_1
(if (<= b 4.5e-267) x (if (<= b 1.8e+25) (* y z) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z * a) * b;
double tmp;
if (b <= -15500.0) {
tmp = t_1;
} else if (b <= 4.5e-267) {
tmp = x;
} else if (b <= 1.8e+25) {
tmp = 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 * a) * b
if (b <= (-15500.0d0)) then
tmp = t_1
else if (b <= 4.5d-267) then
tmp = x
else if (b <= 1.8d+25) then
tmp = 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 * a) * b;
double tmp;
if (b <= -15500.0) {
tmp = t_1;
} else if (b <= 4.5e-267) {
tmp = x;
} else if (b <= 1.8e+25) {
tmp = y * z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z * a) * b tmp = 0 if b <= -15500.0: tmp = t_1 elif b <= 4.5e-267: tmp = x elif b <= 1.8e+25: tmp = y * z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z * a) * b) tmp = 0.0 if (b <= -15500.0) tmp = t_1; elseif (b <= 4.5e-267) tmp = x; elseif (b <= 1.8e+25) tmp = Float64(y * z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z * a) * b; tmp = 0.0; if (b <= -15500.0) tmp = t_1; elseif (b <= 4.5e-267) tmp = x; elseif (b <= 1.8e+25) tmp = y * z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]}, If[LessEqual[b, -15500.0], t$95$1, If[LessEqual[b, 4.5e-267], x, If[LessEqual[b, 1.8e+25], N[(y * z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;b \leq -15500:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{-267}:\\
\;\;\;\;x\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{+25}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -15500 or 1.80000000000000008e25 < b Initial program 90.1%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6486.5%
Simplified86.5%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6456.2%
Simplified56.2%
if -15500 < b < 4.4999999999999999e-267Initial program 98.6%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
Simplified43.5%
if 4.4999999999999999e-267 < b < 1.80000000000000008e25Initial program 88.4%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6496.5%
Simplified96.5%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6447.3%
Simplified47.3%
Final simplification50.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z 5e+184) (+ (+ x (* a (+ t (* z b)))) (* y z)) (* z (+ y (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 5e+184) {
tmp = (x + (a * (t + (z * b)))) + (y * z);
} else {
tmp = z * (y + (a * 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 <= 5d+184) then
tmp = (x + (a * (t + (z * b)))) + (y * z)
else
tmp = z * (y + (a * 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 <= 5e+184) {
tmp = (x + (a * (t + (z * b)))) + (y * z);
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 5e+184: tmp = (x + (a * (t + (z * b)))) + (y * z) else: tmp = z * (y + (a * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 5e+184) tmp = Float64(Float64(x + Float64(a * Float64(t + Float64(z * b)))) + Float64(y * z)); else tmp = Float64(z * Float64(y + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 5e+184) tmp = (x + (a * (t + (z * b)))) + (y * z); else tmp = z * (y + (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 5e+184], N[(N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 5 \cdot 10^{+184}:\\
\;\;\;\;\left(x + a \cdot \left(t + z \cdot b\right)\right) + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if z < 4.9999999999999999e184Initial program 93.4%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6495.1%
Simplified95.1%
if 4.9999999999999999e184 < z Initial program 79.9%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6470.8%
Simplified70.8%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6496.8%
Simplified96.8%
Final simplification95.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* z (+ y (* a b))))) (if (<= z -1.86e-34) t_1 (if (<= z 8.2e-34) (+ 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.86e-34) {
tmp = t_1;
} else if (z <= 8.2e-34) {
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.86d-34)) then
tmp = t_1
else if (z <= 8.2d-34) 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.86e-34) {
tmp = t_1;
} else if (z <= 8.2e-34) {
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.86e-34: tmp = t_1 elif z <= 8.2e-34: 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.86e-34) tmp = t_1; elseif (z <= 8.2e-34) 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.86e-34) tmp = t_1; elseif (z <= 8.2e-34) 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.86e-34], t$95$1, If[LessEqual[z, 8.2e-34], 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.86 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-34}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.86e-34 or 8.2000000000000007e-34 < z Initial program 85.6%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6484.9%
Simplified84.9%
Taylor expanded in z around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6482.4%
Simplified82.4%
if -1.86e-34 < z < 8.2000000000000007e-34Initial program 98.4%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6499.9%
Simplified99.9%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f6472.6%
Simplified72.6%
Final simplification77.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* a (+ t (* z b))))) (if (<= a -5.1e+29) t_1 (if (<= a 1.85e-64) (+ 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 <= -5.1e+29) {
tmp = t_1;
} else if (a <= 1.85e-64) {
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 <= (-5.1d+29)) then
tmp = t_1
else if (a <= 1.85d-64) 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 <= -5.1e+29) {
tmp = t_1;
} else if (a <= 1.85e-64) {
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 <= -5.1e+29: tmp = t_1 elif a <= 1.85e-64: 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 <= -5.1e+29) tmp = t_1; elseif (a <= 1.85e-64) 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 <= -5.1e+29) tmp = t_1; elseif (a <= 1.85e-64) 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, -5.1e+29], t$95$1, If[LessEqual[a, 1.85e-64], 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 -5.1 \cdot 10^{+29}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-64}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -5.1000000000000001e29 or 1.84999999999999999e-64 < a Initial program 85.0%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6492.8%
Simplified92.8%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6478.2%
Simplified78.2%
if -5.1000000000000001e29 < a < 1.84999999999999999e-64Initial program 98.4%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6491.8%
Simplified91.8%
Taylor expanded in x around inf
Simplified75.8%
Final simplification77.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6e+117) (* (* z a) b) (if (<= b 1.55e+28) (+ x (* y z)) (* z (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6e+117) {
tmp = (z * a) * b;
} else if (b <= 1.55e+28) {
tmp = x + (y * z);
} else {
tmp = z * (a * 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 (b <= (-6d+117)) then
tmp = (z * a) * b
else if (b <= 1.55d+28) then
tmp = x + (y * z)
else
tmp = z * (a * 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 (b <= -6e+117) {
tmp = (z * a) * b;
} else if (b <= 1.55e+28) {
tmp = x + (y * z);
} else {
tmp = z * (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6e+117: tmp = (z * a) * b elif b <= 1.55e+28: tmp = x + (y * z) else: tmp = z * (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6e+117) tmp = Float64(Float64(z * a) * b); elseif (b <= 1.55e+28) tmp = Float64(x + Float64(y * z)); else tmp = Float64(z * Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6e+117) tmp = (z * a) * b; elseif (b <= 1.55e+28) tmp = x + (y * z); else tmp = z * (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6e+117], N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision], If[LessEqual[b, 1.55e+28], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6 \cdot 10^{+117}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\mathbf{elif}\;b \leq 1.55 \cdot 10^{+28}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if b < -6e117Initial program 88.2%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6481.4%
Simplified81.4%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6460.9%
Simplified60.9%
if -6e117 < b < 1.55e28Initial program 93.6%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6497.4%
Simplified97.4%
Taylor expanded in x around inf
Simplified66.7%
if 1.55e28 < b Initial program 90.0%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6486.9%
Simplified86.9%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6464.1%
Simplified64.1%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6467.3%
Applied egg-rr67.3%
Final simplification65.9%
(FPCore (x y z t a b) :precision binary64 (if (<= x -3.8e-14) x (if (<= x 4.5e+33) (* y z) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.8e-14) {
tmp = x;
} else if (x <= 4.5e+33) {
tmp = y * z;
} else {
tmp = x;
}
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 (x <= (-3.8d-14)) then
tmp = x
else if (x <= 4.5d+33) then
tmp = y * z
else
tmp = x
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 (x <= -3.8e-14) {
tmp = x;
} else if (x <= 4.5e+33) {
tmp = y * z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -3.8e-14: tmp = x elif x <= 4.5e+33: tmp = y * z else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -3.8e-14) tmp = x; elseif (x <= 4.5e+33) tmp = Float64(y * z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -3.8e-14) tmp = x; elseif (x <= 4.5e+33) tmp = y * z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3.8e-14], x, If[LessEqual[x, 4.5e+33], N[(y * z), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.8 \cdot 10^{-14}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+33}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -3.8000000000000002e-14 or 4.5e33 < x Initial program 92.5%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6493.4%
Simplified93.4%
Taylor expanded in x around inf
Simplified49.1%
if -3.8000000000000002e-14 < x < 4.5e33Initial program 91.3%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6491.3%
Simplified91.3%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6437.5%
Simplified37.5%
Final simplification42.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a -3.4e+57) (* t a) (if (<= a 1.5e-5) x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.4e+57) {
tmp = t * a;
} else if (a <= 1.5e-5) {
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 <= (-3.4d+57)) then
tmp = t * a
else if (a <= 1.5d-5) 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 <= -3.4e+57) {
tmp = t * a;
} else if (a <= 1.5e-5) {
tmp = x;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -3.4e+57: tmp = t * a elif a <= 1.5e-5: tmp = x else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -3.4e+57) tmp = Float64(t * a); elseif (a <= 1.5e-5) 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 <= -3.4e+57) tmp = t * a; elseif (a <= 1.5e-5) tmp = x; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.4e+57], N[(t * a), $MachinePrecision], If[LessEqual[a, 1.5e-5], x, N[(t * a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{+57}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-5}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if a < -3.39999999999999992e57 or 1.50000000000000004e-5 < a Initial program 83.0%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6492.3%
Simplified92.3%
Taylor expanded in t around inf
*-lowering-*.f6439.7%
Simplified39.7%
if -3.39999999999999992e57 < a < 1.50000000000000004e-5Initial program 98.0%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6492.2%
Simplified92.2%
Taylor expanded in x around inf
Simplified35.6%
Final simplification37.3%
(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 91.8%
associate-+l+N/A
+-commutativeN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
associate-*l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6492.3%
Simplified92.3%
Taylor expanded in x around inf
Simplified25.7%
(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 2024155
(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)))