
(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 (if (<= z 1.85e+48) (+ (+ x (* a (+ t (* z b)))) (* z y)) (+ x (* z (+ y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.85e+48) {
tmp = (x + (a * (t + (z * b)))) + (z * y);
} else {
tmp = x + (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 <= 1.85d+48) then
tmp = (x + (a * (t + (z * b)))) + (z * y)
else
tmp = x + (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 <= 1.85e+48) {
tmp = (x + (a * (t + (z * b)))) + (z * y);
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 1.85e+48: tmp = (x + (a * (t + (z * b)))) + (z * y) else: tmp = x + (z * (y + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.85e+48) tmp = Float64(Float64(x + Float64(a * Float64(t + Float64(z * b)))) + Float64(z * y)); else tmp = Float64(x + 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 <= 1.85e+48) tmp = (x + (a * (t + (z * b)))) + (z * y); else tmp = x + (z * (y + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.85e+48], N[(N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.85 \cdot 10^{+48}:\\
\;\;\;\;\left(x + a \cdot \left(t + z \cdot b\right)\right) + z \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if z < 1.85e48Initial program 94.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-*.f6497.5%
Simplified97.5%
if 1.85e48 < z Initial program 85.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-*.f6483.3%
Simplified83.3%
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-*.f6495.0%
Simplified95.0%
Final simplification96.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.12e+198)
(* a (+ t (* z b)))
(if (<= a 1.4e+116)
(+ x (* z (+ y (* a b))))
(+ x (* (* a b) (+ z (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.12e+198) {
tmp = a * (t + (z * b));
} else if (a <= 1.4e+116) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + ((a * b) * (z + (t / b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.12d+198)) then
tmp = a * (t + (z * b))
else if (a <= 1.4d+116) then
tmp = x + (z * (y + (a * b)))
else
tmp = x + ((a * b) * (z + (t / b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.12e+198) {
tmp = a * (t + (z * b));
} else if (a <= 1.4e+116) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + ((a * b) * (z + (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.12e+198: tmp = a * (t + (z * b)) elif a <= 1.4e+116: tmp = x + (z * (y + (a * b))) else: tmp = x + ((a * b) * (z + (t / b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.12e+198) tmp = Float64(a * Float64(t + Float64(z * b))); elseif (a <= 1.4e+116) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(x + Float64(Float64(a * b) * Float64(z + Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.12e+198) tmp = a * (t + (z * b)); elseif (a <= 1.4e+116) tmp = x + (z * (y + (a * b))); else tmp = x + ((a * b) * (z + (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.12e+198], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.4e+116], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * b), $MachinePrecision] * N[(z + N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.12 \cdot 10^{+198}:\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{+116}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot b\right) \cdot \left(z + \frac{t}{b}\right)\\
\end{array}
\end{array}
if a < -1.1199999999999999e198Initial program 79.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-*.f6499.9%
Simplified99.9%
if -1.1199999999999999e198 < a < 1.40000000000000002e116Initial program 94.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-*.f6493.8%
Simplified93.8%
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-*.f6482.6%
Simplified82.6%
if 1.40000000000000002e116 < a Initial program 86.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-*.f6497.3%
Simplified97.3%
Taylor expanded in b around inf
*-lowering-*.f64N/A
associate-/l*N/A
distribute-lft-outN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f6484.6%
Simplified84.6%
Taylor expanded in y around 0
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f6492.6%
Simplified92.6%
Final simplification85.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (* a b))))
(if (<= z -1.4e+133)
t_1
(if (<= z -2.2e+39) (* z y) (if (<= z 1.05e+47) (+ x (* a t)) 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 (z <= -1.4e+133) {
tmp = t_1;
} else if (z <= -2.2e+39) {
tmp = z * y;
} else if (z <= 1.05e+47) {
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 = z * (a * b)
if (z <= (-1.4d+133)) then
tmp = t_1
else if (z <= (-2.2d+39)) then
tmp = z * y
else if (z <= 1.05d+47) 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 = z * (a * b);
double tmp;
if (z <= -1.4e+133) {
tmp = t_1;
} else if (z <= -2.2e+39) {
tmp = z * y;
} else if (z <= 1.05e+47) {
tmp = x + (a * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (a * b) tmp = 0 if z <= -1.4e+133: tmp = t_1 elif z <= -2.2e+39: tmp = z * y elif z <= 1.05e+47: tmp = x + (a * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(a * b)) tmp = 0.0 if (z <= -1.4e+133) tmp = t_1; elseif (z <= -2.2e+39) tmp = Float64(z * y); elseif (z <= 1.05e+47) 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 = z * (a * b); tmp = 0.0; if (z <= -1.4e+133) tmp = t_1; elseif (z <= -2.2e+39) tmp = z * y; elseif (z <= 1.05e+47) 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[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e+133], t$95$1, If[LessEqual[z, -2.2e+39], N[(z * y), $MachinePrecision], If[LessEqual[z, 1.05e+47], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(a \cdot b\right)\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.2 \cdot 10^{+39}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+47}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.40000000000000008e133 or 1.05e47 < z Initial program 83.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-*.f6485.5%
Simplified85.5%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6450.8%
Simplified50.8%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6456.1%
Applied egg-rr56.1%
if -1.40000000000000008e133 < z < -2.2000000000000001e39Initial program 83.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.7%
Simplified95.7%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6453.3%
Simplified53.3%
if -2.2000000000000001e39 < z < 1.05e47Initial 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.3%
Simplified99.3%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f6465.5%
Simplified65.5%
Final simplification61.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.12e-90) (* a (* z b)) (if (<= a 2e-78) (* z y) (if (<= a 7e+162) (* b (* z a)) (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.12e-90) {
tmp = a * (z * b);
} else if (a <= 2e-78) {
tmp = z * y;
} else if (a <= 7e+162) {
tmp = b * (z * a);
} 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.12d-90)) then
tmp = a * (z * b)
else if (a <= 2d-78) then
tmp = z * y
else if (a <= 7d+162) then
tmp = b * (z * a)
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.12e-90) {
tmp = a * (z * b);
} else if (a <= 2e-78) {
tmp = z * y;
} else if (a <= 7e+162) {
tmp = b * (z * a);
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.12e-90: tmp = a * (z * b) elif a <= 2e-78: tmp = z * y elif a <= 7e+162: tmp = b * (z * a) else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.12e-90) tmp = Float64(a * Float64(z * b)); elseif (a <= 2e-78) tmp = Float64(z * y); elseif (a <= 7e+162) tmp = Float64(b * Float64(z * a)); 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.12e-90) tmp = a * (z * b); elseif (a <= 2e-78) tmp = z * y; elseif (a <= 7e+162) tmp = b * (z * a); else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.12e-90], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2e-78], N[(z * y), $MachinePrecision], If[LessEqual[a, 7e+162], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], N[(a * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.12 \cdot 10^{-90}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;a \leq 2 \cdot 10^{-78}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;a \leq 7 \cdot 10^{+162}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if a < -1.12e-90Initial program 85.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-*.f6493.7%
Simplified93.7%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6447.8%
Simplified47.8%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6452.5%
Applied egg-rr52.5%
if -1.12e-90 < a < 2e-78Initial 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.9%
Simplified91.9%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6448.9%
Simplified48.9%
if 2e-78 < a < 7.00000000000000036e162Initial program 94.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-*.f6496.3%
Simplified96.3%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6443.8%
Simplified43.8%
if 7.00000000000000036e162 < a Initial program 85.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-*.f64100.0%
Simplified100.0%
Taylor expanded in t around inf
*-lowering-*.f6462.7%
Simplified62.7%
Final simplification50.3%
(FPCore (x y z t a b) :precision binary64 (if (<= a -2.2e-91) (* z (* a b)) (if (<= a 1.2e-83) (* z y) (if (<= a 7e+162) (* b (* z a)) (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.2e-91) {
tmp = z * (a * b);
} else if (a <= 1.2e-83) {
tmp = z * y;
} else if (a <= 7e+162) {
tmp = b * (z * a);
} 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.2d-91)) then
tmp = z * (a * b)
else if (a <= 1.2d-83) then
tmp = z * y
else if (a <= 7d+162) then
tmp = b * (z * a)
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.2e-91) {
tmp = z * (a * b);
} else if (a <= 1.2e-83) {
tmp = z * y;
} else if (a <= 7e+162) {
tmp = b * (z * a);
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -2.2e-91: tmp = z * (a * b) elif a <= 1.2e-83: tmp = z * y elif a <= 7e+162: tmp = b * (z * a) else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2.2e-91) tmp = Float64(z * Float64(a * b)); elseif (a <= 1.2e-83) tmp = Float64(z * y); elseif (a <= 7e+162) tmp = Float64(b * Float64(z * a)); 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.2e-91) tmp = z * (a * b); elseif (a <= 1.2e-83) tmp = z * y; elseif (a <= 7e+162) tmp = b * (z * a); else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.2e-91], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e-83], N[(z * y), $MachinePrecision], If[LessEqual[a, 7e+162], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], N[(a * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{-91}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{-83}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;a \leq 7 \cdot 10^{+162}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if a < -2.2000000000000001e-91Initial program 85.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-*.f6493.7%
Simplified93.7%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6447.8%
Simplified47.8%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6451.5%
Applied egg-rr51.5%
if -2.2000000000000001e-91 < a < 1.2e-83Initial 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.9%
Simplified91.9%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6448.9%
Simplified48.9%
if 1.2e-83 < a < 7.00000000000000036e162Initial program 94.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-*.f6496.3%
Simplified96.3%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6443.8%
Simplified43.8%
if 7.00000000000000036e162 < a Initial program 85.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-*.f64100.0%
Simplified100.0%
Taylor expanded in t around inf
*-lowering-*.f6462.7%
Simplified62.7%
Final simplification50.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* z a))))
(if (<= a -6.1e-92)
t_1
(if (<= a 1.46e-80) (* z y) (if (<= a 6.8e+162) t_1 (* a t))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (z * a);
double tmp;
if (a <= -6.1e-92) {
tmp = t_1;
} else if (a <= 1.46e-80) {
tmp = z * y;
} else if (a <= 6.8e+162) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = b * (z * a)
if (a <= (-6.1d-92)) then
tmp = t_1
else if (a <= 1.46d-80) then
tmp = z * y
else if (a <= 6.8d+162) then
tmp = t_1
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 t_1 = b * (z * a);
double tmp;
if (a <= -6.1e-92) {
tmp = t_1;
} else if (a <= 1.46e-80) {
tmp = z * y;
} else if (a <= 6.8e+162) {
tmp = t_1;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (z * a) tmp = 0 if a <= -6.1e-92: tmp = t_1 elif a <= 1.46e-80: tmp = z * y elif a <= 6.8e+162: tmp = t_1 else: tmp = a * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(z * a)) tmp = 0.0 if (a <= -6.1e-92) tmp = t_1; elseif (a <= 1.46e-80) tmp = Float64(z * y); elseif (a <= 6.8e+162) tmp = t_1; else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (z * a); tmp = 0.0; if (a <= -6.1e-92) tmp = t_1; elseif (a <= 1.46e-80) tmp = z * y; elseif (a <= 6.8e+162) tmp = t_1; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.1e-92], t$95$1, If[LessEqual[a, 1.46e-80], N[(z * y), $MachinePrecision], If[LessEqual[a, 6.8e+162], t$95$1, N[(a * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(z \cdot a\right)\\
\mathbf{if}\;a \leq -6.1 \cdot 10^{-92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.46 \cdot 10^{-80}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;a \leq 6.8 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if a < -6.09999999999999988e-92 or 1.46e-80 < a < 6.80000000000000006e162Initial program 89.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-*.f6494.8%
Simplified94.8%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6446.2%
Simplified46.2%
if -6.09999999999999988e-92 < a < 1.46e-80Initial 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.9%
Simplified91.9%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6448.9%
Simplified48.9%
if 6.80000000000000006e162 < a Initial program 85.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-*.f64100.0%
Simplified100.0%
Taylor expanded in t around inf
*-lowering-*.f6462.7%
Simplified62.7%
Final simplification48.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ x (* z (+ y (* a b)))))) (if (<= z -7.2e-166) t_1 (if (<= z 6.3e-27) (+ 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 <= -7.2e-166) {
tmp = t_1;
} else if (z <= 6.3e-27) {
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 <= (-7.2d-166)) then
tmp = t_1
else if (z <= 6.3d-27) 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 <= -7.2e-166) {
tmp = t_1;
} else if (z <= 6.3e-27) {
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 <= -7.2e-166: tmp = t_1 elif z <= 6.3e-27: 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 <= -7.2e-166) tmp = t_1; elseif (z <= 6.3e-27) 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 <= -7.2e-166) tmp = t_1; elseif (z <= 6.3e-27) 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, -7.2e-166], t$95$1, If[LessEqual[z, 6.3e-27], 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 -7.2 \cdot 10^{-166}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.3 \cdot 10^{-27}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.2000000000000002e-166 or 6.3000000000000001e-27 < z Initial program 88.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-*.f6491.6%
Simplified91.6%
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-*.f6490.2%
Simplified90.2%
if -7.2000000000000002e-166 < z < 6.3000000000000001e-27Initial program 98.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-*.f6499.9%
Simplified99.9%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f6476.2%
Simplified76.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.12e+39) (* z y) (if (<= z -1.55e-162) x (if (<= z 1.45e-24) (* a t) (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.12e+39) {
tmp = z * y;
} else if (z <= -1.55e-162) {
tmp = x;
} else if (z <= 1.45e-24) {
tmp = 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 <= (-1.12d+39)) then
tmp = z * y
else if (z <= (-1.55d-162)) then
tmp = x
else if (z <= 1.45d-24) then
tmp = 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 <= -1.12e+39) {
tmp = z * y;
} else if (z <= -1.55e-162) {
tmp = x;
} else if (z <= 1.45e-24) {
tmp = a * t;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.12e+39: tmp = z * y elif z <= -1.55e-162: tmp = x elif z <= 1.45e-24: tmp = a * t else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.12e+39) tmp = Float64(z * y); elseif (z <= -1.55e-162) tmp = x; elseif (z <= 1.45e-24) tmp = 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 <= -1.12e+39) tmp = z * y; elseif (z <= -1.55e-162) tmp = x; elseif (z <= 1.45e-24) tmp = a * t; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.12e+39], N[(z * y), $MachinePrecision], If[LessEqual[z, -1.55e-162], x, If[LessEqual[z, 1.45e-24], N[(a * t), $MachinePrecision], N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{+39}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;z \leq -1.55 \cdot 10^{-162}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-24}:\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if z < -1.12e39 or 1.4499999999999999e-24 < z 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-*.f6489.2%
Simplified89.2%
Taylor expanded in y around inf
*-commutativeN/A
*-lowering-*.f6440.7%
Simplified40.7%
if -1.12e39 < z < -1.5499999999999999e-162Initial program 100.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-*.f64100.0%
Simplified100.0%
Taylor expanded in x around inf
Simplified40.6%
if -1.5499999999999999e-162 < z < 1.4499999999999999e-24Initial program 98.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-*.f6499.9%
Simplified99.9%
Taylor expanded in t around inf
*-lowering-*.f6447.3%
Simplified47.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* a (+ t (* z b))))) (if (<= a -6.8e-48) t_1 (if (<= a 2.35e-86) (+ 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 <= -6.8e-48) {
tmp = t_1;
} else if (a <= 2.35e-86) {
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 <= (-6.8d-48)) then
tmp = t_1
else if (a <= 2.35d-86) 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 <= -6.8e-48) {
tmp = t_1;
} else if (a <= 2.35e-86) {
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 <= -6.8e-48: tmp = t_1 elif a <= 2.35e-86: 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 <= -6.8e-48) tmp = t_1; elseif (a <= 2.35e-86) 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 <= -6.8e-48) tmp = t_1; elseif (a <= 2.35e-86) 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, -6.8e-48], t$95$1, If[LessEqual[a, 2.35e-86], 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 -6.8 \cdot 10^{-48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{-86}:\\
\;\;\;\;x + z \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -6.80000000000000056e-48 or 2.35e-86 < a Initial program 87.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-*.f6496.0%
Simplified96.0%
Taylor expanded in a around inf
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f6476.0%
Simplified76.0%
if -6.80000000000000056e-48 < a < 2.35e-86Initial program 98.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-*.f6491.4%
Simplified91.4%
Taylor expanded in x around inf
Simplified81.6%
Final simplification78.3%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.46e-30) (* a (* z b)) (if (<= a 2.35e-86) (+ x (* z y)) (+ x (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.46e-30) {
tmp = a * (z * b);
} else if (a <= 2.35e-86) {
tmp = x + (z * y);
} else {
tmp = x + (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.46d-30)) then
tmp = a * (z * b)
else if (a <= 2.35d-86) then
tmp = x + (z * y)
else
tmp = x + (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.46e-30) {
tmp = a * (z * b);
} else if (a <= 2.35e-86) {
tmp = x + (z * y);
} else {
tmp = x + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.46e-30: tmp = a * (z * b) elif a <= 2.35e-86: tmp = x + (z * y) else: tmp = x + (a * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.46e-30) tmp = Float64(a * Float64(z * b)); elseif (a <= 2.35e-86) tmp = Float64(x + Float64(z * y)); else tmp = Float64(x + Float64(a * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.46e-30) tmp = a * (z * b); elseif (a <= 2.35e-86) tmp = x + (z * y); else tmp = x + (a * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.46e-30], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.35e-86], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.46 \cdot 10^{-30}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;a \leq 2.35 \cdot 10^{-86}:\\
\;\;\;\;x + z \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot t\\
\end{array}
\end{array}
if a < -1.4600000000000001e-30Initial program 83.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.2%
Simplified94.2%
Taylor expanded in b around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6449.4%
Simplified49.4%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6455.9%
Applied egg-rr55.9%
if -1.4600000000000001e-30 < a < 2.35e-86Initial program 98.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.6%
Simplified91.6%
Taylor expanded in x around inf
Simplified81.0%
if 2.35e-86 < a Initial program 91.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-*.f6497.6%
Simplified97.6%
Taylor expanded in z around 0
+-lowering-+.f64N/A
*-lowering-*.f6453.7%
Simplified53.7%
Final simplification65.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1e+46) (* a t) (if (<= t 7200.0) x (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1e+46) {
tmp = a * t;
} else if (t <= 7200.0) {
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 (t <= (-1d+46)) then
tmp = a * t
else if (t <= 7200.0d0) 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 (t <= -1e+46) {
tmp = a * t;
} else if (t <= 7200.0) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1e+46: tmp = a * t elif t <= 7200.0: tmp = x else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1e+46) tmp = Float64(a * t); elseif (t <= 7200.0) 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 (t <= -1e+46) tmp = a * t; elseif (t <= 7200.0) tmp = x; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1e+46], N[(a * t), $MachinePrecision], If[LessEqual[t, 7200.0], x, N[(a * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1 \cdot 10^{+46}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq 7200:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -9.9999999999999999e45 or 7200 < t Initial program 94.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-*.f6495.0%
Simplified95.0%
Taylor expanded in t around inf
*-lowering-*.f6447.6%
Simplified47.6%
if -9.9999999999999999e45 < t < 7200Initial program 90.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-*.f6493.5%
Simplified93.5%
Taylor expanded in x around inf
Simplified31.2%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 92.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-*.f6494.2%
Simplified94.2%
Taylor expanded in x around inf
Simplified22.3%
(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 2024150
(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)))