
(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 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x + (y * z)) + (t * a)) + ((a * z) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
def code(x, y, z, t, a, b): return ((x + (y * z)) + (t * a)) + ((a * z) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + (y * z)) + (t * a)) + ((a * z) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (if (<= z 2e-91) (fma y z (fma a (fma z b t) x)) (fma z (fma a b y) (fma t a x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 2e-91) {
tmp = fma(y, z, fma(a, fma(z, b, t), x));
} else {
tmp = fma(z, fma(a, b, y), fma(t, a, x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 2e-91) tmp = fma(y, z, fma(a, fma(z, b, t), x)); else tmp = fma(z, fma(a, b, y), fma(t, a, x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 2e-91], N[(y * z + N[(a * N[(z * b + t), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(z * N[(a * b + y), $MachinePrecision] + N[(t * a + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2 \cdot 10^{-91}:\\
\;\;\;\;\mathsf{fma}\left(y, z, \mathsf{fma}\left(a, \mathsf{fma}\left(z, b, t\right), x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(z, \mathsf{fma}\left(a, b, y\right), \mathsf{fma}\left(t, a, x\right)\right)\\
\end{array}
\end{array}
if z < 2.00000000000000004e-91Initial program 94.8%
associate-+l+94.8%
+-commutative94.8%
associate-+l+94.8%
fma-def95.3%
+-commutative95.3%
*-commutative95.3%
associate-*l*97.3%
distribute-lft-out98.4%
fma-def98.4%
+-commutative98.4%
fma-def98.4%
Simplified98.4%
if 2.00000000000000004e-91 < z Initial program 91.9%
+-commutative91.9%
+-commutative91.9%
associate-+l+91.9%
associate-+r+91.9%
*-commutative91.9%
associate-*l*97.2%
*-commutative97.2%
distribute-lft-out98.6%
fma-def98.6%
fma-def98.6%
+-commutative98.6%
fma-def98.6%
Simplified98.6%
Final simplification98.4%
(FPCore (x y z t a b) :precision binary64 (if (<= b 1e+158) (fma y z (fma a (fma z b t) x)) (+ (+ (* a t) (+ x (* z y))) (* b (* z a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= 1e+158) {
tmp = fma(y, z, fma(a, fma(z, b, t), x));
} else {
tmp = ((a * t) + (x + (z * y))) + (b * (z * a));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= 1e+158) tmp = fma(y, z, fma(a, fma(z, b, t), x)); else tmp = Float64(Float64(Float64(a * t) + Float64(x + Float64(z * y))) + Float64(b * Float64(z * a))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, 1e+158], N[(y * z + N[(a * N[(z * b + t), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * t), $MachinePrecision] + N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 10^{+158}:\\
\;\;\;\;\mathsf{fma}\left(y, z, \mathsf{fma}\left(a, \mathsf{fma}\left(z, b, t\right), x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot t + \left(x + z \cdot y\right)\right) + b \cdot \left(z \cdot a\right)\\
\end{array}
\end{array}
if b < 9.99999999999999953e157Initial program 93.3%
associate-+l+93.3%
+-commutative93.3%
associate-+l+93.3%
fma-def94.2%
+-commutative94.2%
*-commutative94.2%
associate-*l*97.0%
distribute-lft-out98.3%
fma-def98.3%
+-commutative98.3%
fma-def98.3%
Simplified98.3%
if 9.99999999999999953e157 < b Initial program 98.3%
Final simplification98.3%
(FPCore (x y z t a b) :precision binary64 (if (<= z 1.5e+219) (fma a (+ t (* z b)) (fma y z x)) (fma y z (fma b (* z a) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.5e+219) {
tmp = fma(a, (t + (z * b)), fma(y, z, x));
} else {
tmp = fma(y, z, fma(b, (z * a), x));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.5e+219) tmp = fma(a, Float64(t + Float64(z * b)), fma(y, z, x)); else tmp = fma(y, z, fma(b, Float64(z * a), x)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.5e+219], N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(y * z + x), $MachinePrecision]), $MachinePrecision], N[(y * z + N[(b * N[(z * a), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.5 \cdot 10^{+219}:\\
\;\;\;\;\mathsf{fma}\left(a, t + z \cdot b, \mathsf{fma}\left(y, z, x\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, z, \mathsf{fma}\left(b, z \cdot a, x\right)\right)\\
\end{array}
\end{array}
if z < 1.4999999999999999e219Initial program 94.4%
associate-+l+94.4%
+-commutative94.4%
*-commutative94.4%
associate-*l*96.7%
distribute-lft-out97.1%
fma-def97.1%
+-commutative97.1%
fma-def97.1%
Simplified97.1%
if 1.4999999999999999e219 < z Initial program 88.1%
associate-+l+88.1%
+-commutative88.1%
associate-+l+88.1%
fma-def93.9%
+-commutative93.9%
*-commutative93.9%
associate-*l*72.7%
distribute-lft-out78.6%
fma-def78.6%
+-commutative78.6%
fma-def78.6%
Simplified78.6%
Taylor expanded in t around 0 78.6%
associate-*r*99.8%
*-commutative99.8%
fma-def99.9%
*-commutative99.9%
Simplified99.9%
Final simplification97.3%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (+ (+ (* a t) (+ x (* z y))) (* b (* z a))))) (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 = ((a * t) + (x + (z * y))) + (b * (z * a));
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 = ((a * t) + (x + (z * y))) + (b * (z * a));
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 = ((a * t) + (x + (z * y))) + (b * (z * a)) 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(a * t) + Float64(x + Float64(z * y))) + Float64(b * Float64(z * a))) 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 = ((a * t) + (x + (z * y))) + (b * (z * a)); 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[(a * t), $MachinePrecision] + N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $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(a \cdot t + \left(x + z \cdot y\right)\right) + b \cdot \left(z \cdot a\right)\\
\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.2%
if +inf.0 < (+.f64 (+.f64 (+.f64 x (*.f64 y z)) (*.f64 t a)) (*.f64 (*.f64 a z) b)) Initial program 0.0%
+-commutative0.0%
+-commutative0.0%
associate-+l+0.0%
associate-+r+0.0%
*-commutative0.0%
associate-*l*36.4%
*-commutative36.4%
distribute-lft-out63.6%
fma-def72.7%
fma-def72.7%
+-commutative72.7%
fma-def72.7%
Simplified72.7%
Taylor expanded in t around 0 74.6%
Final simplification97.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))))
(if (<= t -3.5e+133)
(* a t)
(if (<= t -2.65e+76)
x
(if (<= t -1.4e+31)
(* a t)
(if (<= t -8.2e-288)
x
(if (<= t 1.1e-235)
(* z y)
(if (<= t 9.6e-139)
t_1
(if (<= t 1.35e-47) x (if (<= t 2.8e+43) t_1 (* 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 <= -3.5e+133) {
tmp = a * t;
} else if (t <= -2.65e+76) {
tmp = x;
} else if (t <= -1.4e+31) {
tmp = a * t;
} else if (t <= -8.2e-288) {
tmp = x;
} else if (t <= 1.1e-235) {
tmp = z * y;
} else if (t <= 9.6e-139) {
tmp = t_1;
} else if (t <= 1.35e-47) {
tmp = x;
} else if (t <= 2.8e+43) {
tmp = t_1;
} else {
tmp = a * t;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (z * b)
if (t <= (-3.5d+133)) then
tmp = a * t
else if (t <= (-2.65d+76)) then
tmp = x
else if (t <= (-1.4d+31)) then
tmp = a * t
else if (t <= (-8.2d-288)) then
tmp = x
else if (t <= 1.1d-235) then
tmp = z * y
else if (t <= 9.6d-139) then
tmp = t_1
else if (t <= 1.35d-47) then
tmp = x
else if (t <= 2.8d+43) then
tmp = t_1
else
tmp = a * t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (t <= -3.5e+133) {
tmp = a * t;
} else if (t <= -2.65e+76) {
tmp = x;
} else if (t <= -1.4e+31) {
tmp = a * t;
} else if (t <= -8.2e-288) {
tmp = x;
} else if (t <= 1.1e-235) {
tmp = z * y;
} else if (t <= 9.6e-139) {
tmp = t_1;
} else if (t <= 1.35e-47) {
tmp = x;
} else if (t <= 2.8e+43) {
tmp = t_1;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (z * b) tmp = 0 if t <= -3.5e+133: tmp = a * t elif t <= -2.65e+76: tmp = x elif t <= -1.4e+31: tmp = a * t elif t <= -8.2e-288: tmp = x elif t <= 1.1e-235: tmp = z * y elif t <= 9.6e-139: tmp = t_1 elif t <= 1.35e-47: tmp = x elif t <= 2.8e+43: tmp = t_1 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 <= -3.5e+133) tmp = Float64(a * t); elseif (t <= -2.65e+76) tmp = x; elseif (t <= -1.4e+31) tmp = Float64(a * t); elseif (t <= -8.2e-288) tmp = x; elseif (t <= 1.1e-235) tmp = Float64(z * y); elseif (t <= 9.6e-139) tmp = t_1; elseif (t <= 1.35e-47) tmp = x; elseif (t <= 2.8e+43) tmp = t_1; 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 <= -3.5e+133) tmp = a * t; elseif (t <= -2.65e+76) tmp = x; elseif (t <= -1.4e+31) tmp = a * t; elseif (t <= -8.2e-288) tmp = x; elseif (t <= 1.1e-235) tmp = z * y; elseif (t <= 9.6e-139) tmp = t_1; elseif (t <= 1.35e-47) tmp = x; elseif (t <= 2.8e+43) tmp = t_1; 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, -3.5e+133], N[(a * t), $MachinePrecision], If[LessEqual[t, -2.65e+76], x, If[LessEqual[t, -1.4e+31], N[(a * t), $MachinePrecision], If[LessEqual[t, -8.2e-288], x, If[LessEqual[t, 1.1e-235], N[(z * y), $MachinePrecision], If[LessEqual[t, 9.6e-139], t$95$1, If[LessEqual[t, 1.35e-47], x, If[LessEqual[t, 2.8e+43], t$95$1, N[(a * t), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;t \leq -3.5 \cdot 10^{+133}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq -2.65 \cdot 10^{+76}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{+31}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq -8.2 \cdot 10^{-288}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-235}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-47}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -3.4999999999999998e133 or -2.65000000000000008e76 < t < -1.40000000000000008e31 or 2.80000000000000019e43 < t Initial program 90.7%
associate-+l+90.7%
+-commutative90.7%
associate-+l+90.7%
fma-def92.6%
+-commutative92.6%
*-commutative92.6%
associate-*l*94.3%
distribute-lft-out97.2%
fma-def97.2%
+-commutative97.2%
fma-def97.2%
Simplified97.2%
Taylor expanded in z around 0 83.6%
*-commutative83.6%
fma-def83.6%
Simplified83.6%
Taylor expanded in t around inf 61.4%
if -3.4999999999999998e133 < t < -2.65000000000000008e76 or -1.40000000000000008e31 < t < -8.20000000000000015e-288 or 9.60000000000000059e-139 < t < 1.3499999999999999e-47Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
associate-+l+97.1%
fma-def97.1%
+-commutative97.1%
*-commutative97.1%
associate-*l*96.4%
distribute-lft-out96.4%
fma-def96.4%
+-commutative96.4%
fma-def96.4%
Simplified96.4%
Taylor expanded in z around 0 83.3%
*-commutative83.3%
fma-def83.3%
Simplified83.3%
Taylor expanded in x around inf 55.8%
if -8.20000000000000015e-288 < t < 1.09999999999999992e-235Initial program 94.1%
associate-+l+94.1%
+-commutative94.1%
associate-+l+94.1%
fma-def94.1%
+-commutative94.1%
*-commutative94.1%
associate-*l*94.1%
distribute-lft-out94.1%
fma-def94.1%
+-commutative94.1%
fma-def94.1%
Simplified94.1%
Taylor expanded in y around inf 70.6%
*-commutative70.6%
Simplified70.6%
if 1.09999999999999992e-235 < t < 9.60000000000000059e-139 or 1.3499999999999999e-47 < t < 2.80000000000000019e43Initial program 94.2%
associate-+l+94.2%
+-commutative94.2%
associate-+l+94.2%
fma-def94.2%
+-commutative94.2%
*-commutative94.2%
associate-*l*97.1%
distribute-lft-out97.1%
fma-def97.1%
+-commutative97.1%
fma-def97.1%
Simplified97.1%
Taylor expanded in a around inf 65.1%
Taylor expanded in z around inf 53.4%
Final simplification58.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a t))) (t_2 (* a (+ t (* z b)))) (t_3 (+ x (* z y))))
(if (<= a -6.5e+159)
t_2
(if (<= a -6.5e+82)
t_1
(if (<= a -2.9e+20)
t_2
(if (<= a -2.2e-133)
t_3
(if (<= a -1.9e-296) t_1 (if (<= a 3.65e+27) t_3 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * t);
double t_2 = a * (t + (z * b));
double t_3 = x + (z * y);
double tmp;
if (a <= -6.5e+159) {
tmp = t_2;
} else if (a <= -6.5e+82) {
tmp = t_1;
} else if (a <= -2.9e+20) {
tmp = t_2;
} else if (a <= -2.2e-133) {
tmp = t_3;
} else if (a <= -1.9e-296) {
tmp = t_1;
} else if (a <= 3.65e+27) {
tmp = t_3;
} else {
tmp = t_2;
}
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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x + (a * t)
t_2 = a * (t + (z * b))
t_3 = x + (z * y)
if (a <= (-6.5d+159)) then
tmp = t_2
else if (a <= (-6.5d+82)) then
tmp = t_1
else if (a <= (-2.9d+20)) then
tmp = t_2
else if (a <= (-2.2d-133)) then
tmp = t_3
else if (a <= (-1.9d-296)) then
tmp = t_1
else if (a <= 3.65d+27) then
tmp = t_3
else
tmp = t_2
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 + (a * t);
double t_2 = a * (t + (z * b));
double t_3 = x + (z * y);
double tmp;
if (a <= -6.5e+159) {
tmp = t_2;
} else if (a <= -6.5e+82) {
tmp = t_1;
} else if (a <= -2.9e+20) {
tmp = t_2;
} else if (a <= -2.2e-133) {
tmp = t_3;
} else if (a <= -1.9e-296) {
tmp = t_1;
} else if (a <= 3.65e+27) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * t) t_2 = a * (t + (z * b)) t_3 = x + (z * y) tmp = 0 if a <= -6.5e+159: tmp = t_2 elif a <= -6.5e+82: tmp = t_1 elif a <= -2.9e+20: tmp = t_2 elif a <= -2.2e-133: tmp = t_3 elif a <= -1.9e-296: tmp = t_1 elif a <= 3.65e+27: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * t)) t_2 = Float64(a * Float64(t + Float64(z * b))) t_3 = Float64(x + Float64(z * y)) tmp = 0.0 if (a <= -6.5e+159) tmp = t_2; elseif (a <= -6.5e+82) tmp = t_1; elseif (a <= -2.9e+20) tmp = t_2; elseif (a <= -2.2e-133) tmp = t_3; elseif (a <= -1.9e-296) tmp = t_1; elseif (a <= 3.65e+27) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * t); t_2 = a * (t + (z * b)); t_3 = x + (z * y); tmp = 0.0; if (a <= -6.5e+159) tmp = t_2; elseif (a <= -6.5e+82) tmp = t_1; elseif (a <= -2.9e+20) tmp = t_2; elseif (a <= -2.2e-133) tmp = t_3; elseif (a <= -1.9e-296) tmp = t_1; elseif (a <= 3.65e+27) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.5e+159], t$95$2, If[LessEqual[a, -6.5e+82], t$95$1, If[LessEqual[a, -2.9e+20], t$95$2, If[LessEqual[a, -2.2e-133], t$95$3, If[LessEqual[a, -1.9e-296], t$95$1, If[LessEqual[a, 3.65e+27], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot t\\
t_2 := a \cdot \left(t + z \cdot b\right)\\
t_3 := x + z \cdot y\\
\mathbf{if}\;a \leq -6.5 \cdot 10^{+159}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{+82}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -2.9 \cdot 10^{+20}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -2.2 \cdot 10^{-133}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq -1.9 \cdot 10^{-296}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 3.65 \cdot 10^{+27}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -6.5000000000000001e159 or -6.5000000000000003e82 < a < -2.9e20 or 3.6499999999999999e27 < a Initial program 90.0%
associate-+l+90.0%
+-commutative90.0%
associate-+l+90.0%
fma-def92.0%
+-commutative92.0%
*-commutative92.0%
associate-*l*98.0%
distribute-lft-out100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in a around inf 79.9%
if -6.5000000000000001e159 < a < -6.5000000000000003e82 or -2.2000000000000001e-133 < a < -1.9000000000000001e-296Initial program 95.1%
associate-+l+95.1%
+-commutative95.1%
associate-+l+95.1%
fma-def95.1%
+-commutative95.1%
*-commutative95.1%
associate-*l*94.4%
distribute-lft-out96.4%
fma-def96.4%
+-commutative96.4%
fma-def96.4%
Simplified96.4%
Taylor expanded in z around 0 87.9%
*-commutative87.9%
fma-def87.9%
Simplified87.9%
Taylor expanded in y around 0 75.5%
if -2.9e20 < a < -2.2000000000000001e-133 or -1.9000000000000001e-296 < a < 3.6499999999999999e27Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
associate-+l+97.1%
fma-def97.1%
+-commutative97.1%
*-commutative97.1%
associate-*l*93.6%
distribute-lft-out93.6%
fma-def93.6%
+-commutative93.6%
fma-def93.6%
Simplified93.6%
Taylor expanded in a around 0 73.8%
Final simplification76.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z 5.2e+213) (+ (+ (* a (* z b)) (* a t)) (+ x (* z y))) (+ x (* z (+ y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 5.2e+213) {
tmp = ((a * (z * b)) + (a * t)) + (x + (z * y));
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= 5.2d+213) then
tmp = ((a * (z * b)) + (a * t)) + (x + (z * y))
else
tmp = x + (z * (y + (a * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 5.2e+213) {
tmp = ((a * (z * b)) + (a * t)) + (x + (z * y));
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= 5.2e+213: tmp = ((a * (z * b)) + (a * t)) + (x + (z * y)) else: tmp = x + (z * (y + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 5.2e+213) tmp = Float64(Float64(Float64(a * Float64(z * b)) + Float64(a * t)) + Float64(x + Float64(z * y))); else tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= 5.2e+213) tmp = ((a * (z * b)) + (a * t)) + (x + (z * y)); else tmp = x + (z * (y + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 5.2e+213], N[(N[(N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision] + N[(x + 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}\;z \leq 5.2 \cdot 10^{+213}:\\
\;\;\;\;\left(a \cdot \left(z \cdot b\right) + a \cdot t\right) + \left(x + z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if z < 5.19999999999999998e213Initial program 94.4%
associate-+l+94.4%
associate-*l*96.7%
Simplified96.7%
if 5.19999999999999998e213 < z Initial program 88.1%
+-commutative88.1%
+-commutative88.1%
associate-+l+88.1%
associate-+r+88.1%
*-commutative88.1%
associate-*l*88.1%
*-commutative88.1%
distribute-lft-out93.9%
fma-def93.9%
fma-def93.9%
+-commutative93.9%
fma-def93.9%
Simplified93.9%
Taylor expanded in t around 0 99.8%
Final simplification96.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -3.5e+133)
(* a t)
(if (<= t -2.6e+76)
x
(if (<= t -1.45e+29)
(* a t)
(if (<= t -8.5e-288)
x
(if (<= t 5.7e-177) (* z y) (if (<= t 8.5e+51) x (* a t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.5e+133) {
tmp = a * t;
} else if (t <= -2.6e+76) {
tmp = x;
} else if (t <= -1.45e+29) {
tmp = a * t;
} else if (t <= -8.5e-288) {
tmp = x;
} else if (t <= 5.7e-177) {
tmp = z * y;
} else if (t <= 8.5e+51) {
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 <= (-3.5d+133)) then
tmp = a * t
else if (t <= (-2.6d+76)) then
tmp = x
else if (t <= (-1.45d+29)) then
tmp = a * t
else if (t <= (-8.5d-288)) then
tmp = x
else if (t <= 5.7d-177) then
tmp = z * y
else if (t <= 8.5d+51) 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 <= -3.5e+133) {
tmp = a * t;
} else if (t <= -2.6e+76) {
tmp = x;
} else if (t <= -1.45e+29) {
tmp = a * t;
} else if (t <= -8.5e-288) {
tmp = x;
} else if (t <= 5.7e-177) {
tmp = z * y;
} else if (t <= 8.5e+51) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.5e+133: tmp = a * t elif t <= -2.6e+76: tmp = x elif t <= -1.45e+29: tmp = a * t elif t <= -8.5e-288: tmp = x elif t <= 5.7e-177: tmp = z * y elif t <= 8.5e+51: tmp = x else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.5e+133) tmp = Float64(a * t); elseif (t <= -2.6e+76) tmp = x; elseif (t <= -1.45e+29) tmp = Float64(a * t); elseif (t <= -8.5e-288) tmp = x; elseif (t <= 5.7e-177) tmp = Float64(z * y); elseif (t <= 8.5e+51) 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 <= -3.5e+133) tmp = a * t; elseif (t <= -2.6e+76) tmp = x; elseif (t <= -1.45e+29) tmp = a * t; elseif (t <= -8.5e-288) tmp = x; elseif (t <= 5.7e-177) tmp = z * y; elseif (t <= 8.5e+51) tmp = x; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.5e+133], N[(a * t), $MachinePrecision], If[LessEqual[t, -2.6e+76], x, If[LessEqual[t, -1.45e+29], N[(a * t), $MachinePrecision], If[LessEqual[t, -8.5e-288], x, If[LessEqual[t, 5.7e-177], N[(z * y), $MachinePrecision], If[LessEqual[t, 8.5e+51], x, N[(a * t), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{+133}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{+76}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{+29}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-288}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 5.7 \cdot 10^{-177}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+51}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -3.4999999999999998e133 or -2.5999999999999999e76 < t < -1.45e29 or 8.4999999999999999e51 < t Initial program 90.5%
associate-+l+90.5%
+-commutative90.5%
associate-+l+90.5%
fma-def92.5%
+-commutative92.5%
*-commutative92.5%
associate-*l*94.1%
distribute-lft-out97.1%
fma-def97.1%
+-commutative97.1%
fma-def97.1%
Simplified97.1%
Taylor expanded in z around 0 83.3%
*-commutative83.3%
fma-def83.3%
Simplified83.3%
Taylor expanded in t around inf 61.6%
if -3.4999999999999998e133 < t < -2.5999999999999999e76 or -1.45e29 < t < -8.4999999999999997e-288 or 5.6999999999999998e-177 < t < 8.4999999999999999e51Initial program 96.2%
associate-+l+96.2%
+-commutative96.2%
associate-+l+96.2%
fma-def96.2%
+-commutative96.2%
*-commutative96.2%
associate-*l*96.4%
distribute-lft-out96.4%
fma-def96.4%
+-commutative96.4%
fma-def96.4%
Simplified96.4%
Taylor expanded in z around 0 77.4%
*-commutative77.4%
fma-def77.4%
Simplified77.4%
Taylor expanded in x around inf 48.9%
if -8.4999999999999997e-288 < t < 5.6999999999999998e-177Initial program 95.8%
associate-+l+95.8%
+-commutative95.8%
associate-+l+95.8%
fma-def95.8%
+-commutative95.8%
*-commutative95.8%
associate-*l*95.8%
distribute-lft-out95.8%
fma-def95.8%
+-commutative95.8%
fma-def95.8%
Simplified95.8%
Taylor expanded in y around inf 55.2%
*-commutative55.2%
Simplified55.2%
Final simplification54.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -1050000000.0)
t_1
(if (<= z 3.7e+44)
(+ x (* a t))
(if (or (<= z 3.05e+122) (not (<= z 2.2e+193)))
t_1
(+ x (* z (* a b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (y + (a * b));
double tmp;
if (z <= -1050000000.0) {
tmp = t_1;
} else if (z <= 3.7e+44) {
tmp = x + (a * t);
} else if ((z <= 3.05e+122) || !(z <= 2.2e+193)) {
tmp = t_1;
} else {
tmp = x + (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 = z * (y + (a * b))
if (z <= (-1050000000.0d0)) then
tmp = t_1
else if (z <= 3.7d+44) then
tmp = x + (a * t)
else if ((z <= 3.05d+122) .or. (.not. (z <= 2.2d+193))) then
tmp = t_1
else
tmp = x + (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 = z * (y + (a * b));
double tmp;
if (z <= -1050000000.0) {
tmp = t_1;
} else if (z <= 3.7e+44) {
tmp = x + (a * t);
} else if ((z <= 3.05e+122) || !(z <= 2.2e+193)) {
tmp = t_1;
} else {
tmp = x + (z * (a * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -1050000000.0: tmp = t_1 elif z <= 3.7e+44: tmp = x + (a * t) elif (z <= 3.05e+122) or not (z <= 2.2e+193): tmp = t_1 else: tmp = x + (z * (a * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -1050000000.0) tmp = t_1; elseif (z <= 3.7e+44) tmp = Float64(x + Float64(a * t)); elseif ((z <= 3.05e+122) || !(z <= 2.2e+193)) tmp = t_1; else tmp = Float64(x + Float64(z * Float64(a * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (y + (a * b)); tmp = 0.0; if (z <= -1050000000.0) tmp = t_1; elseif (z <= 3.7e+44) tmp = x + (a * t); elseif ((z <= 3.05e+122) || ~((z <= 2.2e+193))) tmp = t_1; else tmp = x + (z * (a * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1050000000.0], t$95$1, If[LessEqual[z, 3.7e+44], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 3.05e+122], N[Not[LessEqual[z, 2.2e+193]], $MachinePrecision]], t$95$1, N[(x + N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -1050000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{+44}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{elif}\;z \leq 3.05 \cdot 10^{+122} \lor \neg \left(z \leq 2.2 \cdot 10^{+193}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -1.05e9 or 3.7000000000000001e44 < z < 3.0499999999999999e122 or 2.19999999999999986e193 < z Initial program 88.4%
associate-+l+88.4%
+-commutative88.4%
associate-+l+88.4%
fma-def90.3%
+-commutative90.3%
*-commutative90.3%
associate-*l*90.7%
distribute-lft-out93.6%
fma-def93.6%
+-commutative93.6%
fma-def93.6%
Simplified93.6%
Taylor expanded in z around inf 79.2%
if -1.05e9 < z < 3.7000000000000001e44Initial program 98.9%
associate-+l+98.9%
+-commutative98.9%
associate-+l+98.9%
fma-def98.9%
+-commutative98.9%
*-commutative98.9%
associate-*l*100.0%
distribute-lft-out100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in z around 0 90.1%
*-commutative90.1%
fma-def90.1%
Simplified90.1%
Taylor expanded in y around 0 81.1%
if 3.0499999999999999e122 < z < 2.19999999999999986e193Initial program 80.0%
associate-+l+80.0%
+-commutative80.0%
associate-+l+80.0%
fma-def80.0%
+-commutative80.0%
*-commutative80.0%
associate-*l*80.4%
distribute-lft-out80.4%
fma-def80.4%
+-commutative80.4%
fma-def80.4%
Simplified80.4%
Taylor expanded in y around 0 80.4%
Taylor expanded in t around 0 61.7%
associate-*r*81.3%
*-commutative81.3%
associate-*r*70.1%
fma-def70.1%
Simplified70.1%
fma-udef70.1%
*-commutative70.1%
*-commutative70.1%
associate-*l*81.3%
Applied egg-rr81.3%
Final simplification80.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3600000000.0) (not (<= z 3.6e+212))) (* z (+ y (* a b))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3600000000.0) || !(z <= 3.6e+212)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-3600000000.0d0)) .or. (.not. (z <= 3.6d+212))) then
tmp = z * (y + (a * b))
else
tmp = x + (a * (t + (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3600000000.0) || !(z <= 3.6e+212)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3600000000.0) or not (z <= 3.6e+212): tmp = z * (y + (a * b)) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3600000000.0) || !(z <= 3.6e+212)) tmp = Float64(z * Float64(y + Float64(a * b))); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3600000000.0) || ~((z <= 3.6e+212))) tmp = z * (y + (a * b)); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3600000000.0], N[Not[LessEqual[z, 3.6e+212]], $MachinePrecision]], N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3600000000 \lor \neg \left(z \leq 3.6 \cdot 10^{+212}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -3.6e9 or 3.6e212 < z Initial program 87.2%
associate-+l+87.2%
+-commutative87.2%
associate-+l+87.2%
fma-def89.5%
+-commutative89.5%
*-commutative89.5%
associate-*l*88.9%
distribute-lft-out92.4%
fma-def92.4%
+-commutative92.4%
fma-def92.3%
Simplified92.3%
Taylor expanded in z around inf 80.7%
if -3.6e9 < z < 3.6e212Initial program 97.3%
associate-+l+97.3%
+-commutative97.3%
associate-+l+97.3%
fma-def97.3%
+-commutative97.3%
*-commutative97.3%
associate-*l*98.8%
distribute-lft-out98.8%
fma-def98.8%
+-commutative98.8%
fma-def98.8%
Simplified98.8%
Taylor expanded in y around 0 87.3%
Final simplification85.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.2e+60) (not (<= y 9.8e+26))) (+ (* z y) (+ x (* a t))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.2e+60) || !(y <= 9.8e+26)) {
tmp = (z * y) + (x + (a * t));
} 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 <= (-5.2d+60)) .or. (.not. (y <= 9.8d+26))) then
tmp = (z * y) + (x + (a * t))
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 <= -5.2e+60) || !(y <= 9.8e+26)) {
tmp = (z * y) + (x + (a * t));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.2e+60) or not (y <= 9.8e+26): tmp = (z * y) + (x + (a * t)) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.2e+60) || !(y <= 9.8e+26)) tmp = Float64(Float64(z * y) + Float64(x + Float64(a * t))); 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 <= -5.2e+60) || ~((y <= 9.8e+26))) tmp = (z * y) + (x + (a * t)); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.2e+60], N[Not[LessEqual[y, 9.8e+26]], $MachinePrecision]], N[(N[(z * y), $MachinePrecision] + N[(x + N[(a * t), $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 -5.2 \cdot 10^{+60} \lor \neg \left(y \leq 9.8 \cdot 10^{+26}\right):\\
\;\;\;\;z \cdot y + \left(x + a \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if y < -5.20000000000000016e60 or 9.79999999999999947e26 < y Initial program 92.2%
associate-+l+92.2%
+-commutative92.2%
associate-+l+92.2%
fma-def94.1%
+-commutative94.1%
*-commutative94.1%
associate-*l*97.1%
distribute-lft-out98.0%
fma-def98.0%
+-commutative98.0%
fma-def98.0%
Simplified98.0%
Taylor expanded in b around 0 89.7%
if -5.20000000000000016e60 < y < 9.79999999999999947e26Initial program 95.1%
associate-+l+95.1%
+-commutative95.1%
associate-+l+95.1%
fma-def95.1%
+-commutative95.1%
*-commutative95.1%
associate-*l*94.4%
distribute-lft-out95.7%
fma-def95.7%
+-commutative95.7%
fma-def95.7%
Simplified95.7%
Taylor expanded in y around 0 90.7%
Final simplification90.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.3e-27) (not (<= z 1.8e+40))) (+ x (* z (+ y (* a b)))) (+ x (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e-27) || !(z <= 1.8e+40)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.3d-27)) .or. (.not. (z <= 1.8d+40))) then
tmp = x + (z * (y + (a * b)))
else
tmp = x + (a * (t + (z * b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.3e-27) || !(z <= 1.8e+40)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = x + (a * (t + (z * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.3e-27) or not (z <= 1.8e+40): tmp = x + (z * (y + (a * b))) else: tmp = x + (a * (t + (z * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.3e-27) || !(z <= 1.8e+40)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.3e-27) || ~((z <= 1.8e+40))) tmp = x + (z * (y + (a * b))); else tmp = x + (a * (t + (z * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.3e-27], N[Not[LessEqual[z, 1.8e+40]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.3 \cdot 10^{-27} \lor \neg \left(z \leq 1.8 \cdot 10^{+40}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -1.30000000000000009e-27 or 1.79999999999999998e40 < z Initial program 88.5%
+-commutative88.5%
+-commutative88.5%
associate-+l+88.5%
associate-+r+88.5%
*-commutative88.5%
associate-*l*94.2%
*-commutative94.2%
distribute-lft-out96.7%
fma-def97.5%
fma-def97.5%
+-commutative97.5%
fma-def97.5%
Simplified97.5%
Taylor expanded in t around 0 89.6%
if -1.30000000000000009e-27 < z < 1.79999999999999998e40Initial program 98.9%
associate-+l+98.9%
+-commutative98.9%
associate-+l+98.9%
fma-def98.9%
+-commutative98.9%
*-commutative98.9%
associate-*l*100.0%
distribute-lft-out100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in y around 0 91.8%
Final simplification90.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -3.5e+133)
(* a t)
(if (<= t -2.1e+76)
x
(if (<= t -1.9e+25) (* a t) (if (<= t 9.2e+52) x (* a t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.5e+133) {
tmp = a * t;
} else if (t <= -2.1e+76) {
tmp = x;
} else if (t <= -1.9e+25) {
tmp = a * t;
} else if (t <= 9.2e+52) {
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 <= (-3.5d+133)) then
tmp = a * t
else if (t <= (-2.1d+76)) then
tmp = x
else if (t <= (-1.9d+25)) then
tmp = a * t
else if (t <= 9.2d+52) 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 <= -3.5e+133) {
tmp = a * t;
} else if (t <= -2.1e+76) {
tmp = x;
} else if (t <= -1.9e+25) {
tmp = a * t;
} else if (t <= 9.2e+52) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.5e+133: tmp = a * t elif t <= -2.1e+76: tmp = x elif t <= -1.9e+25: tmp = a * t elif t <= 9.2e+52: tmp = x else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.5e+133) tmp = Float64(a * t); elseif (t <= -2.1e+76) tmp = x; elseif (t <= -1.9e+25) tmp = Float64(a * t); elseif (t <= 9.2e+52) 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 <= -3.5e+133) tmp = a * t; elseif (t <= -2.1e+76) tmp = x; elseif (t <= -1.9e+25) tmp = a * t; elseif (t <= 9.2e+52) tmp = x; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.5e+133], N[(a * t), $MachinePrecision], If[LessEqual[t, -2.1e+76], x, If[LessEqual[t, -1.9e+25], N[(a * t), $MachinePrecision], If[LessEqual[t, 9.2e+52], x, N[(a * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{+133}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{+76}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{+25}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{+52}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if t < -3.4999999999999998e133 or -2.10000000000000007e76 < t < -1.9e25 or 9.1999999999999999e52 < t Initial program 90.5%
associate-+l+90.5%
+-commutative90.5%
associate-+l+90.5%
fma-def92.5%
+-commutative92.5%
*-commutative92.5%
associate-*l*94.1%
distribute-lft-out97.1%
fma-def97.1%
+-commutative97.1%
fma-def97.1%
Simplified97.1%
Taylor expanded in z around 0 83.3%
*-commutative83.3%
fma-def83.3%
Simplified83.3%
Taylor expanded in t around inf 61.6%
if -3.4999999999999998e133 < t < -2.10000000000000007e76 or -1.9e25 < t < 9.1999999999999999e52Initial program 96.2%
associate-+l+96.2%
+-commutative96.2%
associate-+l+96.2%
fma-def96.2%
+-commutative96.2%
*-commutative96.2%
associate-*l*96.3%
distribute-lft-out96.3%
fma-def96.3%
+-commutative96.3%
fma-def96.3%
Simplified96.3%
Taylor expanded in z around 0 76.5%
*-commutative76.5%
fma-def76.5%
Simplified76.5%
Taylor expanded in x around inf 43.0%
Final simplification50.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2600000000.0) (not (<= z 8.5e+43))) (* 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 <= -2600000000.0) || !(z <= 8.5e+43)) {
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 <= (-2600000000.0d0)) .or. (.not. (z <= 8.5d+43))) 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 <= -2600000000.0) || !(z <= 8.5e+43)) {
tmp = z * (y + (a * b));
} else {
tmp = x + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2600000000.0) or not (z <= 8.5e+43): 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 <= -2600000000.0) || !(z <= 8.5e+43)) 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 <= -2600000000.0) || ~((z <= 8.5e+43))) 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, -2600000000.0], N[Not[LessEqual[z, 8.5e+43]], $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 -2600000000 \lor \neg \left(z \leq 8.5 \cdot 10^{+43}\right):\\
\;\;\;\;z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot t\\
\end{array}
\end{array}
if z < -2.6e9 or 8.5e43 < z Initial program 87.6%
associate-+l+87.6%
+-commutative87.6%
associate-+l+87.6%
fma-def89.4%
+-commutative89.4%
*-commutative89.4%
associate-*l*89.8%
distribute-lft-out92.5%
fma-def92.5%
+-commutative92.5%
fma-def92.4%
Simplified92.4%
Taylor expanded in z around inf 75.0%
if -2.6e9 < z < 8.5e43Initial program 98.9%
associate-+l+98.9%
+-commutative98.9%
associate-+l+98.9%
fma-def98.9%
+-commutative98.9%
*-commutative98.9%
associate-*l*100.0%
distribute-lft-out100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in z around 0 90.1%
*-commutative90.1%
fma-def90.1%
Simplified90.1%
Taylor expanded in y around 0 81.1%
Final simplification78.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7.6e+40) (not (<= t 8e+43))) (+ x (* a t)) (+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.6e+40) || !(t <= 8e+43)) {
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 ((t <= (-7.6d+40)) .or. (.not. (t <= 8d+43))) 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 ((t <= -7.6e+40) || !(t <= 8e+43)) {
tmp = x + (a * t);
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7.6e+40) or not (t <= 8e+43): tmp = x + (a * t) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7.6e+40) || !(t <= 8e+43)) 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 ((t <= -7.6e+40) || ~((t <= 8e+43))) tmp = x + (a * t); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -7.6e+40], N[Not[LessEqual[t, 8e+43]], $MachinePrecision]], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.6 \cdot 10^{+40} \lor \neg \left(t \leq 8 \cdot 10^{+43}\right):\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if t < -7.60000000000000009e40 or 8.00000000000000011e43 < t Initial program 91.9%
associate-+l+91.9%
+-commutative91.9%
associate-+l+91.9%
fma-def93.6%
+-commutative93.6%
*-commutative93.6%
associate-*l*93.4%
distribute-lft-out96.0%
fma-def96.0%
+-commutative96.0%
fma-def96.0%
Simplified96.0%
Taylor expanded in z around 0 85.8%
*-commutative85.8%
fma-def85.8%
Simplified85.8%
Taylor expanded in y around 0 71.2%
if -7.60000000000000009e40 < t < 8.00000000000000011e43Initial program 95.7%
associate-+l+95.7%
+-commutative95.7%
associate-+l+95.7%
fma-def95.7%
+-commutative95.7%
*-commutative95.7%
associate-*l*97.2%
distribute-lft-out97.2%
fma-def97.2%
+-commutative97.2%
fma-def97.2%
Simplified97.2%
Taylor expanded in a around 0 67.6%
Final simplification69.3%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2e+79) (* z y) (if (<= z 1.25e+213) (+ x (* a t)) (* a (* z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2e+79) {
tmp = z * y;
} else if (z <= 1.25e+213) {
tmp = x + (a * t);
} 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 <= (-2d+79)) then
tmp = z * y
else if (z <= 1.25d+213) then
tmp = x + (a * t)
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 <= -2e+79) {
tmp = z * y;
} else if (z <= 1.25e+213) {
tmp = x + (a * t);
} else {
tmp = a * (z * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2e+79: tmp = z * y elif z <= 1.25e+213: tmp = x + (a * t) else: tmp = a * (z * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2e+79) tmp = Float64(z * y); elseif (z <= 1.25e+213) tmp = Float64(x + Float64(a * t)); 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 <= -2e+79) tmp = z * y; elseif (z <= 1.25e+213) tmp = x + (a * t); else tmp = a * (z * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2e+79], N[(z * y), $MachinePrecision], If[LessEqual[z, 1.25e+213], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{+79}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;z \leq 1.25 \cdot 10^{+213}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\end{array}
\end{array}
if z < -1.99999999999999993e79Initial program 83.8%
associate-+l+83.8%
+-commutative83.8%
associate-+l+83.8%
fma-def83.8%
+-commutative83.8%
*-commutative83.8%
associate-*l*91.8%
distribute-lft-out95.9%
fma-def95.9%
+-commutative95.9%
fma-def95.9%
Simplified95.9%
Taylor expanded in y around inf 50.2%
*-commutative50.2%
Simplified50.2%
if -1.99999999999999993e79 < z < 1.2499999999999999e213Initial program 97.1%
associate-+l+97.1%
+-commutative97.1%
associate-+l+97.1%
fma-def97.6%
+-commutative97.6%
*-commutative97.6%
associate-*l*98.4%
distribute-lft-out98.5%
fma-def98.5%
+-commutative98.5%
fma-def98.5%
Simplified98.5%
Taylor expanded in z around 0 86.0%
*-commutative86.0%
fma-def86.0%
Simplified86.0%
Taylor expanded in y around 0 72.0%
if 1.2499999999999999e213 < z Initial program 88.1%
associate-+l+88.1%
+-commutative88.1%
associate-+l+88.1%
fma-def93.9%
+-commutative93.9%
*-commutative93.9%
associate-*l*72.7%
distribute-lft-out78.6%
fma-def78.6%
+-commutative78.6%
fma-def78.6%
Simplified78.6%
Taylor expanded in a around inf 61.3%
Taylor expanded in z around inf 61.4%
Final simplification67.1%
(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 93.9%
associate-+l+93.9%
+-commutative93.9%
associate-+l+93.9%
fma-def94.7%
+-commutative94.7%
*-commutative94.7%
associate-*l*95.5%
distribute-lft-out96.7%
fma-def96.7%
+-commutative96.7%
fma-def96.7%
Simplified96.7%
Taylor expanded in z around 0 79.2%
*-commutative79.2%
fma-def79.2%
Simplified79.2%
Taylor expanded in x around inf 29.5%
Final simplification29.5%
(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 2023221
(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)))