
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* b (* z a))))) (if (<= t_1 5e+306) t_1 (* a (+ t (+ (+ (/ x a) (/ (* y z) a)) (* z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + (b * (z * a));
double tmp;
if (t_1 <= 5e+306) {
tmp = t_1;
} else {
tmp = a * (t + (((x / a) + ((y * z) / a)) + (z * 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) :: t_1
real(8) :: tmp
t_1 = ((x + (y * z)) + (t * a)) + (b * (z * a))
if (t_1 <= 5d+306) then
tmp = t_1
else
tmp = a * (t + (((x / a) + ((y * z) / a)) + (z * b)))
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)) + (b * (z * a));
double tmp;
if (t_1 <= 5e+306) {
tmp = t_1;
} else {
tmp = a * (t + (((x / a) + ((y * z) / a)) + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (y * z)) + (t * a)) + (b * (z * a)) tmp = 0 if t_1 <= 5e+306: tmp = t_1 else: tmp = a * (t + (((x / a) + ((y * z) / a)) + (z * b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(b * Float64(z * a))) tmp = 0.0 if (t_1 <= 5e+306) tmp = t_1; else tmp = Float64(a * Float64(t + Float64(Float64(Float64(x / a) + Float64(Float64(y * z) / a)) + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (y * z)) + (t * a)) + (b * (z * a)); tmp = 0.0; if (t_1 <= 5e+306) tmp = t_1; else tmp = a * (t + (((x / a) + ((y * z) / a)) + (z * b))); 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[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+306], t$95$1, N[(a * N[(t + N[(N[(N[(x / a), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t + \left(\left(\frac{x}{a} + \frac{y \cdot z}{a}\right) + z \cdot b\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 4.99999999999999993e306Initial program 98.0%
if 4.99999999999999993e306 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 74.7%
associate-+l+74.7%
associate-*l*84.7%
Simplified84.7%
Taylor expanded in a around inf 94.9%
Final simplification97.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* b (* z a))))) (if (<= t_1 INFINITY) t_1 (* z (+ y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + (b * (z * a));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + (b * (z * a));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = z * (y + (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (y * z)) + (t * a)) + (b * (z * a)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = z * (y + (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(b * Float64(z * a))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(z * Float64(y + Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (y * z)) + (t * a)) + (b * (z * a)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = z * (y + (a * b)); 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[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < +inf.0Initial program 97.6%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
associate-+l+0.0%
associate-*l*38.5%
Simplified38.5%
Taylor expanded in z around inf 76.9%
Final simplification96.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t (* z b)))))
(if (or (<= y -58000000000.0) (not (<= y 6.6e-28)))
(+ (* y (+ z (/ x y))) t_1)
(+ x 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 ((y <= -58000000000.0) || !(y <= 6.6e-28)) {
tmp = (y * (z + (x / y))) + t_1;
} else {
tmp = x + 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 ((y <= (-58000000000.0d0)) .or. (.not. (y <= 6.6d-28))) then
tmp = (y * (z + (x / y))) + t_1
else
tmp = x + 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 ((y <= -58000000000.0) || !(y <= 6.6e-28)) {
tmp = (y * (z + (x / y))) + t_1;
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + (z * b)) tmp = 0 if (y <= -58000000000.0) or not (y <= 6.6e-28): tmp = (y * (z + (x / y))) + t_1 else: tmp = x + 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 ((y <= -58000000000.0) || !(y <= 6.6e-28)) tmp = Float64(Float64(y * Float64(z + Float64(x / y))) + t_1); else tmp = Float64(x + 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 ((y <= -58000000000.0) || ~((y <= 6.6e-28))) tmp = (y * (z + (x / y))) + t_1; else tmp = x + 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[Or[LessEqual[y, -58000000000.0], N[Not[LessEqual[y, 6.6e-28]], $MachinePrecision]], N[(N[(y * N[(z + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + z \cdot b\right)\\
\mathbf{if}\;y \leq -58000000000 \lor \neg \left(y \leq 6.6 \cdot 10^{-28}\right):\\
\;\;\;\;y \cdot \left(z + \frac{x}{y}\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;x + t\_1\\
\end{array}
\end{array}
if y < -5.8e10 or 6.6000000000000003e-28 < y Initial program 92.7%
associate-+l+92.7%
+-commutative92.7%
fma-define92.7%
associate-*l*94.1%
*-commutative94.1%
*-commutative94.1%
distribute-rgt-out94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in y around inf 94.8%
if -5.8e10 < y < 6.6000000000000003e-28Initial program 92.6%
associate-+l+92.6%
+-commutative92.6%
fma-define92.6%
associate-*l*93.5%
*-commutative93.5%
*-commutative93.5%
distribute-rgt-out96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in y around 0 90.5%
Final simplification92.8%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3e+270) (* b (* z a)) (if (or (<= z -7.6e-15) (not (<= z 7e+70))) (+ x (* y z)) (+ x (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3e+270) {
tmp = b * (z * a);
} else if ((z <= -7.6e-15) || !(z <= 7e+70)) {
tmp = x + (y * z);
} 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 (z <= (-3d+270)) then
tmp = b * (z * a)
else if ((z <= (-7.6d-15)) .or. (.not. (z <= 7d+70))) then
tmp = x + (y * z)
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 (z <= -3e+270) {
tmp = b * (z * a);
} else if ((z <= -7.6e-15) || !(z <= 7e+70)) {
tmp = x + (y * z);
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3e+270: tmp = b * (z * a) elif (z <= -7.6e-15) or not (z <= 7e+70): tmp = x + (y * z) else: tmp = x + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3e+270) tmp = Float64(b * Float64(z * a)); elseif ((z <= -7.6e-15) || !(z <= 7e+70)) tmp = Float64(x + Float64(y * z)); 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 (z <= -3e+270) tmp = b * (z * a); elseif ((z <= -7.6e-15) || ~((z <= 7e+70))) tmp = x + (y * z); else tmp = x + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3e+270], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -7.6e-15], N[Not[LessEqual[z, 7e+70]], $MachinePrecision]], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+270}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{elif}\;z \leq -7.6 \cdot 10^{-15} \lor \neg \left(z \leq 7 \cdot 10^{+70}\right):\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if z < -3.00000000000000014e270Initial program 70.0%
associate-+l+70.0%
+-commutative70.0%
fma-define70.0%
associate-*l*51.2%
*-commutative51.2%
*-commutative51.2%
distribute-rgt-out71.2%
*-commutative71.2%
Simplified71.2%
Taylor expanded in y around 0 81.2%
Taylor expanded in a around inf 81.2%
Taylor expanded in b around inf 81.2%
*-commutative81.2%
associate-*r*90.8%
Simplified90.8%
if -3.00000000000000014e270 < z < -7.6000000000000004e-15 or 7.00000000000000005e70 < z Initial program 87.0%
associate-+l+87.0%
+-commutative87.0%
fma-define87.1%
associate-*l*89.9%
*-commutative89.9%
*-commutative89.9%
distribute-rgt-out91.8%
*-commutative91.8%
Simplified91.8%
Taylor expanded in y around inf 84.6%
Taylor expanded in a around 0 62.1%
Taylor expanded in y around 0 62.1%
if -7.6000000000000004e-15 < z < 7.00000000000000005e70Initial program 98.6%
associate-+l+98.6%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in z around 0 74.3%
Final simplification69.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2e+195) (* b (* z a)) (if (or (<= z -7e-14) (not (<= z 5.5e+68))) (* y z) (+ x (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2e+195) {
tmp = b * (z * a);
} else if ((z <= -7e-14) || !(z <= 5.5e+68)) {
tmp = y * z;
} 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 (z <= (-2d+195)) then
tmp = b * (z * a)
else if ((z <= (-7d-14)) .or. (.not. (z <= 5.5d+68))) then
tmp = y * z
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 (z <= -2e+195) {
tmp = b * (z * a);
} else if ((z <= -7e-14) || !(z <= 5.5e+68)) {
tmp = y * z;
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2e+195: tmp = b * (z * a) elif (z <= -7e-14) or not (z <= 5.5e+68): tmp = y * z else: tmp = x + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2e+195) tmp = Float64(b * Float64(z * a)); elseif ((z <= -7e-14) || !(z <= 5.5e+68)) tmp = Float64(y * z); 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 (z <= -2e+195) tmp = b * (z * a); elseif ((z <= -7e-14) || ~((z <= 5.5e+68))) tmp = y * z; else tmp = x + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2e+195], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -7e-14], N[Not[LessEqual[z, 5.5e+68]], $MachinePrecision]], N[(y * z), $MachinePrecision], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+195}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-14} \lor \neg \left(z \leq 5.5 \cdot 10^{+68}\right):\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if z < -1.99999999999999995e195Initial program 78.3%
associate-+l+78.3%
+-commutative78.3%
fma-define78.3%
associate-*l*61.9%
*-commutative61.9%
*-commutative61.9%
distribute-rgt-out74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in y around 0 63.9%
Taylor expanded in a around inf 62.7%
Taylor expanded in b around inf 53.7%
*-commutative53.7%
associate-*r*66.1%
Simplified66.1%
if -1.99999999999999995e195 < z < -7.0000000000000005e-14 or 5.5000000000000004e68 < z Initial program 87.5%
associate-+l+87.5%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in z around inf 83.8%
Taylor expanded in y around inf 53.7%
if -7.0000000000000005e-14 < z < 5.5000000000000004e68Initial program 98.6%
associate-+l+98.6%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in z around 0 74.9%
Final simplification66.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.4e+193)
(* b (* z a))
(if (<= z -7e-15)
(* y (+ z (/ x y)))
(if (<= z 5.8e+68) (+ x (* t a)) (+ x (* y z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.4e+193) {
tmp = b * (z * a);
} else if (z <= -7e-15) {
tmp = y * (z + (x / y));
} else if (z <= 5.8e+68) {
tmp = x + (t * a);
} else {
tmp = x + (y * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.4d+193)) then
tmp = b * (z * a)
else if (z <= (-7d-15)) then
tmp = y * (z + (x / y))
else if (z <= 5.8d+68) then
tmp = x + (t * a)
else
tmp = x + (y * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.4e+193) {
tmp = b * (z * a);
} else if (z <= -7e-15) {
tmp = y * (z + (x / y));
} else if (z <= 5.8e+68) {
tmp = x + (t * a);
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.4e+193: tmp = b * (z * a) elif z <= -7e-15: tmp = y * (z + (x / y)) elif z <= 5.8e+68: tmp = x + (t * a) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.4e+193) tmp = Float64(b * Float64(z * a)); elseif (z <= -7e-15) tmp = Float64(y * Float64(z + Float64(x / y))); elseif (z <= 5.8e+68) tmp = Float64(x + Float64(t * a)); else tmp = Float64(x + Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.4e+193) tmp = b * (z * a); elseif (z <= -7e-15) tmp = y * (z + (x / y)); elseif (z <= 5.8e+68) tmp = x + (t * a); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.4e+193], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -7e-15], N[(y * N[(z + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+68], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.4 \cdot 10^{+193}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-15}:\\
\;\;\;\;y \cdot \left(z + \frac{x}{y}\right)\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+68}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if z < -3.39999999999999986e193Initial program 78.3%
associate-+l+78.3%
+-commutative78.3%
fma-define78.3%
associate-*l*61.9%
*-commutative61.9%
*-commutative61.9%
distribute-rgt-out74.9%
*-commutative74.9%
Simplified74.9%
Taylor expanded in y around 0 63.9%
Taylor expanded in a around inf 62.7%
Taylor expanded in b around inf 53.7%
*-commutative53.7%
associate-*r*66.1%
Simplified66.1%
if -3.39999999999999986e193 < z < -7.0000000000000001e-15Initial program 91.9%
associate-+l+91.9%
+-commutative91.9%
fma-define91.9%
associate-*l*95.8%
*-commutative95.8%
*-commutative95.8%
distribute-rgt-out95.8%
*-commutative95.8%
Simplified95.8%
Taylor expanded in y around inf 90.0%
Taylor expanded in a around 0 69.6%
if -7.0000000000000001e-15 < z < 5.80000000000000023e68Initial program 98.6%
associate-+l+98.6%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in z around 0 74.3%
if 5.80000000000000023e68 < z Initial program 82.7%
associate-+l+82.7%
+-commutative82.7%
fma-define82.7%
associate-*l*89.3%
*-commutative89.3%
*-commutative89.3%
distribute-rgt-out91.5%
*-commutative91.5%
Simplified91.5%
Taylor expanded in y around inf 83.2%
Taylor expanded in a around 0 58.5%
Taylor expanded in y around 0 62.6%
Final simplification70.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -3.5e+196) (* z (+ y (* a b))) (+ (+ x (* y z)) (+ (* a (* z b)) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.5e+196) {
tmp = z * (y + (a * b));
} else {
tmp = (x + (y * z)) + ((a * (z * b)) + (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 (z <= (-3.5d+196)) then
tmp = z * (y + (a * b))
else
tmp = (x + (y * z)) + ((a * (z * b)) + (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 (z <= -3.5e+196) {
tmp = z * (y + (a * b));
} else {
tmp = (x + (y * z)) + ((a * (z * b)) + (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.5e+196: tmp = z * (y + (a * b)) else: tmp = (x + (y * z)) + ((a * (z * b)) + (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.5e+196) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(Float64(x + Float64(y * z)) + Float64(Float64(a * Float64(z * b)) + Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.5e+196) tmp = z * (y + (a * b)); else tmp = (x + (y * z)) + ((a * (z * b)) + (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.5e+196], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+196}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y \cdot z\right) + \left(a \cdot \left(z \cdot b\right) + t \cdot a\right)\\
\end{array}
\end{array}
if z < -3.4999999999999998e196Initial program 78.3%
associate-+l+78.3%
associate-*l*61.9%
Simplified61.9%
Taylor expanded in z around inf 86.9%
if -3.4999999999999998e196 < z Initial program 94.0%
associate-+l+94.0%
associate-*l*97.0%
Simplified97.0%
Final simplification96.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.8e+92) (not (<= a 2.5e+71))) (+ x (* a (+ t (* z b)))) (+ x (+ (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.8e+92) || !(a <= 2.5e+71)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-4.8d+92)) .or. (.not. (a <= 2.5d+71))) then
tmp = x + (a * (t + (z * b)))
else
tmp = x + ((t * a) + (y * z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.8e+92) || !(a <= 2.5e+71)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.8e+92) or not (a <= 2.5e+71): tmp = x + (a * (t + (z * b))) else: tmp = x + ((t * a) + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.8e+92) || !(a <= 2.5e+71)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); else tmp = Float64(x + Float64(Float64(t * a) + Float64(y * z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4.8e+92) || ~((a <= 2.5e+71))) tmp = x + (a * (t + (z * b))); else tmp = x + ((t * a) + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.8e+92], N[Not[LessEqual[a, 2.5e+71]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.8 \cdot 10^{+92} \lor \neg \left(a \leq 2.5 \cdot 10^{+71}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\end{array}
\end{array}
if a < -4.80000000000000009e92 or 2.49999999999999986e71 < a Initial program 86.4%
associate-+l+86.4%
+-commutative86.4%
fma-define86.4%
associate-*l*94.0%
*-commutative94.0%
*-commutative94.0%
distribute-rgt-out97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in y around 0 91.7%
if -4.80000000000000009e92 < a < 2.49999999999999986e71Initial program 97.9%
associate-+l+97.9%
associate-*l*93.7%
Simplified93.7%
Taylor expanded in b around 0 88.9%
Final simplification90.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -6.6e-14) (not (<= z 3.2e+68))) (* z (+ y (* a b))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6.6e-14) || !(z <= 3.2e+68)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * 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 <= (-6.6d-14)) .or. (.not. (z <= 3.2d+68))) then
tmp = z * (y + (a * b))
else
tmp = x + (a * (t + (z * 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 <= -6.6e-14) || !(z <= 3.2e+68)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6.6e-14) or not (z <= 3.2e+68): tmp = z * (y + (a * b)) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6.6e-14) || !(z <= 3.2e+68)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -6.6e-14) || ~((z <= 3.2e+68))) tmp = z * (y + (a * b)); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6.6e-14], N[Not[LessEqual[z, 3.2e+68]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.6 \cdot 10^{-14} \lor \neg \left(z \leq 3.2 \cdot 10^{+68}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -6.5999999999999996e-14 or 3.19999999999999994e68 < z Initial program 85.7%
associate-+l+85.7%
associate-*l*86.7%
Simplified86.7%
Taylor expanded in z around inf 84.4%
if -6.5999999999999996e-14 < z < 3.19999999999999994e68Initial program 98.6%
associate-+l+98.6%
+-commutative98.6%
fma-define98.6%
associate-*l*100.0%
*-commutative100.0%
*-commutative100.0%
distribute-rgt-out100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in y around 0 91.8%
Final simplification88.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a -8.2e+94) (+ x (* b (* a (+ z (/ t b))))) (if (<= a 2.7e+73) (+ x (+ (* t a) (* y z))) (+ x (* a (+ t (* z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8.2e+94) {
tmp = x + (b * (a * (z + (t / b))));
} else if (a <= 2.7e+73) {
tmp = x + ((t * a) + (y * z));
} else {
tmp = x + (a * (t + (z * 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 <= (-8.2d+94)) then
tmp = x + (b * (a * (z + (t / b))))
else if (a <= 2.7d+73) then
tmp = x + ((t * a) + (y * z))
else
tmp = x + (a * (t + (z * 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 <= -8.2e+94) {
tmp = x + (b * (a * (z + (t / b))));
} else if (a <= 2.7e+73) {
tmp = x + ((t * a) + (y * z));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -8.2e+94: tmp = x + (b * (a * (z + (t / b)))) elif a <= 2.7e+73: tmp = x + ((t * a) + (y * z)) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -8.2e+94) tmp = Float64(x + Float64(b * Float64(a * Float64(z + Float64(t / b))))); elseif (a <= 2.7e+73) tmp = Float64(x + Float64(Float64(t * a) + Float64(y * z))); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -8.2e+94) tmp = x + (b * (a * (z + (t / b)))); elseif (a <= 2.7e+73) tmp = x + ((t * a) + (y * z)); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -8.2e+94], N[(x + N[(b * N[(a * N[(z + N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.7e+73], N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.2 \cdot 10^{+94}:\\
\;\;\;\;x + b \cdot \left(a \cdot \left(z + \frac{t}{b}\right)\right)\\
\mathbf{elif}\;a \leq 2.7 \cdot 10^{+73}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if a < -8.20000000000000061e94Initial program 86.3%
associate-+l+86.3%
+-commutative86.3%
fma-define86.3%
associate-*l*93.1%
*-commutative93.1%
*-commutative93.1%
distribute-rgt-out98.3%
*-commutative98.3%
Simplified98.3%
Taylor expanded in y around 0 88.3%
Taylor expanded in b around inf 79.6%
associate-/l*83.1%
distribute-lft-out88.3%
Simplified88.3%
if -8.20000000000000061e94 < a < 2.6999999999999999e73Initial program 97.9%
associate-+l+97.9%
associate-*l*93.7%
Simplified93.7%
Taylor expanded in b around 0 88.9%
if 2.6999999999999999e73 < a Initial program 86.5%
associate-+l+86.5%
+-commutative86.5%
fma-define86.5%
associate-*l*94.8%
*-commutative94.8%
*-commutative94.8%
distribute-rgt-out96.5%
*-commutative96.5%
Simplified96.5%
Taylor expanded in y around 0 95.0%
Final simplification90.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y -1.95e+102) (* y z) (if (<= y 5.9e-183) (* b (* z a)) (if (<= y 2.7e+28) (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.95e+102) {
tmp = y * z;
} else if (y <= 5.9e-183) {
tmp = b * (z * a);
} else if (y <= 2.7e+28) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.95d+102)) then
tmp = y * z
else if (y <= 5.9d-183) then
tmp = b * (z * a)
else if (y <= 2.7d+28) then
tmp = t * a
else
tmp = y * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.95e+102) {
tmp = y * z;
} else if (y <= 5.9e-183) {
tmp = b * (z * a);
} else if (y <= 2.7e+28) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.95e+102: tmp = y * z elif y <= 5.9e-183: tmp = b * (z * a) elif y <= 2.7e+28: tmp = t * a else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.95e+102) tmp = Float64(y * z); elseif (y <= 5.9e-183) tmp = Float64(b * Float64(z * a)); elseif (y <= 2.7e+28) tmp = Float64(t * a); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.95e+102) tmp = y * z; elseif (y <= 5.9e-183) tmp = b * (z * a); elseif (y <= 2.7e+28) tmp = t * a; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.95e+102], N[(y * z), $MachinePrecision], If[LessEqual[y, 5.9e-183], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+28], N[(t * a), $MachinePrecision], N[(y * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+102}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;y \leq 5.9 \cdot 10^{-183}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+28}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if y < -1.9499999999999999e102 or 2.7000000000000002e28 < y Initial program 91.6%
associate-+l+91.6%
associate-*l*92.5%
Simplified92.5%
Taylor expanded in z around inf 67.7%
Taylor expanded in y around inf 55.3%
if -1.9499999999999999e102 < y < 5.89999999999999984e-183Initial program 92.4%
associate-+l+92.4%
+-commutative92.4%
fma-define92.5%
associate-*l*94.4%
*-commutative94.4%
*-commutative94.4%
distribute-rgt-out97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in y around 0 88.2%
Taylor expanded in a around inf 81.0%
Taylor expanded in b around inf 40.2%
*-commutative40.2%
associate-*r*41.7%
Simplified41.7%
if 5.89999999999999984e-183 < y < 2.7000000000000002e28Initial program 95.6%
associate-+l+95.6%
associate-*l*95.8%
Simplified95.8%
Taylor expanded in z around 0 84.8%
Taylor expanded in x around 0 55.0%
Final simplification49.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y -3.5e+100) (* y z) (if (<= y 4e-183) (* a (* z b)) (if (<= y 1.8e+28) (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.5e+100) {
tmp = y * z;
} else if (y <= 4e-183) {
tmp = a * (z * b);
} else if (y <= 1.8e+28) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-3.5d+100)) then
tmp = y * z
else if (y <= 4d-183) then
tmp = a * (z * b)
else if (y <= 1.8d+28) then
tmp = t * a
else
tmp = y * z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.5e+100) {
tmp = y * z;
} else if (y <= 4e-183) {
tmp = a * (z * b);
} else if (y <= 1.8e+28) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.5e+100: tmp = y * z elif y <= 4e-183: tmp = a * (z * b) elif y <= 1.8e+28: tmp = t * a else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.5e+100) tmp = Float64(y * z); elseif (y <= 4e-183) tmp = Float64(a * Float64(z * b)); elseif (y <= 1.8e+28) tmp = Float64(t * a); else tmp = Float64(y * z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.5e+100) tmp = y * z; elseif (y <= 4e-183) tmp = a * (z * b); elseif (y <= 1.8e+28) tmp = t * a; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.5e+100], N[(y * z), $MachinePrecision], If[LessEqual[y, 4e-183], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e+28], N[(t * a), $MachinePrecision], N[(y * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+100}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-183}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{+28}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if y < -3.49999999999999976e100 or 1.8e28 < y Initial program 91.6%
associate-+l+91.6%
associate-*l*92.5%
Simplified92.5%
Taylor expanded in z around inf 67.7%
Taylor expanded in y around inf 55.3%
if -3.49999999999999976e100 < y < 4.00000000000000002e-183Initial program 92.4%
associate-+l+92.4%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in z around inf 49.1%
Taylor expanded in y around 0 40.2%
if 4.00000000000000002e-183 < y < 1.8e28Initial program 95.6%
associate-+l+95.6%
associate-*l*95.8%
Simplified95.8%
Taylor expanded in z around 0 84.8%
Taylor expanded in x around 0 55.0%
Final simplification49.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -5.2e+16) (* t a) (if (<= t 8.5e-277) x (if (<= t 2.8e+45) (* y z) (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.2e+16) {
tmp = t * a;
} else if (t <= 8.5e-277) {
tmp = x;
} else if (t <= 2.8e+45) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-5.2d+16)) then
tmp = t * a
else if (t <= 8.5d-277) then
tmp = x
else if (t <= 2.8d+45) then
tmp = y * z
else
tmp = t * a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.2e+16) {
tmp = t * a;
} else if (t <= 8.5e-277) {
tmp = x;
} else if (t <= 2.8e+45) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5.2e+16: tmp = t * a elif t <= 8.5e-277: tmp = x elif t <= 2.8e+45: tmp = y * z else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5.2e+16) tmp = Float64(t * a); elseif (t <= 8.5e-277) tmp = x; elseif (t <= 2.8e+45) tmp = Float64(y * z); else tmp = Float64(t * a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -5.2e+16) tmp = t * a; elseif (t <= 8.5e-277) tmp = x; elseif (t <= 2.8e+45) tmp = y * z; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5.2e+16], N[(t * a), $MachinePrecision], If[LessEqual[t, 8.5e-277], x, If[LessEqual[t, 2.8e+45], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+16}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-277}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+45}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if t < -5.2e16 or 2.7999999999999999e45 < t Initial program 92.0%
associate-+l+92.0%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in z around 0 68.4%
Taylor expanded in x around 0 55.0%
if -5.2e16 < t < 8.4999999999999998e-277Initial program 94.6%
associate-+l+94.6%
+-commutative94.6%
fma-define94.6%
associate-*l*92.0%
*-commutative92.0%
*-commutative92.0%
distribute-rgt-out92.0%
*-commutative92.0%
Simplified92.0%
Taylor expanded in y around 0 75.0%
Taylor expanded in a around inf 66.7%
Taylor expanded in a around 0 40.2%
if 8.4999999999999998e-277 < t < 2.7999999999999999e45Initial program 91.6%
associate-+l+91.6%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in z around inf 69.6%
Taylor expanded in y around inf 42.3%
Final simplification47.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1e-15) (not (<= z 3.7e-16))) (* z (+ y (* a b))) (+ x (* t a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1e-15) || !(z <= 3.7e-16)) {
tmp = z * (y + (a * b));
} 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 ((z <= (-1d-15)) .or. (.not. (z <= 3.7d-16))) then
tmp = z * (y + (a * b))
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 ((z <= -1e-15) || !(z <= 3.7e-16)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1e-15) or not (z <= 3.7e-16): tmp = z * (y + (a * b)) else: tmp = x + (t * a) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1e-15) || !(z <= 3.7e-16)) tmp = Float64(z * Float64(y + Float64(a * b))); 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 ((z <= -1e-15) || ~((z <= 3.7e-16))) tmp = z * (y + (a * b)); else tmp = x + (t * a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1e-15], N[Not[LessEqual[z, 3.7e-16]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-15} \lor \neg \left(z \leq 3.7 \cdot 10^{-16}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if z < -1.0000000000000001e-15 or 3.7e-16 < z Initial program 87.4%
associate-+l+87.4%
associate-*l*88.3%
Simplified88.3%
Taylor expanded in z around inf 82.0%
if -1.0000000000000001e-15 < z < 3.7e-16Initial program 98.4%
associate-+l+98.4%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in z around 0 78.1%
Final simplification80.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.8e+16) (not (<= t 1.55e-45))) (* t a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.8e+16) || !(t <= 1.55e-45)) {
tmp = t * a;
} 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 ((t <= (-5.8d+16)) .or. (.not. (t <= 1.55d-45))) then
tmp = t * a
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 ((t <= -5.8e+16) || !(t <= 1.55e-45)) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5.8e+16) or not (t <= 1.55e-45): tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.8e+16) || !(t <= 1.55e-45)) tmp = Float64(t * a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5.8e+16) || ~((t <= 1.55e-45))) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.8e+16], N[Not[LessEqual[t, 1.55e-45]], $MachinePrecision]], N[(t * a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.8 \cdot 10^{+16} \lor \neg \left(t \leq 1.55 \cdot 10^{-45}\right):\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -5.8e16 or 1.55e-45 < t Initial program 91.1%
associate-+l+91.1%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in z around 0 61.3%
Taylor expanded in x around 0 49.5%
if -5.8e16 < t < 1.55e-45Initial program 94.3%
associate-+l+94.3%
+-commutative94.3%
fma-define94.3%
associate-*l*94.3%
*-commutative94.3%
*-commutative94.3%
distribute-rgt-out94.3%
*-commutative94.3%
Simplified94.3%
Taylor expanded in y around 0 70.3%
Taylor expanded in a around inf 63.8%
Taylor expanded in a around 0 35.6%
Final simplification42.9%
(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.6%
associate-+l+92.6%
+-commutative92.6%
fma-define92.6%
associate-*l*93.8%
*-commutative93.8%
*-commutative93.8%
distribute-rgt-out95.4%
*-commutative95.4%
Simplified95.4%
Taylor expanded in y around 0 74.5%
Taylor expanded in a around inf 69.3%
Taylor expanded in a around 0 24.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 2024133
(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)))