
(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 (if (<= a -1.62e+65) (fma a (+ t (* z b)) (fma y z x)) (+ (fma z y (fma a t x)) (* z (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.62e+65) {
tmp = fma(a, (t + (z * b)), fma(y, z, x));
} else {
tmp = fma(z, y, fma(a, t, x)) + (z * (a * b));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.62e+65) tmp = fma(a, Float64(t + Float64(z * b)), fma(y, z, x)); else tmp = Float64(fma(z, y, fma(a, t, x)) + Float64(z * Float64(a * b))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.62e+65], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(y * z + x), $MachinePrecision]), $MachinePrecision], N[(N[(z * y + N[(a * t + x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.62 \cdot 10^{+65}:\\
\;\;\;\;\mathsf{fma}\left(a, t + z \cdot b, \mathsf{fma}\left(y, z, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, y, \mathsf{fma}\left(a, t, x\right)\right) + z \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if a < -1.61999999999999997e65Initial program 90.2%
associate-+l+90.2%
+-commutative90.2%
*-commutative90.2%
*-commutative90.2%
associate-*l*94.1%
distribute-rgt-out100.0%
fma-def100.0%
*-commutative100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
if -1.61999999999999997e65 < a Initial program 96.2%
+-commutative96.2%
*-commutative96.2%
associate-*l*97.1%
*-commutative97.1%
fma-def97.1%
*-commutative97.1%
+-commutative97.1%
fma-def97.1%
+-commutative97.1%
fma-def97.1%
Simplified97.1%
fma-udef97.1%
fma-udef97.1%
+-commutative97.1%
associate-+r+97.1%
*-commutative97.1%
*-commutative97.1%
Applied egg-rr97.1%
fma-udef97.1%
+-commutative97.1%
+-commutative97.1%
fma-def97.6%
fma-def97.6%
Applied egg-rr97.6%
Final simplification98.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (+ x (* z y)) (* a t)) (* b (* a z))))) (if (<= t_1 INFINITY) t_1 (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * y)) + (a * t)) + (b * (a * z));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = a * (t + (z * b));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (z * y)) + (a * t)) + (b * (a * z));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = a * (t + (z * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x + (z * y)) + (a * t)) + (b * (a * z)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = a * (t + (z * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x + Float64(z * y)) + Float64(a * t)) + Float64(b * Float64(a * z))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(a * Float64(t + Float64(z * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x + (z * y)) + (a * t)) + (b * (a * z)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = a * (t + (z * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x + z \cdot y\right) + a \cdot t\right) + b \cdot \left(a \cdot z\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(t + z \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.7%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
*-commutative0.0%
associate-*l*14.3%
Simplified14.3%
Taylor expanded in a around inf 100.0%
Final simplification97.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))))
(if (<= t -5.2e+90)
(* a t)
(if (<= t -2.5e-74)
(* z y)
(if (<= t -1e-228)
t_1
(if (<= t 2.3e-86)
x
(if (<= t 5.5e+44) t_1 (if (<= t 1.05e+75) x (* a t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (t <= -5.2e+90) {
tmp = a * t;
} else if (t <= -2.5e-74) {
tmp = z * y;
} else if (t <= -1e-228) {
tmp = t_1;
} else if (t <= 2.3e-86) {
tmp = x;
} else if (t <= 5.5e+44) {
tmp = t_1;
} else if (t <= 1.05e+75) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (z * b)
if (t <= (-5.2d+90)) then
tmp = a * t
else if (t <= (-2.5d-74)) then
tmp = z * y
else if (t <= (-1d-228)) then
tmp = t_1
else if (t <= 2.3d-86) then
tmp = x
else if (t <= 5.5d+44) then
tmp = t_1
else if (t <= 1.05d+75) then
tmp = x
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (t <= -5.2e+90) {
tmp = a * t;
} else if (t <= -2.5e-74) {
tmp = z * y;
} else if (t <= -1e-228) {
tmp = t_1;
} else if (t <= 2.3e-86) {
tmp = x;
} else if (t <= 5.5e+44) {
tmp = t_1;
} else if (t <= 1.05e+75) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (z * b) tmp = 0 if t <= -5.2e+90: tmp = a * t elif t <= -2.5e-74: tmp = z * y elif t <= -1e-228: tmp = t_1 elif t <= 2.3e-86: tmp = x elif t <= 5.5e+44: tmp = t_1 elif t <= 1.05e+75: tmp = x else: tmp = a * t return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(z * b)) tmp = 0.0 if (t <= -5.2e+90) tmp = Float64(a * t); elseif (t <= -2.5e-74) tmp = Float64(z * y); elseif (t <= -1e-228) tmp = t_1; elseif (t <= 2.3e-86) tmp = x; elseif (t <= 5.5e+44) tmp = t_1; elseif (t <= 1.05e+75) tmp = x; else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (z * b); tmp = 0.0; if (t <= -5.2e+90) tmp = a * t; elseif (t <= -2.5e-74) tmp = z * y; elseif (t <= -1e-228) tmp = t_1; elseif (t <= 2.3e-86) tmp = x; elseif (t <= 5.5e+44) tmp = t_1; elseif (t <= 1.05e+75) tmp = x; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.2e+90], N[(a * t), $MachinePrecision], If[LessEqual[t, -2.5e-74], N[(z * y), $MachinePrecision], If[LessEqual[t, -1e-228], t$95$1, If[LessEqual[t, 2.3e-86], x, If[LessEqual[t, 5.5e+44], t$95$1, If[LessEqual[t, 1.05e+75], x, N[(a * t), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;t \leq -5.2 \cdot 10^{+90}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq -2.5 \cdot 10^{-74}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-228}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-86}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{+75}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -5.1999999999999997e90 or 1.04999999999999999e75 < t Initial program 92.4%
*-commutative92.4%
associate-*l*92.4%
Simplified92.4%
Taylor expanded in t around inf 55.6%
if -5.1999999999999997e90 < t < -2.49999999999999999e-74Initial program 96.2%
*-commutative96.2%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in y around inf 47.0%
*-commutative47.0%
Simplified47.0%
if -2.49999999999999999e-74 < t < -1.00000000000000003e-228 or 2.29999999999999996e-86 < t < 5.5000000000000001e44Initial program 96.6%
+-commutative96.6%
*-commutative96.6%
associate-*l*94.6%
*-commutative94.6%
fma-def94.6%
*-commutative94.6%
+-commutative94.6%
fma-def94.6%
+-commutative94.6%
fma-def94.6%
Simplified94.6%
fma-udef94.6%
fma-udef94.6%
+-commutative94.6%
associate-+r+94.6%
*-commutative94.6%
*-commutative94.6%
Applied egg-rr94.6%
Taylor expanded in b around inf 51.6%
*-commutative51.6%
Simplified51.6%
if -1.00000000000000003e-228 < t < 2.29999999999999996e-86 or 5.5000000000000001e44 < t < 1.04999999999999999e75Initial program 97.2%
*-commutative97.2%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in x around inf 50.4%
Final simplification52.4%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= a -1.78e+65)
(and (not (<= a 3.2e-68)) (or (<= a 4.4e-48) (not (<= a 1.32e-23)))))
(* a (+ t (* z b)))
(+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.78e+65) || (!(a <= 3.2e-68) && ((a <= 4.4e-48) || !(a <= 1.32e-23)))) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.78d+65)) .or. (.not. (a <= 3.2d-68)) .and. (a <= 4.4d-48) .or. (.not. (a <= 1.32d-23))) then
tmp = a * (t + (z * b))
else
tmp = x + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.78e+65) || (!(a <= 3.2e-68) && ((a <= 4.4e-48) || !(a <= 1.32e-23)))) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.78e+65) or (not (a <= 3.2e-68) and ((a <= 4.4e-48) or not (a <= 1.32e-23))): tmp = a * (t + (z * b)) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.78e+65) || (!(a <= 3.2e-68) && ((a <= 4.4e-48) || !(a <= 1.32e-23)))) tmp = Float64(a * Float64(t + Float64(z * b))); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.78e+65) || (~((a <= 3.2e-68)) && ((a <= 4.4e-48) || ~((a <= 1.32e-23))))) tmp = a * (t + (z * b)); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.78e+65], And[N[Not[LessEqual[a, 3.2e-68]], $MachinePrecision], Or[LessEqual[a, 4.4e-48], N[Not[LessEqual[a, 1.32e-23]], $MachinePrecision]]]], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.78 \cdot 10^{+65} \lor \neg \left(a \leq 3.2 \cdot 10^{-68}\right) \land \left(a \leq 4.4 \cdot 10^{-48} \lor \neg \left(a \leq 1.32 \cdot 10^{-23}\right)\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -1.77999999999999995e65 or 3.1999999999999999e-68 < a < 4.40000000000000025e-48 or 1.31999999999999994e-23 < a Initial program 91.1%
*-commutative91.1%
associate-*l*90.2%
Simplified90.2%
Taylor expanded in a around inf 74.9%
if -1.77999999999999995e65 < a < 3.1999999999999999e-68 or 4.40000000000000025e-48 < a < 1.31999999999999994e-23Initial program 98.5%
*-commutative98.5%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in a around 0 72.4%
Final simplification73.5%
(FPCore (x y z t a b) :precision binary64 (+ (* z (* a b)) (+ (+ x (* z y)) (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
return (z * (a * b)) + ((x + (z * y)) + (a * t));
}
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 = (z * (a * b)) + ((x + (z * y)) + (a * t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (z * (a * b)) + ((x + (z * y)) + (a * t));
}
def code(x, y, z, t, a, b): return (z * (a * b)) + ((x + (z * y)) + (a * t))
function code(x, y, z, t, a, b) return Float64(Float64(z * Float64(a * b)) + Float64(Float64(x + Float64(z * y)) + Float64(a * t))) end
function tmp = code(x, y, z, t, a, b) tmp = (z * (a * b)) + ((x + (z * y)) + (a * t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \left(a \cdot b\right) + \left(\left(x + z \cdot y\right) + a \cdot t\right)
\end{array}
Initial program 95.0%
*-commutative95.0%
associate-*l*95.0%
Simplified95.0%
Final simplification95.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -9.5e+126) (not (<= z 4.1e+131))) (* z (+ y (* a b))) (+ x (+ (* a t) (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.5e+126) || !(z <= 4.1e+131)) {
tmp = z * (y + (a * b));
} else {
tmp = x + ((a * t) + (z * y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-9.5d+126)) .or. (.not. (z <= 4.1d+131))) then
tmp = z * (y + (a * b))
else
tmp = x + ((a * t) + (z * y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -9.5e+126) || !(z <= 4.1e+131)) {
tmp = z * (y + (a * b));
} else {
tmp = x + ((a * t) + (z * y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -9.5e+126) or not (z <= 4.1e+131): tmp = z * (y + (a * b)) else: tmp = x + ((a * t) + (z * y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -9.5e+126) || !(z <= 4.1e+131)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(Float64(a * t) + Float64(z * y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -9.5e+126) || ~((z <= 4.1e+131))) tmp = z * (y + (a * b)); else tmp = x + ((a * t) + (z * y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -9.5e+126], N[Not[LessEqual[z, 4.1e+131]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * t), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+126} \lor \neg \left(z \leq 4.1 \cdot 10^{+131}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot t + z \cdot y\right)\\
\end{array}
\end{array}
if z < -9.49999999999999951e126 or 4.10000000000000007e131 < z Initial program 86.9%
*-commutative86.9%
associate-*l*92.5%
Simplified92.5%
Taylor expanded in z around inf 84.0%
if -9.49999999999999951e126 < z < 4.10000000000000007e131Initial program 97.9%
*-commutative97.9%
associate-*l*95.8%
Simplified95.8%
Taylor expanded in b around 0 84.7%
Final simplification84.5%
(FPCore (x y z t a b) :precision binary64 (if (<= b -6.5e+137) (+ x (* a (* z b))) (if (<= b 1.5e+50) (+ x (+ (* a t) (* z y))) (+ x (* z (+ y (* a b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.5e+137) {
tmp = x + (a * (z * b));
} else if (b <= 1.5e+50) {
tmp = x + ((a * t) + (z * y));
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-6.5d+137)) then
tmp = x + (a * (z * b))
else if (b <= 1.5d+50) then
tmp = x + ((a * t) + (z * y))
else
tmp = x + (z * (y + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.5e+137) {
tmp = x + (a * (z * b));
} else if (b <= 1.5e+50) {
tmp = x + ((a * t) + (z * y));
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.5e+137: tmp = x + (a * (z * b)) elif b <= 1.5e+50: tmp = x + ((a * t) + (z * y)) else: tmp = x + (z * (y + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.5e+137) tmp = Float64(x + Float64(a * Float64(z * b))); elseif (b <= 1.5e+50) tmp = Float64(x + Float64(Float64(a * t) + Float64(z * y))); else tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6.5e+137) tmp = x + (a * (z * b)); elseif (b <= 1.5e+50) tmp = x + ((a * t) + (z * y)); else tmp = x + (z * (y + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.5e+137], N[(x + N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e+50], N[(x + N[(N[(a * t), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.5 \cdot 10^{+137}:\\
\;\;\;\;x + a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;b \leq 1.5 \cdot 10^{+50}:\\
\;\;\;\;x + \left(a \cdot t + z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if b < -6.5000000000000002e137Initial program 97.2%
*-commutative97.2%
associate-*l*86.7%
Simplified86.7%
Taylor expanded in t around 0 81.1%
+-commutative81.1%
+-commutative81.1%
associate-*r*78.6%
distribute-rgt-in78.6%
Simplified78.6%
Taylor expanded in y around 0 81.1%
if -6.5000000000000002e137 < b < 1.4999999999999999e50Initial program 94.5%
*-commutative94.5%
associate-*l*97.4%
Simplified97.4%
Taylor expanded in b around 0 91.8%
if 1.4999999999999999e50 < b Initial program 95.0%
*-commutative95.0%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in t around 0 76.4%
+-commutative76.4%
+-commutative76.4%
associate-*r*87.6%
distribute-rgt-in89.2%
Simplified89.2%
Final simplification89.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.86e+230)
(* z (* a b))
(if (or (<= a -6e+44) (not (<= a 4200000000000.0)))
(+ x (* a t))
(+ x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.86e+230) {
tmp = z * (a * b);
} else if ((a <= -6e+44) || !(a <= 4200000000000.0)) {
tmp = x + (a * t);
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.86d+230)) then
tmp = z * (a * b)
else if ((a <= (-6d+44)) .or. (.not. (a <= 4200000000000.0d0))) then
tmp = x + (a * t)
else
tmp = x + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.86e+230) {
tmp = z * (a * b);
} else if ((a <= -6e+44) || !(a <= 4200000000000.0)) {
tmp = x + (a * t);
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.86e+230: tmp = z * (a * b) elif (a <= -6e+44) or not (a <= 4200000000000.0): tmp = x + (a * t) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.86e+230) tmp = Float64(z * Float64(a * b)); elseif ((a <= -6e+44) || !(a <= 4200000000000.0)) tmp = Float64(x + Float64(a * t)); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.86e+230) tmp = z * (a * b); elseif ((a <= -6e+44) || ~((a <= 4200000000000.0))) tmp = x + (a * t); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.86e+230], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -6e+44], N[Not[LessEqual[a, 4200000000000.0]], $MachinePrecision]], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.86 \cdot 10^{+230}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq -6 \cdot 10^{+44} \lor \neg \left(a \leq 4200000000000\right):\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -1.86e230Initial program 88.4%
+-commutative88.4%
*-commutative88.4%
associate-*l*94.0%
*-commutative94.0%
fma-def94.0%
*-commutative94.0%
+-commutative94.0%
fma-def94.0%
+-commutative94.0%
fma-def94.0%
Simplified94.0%
fma-udef94.0%
fma-udef94.0%
+-commutative94.0%
associate-+r+94.0%
*-commutative94.0%
*-commutative94.0%
Applied egg-rr94.0%
Taylor expanded in b around inf 71.7%
*-commutative71.7%
Simplified71.7%
Taylor expanded in a around 0 71.7%
associate-*r*76.9%
Simplified76.9%
if -1.86e230 < a < -5.99999999999999974e44 or 4.2e12 < a Initial program 90.3%
*-commutative90.3%
associate-*l*88.1%
Simplified88.1%
Taylor expanded in z around 0 63.6%
if -5.99999999999999974e44 < a < 4.2e12Initial program 98.6%
*-commutative98.6%
associate-*l*99.3%
Simplified99.3%
Taylor expanded in a around 0 68.3%
Final simplification67.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.6e+131)
(* z y)
(if (<= z 2.8e+42)
(+ x (* a t))
(if (<= z 2.15e+118) (* z y) (* z (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.6e+131) {
tmp = z * y;
} else if (z <= 2.8e+42) {
tmp = x + (a * t);
} else if (z <= 2.15e+118) {
tmp = z * y;
} 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 <= (-2.6d+131)) then
tmp = z * y
else if (z <= 2.8d+42) then
tmp = x + (a * t)
else if (z <= 2.15d+118) then
tmp = z * y
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 <= -2.6e+131) {
tmp = z * y;
} else if (z <= 2.8e+42) {
tmp = x + (a * t);
} else if (z <= 2.15e+118) {
tmp = z * y;
} else {
tmp = z * (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.6e+131: tmp = z * y elif z <= 2.8e+42: tmp = x + (a * t) elif z <= 2.15e+118: tmp = z * y else: tmp = z * (a * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.6e+131) tmp = Float64(z * y); elseif (z <= 2.8e+42) tmp = Float64(x + Float64(a * t)); elseif (z <= 2.15e+118) tmp = Float64(z * y); 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 <= -2.6e+131) tmp = z * y; elseif (z <= 2.8e+42) tmp = x + (a * t); elseif (z <= 2.15e+118) tmp = z * y; else tmp = z * (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.6e+131], N[(z * y), $MachinePrecision], If[LessEqual[z, 2.8e+42], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.15e+118], N[(z * y), $MachinePrecision], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+131}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{+42}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{+118}:\\
\;\;\;\;z \cdot y\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -2.6e131 or 2.7999999999999999e42 < z < 2.1500000000000002e118Initial program 88.8%
*-commutative88.8%
associate-*l*96.1%
Simplified96.1%
Taylor expanded in y around inf 51.7%
*-commutative51.7%
Simplified51.7%
if -2.6e131 < z < 2.7999999999999999e42Initial program 98.2%
*-commutative98.2%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in z around 0 69.1%
if 2.1500000000000002e118 < z Initial program 89.3%
+-commutative89.3%
*-commutative89.3%
associate-*l*91.8%
*-commutative91.8%
fma-def91.8%
*-commutative91.8%
+-commutative91.8%
fma-def91.8%
+-commutative91.8%
fma-def91.8%
Simplified91.8%
fma-udef91.8%
fma-udef91.8%
+-commutative91.8%
associate-+r+91.8%
*-commutative91.8%
*-commutative91.8%
Applied egg-rr91.8%
Taylor expanded in b around inf 55.2%
*-commutative55.2%
Simplified55.2%
Taylor expanded in a around 0 55.2%
associate-*r*55.2%
Simplified55.2%
Final simplification63.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.3e+54) (not (<= z 1e-37))) (* z (+ y (* a b))) (+ x (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e+54) || !(z <= 1e-37)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.3d+54)) .or. (.not. (z <= 1d-37))) then
tmp = z * (y + (a * b))
else
tmp = x + (a * t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e+54) || !(z <= 1e-37)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.3e+54) or not (z <= 1e-37): tmp = z * (y + (a * b)) else: tmp = x + (a * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.3e+54) || !(z <= 1e-37)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(a * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.3e+54) || ~((z <= 1e-37))) tmp = z * (y + (a * b)); else tmp = x + (a * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.3e+54], N[Not[LessEqual[z, 1e-37]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{+54} \lor \neg \left(z \leq 10^{-37}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot t\\
\end{array}
\end{array}
if z < -1.30000000000000003e54 or 1.00000000000000007e-37 < z Initial program 90.3%
*-commutative90.3%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in z around inf 74.7%
if -1.30000000000000003e54 < z < 1.00000000000000007e-37Initial program 99.2%
*-commutative99.2%
associate-*l*94.9%
Simplified94.9%
Taylor expanded in z around 0 76.2%
Final simplification75.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -5.1e+93) (* a t) (if (<= t -3.65e-101) (* z y) (if (<= t 9e+74) x (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.1e+93) {
tmp = a * t;
} else if (t <= -3.65e-101) {
tmp = z * y;
} else if (t <= 9e+74) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-5.1d+93)) then
tmp = a * t
else if (t <= (-3.65d-101)) then
tmp = z * y
else if (t <= 9d+74) then
tmp = x
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -5.1e+93) {
tmp = a * t;
} else if (t <= -3.65e-101) {
tmp = z * y;
} else if (t <= 9e+74) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -5.1e+93: tmp = a * t elif t <= -3.65e-101: tmp = z * y elif t <= 9e+74: tmp = x else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -5.1e+93) tmp = Float64(a * t); elseif (t <= -3.65e-101) tmp = Float64(z * y); elseif (t <= 9e+74) tmp = x; else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -5.1e+93) tmp = a * t; elseif (t <= -3.65e-101) tmp = z * y; elseif (t <= 9e+74) tmp = x; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -5.1e+93], N[(a * t), $MachinePrecision], If[LessEqual[t, -3.65e-101], N[(z * y), $MachinePrecision], If[LessEqual[t, 9e+74], x, N[(a * t), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.1 \cdot 10^{+93}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq -3.65 \cdot 10^{-101}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+74}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -5.0999999999999996e93 or 8.9999999999999999e74 < t Initial program 92.4%
*-commutative92.4%
associate-*l*92.4%
Simplified92.4%
Taylor expanded in t around inf 55.6%
if -5.0999999999999996e93 < t < -3.65e-101Initial program 96.8%
*-commutative96.8%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in y around inf 42.9%
*-commutative42.9%
Simplified42.9%
if -3.65e-101 < t < 8.9999999999999999e74Initial program 96.8%
*-commutative96.8%
associate-*l*95.9%
Simplified95.9%
Taylor expanded in x around inf 42.2%
Final simplification47.8%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.4e+90) (* a t) (if (<= t 1e+75) x (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.4e+90) {
tmp = a * t;
} else if (t <= 1e+75) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-1.4d+90)) then
tmp = a * t
else if (t <= 1d+75) then
tmp = x
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.4e+90) {
tmp = a * t;
} else if (t <= 1e+75) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.4e+90: tmp = a * t elif t <= 1e+75: tmp = x else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.4e+90) tmp = Float64(a * t); elseif (t <= 1e+75) tmp = x; else tmp = Float64(a * t); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.4e+90) tmp = a * t; elseif (t <= 1e+75) tmp = x; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.4e+90], N[(a * t), $MachinePrecision], If[LessEqual[t, 1e+75], x, N[(a * t), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.4 \cdot 10^{+90}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq 10^{+75}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -1.4e90 or 9.99999999999999927e74 < t Initial program 92.4%
*-commutative92.4%
associate-*l*92.4%
Simplified92.4%
Taylor expanded in t around inf 55.6%
if -1.4e90 < t < 9.99999999999999927e74Initial program 96.8%
*-commutative96.8%
associate-*l*96.8%
Simplified96.8%
Taylor expanded in x around inf 39.4%
Final simplification46.0%
(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 95.0%
*-commutative95.0%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in x around inf 27.9%
Final simplification27.9%
(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 2023285
(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)))