
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* (* z a) b)))) (if (<= t_1 INFINITY) t_1 (+ x (* 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)) + ((z * a) * b);
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = x + (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)) + ((z * a) * b);
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = x + (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(Float64(z * a) * b)) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; 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) t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = x + (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[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x + 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 98.1%
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*13.6%
Simplified13.6%
Taylor expanded in t around 0 40.9%
+-commutative40.9%
+-commutative40.9%
associate-*r*40.9%
distribute-rgt-in95.5%
Simplified95.5%
Final simplification97.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.25e+176)
(* z (* a b))
(if (or (<= a 4.5e-47) (and (not (<= a 2.45e-20)) (<= a 1.28e+51)))
(+ x (* y z))
(* a (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.25e+176) {
tmp = z * (a * b);
} else if ((a <= 4.5e-47) || (!(a <= 2.45e-20) && (a <= 1.28e+51))) {
tmp = x + (y * z);
} else {
tmp = 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) :: tmp
if (a <= (-1.25d+176)) then
tmp = z * (a * b)
else if ((a <= 4.5d-47) .or. (.not. (a <= 2.45d-20)) .and. (a <= 1.28d+51)) then
tmp = x + (y * z)
else
tmp = 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 tmp;
if (a <= -1.25e+176) {
tmp = z * (a * b);
} else if ((a <= 4.5e-47) || (!(a <= 2.45e-20) && (a <= 1.28e+51))) {
tmp = x + (y * z);
} else {
tmp = a * (z * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.25e+176: tmp = z * (a * b) elif (a <= 4.5e-47) or (not (a <= 2.45e-20) and (a <= 1.28e+51)): tmp = x + (y * z) else: tmp = a * (z * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.25e+176) tmp = Float64(z * Float64(a * b)); elseif ((a <= 4.5e-47) || (!(a <= 2.45e-20) && (a <= 1.28e+51))) tmp = Float64(x + Float64(y * z)); else tmp = Float64(a * Float64(z * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.25e+176) tmp = z * (a * b); elseif ((a <= 4.5e-47) || (~((a <= 2.45e-20)) && (a <= 1.28e+51))) tmp = x + (y * z); else tmp = a * (z * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.25e+176], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, 4.5e-47], And[N[Not[LessEqual[a, 2.45e-20]], $MachinePrecision], LessEqual[a, 1.28e+51]]], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{+176}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{-47} \lor \neg \left(a \leq 2.45 \cdot 10^{-20}\right) \land a \leq 1.28 \cdot 10^{+51}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\end{array}
\end{array}
if a < -1.25e176Initial program 65.3%
associate-+l+65.3%
associate-*l*74.9%
Simplified74.9%
Taylor expanded in t around 0 62.2%
+-commutative62.2%
+-commutative62.2%
associate-*r*62.2%
distribute-rgt-in69.3%
Simplified69.3%
Taylor expanded in y around 0 65.8%
Taylor expanded in a around inf 65.7%
associate-*r*65.8%
*-commutative65.8%
Simplified65.8%
if -1.25e176 < a < 4.5e-47 or 2.4500000000000001e-20 < a < 1.27999999999999993e51Initial program 94.8%
associate-+l+94.8%
associate-*l*93.0%
Simplified93.0%
Taylor expanded in a around 0 70.1%
if 4.5e-47 < a < 2.4500000000000001e-20 or 1.27999999999999993e51 < a Initial program 86.4%
associate-+l+86.4%
associate-*l*88.0%
Simplified88.0%
Taylor expanded in z around inf 62.7%
Taylor expanded in y around 0 54.1%
Final simplification65.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -85000000000000.0)
(* y z)
(if (<= z 3.2e-163)
x
(if (<= z 5.8e-112) (* t a) (if (<= z 5.7e+54) (* y z) (* a (* z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -85000000000000.0) {
tmp = y * z;
} else if (z <= 3.2e-163) {
tmp = x;
} else if (z <= 5.8e-112) {
tmp = t * a;
} else if (z <= 5.7e+54) {
tmp = y * z;
} else {
tmp = 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) :: tmp
if (z <= (-85000000000000.0d0)) then
tmp = y * z
else if (z <= 3.2d-163) then
tmp = x
else if (z <= 5.8d-112) then
tmp = t * a
else if (z <= 5.7d+54) then
tmp = y * z
else
tmp = 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 tmp;
if (z <= -85000000000000.0) {
tmp = y * z;
} else if (z <= 3.2e-163) {
tmp = x;
} else if (z <= 5.8e-112) {
tmp = t * a;
} else if (z <= 5.7e+54) {
tmp = y * z;
} else {
tmp = a * (z * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -85000000000000.0: tmp = y * z elif z <= 3.2e-163: tmp = x elif z <= 5.8e-112: tmp = t * a elif z <= 5.7e+54: tmp = y * z else: tmp = a * (z * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -85000000000000.0) tmp = Float64(y * z); elseif (z <= 3.2e-163) tmp = x; elseif (z <= 5.8e-112) tmp = Float64(t * a); elseif (z <= 5.7e+54) tmp = Float64(y * z); else tmp = Float64(a * Float64(z * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -85000000000000.0) tmp = y * z; elseif (z <= 3.2e-163) tmp = x; elseif (z <= 5.8e-112) tmp = t * a; elseif (z <= 5.7e+54) tmp = y * z; else tmp = a * (z * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -85000000000000.0], N[(y * z), $MachinePrecision], If[LessEqual[z, 3.2e-163], x, If[LessEqual[z, 5.8e-112], N[(t * a), $MachinePrecision], If[LessEqual[z, 5.7e+54], N[(y * z), $MachinePrecision], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -85000000000000:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 3.2 \cdot 10^{-163}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-112}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{+54}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\end{array}
\end{array}
if z < -8.5e13 or 5.79999999999999985e-112 < z < 5.6999999999999997e54Initial program 87.8%
associate-+l+87.8%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in y around inf 45.4%
*-commutative45.4%
Simplified45.4%
if -8.5e13 < z < 3.19999999999999988e-163Initial program 99.6%
associate-+l+99.6%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in x around inf 52.7%
if 3.19999999999999988e-163 < z < 5.79999999999999985e-112Initial program 100.0%
associate-+l+100.0%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in t around inf 58.8%
if 5.6999999999999997e54 < z Initial program 75.6%
associate-+l+75.6%
associate-*l*72.0%
Simplified72.0%
Taylor expanded in z around inf 86.0%
Taylor expanded in y around 0 54.9%
Final simplification50.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.16e+14)
(* y z)
(if (<= z 7.2e-162)
x
(if (<= z 4e-112) (* t a) (if (<= z 5.2e+54) (* y z) (* z (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.16e+14) {
tmp = y * z;
} else if (z <= 7.2e-162) {
tmp = x;
} else if (z <= 4e-112) {
tmp = t * a;
} else if (z <= 5.2e+54) {
tmp = y * z;
} else {
tmp = z * (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.16d+14)) then
tmp = y * z
else if (z <= 7.2d-162) then
tmp = x
else if (z <= 4d-112) then
tmp = t * a
else if (z <= 5.2d+54) then
tmp = y * z
else
tmp = z * (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.16e+14) {
tmp = y * z;
} else if (z <= 7.2e-162) {
tmp = x;
} else if (z <= 4e-112) {
tmp = t * a;
} else if (z <= 5.2e+54) {
tmp = y * z;
} else {
tmp = z * (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.16e+14: tmp = y * z elif z <= 7.2e-162: tmp = x elif z <= 4e-112: tmp = t * a elif z <= 5.2e+54: tmp = y * z else: tmp = z * (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.16e+14) tmp = Float64(y * z); elseif (z <= 7.2e-162) tmp = x; elseif (z <= 4e-112) tmp = Float64(t * a); elseif (z <= 5.2e+54) tmp = Float64(y * z); else tmp = Float64(z * Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.16e+14) tmp = y * z; elseif (z <= 7.2e-162) tmp = x; elseif (z <= 4e-112) tmp = t * a; elseif (z <= 5.2e+54) tmp = y * z; else tmp = z * (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.16e+14], N[(y * z), $MachinePrecision], If[LessEqual[z, 7.2e-162], x, If[LessEqual[z, 4e-112], N[(t * a), $MachinePrecision], If[LessEqual[z, 5.2e+54], N[(y * z), $MachinePrecision], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.16 \cdot 10^{+14}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 7.2 \cdot 10^{-162}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-112}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+54}:\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -1.16e14 or 3.9999999999999998e-112 < z < 5.20000000000000013e54Initial program 87.8%
associate-+l+87.8%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in y around inf 45.4%
*-commutative45.4%
Simplified45.4%
if -1.16e14 < z < 7.1999999999999996e-162Initial program 99.6%
associate-+l+99.6%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in x around inf 52.7%
if 7.1999999999999996e-162 < z < 3.9999999999999998e-112Initial program 100.0%
associate-+l+100.0%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in t around inf 58.8%
if 5.20000000000000013e54 < z Initial program 75.6%
associate-+l+75.6%
associate-*l*72.0%
Simplified72.0%
Taylor expanded in t around 0 72.3%
+-commutative72.3%
+-commutative72.3%
associate-*r*79.5%
distribute-rgt-in90.8%
Simplified90.8%
Taylor expanded in y around 0 59.7%
Taylor expanded in a around inf 54.9%
associate-*r*58.4%
*-commutative58.4%
Simplified58.4%
Final simplification51.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.3e+166) (not (<= z 2.3e+80))) (+ x (* z (+ y (* a b)))) (+ (+ x (* y z)) (+ (* t a) (* a (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e+166) || !(z <= 2.3e+80)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (x + (y * z)) + ((t * a) + (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) :: tmp
if ((z <= (-1.3d+166)) .or. (.not. (z <= 2.3d+80))) then
tmp = x + (z * (y + (a * b)))
else
tmp = (x + (y * z)) + ((t * a) + (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 tmp;
if ((z <= -1.3e+166) || !(z <= 2.3e+80)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (x + (y * z)) + ((t * a) + (a * (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.3e+166) or not (z <= 2.3e+80): tmp = x + (z * (y + (a * b))) else: tmp = (x + (y * z)) + ((t * a) + (a * (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.3e+166) || !(z <= 2.3e+80)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(Float64(x + Float64(y * z)) + Float64(Float64(t * a) + Float64(a * Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.3e+166) || ~((z <= 2.3e+80))) tmp = x + (z * (y + (a * b))); else tmp = (x + (y * z)) + ((t * a) + (a * (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.3e+166], N[Not[LessEqual[z, 2.3e+80]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+166} \lor \neg \left(z \leq 2.3 \cdot 10^{+80}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y \cdot z\right) + \left(t \cdot a + a \cdot \left(z \cdot b\right)\right)\\
\end{array}
\end{array}
if z < -1.3e166 or 2.30000000000000004e80 < z Initial program 73.2%
associate-+l+73.2%
associate-*l*71.9%
Simplified71.9%
Taylor expanded in t around 0 71.2%
+-commutative71.2%
+-commutative71.2%
associate-*r*78.1%
distribute-rgt-in92.3%
Simplified92.3%
if -1.3e166 < z < 2.30000000000000004e80Initial program 97.8%
associate-+l+97.8%
associate-*l*98.8%
Simplified98.8%
Final simplification96.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t (* z b)))))
(if (<= a -3.6e+27)
t_1
(if (<= a 3.1e-57)
(+ x (* y z))
(if (<= a 2.2e+40) (+ x (* a (* z b))) 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 <= -3.6e+27) {
tmp = t_1;
} else if (a <= 3.1e-57) {
tmp = x + (y * z);
} else if (a <= 2.2e+40) {
tmp = x + (a * (z * b));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (t + (z * b))
if (a <= (-3.6d+27)) then
tmp = t_1
else if (a <= 3.1d-57) then
tmp = x + (y * z)
else if (a <= 2.2d+40) then
tmp = x + (a * (z * b))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + (z * b));
double tmp;
if (a <= -3.6e+27) {
tmp = t_1;
} else if (a <= 3.1e-57) {
tmp = x + (y * z);
} else if (a <= 2.2e+40) {
tmp = x + (a * (z * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + (z * b)) tmp = 0 if a <= -3.6e+27: tmp = t_1 elif a <= 3.1e-57: tmp = x + (y * z) elif a <= 2.2e+40: tmp = x + (a * (z * b)) 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 <= -3.6e+27) tmp = t_1; elseif (a <= 3.1e-57) tmp = Float64(x + Float64(y * z)); elseif (a <= 2.2e+40) tmp = Float64(x + Float64(a * Float64(z * b))); 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 <= -3.6e+27) tmp = t_1; elseif (a <= 3.1e-57) tmp = x + (y * z); elseif (a <= 2.2e+40) tmp = x + (a * (z * b)); 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, -3.6e+27], t$95$1, If[LessEqual[a, 3.1e-57], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.2e+40], N[(x + N[(a * N[(z * b), $MachinePrecision]), $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 -3.6 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-57}:\\
\;\;\;\;x + y \cdot z\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{+40}:\\
\;\;\;\;x + a \cdot \left(z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.59999999999999983e27 or 2.1999999999999999e40 < a Initial program 79.6%
associate-+l+79.6%
associate-*l*84.9%
Simplified84.9%
Taylor expanded in a around inf 78.0%
if -3.59999999999999983e27 < a < 3.09999999999999976e-57Initial program 99.2%
associate-+l+99.2%
associate-*l*93.7%
Simplified93.7%
Taylor expanded in a around 0 82.6%
if 3.09999999999999976e-57 < a < 2.1999999999999999e40Initial program 99.9%
associate-+l+99.9%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in t around 0 86.3%
+-commutative86.3%
+-commutative86.3%
associate-*r*82.3%
distribute-rgt-in82.3%
Simplified82.3%
Taylor expanded in y around 0 73.2%
Final simplification79.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y z))))
(if (<= z -1.25e+14)
t_1
(if (<= z 1.06e-97)
(+ x (* t a))
(if (<= z 2.3e+59) t_1 (* z (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (z <= -1.25e+14) {
tmp = t_1;
} else if (z <= 1.06e-97) {
tmp = x + (t * a);
} else if (z <= 2.3e+59) {
tmp = t_1;
} else {
tmp = z * (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * z)
if (z <= (-1.25d+14)) then
tmp = t_1
else if (z <= 1.06d-97) then
tmp = x + (t * a)
else if (z <= 2.3d+59) then
tmp = t_1
else
tmp = z * (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * z);
double tmp;
if (z <= -1.25e+14) {
tmp = t_1;
} else if (z <= 1.06e-97) {
tmp = x + (t * a);
} else if (z <= 2.3e+59) {
tmp = t_1;
} else {
tmp = z * (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * z) tmp = 0 if z <= -1.25e+14: tmp = t_1 elif z <= 1.06e-97: tmp = x + (t * a) elif z <= 2.3e+59: tmp = t_1 else: tmp = z * (a * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * z)) tmp = 0.0 if (z <= -1.25e+14) tmp = t_1; elseif (z <= 1.06e-97) tmp = Float64(x + Float64(t * a)); elseif (z <= 2.3e+59) tmp = t_1; else tmp = Float64(z * Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * z); tmp = 0.0; if (z <= -1.25e+14) tmp = t_1; elseif (z <= 1.06e-97) tmp = x + (t * a); elseif (z <= 2.3e+59) tmp = t_1; else tmp = z * (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e+14], t$95$1, If[LessEqual[z, 1.06e-97], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+59], t$95$1, N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.06 \cdot 10^{-97}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -1.25e14 or 1.06000000000000006e-97 < z < 2.30000000000000008e59Initial program 87.6%
associate-+l+87.6%
associate-*l*89.7%
Simplified89.7%
Taylor expanded in a around 0 59.5%
if -1.25e14 < z < 1.06000000000000006e-97Initial program 99.7%
associate-+l+99.7%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in z around 0 77.5%
+-commutative77.5%
Simplified77.5%
if 2.30000000000000008e59 < z Initial program 74.7%
associate-+l+74.7%
associate-*l*70.9%
Simplified70.9%
Taylor expanded in t around 0 73.2%
+-commutative73.2%
+-commutative73.2%
associate-*r*80.6%
distribute-rgt-in92.4%
Simplified92.4%
Taylor expanded in y around 0 60.0%
Taylor expanded in a around inf 56.8%
associate-*r*60.5%
*-commutative60.5%
Simplified60.5%
Final simplification66.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7.4e+71) (not (<= b 1.22e+60))) (+ x (* a (* z b))) (+ x (+ (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.4e+71) || !(b <= 1.22e+60)) {
tmp = x + (a * (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 ((b <= (-7.4d+71)) .or. (.not. (b <= 1.22d+60))) then
tmp = x + (a * (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 ((b <= -7.4e+71) || !(b <= 1.22e+60)) {
tmp = x + (a * (z * b));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7.4e+71) or not (b <= 1.22e+60): tmp = x + (a * (z * b)) else: tmp = x + ((t * a) + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7.4e+71) || !(b <= 1.22e+60)) tmp = Float64(x + Float64(a * 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 ((b <= -7.4e+71) || ~((b <= 1.22e+60))) tmp = x + (a * (z * b)); else tmp = x + ((t * a) + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7.4e+71], N[Not[LessEqual[b, 1.22e+60]], $MachinePrecision]], N[(x + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.4 \cdot 10^{+71} \lor \neg \left(b \leq 1.22 \cdot 10^{+60}\right):\\
\;\;\;\;x + a \cdot \left(z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\end{array}
\end{array}
if b < -7.4e71 or 1.21999999999999995e60 < b Initial program 87.2%
associate-+l+87.2%
associate-*l*81.6%
Simplified81.6%
Taylor expanded in t around 0 79.6%
+-commutative79.6%
+-commutative79.6%
associate-*r*80.0%
distribute-rgt-in86.5%
Simplified86.5%
Taylor expanded in y around 0 79.0%
if -7.4e71 < b < 1.21999999999999995e60Initial program 91.5%
associate-+l+91.5%
associate-*l*95.9%
Simplified95.9%
Taylor expanded in b around 0 90.0%
Final simplification85.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5e-48) (not (<= b 1.32e-76))) (+ x (* z (+ y (* a b)))) (+ x (+ (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5e-48) || !(b <= 1.32e-76)) {
tmp = x + (z * (y + (a * 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 ((b <= (-5d-48)) .or. (.not. (b <= 1.32d-76))) then
tmp = x + (z * (y + (a * 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 ((b <= -5e-48) || !(b <= 1.32e-76)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5e-48) or not (b <= 1.32e-76): tmp = x + (z * (y + (a * b))) else: tmp = x + ((t * a) + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5e-48) || !(b <= 1.32e-76)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * 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 ((b <= -5e-48) || ~((b <= 1.32e-76))) tmp = x + (z * (y + (a * b))); else tmp = x + ((t * a) + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5e-48], N[Not[LessEqual[b, 1.32e-76]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * 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}\;b \leq -5 \cdot 10^{-48} \lor \neg \left(b \leq 1.32 \cdot 10^{-76}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\end{array}
\end{array}
if b < -4.9999999999999999e-48 or 1.31999999999999996e-76 < b Initial program 87.7%
associate-+l+87.7%
associate-*l*84.5%
Simplified84.5%
Taylor expanded in t around 0 78.4%
+-commutative78.4%
+-commutative78.4%
associate-*r*79.2%
distribute-rgt-in86.0%
Simplified86.0%
if -4.9999999999999999e-48 < b < 1.31999999999999996e-76Initial program 92.9%
associate-+l+92.9%
associate-*l*98.9%
Simplified98.9%
Taylor expanded in b around 0 98.4%
Final simplification90.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.95e+14) (* y z) (if (<= z 1.4e-161) x (if (<= z 5.8e-112) (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.95e+14) {
tmp = y * z;
} else if (z <= 1.4e-161) {
tmp = x;
} else if (z <= 5.8e-112) {
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 (z <= (-1.95d+14)) then
tmp = y * z
else if (z <= 1.4d-161) then
tmp = x
else if (z <= 5.8d-112) 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 (z <= -1.95e+14) {
tmp = y * z;
} else if (z <= 1.4e-161) {
tmp = x;
} else if (z <= 5.8e-112) {
tmp = t * a;
} else {
tmp = y * z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.95e+14: tmp = y * z elif z <= 1.4e-161: tmp = x elif z <= 5.8e-112: tmp = t * a else: tmp = y * z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.95e+14) tmp = Float64(y * z); elseif (z <= 1.4e-161) tmp = x; elseif (z <= 5.8e-112) 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 (z <= -1.95e+14) tmp = y * z; elseif (z <= 1.4e-161) tmp = x; elseif (z <= 5.8e-112) tmp = t * a; else tmp = y * z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.95e+14], N[(y * z), $MachinePrecision], If[LessEqual[z, 1.4e-161], x, If[LessEqual[z, 5.8e-112], N[(t * a), $MachinePrecision], N[(y * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.95 \cdot 10^{+14}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-161}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-112}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\end{array}
if z < -1.95e14 or 5.79999999999999985e-112 < z Initial program 83.8%
associate-+l+83.8%
associate-*l*84.0%
Simplified84.0%
Taylor expanded in y around inf 44.1%
*-commutative44.1%
Simplified44.1%
if -1.95e14 < z < 1.39999999999999996e-161Initial program 99.6%
associate-+l+99.6%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in x around inf 52.7%
if 1.39999999999999996e-161 < z < 5.79999999999999985e-112Initial program 100.0%
associate-+l+100.0%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in t around inf 58.8%
Final simplification47.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4e+38) (not (<= a 3.1e-57))) (* a (+ t (* z b))) (+ x (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4e+38) || !(a <= 3.1e-57)) {
tmp = a * (t + (z * b));
} 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 ((a <= (-4d+38)) .or. (.not. (a <= 3.1d-57))) then
tmp = a * (t + (z * b))
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 ((a <= -4e+38) || !(a <= 3.1e-57)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4e+38) or not (a <= 3.1e-57): tmp = a * (t + (z * b)) else: tmp = x + (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4e+38) || !(a <= 3.1e-57)) tmp = Float64(a * Float64(t + Float64(z * b))); 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 ((a <= -4e+38) || ~((a <= 3.1e-57))) tmp = a * (t + (z * b)); else tmp = x + (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4e+38], N[Not[LessEqual[a, 3.1e-57]], $MachinePrecision]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+38} \lor \neg \left(a \leq 3.1 \cdot 10^{-57}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -3.99999999999999991e38 or 3.09999999999999976e-57 < a Initial program 82.6%
associate-+l+82.6%
associate-*l*87.1%
Simplified87.1%
Taylor expanded in a around inf 74.5%
if -3.99999999999999991e38 < a < 3.09999999999999976e-57Initial program 99.2%
associate-+l+99.2%
associate-*l*93.7%
Simplified93.7%
Taylor expanded in a around 0 82.6%
Final simplification78.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -0.0013) x (if (<= x 1.2e-29) (* t a) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -0.0013) {
tmp = x;
} else if (x <= 1.2e-29) {
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 (x <= (-0.0013d0)) then
tmp = x
else if (x <= 1.2d-29) 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 (x <= -0.0013) {
tmp = x;
} else if (x <= 1.2e-29) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -0.0013: tmp = x elif x <= 1.2e-29: tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -0.0013) tmp = x; elseif (x <= 1.2e-29) 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 (x <= -0.0013) tmp = x; elseif (x <= 1.2e-29) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -0.0013], x, If[LessEqual[x, 1.2e-29], N[(t * a), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -0.0013:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.2 \cdot 10^{-29}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -0.0012999999999999999 or 1.19999999999999996e-29 < x Initial program 90.3%
associate-+l+90.3%
associate-*l*91.0%
Simplified91.0%
Taylor expanded in x around inf 43.4%
if -0.0012999999999999999 < x < 1.19999999999999996e-29Initial program 89.0%
associate-+l+89.0%
associate-*l*88.6%
Simplified88.6%
Taylor expanded in t around inf 33.5%
Final simplification38.6%
(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 89.6%
associate-+l+89.6%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in x around inf 25.3%
Final simplification25.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 2024041
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:herbie-target
(if (< z -11820553527347888000.0) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 4.7589743188364287e-122) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a)))))
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))