
(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 12 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 (* a (+ b (/ t z)))))
(if (<= z -4.5e+153)
(+ x (* z (+ y t_1)))
(if (<= z 2e+51)
(+ (* z y) (+ x (* a (+ t (* z b)))))
(* z (+ y (+ t_1 (/ x z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (b + (t / z));
double tmp;
if (z <= -4.5e+153) {
tmp = x + (z * (y + t_1));
} else if (z <= 2e+51) {
tmp = (z * y) + (x + (a * (t + (z * b))));
} else {
tmp = z * (y + (t_1 + (x / 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 = a * (b + (t / z))
if (z <= (-4.5d+153)) then
tmp = x + (z * (y + t_1))
else if (z <= 2d+51) then
tmp = (z * y) + (x + (a * (t + (z * b))))
else
tmp = z * (y + (t_1 + (x / 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 = a * (b + (t / z));
double tmp;
if (z <= -4.5e+153) {
tmp = x + (z * (y + t_1));
} else if (z <= 2e+51) {
tmp = (z * y) + (x + (a * (t + (z * b))));
} else {
tmp = z * (y + (t_1 + (x / z)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (b + (t / z)) tmp = 0 if z <= -4.5e+153: tmp = x + (z * (y + t_1)) elif z <= 2e+51: tmp = (z * y) + (x + (a * (t + (z * b)))) else: tmp = z * (y + (t_1 + (x / z))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(b + Float64(t / z))) tmp = 0.0 if (z <= -4.5e+153) tmp = Float64(x + Float64(z * Float64(y + t_1))); elseif (z <= 2e+51) tmp = Float64(Float64(z * y) + Float64(x + Float64(a * Float64(t + Float64(z * b))))); else tmp = Float64(z * Float64(y + Float64(t_1 + Float64(x / z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (b + (t / z)); tmp = 0.0; if (z <= -4.5e+153) tmp = x + (z * (y + t_1)); elseif (z <= 2e+51) tmp = (z * y) + (x + (a * (t + (z * b)))); else tmp = z * (y + (t_1 + (x / z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+153], N[(x + N[(z * N[(y + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+51], N[(N[(z * y), $MachinePrecision] + N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(y + N[(t$95$1 + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(b + \frac{t}{z}\right)\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+153}:\\
\;\;\;\;x + z \cdot \left(y + t\_1\right)\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+51}:\\
\;\;\;\;z \cdot y + \left(x + a \cdot \left(t + z \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + \left(t\_1 + \frac{x}{z}\right)\right)\\
\end{array}
\end{array}
if z < -4.5000000000000001e153Initial program 85.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-*.f6477.1%
Simplified77.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%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64100.0%
Simplified100.0%
if -4.5000000000000001e153 < z < 2e51Initial program 97.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-*.f6499.9%
Simplified99.9%
if 2e51 < z Initial program 75.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-*.f6482.8%
Simplified82.8%
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 simplification100.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.05e-39)
(* a t)
(if (<= a 1.58e-260)
(* z y)
(if (<= a 1550000.0) x (if (<= a 3.8e+163) (* a (* z b)) (* a t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.05e-39) {
tmp = a * t;
} else if (a <= 1.58e-260) {
tmp = z * y;
} else if (a <= 1550000.0) {
tmp = x;
} else if (a <= 3.8e+163) {
tmp = a * (z * b);
} else {
tmp = a * t;
}
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 <= (-1.05d-39)) then
tmp = a * t
else if (a <= 1.58d-260) then
tmp = z * y
else if (a <= 1550000.0d0) then
tmp = x
else if (a <= 3.8d+163) then
tmp = a * (z * b)
else
tmp = a * t
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 <= -1.05e-39) {
tmp = a * t;
} else if (a <= 1.58e-260) {
tmp = z * y;
} else if (a <= 1550000.0) {
tmp = x;
} else if (a <= 3.8e+163) {
tmp = a * (z * b);
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.05e-39: tmp = a * t elif a <= 1.58e-260: tmp = z * y elif a <= 1550000.0: tmp = x elif a <= 3.8e+163: tmp = a * (z * b) else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.05e-39) tmp = Float64(a * t); elseif (a <= 1.58e-260) tmp = Float64(z * y); elseif (a <= 1550000.0) tmp = x; elseif (a <= 3.8e+163) tmp = Float64(a * Float64(z * b)); else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.05e-39) tmp = a * t; elseif (a <= 1.58e-260) tmp = z * y; elseif (a <= 1550000.0) tmp = x; elseif (a <= 3.8e+163) tmp = a * (z * b); else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.05e-39], N[(a * t), $MachinePrecision], If[LessEqual[a, 1.58e-260], N[(z * y), $MachinePrecision], If[LessEqual[a, 1550000.0], x, If[LessEqual[a, 3.8e+163], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], N[(a * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{-39}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;a \leq 1.58 \cdot 10^{-260}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;a \leq 1550000:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{+163}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if a < -1.04999999999999997e-39 or 3.80000000000000008e163 < a Initial program 85.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-*.f6495.4%
Simplified95.4%
Taylor expanded in t around inf
*-lowering-*.f6445.0%
Simplified45.0%
if -1.04999999999999997e-39 < a < 1.58000000000000002e-260Initial program 97.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-*.f6491.3%
Simplified91.3%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6456.9%
Simplified56.9%
if 1.58000000000000002e-260 < a < 1.55e6Initial program 97.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-*.f6490.3%
Simplified90.3%
Taylor expanded in x around inf
Simplified56.7%
if 1.55e6 < a < 3.80000000000000008e163Initial program 86.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-*.f6496.3%
Simplified96.3%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6442.0%
Simplified42.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6445.1%
Applied egg-rr45.1%
Final simplification50.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (+ y (* a (+ b (/ t z))))))))
(if (<= z -1e+154)
t_1
(if (<= z 2e+51) (+ (* z y) (+ x (* 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 <= -1e+154) {
tmp = t_1;
} else if (z <= 2e+51) {
tmp = (z * y) + (x + (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 <= (-1d+154)) then
tmp = t_1
else if (z <= 2d+51) then
tmp = (z * y) + (x + (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 <= -1e+154) {
tmp = t_1;
} else if (z <= 2e+51) {
tmp = (z * y) + (x + (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 <= -1e+154: tmp = t_1 elif z <= 2e+51: tmp = (z * y) + (x + (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 <= -1e+154) tmp = t_1; elseif (z <= 2e+51) tmp = Float64(Float64(z * y) + Float64(x + 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 <= -1e+154) tmp = t_1; elseif (z <= 2e+51) tmp = (z * y) + (x + (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, -1e+154], t$95$1, If[LessEqual[z, 2e+51], N[(N[(z * y), $MachinePrecision] + N[(x + 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 \cdot 10^{+154}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2 \cdot 10^{+51}:\\
\;\;\;\;z \cdot y + \left(x + a \cdot \left(t + z \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.00000000000000004e154 or 2e51 < z Initial program 79.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-*.f6480.6%
Simplified80.6%
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%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64100.0%
Simplified100.0%
if -1.00000000000000004e154 < z < 2e51Initial program 97.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-*.f6499.9%
Simplified99.9%
Final simplification100.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (+ y (* a (+ b (/ t z))))))))
(if (<= z -3.2e-66)
t_1
(if (<= z 4.8e-156) (+ (* b (* z a)) (+ x (* a t))) 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 <= -3.2e-66) {
tmp = t_1;
} else if (z <= 4.8e-156) {
tmp = (b * (z * a)) + (x + (a * t));
} 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 <= (-3.2d-66)) then
tmp = t_1
else if (z <= 4.8d-156) then
tmp = (b * (z * a)) + (x + (a * t))
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 <= -3.2e-66) {
tmp = t_1;
} else if (z <= 4.8e-156) {
tmp = (b * (z * a)) + (x + (a * t));
} 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 <= -3.2e-66: tmp = t_1 elif z <= 4.8e-156: tmp = (b * (z * a)) + (x + (a * t)) 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 <= -3.2e-66) tmp = t_1; elseif (z <= 4.8e-156) tmp = Float64(Float64(b * Float64(z * a)) + Float64(x + Float64(a * t))); 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 <= -3.2e-66) tmp = t_1; elseif (z <= 4.8e-156) tmp = (b * (z * a)) + (x + (a * t)); 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, -3.2e-66], t$95$1, If[LessEqual[z, 4.8e-156], N[(N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision] + N[(x + N[(a * t), $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 -3.2 \cdot 10^{-66}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-156}:\\
\;\;\;\;b \cdot \left(z \cdot a\right) + \left(x + a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -3.19999999999999982e-66 or 4.8e-156 < z Initial program 87.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 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-/.f6496.4%
Simplified96.4%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f6497.6%
Simplified97.6%
if -3.19999999999999982e-66 < z < 4.8e-156Initial program 99.0%
Taylor expanded in x around inf
Simplified91.6%
Final simplification95.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (+ y (* a b))))))
(if (<= z -8.2e+39)
t_1
(if (<= z 2.85e-112) (+ (* b (* z a)) (+ x (* a t))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (y + (a * b)));
double tmp;
if (z <= -8.2e+39) {
tmp = t_1;
} else if (z <= 2.85e-112) {
tmp = (b * (z * a)) + (x + (a * t));
} 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)))
if (z <= (-8.2d+39)) then
tmp = t_1
else if (z <= 2.85d-112) then
tmp = (b * (z * a)) + (x + (a * t))
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)));
double tmp;
if (z <= -8.2e+39) {
tmp = t_1;
} else if (z <= 2.85e-112) {
tmp = (b * (z * a)) + (x + (a * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (y + (a * b))) tmp = 0 if z <= -8.2e+39: tmp = t_1 elif z <= 2.85e-112: tmp = (b * (z * a)) + (x + (a * t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(y + Float64(a * b)))) tmp = 0.0 if (z <= -8.2e+39) tmp = t_1; elseif (z <= 2.85e-112) tmp = Float64(Float64(b * Float64(z * a)) + Float64(x + Float64(a * t))); 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))); tmp = 0.0; if (z <= -8.2e+39) tmp = t_1; elseif (z <= 2.85e-112) tmp = (b * (z * a)) + (x + (a * t)); 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 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8.2e+39], t$95$1, If[LessEqual[z, 2.85e-112], N[(N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision] + N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -8.2 \cdot 10^{+39}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.85 \cdot 10^{-112}:\\
\;\;\;\;b \cdot \left(z \cdot a\right) + \left(x + a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -8.20000000000000008e39 or 2.85000000000000008e-112 < z Initial program 84.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-*.f6487.7%
Simplified87.7%
Taylor expanded in t around 0
+-lowering-+.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6488.7%
Simplified88.7%
if -8.20000000000000008e39 < z < 2.85000000000000008e-112Initial program 99.2%
Taylor expanded in x around inf
Simplified89.6%
Final simplification89.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z y))))
(if (<= z -6.8e+257)
(* a (* z b))
(if (<= z -2.6e+83) t_1 (if (<= z 1.45e-111) (+ x (* a t)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * y);
double tmp;
if (z <= -6.8e+257) {
tmp = a * (z * b);
} else if (z <= -2.6e+83) {
tmp = t_1;
} else if (z <= 1.45e-111) {
tmp = x + (a * t);
} 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)
if (z <= (-6.8d+257)) then
tmp = a * (z * b)
else if (z <= (-2.6d+83)) then
tmp = t_1
else if (z <= 1.45d-111) then
tmp = x + (a * t)
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);
double tmp;
if (z <= -6.8e+257) {
tmp = a * (z * b);
} else if (z <= -2.6e+83) {
tmp = t_1;
} else if (z <= 1.45e-111) {
tmp = x + (a * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * y) tmp = 0 if z <= -6.8e+257: tmp = a * (z * b) elif z <= -2.6e+83: tmp = t_1 elif z <= 1.45e-111: tmp = x + (a * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * y)) tmp = 0.0 if (z <= -6.8e+257) tmp = Float64(a * Float64(z * b)); elseif (z <= -2.6e+83) tmp = t_1; elseif (z <= 1.45e-111) tmp = Float64(x + Float64(a * t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * y); tmp = 0.0; if (z <= -6.8e+257) tmp = a * (z * b); elseif (z <= -2.6e+83) tmp = t_1; elseif (z <= 1.45e-111) tmp = x + (a * t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e+257], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.6e+83], t$95$1, If[LessEqual[z, 1.45e-111], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot y\\
\mathbf{if}\;z \leq -6.8 \cdot 10^{+257}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq -2.6 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-111}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -6.8000000000000005e257Initial program 83.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-*.f6491.7%
Simplified91.7%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6476.0%
Simplified76.0%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6483.7%
Applied egg-rr83.7%
if -6.8000000000000005e257 < z < -2.6000000000000001e83 or 1.45000000000000001e-111 < z Initial program 84.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-*.f6486.5%
Simplified86.5%
Taylor expanded in x around inf
Simplified62.3%
if -2.6000000000000001e83 < z < 1.45000000000000001e-111Initial program 97.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-*.f64100.0%
Simplified100.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f6477.9%
Simplified77.9%
Final simplification71.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ x (* z (+ y (* a b)))))) (if (<= z -2.15e-73) t_1 (if (<= z 3.65e-115) (+ x (* a t)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (y + (a * b)));
double tmp;
if (z <= -2.15e-73) {
tmp = t_1;
} else if (z <= 3.65e-115) {
tmp = x + (a * t);
} 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)))
if (z <= (-2.15d-73)) then
tmp = t_1
else if (z <= 3.65d-115) then
tmp = x + (a * t)
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)));
double tmp;
if (z <= -2.15e-73) {
tmp = t_1;
} else if (z <= 3.65e-115) {
tmp = x + (a * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (y + (a * b))) tmp = 0 if z <= -2.15e-73: tmp = t_1 elif z <= 3.65e-115: tmp = x + (a * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(y + Float64(a * b)))) tmp = 0.0 if (z <= -2.15e-73) tmp = t_1; elseif (z <= 3.65e-115) tmp = Float64(x + Float64(a * t)); 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))); tmp = 0.0; if (z <= -2.15e-73) tmp = t_1; elseif (z <= 3.65e-115) tmp = x + (a * t); 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 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.15e-73], t$95$1, If[LessEqual[z, 3.65e-115], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -2.15 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 3.65 \cdot 10^{-115}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.1499999999999999e-73 or 3.64999999999999982e-115 < z Initial program 86.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-*.f6489.7%
Simplified89.7%
Taylor expanded in t around 0
+-lowering-+.f64N/A
+-commutativeN/A
associate-*r*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6487.0%
Simplified87.0%
if -2.1499999999999999e-73 < z < 3.64999999999999982e-115Initial program 99.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-*.f6499.9%
Simplified99.9%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f6484.7%
Simplified84.7%
(FPCore (x y z t a b) :precision binary64 (if (<= a -2.6e-41) (* a t) (if (<= a 2.95e-260) (* z y) (if (<= a 3.9e+29) x (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.6e-41) {
tmp = a * t;
} else if (a <= 2.95e-260) {
tmp = z * y;
} else if (a <= 3.9e+29) {
tmp = x;
} else {
tmp = a * t;
}
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 <= (-2.6d-41)) then
tmp = a * t
else if (a <= 2.95d-260) then
tmp = z * y
else if (a <= 3.9d+29) then
tmp = x
else
tmp = a * t
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 <= -2.6e-41) {
tmp = a * t;
} else if (a <= 2.95e-260) {
tmp = z * y;
} else if (a <= 3.9e+29) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -2.6e-41: tmp = a * t elif a <= 2.95e-260: tmp = z * y elif a <= 3.9e+29: tmp = x else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2.6e-41) tmp = Float64(a * t); elseif (a <= 2.95e-260) tmp = Float64(z * y); elseif (a <= 3.9e+29) tmp = x; else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -2.6e-41) tmp = a * t; elseif (a <= 2.95e-260) tmp = z * y; elseif (a <= 3.9e+29) tmp = x; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.6e-41], N[(a * t), $MachinePrecision], If[LessEqual[a, 2.95e-260], N[(z * y), $MachinePrecision], If[LessEqual[a, 3.9e+29], x, N[(a * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{-41}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;a \leq 2.95 \cdot 10^{-260}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{+29}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if a < -2.5999999999999999e-41 or 3.89999999999999968e29 < a Initial program 85.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-*.f6495.5%
Simplified95.5%
Taylor expanded in t around inf
*-lowering-*.f6443.0%
Simplified43.0%
if -2.5999999999999999e-41 < a < 2.95e-260Initial program 97.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-*.f6491.3%
Simplified91.3%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6456.9%
Simplified56.9%
if 2.95e-260 < a < 3.89999999999999968e29Initial 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-*.f6491.0%
Simplified91.0%
Taylor expanded in x around inf
Simplified52.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* a (+ t (* z b))))) (if (<= a -1.85e-37) t_1 (if (<= a 112000.0) (+ x (* z y)) 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.85e-37) {
tmp = t_1;
} else if (a <= 112000.0) {
tmp = x + (z * 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 = a * (t + (z * b))
if (a <= (-1.85d-37)) then
tmp = t_1
else if (a <= 112000.0d0) then
tmp = x + (z * 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 = a * (t + (z * b));
double tmp;
if (a <= -1.85e-37) {
tmp = t_1;
} else if (a <= 112000.0) {
tmp = x + (z * y);
} 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.85e-37: tmp = t_1 elif a <= 112000.0: tmp = x + (z * y) 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.85e-37) tmp = t_1; elseif (a <= 112000.0) tmp = Float64(x + Float64(z * y)); 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.85e-37) tmp = t_1; elseif (a <= 112000.0) tmp = x + (z * y); 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.85e-37], t$95$1, If[LessEqual[a, 112000.0], N[(x + N[(z * y), $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.85 \cdot 10^{-37}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 112000:\\
\;\;\;\;x + z \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.85e-37 or 112000 < a Initial program 85.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-*.f6495.6%
Simplified95.6%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6476.7%
Simplified76.7%
if -1.85e-37 < a < 112000Initial program 97.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-*.f6490.9%
Simplified90.9%
Taylor expanded in x around inf
Simplified80.6%
Final simplification78.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -4.6e+153) (* z (* a b)) (if (<= z 6.1e-108) (+ x (* a t)) (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.6e+153) {
tmp = z * (a * b);
} else if (z <= 6.1e-108) {
tmp = x + (a * t);
} else {
tmp = z * y;
}
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.6d+153)) then
tmp = z * (a * b)
else if (z <= 6.1d-108) then
tmp = x + (a * t)
else
tmp = z * y
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.6e+153) {
tmp = z * (a * b);
} else if (z <= 6.1e-108) {
tmp = x + (a * t);
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4.6e+153: tmp = z * (a * b) elif z <= 6.1e-108: tmp = x + (a * t) else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.6e+153) tmp = Float64(z * Float64(a * b)); elseif (z <= 6.1e-108) tmp = Float64(x + Float64(a * t)); else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4.6e+153) tmp = z * (a * b); elseif (z <= 6.1e-108) tmp = x + (a * t); else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.6e+153], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.1e-108], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], N[(z * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.6 \cdot 10^{+153}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 6.1 \cdot 10^{-108}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if z < -4.6000000000000003e153Initial program 85.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-*.f6477.1%
Simplified77.1%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6454.0%
Simplified54.0%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6456.9%
Applied egg-rr56.9%
if -4.6000000000000003e153 < z < 6.10000000000000007e-108Initial program 96.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-*.f64100.0%
Simplified100.0%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f6475.2%
Simplified75.2%
if 6.10000000000000007e-108 < z Initial program 84.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-*.f6489.5%
Simplified89.5%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6448.7%
Simplified48.7%
Final simplification64.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -6.5e+51) x (if (<= x 1.45e+42) (* a t) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -6.5e+51) {
tmp = x;
} else if (x <= 1.45e+42) {
tmp = a * t;
} 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 <= (-6.5d+51)) then
tmp = x
else if (x <= 1.45d+42) then
tmp = a * t
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 <= -6.5e+51) {
tmp = x;
} else if (x <= 1.45e+42) {
tmp = a * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -6.5e+51: tmp = x elif x <= 1.45e+42: tmp = a * t else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -6.5e+51) tmp = x; elseif (x <= 1.45e+42) tmp = Float64(a * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -6.5e+51) tmp = x; elseif (x <= 1.45e+42) tmp = a * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -6.5e+51], x, If[LessEqual[x, 1.45e+42], N[(a * t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.5 \cdot 10^{+51}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{+42}:\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -6.5e51 or 1.4499999999999999e42 < x Initial program 92.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-*.f6492.1%
Simplified92.1%
Taylor expanded in x around inf
Simplified49.0%
if -6.5e51 < x < 1.4499999999999999e42Initial program 90.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-*.f6494.3%
Simplified94.3%
Taylor expanded in t around inf
*-lowering-*.f6438.1%
Simplified38.1%
(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.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-*.f6493.4%
Simplified93.4%
Taylor expanded in x around inf
Simplified24.5%
(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 2024163
(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)))