
(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 1e+305) t_1 (* z (+ y (* a (+ b (/ t z))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= 1e+305) {
tmp = t_1;
} else {
tmp = z * (y + (a * (b + (t / z))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b)
if (t_1 <= 1d+305) then
tmp = t_1
else
tmp = z * (y + (a * (b + (t / z))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b);
double tmp;
if (t_1 <= 1e+305) {
tmp = t_1;
} else {
tmp = z * (y + (a * (b + (t / z))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b) tmp = 0 if t_1 <= 1e+305: tmp = t_1 else: tmp = z * (y + (a * (b + (t / z)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(z * a) * b)) tmp = 0.0 if (t_1 <= 1e+305) tmp = t_1; else tmp = Float64(z * Float64(y + Float64(a * Float64(b + Float64(t / z))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (y * z)) + (t * a)) + ((z * a) * b); tmp = 0.0; if (t_1 <= 1e+305) tmp = t_1; else tmp = z * (y + (a * (b + (t / z)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(z * a), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+305], t$95$1, N[(z * N[(y + N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(z \cdot a\right) \cdot b\\
\mathbf{if}\;t\_1 \leq 10^{+305}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y + a \cdot \left(b + \frac{t}{z}\right)\right)\\
\end{array}
\end{array}
if (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) < 9.9999999999999994e304Initial program 100.0%
if 9.9999999999999994e304 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 70.8%
Taylor expanded in x around 0 70.8%
Taylor expanded in z around inf 92.2%
associate-/l*96.1%
distribute-lft-out100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2e+26) (not (<= z 1000.0))) (* z (+ y (+ (* a (+ b (/ t z))) (/ x z)))) (+ (+ 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 <= -2e+26) || !(z <= 1000.0)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} 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 <= (-2d+26)) .or. (.not. (z <= 1000.0d0))) then
tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
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 <= -2e+26) || !(z <= 1000.0)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = (x + (y * z)) + ((t * a) + (a * (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2e+26) or not (z <= 1000.0): tmp = z * (y + ((a * (b + (t / z))) + (x / z))) 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 <= -2e+26) || !(z <= 1000.0)) tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))); 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 <= -2e+26) || ~((z <= 1000.0))) tmp = z * (y + ((a * (b + (t / z))) + (x / z))); 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, -2e+26], N[Not[LessEqual[z, 1000.0]], $MachinePrecision]], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $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 -2 \cdot 10^{+26} \lor \neg \left(z \leq 1000\right):\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\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 < -2.0000000000000001e26 or 1e3 < z Initial program 88.8%
associate-+l+88.8%
associate-*l*86.4%
Simplified86.4%
Taylor expanded in z around inf 98.1%
+-commutative98.1%
associate-+l+98.1%
+-commutative98.1%
associate-/l*99.9%
distribute-lft-out99.9%
Simplified99.9%
if -2.0000000000000001e26 < z < 1e3Initial program 98.5%
associate-+l+98.5%
associate-*l*98.5%
Simplified98.5%
Final simplification99.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.15e-40) (not (<= z 2.3e-78))) (* z (+ y (+ (* a (+ b (/ t z))) (/ x z)))) (+ x (+ (* t a) (* y z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.15e-40) || !(z <= 2.3e-78)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} 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 ((z <= (-1.15d-40)) .or. (.not. (z <= 2.3d-78))) then
tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
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 ((z <= -1.15e-40) || !(z <= 2.3e-78)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = x + ((t * a) + (y * z));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.15e-40) or not (z <= 2.3e-78): tmp = z * (y + ((a * (b + (t / z))) + (x / z))) else: tmp = x + ((t * a) + (y * z)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.15e-40) || !(z <= 2.3e-78)) tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))); 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 ((z <= -1.15e-40) || ~((z <= 2.3e-78))) tmp = z * (y + ((a * (b + (t / z))) + (x / z))); else tmp = x + ((t * a) + (y * z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.15e-40], N[Not[LessEqual[z, 2.3e-78]], $MachinePrecision]], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $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}\;z \leq -1.15 \cdot 10^{-40} \lor \neg \left(z \leq 2.3 \cdot 10^{-78}\right):\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(t \cdot a + y \cdot z\right)\\
\end{array}
\end{array}
if z < -1.15e-40 or 2.3000000000000002e-78 < z Initial program 90.6%
associate-+l+90.6%
associate-*l*88.5%
Simplified88.5%
Taylor expanded in z around inf 97.1%
+-commutative97.1%
associate-+l+97.1%
+-commutative97.1%
associate-/l*98.5%
distribute-lft-out98.5%
Simplified98.5%
if -1.15e-40 < z < 2.3000000000000002e-78Initial program 98.3%
associate-+l+98.3%
associate-*l*98.3%
Simplified98.3%
Taylor expanded in b around 0 91.0%
Final simplification95.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -6e+203)
(* z (+ y (* a b)))
(if (or (<= y -4.1e+54) (not (<= y 1.62e+69)))
(+ (* 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 (y <= -6e+203) {
tmp = z * (y + (a * b));
} else if ((y <= -4.1e+54) || !(y <= 1.62e+69)) {
tmp = (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 (y <= (-6d+203)) then
tmp = z * (y + (a * b))
else if ((y <= (-4.1d+54)) .or. (.not. (y <= 1.62d+69))) then
tmp = (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 (y <= -6e+203) {
tmp = z * (y + (a * b));
} else if ((y <= -4.1e+54) || !(y <= 1.62e+69)) {
tmp = (t * a) + (y * z);
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -6e+203: tmp = z * (y + (a * b)) elif (y <= -4.1e+54) or not (y <= 1.62e+69): tmp = (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 (y <= -6e+203) tmp = Float64(z * Float64(y + Float64(a * b))); elseif ((y <= -4.1e+54) || !(y <= 1.62e+69)) tmp = 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 (y <= -6e+203) tmp = z * (y + (a * b)); elseif ((y <= -4.1e+54) || ~((y <= 1.62e+69))) tmp = (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[y, -6e+203], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -4.1e+54], N[Not[LessEqual[y, 1.62e+69]], $MachinePrecision]], N[(N[(t * a), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6 \cdot 10^{+203}:\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{+54} \lor \neg \left(y \leq 1.62 \cdot 10^{+69}\right):\\
\;\;\;\;t \cdot a + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if y < -5.9999999999999999e203Initial program 90.0%
associate-+l+90.0%
associate-*l*90.0%
Simplified90.0%
Taylor expanded in z around inf 90.4%
if -5.9999999999999999e203 < y < -4.09999999999999967e54 or 1.62e69 < y Initial program 91.7%
Taylor expanded in x around 0 79.2%
Taylor expanded in b around 0 78.0%
if -4.09999999999999967e54 < y < 1.62e69Initial program 96.1%
associate-+l+96.1%
+-commutative96.1%
fma-define96.1%
associate-*l*94.9%
*-commutative94.9%
*-commutative94.9%
distribute-rgt-out96.2%
remove-double-neg96.2%
*-commutative96.2%
distribute-lft-neg-out96.2%
sub-neg96.2%
sub-neg96.2%
distribute-lft-neg-out96.2%
*-commutative96.2%
remove-double-neg96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in y around 0 91.6%
Final simplification87.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3e+54) (not (<= y 14.0))) (+ 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 ((y <= -3e+54) || !(y <= 14.0)) {
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 ((y <= (-3d+54)) .or. (.not. (y <= 14.0d0))) 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 ((y <= -3e+54) || !(y <= 14.0)) {
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 (y <= -3e+54) or not (y <= 14.0): 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 ((y <= -3e+54) || !(y <= 14.0)) 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 ((y <= -3e+54) || ~((y <= 14.0))) 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[Or[LessEqual[y, -3e+54], N[Not[LessEqual[y, 14.0]], $MachinePrecision]], 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}\;y \leq -3 \cdot 10^{+54} \lor \neg \left(y \leq 14\right):\\
\;\;\;\;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 y < -2.9999999999999999e54 or 14 < y Initial program 90.4%
associate-+l+90.4%
associate-*l*90.4%
Simplified90.4%
Taylor expanded in b around 0 88.9%
if -2.9999999999999999e54 < y < 14Initial program 97.2%
associate-+l+97.2%
+-commutative97.2%
fma-define97.2%
associate-*l*95.2%
*-commutative95.2%
*-commutative95.2%
distribute-rgt-out96.0%
remove-double-neg96.0%
*-commutative96.0%
distribute-lft-neg-out96.0%
sub-neg96.0%
sub-neg96.0%
distribute-lft-neg-out96.0%
*-commutative96.0%
remove-double-neg96.0%
*-commutative96.0%
Simplified96.0%
Taylor expanded in y around 0 91.7%
Final simplification90.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.5e-51) (not (<= z 2.6e-24))) (* 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 <= -2.5e-51) || !(z <= 2.6e-24)) {
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 <= (-2.5d-51)) .or. (.not. (z <= 2.6d-24))) 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 <= -2.5e-51) || !(z <= 2.6e-24)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (t * a);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.5e-51) or not (z <= 2.6e-24): 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 <= -2.5e-51) || !(z <= 2.6e-24)) 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 <= -2.5e-51) || ~((z <= 2.6e-24))) 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, -2.5e-51], N[Not[LessEqual[z, 2.6e-24]], $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 -2.5 \cdot 10^{-51} \lor \neg \left(z \leq 2.6 \cdot 10^{-24}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\end{array}
if z < -2.50000000000000002e-51 or 2.6e-24 < z Initial program 90.4%
associate-+l+90.4%
associate-*l*88.3%
Simplified88.3%
Taylor expanded in z around inf 77.0%
if -2.50000000000000002e-51 < z < 2.6e-24Initial program 98.3%
associate-+l+98.3%
associate-*l*98.3%
Simplified98.3%
Taylor expanded in z around 0 77.3%
Final simplification77.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.15e-34) (not (<= a 6.4e-46))) (* 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 <= -2.15e-34) || !(a <= 6.4e-46)) {
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 <= (-2.15d-34)) .or. (.not. (a <= 6.4d-46))) 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 <= -2.15e-34) || !(a <= 6.4e-46)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.15e-34) or not (a <= 6.4e-46): 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 <= -2.15e-34) || !(a <= 6.4e-46)) 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 <= -2.15e-34) || ~((a <= 6.4e-46))) 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, -2.15e-34], N[Not[LessEqual[a, 6.4e-46]], $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 -2.15 \cdot 10^{-34} \lor \neg \left(a \leq 6.4 \cdot 10^{-46}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot z\\
\end{array}
\end{array}
if a < -2.15e-34 or 6.3999999999999998e-46 < a Initial program 90.5%
associate-+l+90.5%
+-commutative90.5%
fma-define90.5%
associate-*l*93.6%
*-commutative93.6%
*-commutative93.6%
distribute-rgt-out95.5%
remove-double-neg95.5%
*-commutative95.5%
distribute-lft-neg-out95.5%
sub-neg95.5%
sub-neg95.5%
distribute-lft-neg-out95.5%
*-commutative95.5%
remove-double-neg95.5%
*-commutative95.5%
Simplified95.5%
Taylor expanded in y around 0 87.9%
Taylor expanded in x around 0 76.7%
if -2.15e-34 < a < 6.3999999999999998e-46Initial program 100.0%
Taylor expanded in y around inf 90.5%
associate-/l*83.5%
Simplified83.5%
Taylor expanded in x around 0 98.0%
associate-*r/87.3%
Simplified87.3%
Taylor expanded in a around 0 76.7%
*-commutative76.7%
Simplified76.7%
Final simplification76.7%
(FPCore (x y z t a b) :precision binary64 (if (<= z -500000000.0) (+ x (* y z)) (if (<= z 1.5e+45) (+ x (* t a)) (* a (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -500000000.0) {
tmp = x + (y * z);
} else if (z <= 1.5e+45) {
tmp = x + (t * a);
} 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 <= (-500000000.0d0)) then
tmp = x + (y * z)
else if (z <= 1.5d+45) then
tmp = x + (t * a)
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 <= -500000000.0) {
tmp = x + (y * z);
} else if (z <= 1.5e+45) {
tmp = x + (t * a);
} else {
tmp = a * (z * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -500000000.0: tmp = x + (y * z) elif z <= 1.5e+45: tmp = x + (t * a) else: tmp = a * (z * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -500000000.0) tmp = Float64(x + Float64(y * z)); elseif (z <= 1.5e+45) tmp = Float64(x + Float64(t * a)); 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 <= -500000000.0) tmp = x + (y * z); elseif (z <= 1.5e+45) tmp = x + (t * a); else tmp = a * (z * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -500000000.0], N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.5e+45], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -500000000:\\
\;\;\;\;x + y \cdot z\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{+45}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\end{array}
\end{array}
if z < -5e8Initial program 92.5%
Taylor expanded in y around inf 83.8%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in x around 0 89.5%
associate-*r/88.1%
Simplified88.1%
Taylor expanded in a around 0 59.6%
*-commutative59.6%
Simplified59.6%
if -5e8 < z < 1.50000000000000005e45Initial program 98.6%
associate-+l+98.6%
associate-*l*97.9%
Simplified97.9%
Taylor expanded in z around 0 72.3%
if 1.50000000000000005e45 < z Initial program 81.9%
associate-+l+81.9%
+-commutative81.9%
fma-define81.9%
associate-*l*86.5%
*-commutative86.5%
*-commutative86.5%
distribute-rgt-out86.5%
remove-double-neg86.5%
*-commutative86.5%
distribute-lft-neg-out86.5%
sub-neg86.5%
sub-neg86.5%
distribute-lft-neg-out86.5%
*-commutative86.5%
remove-double-neg86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in y around 0 84.5%
Taylor expanded in z around inf 62.3%
Final simplification67.3%
(FPCore (x y z t a b) :precision binary64 (if (<= z -5e+69) (* y z) (if (<= z 1.95e+44) (+ x (* t a)) (* a (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5e+69) {
tmp = y * z;
} else if (z <= 1.95e+44) {
tmp = x + (t * a);
} 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 <= (-5d+69)) then
tmp = y * z
else if (z <= 1.95d+44) then
tmp = x + (t * a)
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 <= -5e+69) {
tmp = y * z;
} else if (z <= 1.95e+44) {
tmp = x + (t * a);
} else {
tmp = a * (z * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5e+69: tmp = y * z elif z <= 1.95e+44: tmp = x + (t * a) else: tmp = a * (z * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5e+69) tmp = Float64(y * z); elseif (z <= 1.95e+44) tmp = Float64(x + Float64(t * a)); 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 <= -5e+69) tmp = y * z; elseif (z <= 1.95e+44) tmp = x + (t * a); else tmp = a * (z * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5e+69], N[(y * z), $MachinePrecision], If[LessEqual[z, 1.95e+44], N[(x + N[(t * a), $MachinePrecision]), $MachinePrecision], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+69}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 1.95 \cdot 10^{+44}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\end{array}
\end{array}
if z < -5.00000000000000036e69Initial program 89.8%
associate-+l+89.8%
associate-*l*83.8%
Simplified83.8%
Taylor expanded in t around inf 74.0%
associate-/l*69.8%
associate-/l*75.7%
*-commutative75.7%
Simplified75.7%
Taylor expanded in y around inf 55.4%
*-commutative55.4%
Simplified55.4%
if -5.00000000000000036e69 < z < 1.9500000000000001e44Initial program 98.7%
associate-+l+98.7%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in z around 0 68.8%
if 1.9500000000000001e44 < z Initial program 81.9%
associate-+l+81.9%
+-commutative81.9%
fma-define81.9%
associate-*l*86.5%
*-commutative86.5%
*-commutative86.5%
distribute-rgt-out86.5%
remove-double-neg86.5%
*-commutative86.5%
distribute-lft-neg-out86.5%
sub-neg86.5%
sub-neg86.5%
distribute-lft-neg-out86.5%
*-commutative86.5%
remove-double-neg86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in y around 0 84.5%
Taylor expanded in z around inf 62.3%
Final simplification65.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -15.2) (* y z) (if (<= z 2.15e+45) (* t a) (* a (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -15.2) {
tmp = y * z;
} else if (z <= 2.15e+45) {
tmp = t * a;
} 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 <= (-15.2d0)) then
tmp = y * z
else if (z <= 2.15d+45) then
tmp = t * a
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 <= -15.2) {
tmp = y * z;
} else if (z <= 2.15e+45) {
tmp = t * a;
} else {
tmp = a * (z * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -15.2: tmp = y * z elif z <= 2.15e+45: tmp = t * a else: tmp = a * (z * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -15.2) tmp = Float64(y * z); elseif (z <= 2.15e+45) tmp = Float64(t * a); 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 <= -15.2) tmp = y * z; elseif (z <= 2.15e+45) tmp = t * a; else tmp = a * (z * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -15.2], N[(y * z), $MachinePrecision], If[LessEqual[z, 2.15e+45], N[(t * a), $MachinePrecision], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -15.2:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+45}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\end{array}
\end{array}
if z < -15.199999999999999Initial program 92.6%
associate-+l+92.6%
associate-*l*86.9%
Simplified86.9%
Taylor expanded in t around inf 74.4%
associate-/l*71.4%
associate-/l*74.1%
*-commutative74.1%
Simplified74.1%
Taylor expanded in y around inf 49.8%
*-commutative49.8%
Simplified49.8%
if -15.199999999999999 < z < 2.1500000000000002e45Initial program 98.6%
associate-+l+98.6%
associate-*l*97.9%
Simplified97.9%
Taylor expanded in z around 0 72.1%
Taylor expanded in x around 0 47.1%
if 2.1500000000000002e45 < z Initial program 81.9%
associate-+l+81.9%
+-commutative81.9%
fma-define81.9%
associate-*l*86.5%
*-commutative86.5%
*-commutative86.5%
distribute-rgt-out86.5%
remove-double-neg86.5%
*-commutative86.5%
distribute-lft-neg-out86.5%
sub-neg86.5%
sub-neg86.5%
distribute-lft-neg-out86.5%
*-commutative86.5%
remove-double-neg86.5%
*-commutative86.5%
Simplified86.5%
Taylor expanded in y around 0 84.5%
Taylor expanded in z around inf 62.3%
Final simplification50.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.3e+28) (not (<= y 5.5e+62))) (* y z) (* t a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.3e+28) || !(y <= 5.5e+62)) {
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 ((y <= (-3.3d+28)) .or. (.not. (y <= 5.5d+62))) 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 ((y <= -3.3e+28) || !(y <= 5.5e+62)) {
tmp = y * z;
} else {
tmp = t * a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.3e+28) or not (y <= 5.5e+62): tmp = y * z else: tmp = t * a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.3e+28) || !(y <= 5.5e+62)) 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 ((y <= -3.3e+28) || ~((y <= 5.5e+62))) tmp = y * z; else tmp = t * a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.3e+28], N[Not[LessEqual[y, 5.5e+62]], $MachinePrecision]], N[(y * z), $MachinePrecision], N[(t * a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.3 \cdot 10^{+28} \lor \neg \left(y \leq 5.5 \cdot 10^{+62}\right):\\
\;\;\;\;y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t \cdot a\\
\end{array}
\end{array}
if y < -3.3e28 or 5.4999999999999997e62 < y Initial program 92.1%
associate-+l+92.1%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in t around inf 77.0%
associate-/l*76.1%
associate-/l*76.9%
*-commutative76.9%
Simplified76.9%
Taylor expanded in y around inf 56.1%
*-commutative56.1%
Simplified56.1%
if -3.3e28 < y < 5.4999999999999997e62Initial program 95.8%
associate-+l+95.8%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in z around 0 64.0%
Taylor expanded in x around 0 40.0%
Final simplification47.1%
(FPCore (x y z t a b) :precision binary64 (if (<= x -8.8e+60) x (if (<= x 3.75e+62) (* t a) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8.8e+60) {
tmp = x;
} else if (x <= 3.75e+62) {
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 <= (-8.8d+60)) then
tmp = x
else if (x <= 3.75d+62) 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 <= -8.8e+60) {
tmp = x;
} else if (x <= 3.75e+62) {
tmp = t * a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -8.8e+60: tmp = x elif x <= 3.75e+62: tmp = t * a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -8.8e+60) tmp = x; elseif (x <= 3.75e+62) 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 <= -8.8e+60) tmp = x; elseif (x <= 3.75e+62) tmp = t * a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.8e+60], x, If[LessEqual[x, 3.75e+62], N[(t * a), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.8 \cdot 10^{+60}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.75 \cdot 10^{+62}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -8.79999999999999984e60 or 3.74999999999999999e62 < x Initial program 95.7%
associate-+l+95.7%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in z around 0 60.7%
Taylor expanded in x around inf 44.9%
if -8.79999999999999984e60 < x < 3.74999999999999999e62Initial program 93.3%
associate-+l+93.3%
associate-*l*92.3%
Simplified92.3%
Taylor expanded in z around 0 46.7%
Taylor expanded in x around 0 40.2%
Final simplification41.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 94.2%
associate-+l+94.2%
associate-*l*93.1%
Simplified93.1%
Taylor expanded in z around 0 51.7%
Taylor expanded in x around inf 21.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 2024180
(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)))