
(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 (or (<= z -3.6e+51) (not (<= z 2e-16))) (* z (+ y (+ (* a (+ b (/ t z))) (/ x z)))) (+ (+ x (* z y)) (+ (* a (* z b)) (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.6e+51) || !(z <= 2e-16)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = (x + (z * y)) + ((a * (z * b)) + (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 <= (-3.6d+51)) .or. (.not. (z <= 2d-16))) then
tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
else
tmp = (x + (z * y)) + ((a * (z * b)) + (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 <= -3.6e+51) || !(z <= 2e-16)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = (x + (z * y)) + ((a * (z * b)) + (a * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.6e+51) or not (z <= 2e-16): tmp = z * (y + ((a * (b + (t / z))) + (x / z))) else: tmp = (x + (z * y)) + ((a * (z * b)) + (a * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.6e+51) || !(z <= 2e-16)) tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))); else tmp = Float64(Float64(x + Float64(z * y)) + Float64(Float64(a * Float64(z * b)) + Float64(a * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.6e+51) || ~((z <= 2e-16))) tmp = z * (y + ((a * (b + (t / z))) + (x / z))); else tmp = (x + (z * y)) + ((a * (z * b)) + (a * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.6e+51], N[Not[LessEqual[z, 2e-16]], $MachinePrecision]], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.6 \cdot 10^{+51} \lor \neg \left(z \leq 2 \cdot 10^{-16}\right):\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + z \cdot y\right) + \left(a \cdot \left(z \cdot b\right) + a \cdot t\right)\\
\end{array}
\end{array}
if z < -3.60000000000000011e51 or 2e-16 < z Initial program 82.5%
associate-+l+82.5%
associate-*l*83.3%
Simplified83.3%
Taylor expanded in z around inf 94.3%
+-commutative94.3%
associate-+r+94.3%
associate-/l*99.1%
distribute-lft-out99.9%
Simplified99.9%
if -3.60000000000000011e51 < z < 2e-16Initial program 99.7%
associate-+l+99.7%
associate-*l*99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1e+78) (* z (+ y (+ (* a (+ b (/ t z))) (/ x z)))) (+ (fma y z x) (* a (+ t (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e+78) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = fma(y, z, x) + (a * (t + (z * b)));
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1e+78) tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))); else tmp = Float64(fma(y, z, x) + Float64(a * Float64(t + Float64(z * b)))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1e+78], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z + x), $MachinePrecision] + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+78}:\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, z, x\right) + a \cdot \left(t + z \cdot b\right)\\
\end{array}
\end{array}
if z < -1.00000000000000001e78Initial program 79.4%
associate-+l+79.4%
associate-*l*75.6%
Simplified75.6%
Taylor expanded in z around inf 93.7%
+-commutative93.7%
associate-+r+93.7%
associate-/l*97.8%
distribute-lft-out99.9%
Simplified99.9%
if -1.00000000000000001e78 < z Initial program 94.1%
associate-+l+94.1%
+-commutative94.1%
fma-define94.1%
associate-*l*95.6%
*-commutative95.6%
*-commutative95.6%
distribute-rgt-out98.1%
*-commutative98.1%
Simplified98.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* z b))))
(if (<= a -1.1e-20)
t_1
(if (<= a 2.6e-220)
x
(if (<= a 6.2e-40)
(* z y)
(if (<= a 3.6e+61) x (if (<= a 9.6e+199) (* a t) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (a <= -1.1e-20) {
tmp = t_1;
} else if (a <= 2.6e-220) {
tmp = x;
} else if (a <= 6.2e-40) {
tmp = z * y;
} else if (a <= 3.6e+61) {
tmp = x;
} else if (a <= 9.6e+199) {
tmp = a * t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * (z * b)
if (a <= (-1.1d-20)) then
tmp = t_1
else if (a <= 2.6d-220) then
tmp = x
else if (a <= 6.2d-40) then
tmp = z * y
else if (a <= 3.6d+61) then
tmp = x
else if (a <= 9.6d+199) then
tmp = a * t
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (z * b);
double tmp;
if (a <= -1.1e-20) {
tmp = t_1;
} else if (a <= 2.6e-220) {
tmp = x;
} else if (a <= 6.2e-40) {
tmp = z * y;
} else if (a <= 3.6e+61) {
tmp = x;
} else if (a <= 9.6e+199) {
tmp = a * t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (z * b) tmp = 0 if a <= -1.1e-20: tmp = t_1 elif a <= 2.6e-220: tmp = x elif a <= 6.2e-40: tmp = z * y elif a <= 3.6e+61: tmp = x elif a <= 9.6e+199: tmp = a * t else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(z * b)) tmp = 0.0 if (a <= -1.1e-20) tmp = t_1; elseif (a <= 2.6e-220) tmp = x; elseif (a <= 6.2e-40) tmp = Float64(z * y); elseif (a <= 3.6e+61) tmp = x; elseif (a <= 9.6e+199) tmp = Float64(a * t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (z * b); tmp = 0.0; if (a <= -1.1e-20) tmp = t_1; elseif (a <= 2.6e-220) tmp = x; elseif (a <= 6.2e-40) tmp = z * y; elseif (a <= 3.6e+61) tmp = x; elseif (a <= 9.6e+199) tmp = a * t; else tmp = t_1; 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[a, -1.1e-20], t$95$1, If[LessEqual[a, 2.6e-220], x, If[LessEqual[a, 6.2e-40], N[(z * y), $MachinePrecision], If[LessEqual[a, 3.6e+61], x, If[LessEqual[a, 9.6e+199], N[(a * t), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(z \cdot b\right)\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{-20}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-220}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-40}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{+61}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{+199}:\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.09999999999999995e-20 or 9.60000000000000059e199 < a Initial program 78.5%
associate-+l+78.5%
associate-*l*86.9%
Simplified86.9%
Taylor expanded in z around inf 62.9%
+-commutative62.9%
Simplified62.9%
Taylor expanded in a around inf 55.8%
*-commutative55.8%
Simplified55.8%
if -1.09999999999999995e-20 < a < 2.6e-220 or 6.20000000000000021e-40 < a < 3.6000000000000001e61Initial program 98.7%
associate-+l+98.7%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in x around inf 51.1%
if 2.6e-220 < a < 6.20000000000000021e-40Initial program 100.0%
associate-+l+100.0%
associate-*l*93.6%
Simplified93.6%
Taylor expanded in y around inf 65.2%
*-commutative65.2%
Simplified65.2%
if 3.6000000000000001e61 < a < 9.60000000000000059e199Initial program 96.4%
Taylor expanded in x around 0 89.1%
Taylor expanded in t around inf 47.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* a t))))
(if (<= a -4.2e+171)
(* b (* z a))
(if (<= a -5.6e+33)
t_1
(if (<= a 3.9e-32)
(+ x (* z y))
(if (<= a 3.6e+209) t_1 (* a (* z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (a * t);
double tmp;
if (a <= -4.2e+171) {
tmp = b * (z * a);
} else if (a <= -5.6e+33) {
tmp = t_1;
} else if (a <= 3.9e-32) {
tmp = x + (z * y);
} else if (a <= 3.6e+209) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x + (a * t)
if (a <= (-4.2d+171)) then
tmp = b * (z * a)
else if (a <= (-5.6d+33)) then
tmp = t_1
else if (a <= 3.9d-32) then
tmp = x + (z * y)
else if (a <= 3.6d+209) then
tmp = t_1
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 t_1 = x + (a * t);
double tmp;
if (a <= -4.2e+171) {
tmp = b * (z * a);
} else if (a <= -5.6e+33) {
tmp = t_1;
} else if (a <= 3.9e-32) {
tmp = x + (z * y);
} else if (a <= 3.6e+209) {
tmp = t_1;
} else {
tmp = a * (z * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (a * t) tmp = 0 if a <= -4.2e+171: tmp = b * (z * a) elif a <= -5.6e+33: tmp = t_1 elif a <= 3.9e-32: tmp = x + (z * y) elif a <= 3.6e+209: tmp = t_1 else: tmp = a * (z * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(a * t)) tmp = 0.0 if (a <= -4.2e+171) tmp = Float64(b * Float64(z * a)); elseif (a <= -5.6e+33) tmp = t_1; elseif (a <= 3.9e-32) tmp = Float64(x + Float64(z * y)); elseif (a <= 3.6e+209) tmp = t_1; else tmp = Float64(a * Float64(z * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (a * t); tmp = 0.0; if (a <= -4.2e+171) tmp = b * (z * a); elseif (a <= -5.6e+33) tmp = t_1; elseif (a <= 3.9e-32) tmp = x + (z * y); elseif (a <= 3.6e+209) tmp = t_1; else tmp = a * (z * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4.2e+171], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -5.6e+33], t$95$1, If[LessEqual[a, 3.9e-32], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e+209], t$95$1, N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + a \cdot t\\
\mathbf{if}\;a \leq -4.2 \cdot 10^{+171}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{elif}\;a \leq -5.6 \cdot 10^{+33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{-32}:\\
\;\;\;\;x + z \cdot y\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\end{array}
\end{array}
if a < -4.2000000000000003e171Initial program 68.0%
Taylor expanded in x around 0 56.3%
Taylor expanded in a around inf 80.6%
+-commutative80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in z around inf 57.1%
associate-*r*53.6%
*-commutative53.6%
associate-*r*60.9%
Simplified60.9%
if -4.2000000000000003e171 < a < -5.6000000000000002e33 or 3.9000000000000001e-32 < a < 3.60000000000000012e209Initial program 92.7%
associate-+l+92.7%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in z around 0 61.3%
+-commutative61.3%
Simplified61.3%
if -5.6000000000000002e33 < a < 3.9000000000000001e-32Initial program 98.9%
associate-+l+98.9%
associate-*l*94.0%
Simplified94.0%
Taylor expanded in a around 0 83.9%
if 3.60000000000000012e209 < a Initial program 69.8%
associate-+l+69.8%
associate-*l*82.4%
Simplified82.4%
Taylor expanded in z around inf 74.8%
+-commutative74.8%
Simplified74.8%
Taylor expanded in a around inf 76.6%
*-commutative76.6%
Simplified76.6%
Final simplification73.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.1e+58)
(* a t)
(if (<= a 4.7e-219)
x
(if (<= a 1.9e-40) (* z y) (if (<= a 2.45e+61) x (* a t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.1e+58) {
tmp = a * t;
} else if (a <= 4.7e-219) {
tmp = x;
} else if (a <= 1.9e-40) {
tmp = z * y;
} else if (a <= 2.45e+61) {
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 (a <= (-1.1d+58)) then
tmp = a * t
else if (a <= 4.7d-219) then
tmp = x
else if (a <= 1.9d-40) then
tmp = z * y
else if (a <= 2.45d+61) 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 (a <= -1.1e+58) {
tmp = a * t;
} else if (a <= 4.7e-219) {
tmp = x;
} else if (a <= 1.9e-40) {
tmp = z * y;
} else if (a <= 2.45e+61) {
tmp = x;
} else {
tmp = a * t;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.1e+58: tmp = a * t elif a <= 4.7e-219: tmp = x elif a <= 1.9e-40: tmp = z * y elif a <= 2.45e+61: tmp = x else: tmp = a * t return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.1e+58) tmp = Float64(a * t); elseif (a <= 4.7e-219) tmp = x; elseif (a <= 1.9e-40) tmp = Float64(z * y); elseif (a <= 2.45e+61) 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 (a <= -1.1e+58) tmp = a * t; elseif (a <= 4.7e-219) tmp = x; elseif (a <= 1.9e-40) tmp = z * y; elseif (a <= 2.45e+61) tmp = x; else tmp = a * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.1e+58], N[(a * t), $MachinePrecision], If[LessEqual[a, 4.7e-219], x, If[LessEqual[a, 1.9e-40], N[(z * y), $MachinePrecision], If[LessEqual[a, 2.45e+61], x, N[(a * t), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{+58}:\\
\;\;\;\;a \cdot t\\
\mathbf{elif}\;a \leq 4.7 \cdot 10^{-219}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-40}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;a \leq 2.45 \cdot 10^{+61}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot t\\
\end{array}
\end{array}
if a < -1.1e58 or 2.45000000000000013e61 < a Initial program 80.8%
Taylor expanded in x around 0 74.9%
Taylor expanded in t around inf 42.8%
if -1.1e58 < a < 4.7e-219 or 1.8999999999999999e-40 < a < 2.45000000000000013e61Initial program 98.0%
associate-+l+98.0%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in x around inf 46.8%
if 4.7e-219 < a < 1.8999999999999999e-40Initial program 100.0%
associate-+l+100.0%
associate-*l*93.6%
Simplified93.6%
Taylor expanded in y around inf 65.2%
*-commutative65.2%
Simplified65.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -6.2e+254) (* z y) (if (<= z -4700.0) (* z (* a b)) (if (<= z 2.45e-83) x (* a (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6.2e+254) {
tmp = z * y;
} else if (z <= -4700.0) {
tmp = z * (a * b);
} else if (z <= 2.45e-83) {
tmp = x;
} 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 <= (-6.2d+254)) then
tmp = z * y
else if (z <= (-4700.0d0)) then
tmp = z * (a * b)
else if (z <= 2.45d-83) then
tmp = x
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 <= -6.2e+254) {
tmp = z * y;
} else if (z <= -4700.0) {
tmp = z * (a * b);
} else if (z <= 2.45e-83) {
tmp = x;
} else {
tmp = a * (z * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -6.2e+254: tmp = z * y elif z <= -4700.0: tmp = z * (a * b) elif z <= 2.45e-83: tmp = x else: tmp = a * (z * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -6.2e+254) tmp = Float64(z * y); elseif (z <= -4700.0) tmp = Float64(z * Float64(a * b)); elseif (z <= 2.45e-83) tmp = x; 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 <= -6.2e+254) tmp = z * y; elseif (z <= -4700.0) tmp = z * (a * b); elseif (z <= 2.45e-83) tmp = x; else tmp = a * (z * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6.2e+254], N[(z * y), $MachinePrecision], If[LessEqual[z, -4700.0], N[(z * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.45e-83], x, N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.2 \cdot 10^{+254}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;z \leq -4700:\\
\;\;\;\;z \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-83}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\end{array}
\end{array}
if z < -6.2000000000000004e254Initial program 92.3%
associate-+l+92.3%
associate-*l*76.9%
Simplified76.9%
Taylor expanded in y around inf 77.0%
*-commutative77.0%
Simplified77.0%
if -6.2000000000000004e254 < z < -4700Initial program 82.0%
associate-+l+82.0%
associate-*l*82.3%
Simplified82.3%
Taylor expanded in z around inf 69.6%
+-commutative69.6%
Simplified69.6%
Taylor expanded in a around inf 51.3%
if -4700 < z < 2.45e-83Initial program 99.6%
associate-+l+99.6%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in x around inf 50.5%
if 2.45e-83 < z Initial program 86.3%
associate-+l+86.3%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in z around inf 77.5%
+-commutative77.5%
Simplified77.5%
Taylor expanded in a around inf 49.7%
*-commutative49.7%
Simplified49.7%
(FPCore (x y z t a b) :precision binary64 (if (<= z -5.4e+256) (* z y) (if (<= z -5400.0) (* b (* z a)) (if (<= z 2.9e-80) x (* a (* z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.4e+256) {
tmp = z * y;
} else if (z <= -5400.0) {
tmp = b * (z * a);
} else if (z <= 2.9e-80) {
tmp = x;
} 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 <= (-5.4d+256)) then
tmp = z * y
else if (z <= (-5400.0d0)) then
tmp = b * (z * a)
else if (z <= 2.9d-80) then
tmp = x
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 <= -5.4e+256) {
tmp = z * y;
} else if (z <= -5400.0) {
tmp = b * (z * a);
} else if (z <= 2.9e-80) {
tmp = x;
} else {
tmp = a * (z * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5.4e+256: tmp = z * y elif z <= -5400.0: tmp = b * (z * a) elif z <= 2.9e-80: tmp = x else: tmp = a * (z * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.4e+256) tmp = Float64(z * y); elseif (z <= -5400.0) tmp = Float64(b * Float64(z * a)); elseif (z <= 2.9e-80) tmp = x; 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 <= -5.4e+256) tmp = z * y; elseif (z <= -5400.0) tmp = b * (z * a); elseif (z <= 2.9e-80) tmp = x; else tmp = a * (z * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.4e+256], N[(z * y), $MachinePrecision], If[LessEqual[z, -5400.0], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-80], x, N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.4 \cdot 10^{+256}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;z \leq -5400:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{elif}\;z \leq 2.9 \cdot 10^{-80}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\end{array}
\end{array}
if z < -5.3999999999999999e256Initial program 92.3%
associate-+l+92.3%
associate-*l*76.9%
Simplified76.9%
Taylor expanded in y around inf 77.0%
*-commutative77.0%
Simplified77.0%
if -5.3999999999999999e256 < z < -5400Initial program 82.0%
Taylor expanded in x around 0 68.5%
Taylor expanded in a around inf 62.8%
+-commutative62.8%
*-commutative62.8%
Simplified62.8%
Taylor expanded in z around inf 45.9%
associate-*r*51.3%
*-commutative51.3%
associate-*r*49.6%
Simplified49.6%
if -5400 < z < 2.89999999999999998e-80Initial program 99.6%
associate-+l+99.6%
associate-*l*99.9%
Simplified99.9%
Taylor expanded in x around inf 50.5%
if 2.89999999999999998e-80 < z Initial program 86.3%
associate-+l+86.3%
associate-*l*89.9%
Simplified89.9%
Taylor expanded in z around inf 77.5%
+-commutative77.5%
Simplified77.5%
Taylor expanded in a around inf 49.7%
*-commutative49.7%
Simplified49.7%
Final simplification51.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.85e+34) (not (<= a 4.3e-34))) (+ x (* a (+ t (* z b)))) (+ x (* z (+ y (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.85e+34) || !(a <= 4.3e-34)) {
tmp = x + (a * (t + (z * b)));
} 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 ((a <= (-1.85d+34)) .or. (.not. (a <= 4.3d-34))) then
tmp = x + (a * (t + (z * b)))
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 ((a <= -1.85e+34) || !(a <= 4.3e-34)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + (z * (y + (a * b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.85e+34) or not (a <= 4.3e-34): tmp = x + (a * (t + (z * b))) else: tmp = x + (z * (y + (a * b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.85e+34) || !(a <= 4.3e-34)) tmp = Float64(x + Float64(a * Float64(t + Float64(z * b)))); 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 ((a <= -1.85e+34) || ~((a <= 4.3e-34))) tmp = x + (a * (t + (z * b))); else tmp = x + (z * (y + (a * b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.85e+34], N[Not[LessEqual[a, 4.3e-34]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.85 \cdot 10^{+34} \lor \neg \left(a \leq 4.3 \cdot 10^{-34}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\end{array}
\end{array}
if a < -1.85000000000000004e34 or 4.3e-34 < a Initial program 83.7%
associate-+l+83.7%
+-commutative83.7%
fma-define83.7%
associate-*l*89.7%
*-commutative89.7%
*-commutative89.7%
distribute-rgt-out94.4%
*-commutative94.4%
Simplified94.4%
Taylor expanded in y around 0 93.8%
if -1.85000000000000004e34 < a < 4.3e-34Initial program 98.9%
associate-+l+98.9%
associate-*l*94.0%
Simplified94.0%
Taylor expanded in t around 0 90.0%
+-commutative90.0%
associate-*r*95.1%
distribute-rgt-in95.9%
Simplified95.9%
Final simplification94.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -6e-73) (not (<= a 1.8e-33))) (+ x (* 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 <= -6e-73) || !(a <= 1.8e-33)) {
tmp = x + (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 <= (-6d-73)) .or. (.not. (a <= 1.8d-33))) then
tmp = x + (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 <= -6e-73) || !(a <= 1.8e-33)) {
tmp = x + (a * (t + (z * b)));
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -6e-73) or not (a <= 1.8e-33): tmp = x + (a * (t + (z * b))) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -6e-73) || !(a <= 1.8e-33)) tmp = Float64(x + 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 <= -6e-73) || ~((a <= 1.8e-33))) tmp = x + (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, -6e-73], N[Not[LessEqual[a, 1.8e-33]], $MachinePrecision]], N[(x + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{-73} \lor \neg \left(a \leq 1.8 \cdot 10^{-33}\right):\\
\;\;\;\;x + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -6e-73 or 1.80000000000000017e-33 < a Initial program 85.6%
associate-+l+85.6%
+-commutative85.6%
fma-define85.6%
associate-*l*90.1%
*-commutative90.1%
*-commutative90.1%
distribute-rgt-out94.0%
*-commutative94.0%
Simplified94.0%
Taylor expanded in y around 0 91.0%
if -6e-73 < a < 1.80000000000000017e-33Initial program 99.6%
associate-+l+99.6%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in a around 0 88.8%
Final simplification90.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.3e+15) (not (<= a 2.45e+61))) (* 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 <= -3.3e+15) || !(a <= 2.45e+61)) {
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 <= (-3.3d+15)) .or. (.not. (a <= 2.45d+61))) 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 <= -3.3e+15) || !(a <= 2.45e+61)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.3e+15) or not (a <= 2.45e+61): 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 <= -3.3e+15) || !(a <= 2.45e+61)) 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 <= -3.3e+15) || ~((a <= 2.45e+61))) 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, -3.3e+15], N[Not[LessEqual[a, 2.45e+61]], $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 -3.3 \cdot 10^{+15} \lor \neg \left(a \leq 2.45 \cdot 10^{+61}\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -3.3e15 or 2.45000000000000013e61 < a Initial program 82.4%
Taylor expanded in x around 0 75.0%
Taylor expanded in a around inf 86.5%
+-commutative86.5%
*-commutative86.5%
Simplified86.5%
if -3.3e15 < a < 2.45000000000000013e61Initial program 98.3%
associate-+l+98.3%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in a around 0 81.0%
Final simplification83.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.5e+14) (not (<= a 1.85e+148))) (* a (* z b)) (+ x (* z y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.5e+14) || !(a <= 1.85e+148)) {
tmp = a * (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 <= (-2.5d+14)) .or. (.not. (a <= 1.85d+148))) then
tmp = a * (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 <= -2.5e+14) || !(a <= 1.85e+148)) {
tmp = a * (z * b);
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.5e+14) or not (a <= 1.85e+148): tmp = a * (z * b) else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.5e+14) || !(a <= 1.85e+148)) tmp = Float64(a * 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 <= -2.5e+14) || ~((a <= 1.85e+148))) tmp = a * (z * b); else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.5e+14], N[Not[LessEqual[a, 1.85e+148]], $MachinePrecision]], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+14} \lor \neg \left(a \leq 1.85 \cdot 10^{+148}\right):\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -2.5e14 or 1.8500000000000001e148 < a Initial program 78.8%
associate-+l+78.8%
associate-*l*87.0%
Simplified87.0%
Taylor expanded in z around inf 58.5%
+-commutative58.5%
Simplified58.5%
Taylor expanded in a around inf 57.8%
*-commutative57.8%
Simplified57.8%
if -2.5e14 < a < 1.8500000000000001e148Initial program 98.5%
associate-+l+98.5%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in a around 0 76.6%
Final simplification69.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.5e+55) (not (<= a 2.45e+61))) (* a t) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.5e+55) || !(a <= 2.45e+61)) {
tmp = a * t;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-4.5d+55)) .or. (.not. (a <= 2.45d+61))) then
tmp = a * t
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.5e+55) || !(a <= 2.45e+61)) {
tmp = a * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.5e+55) or not (a <= 2.45e+61): tmp = a * t else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.5e+55) || !(a <= 2.45e+61)) tmp = Float64(a * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4.5e+55) || ~((a <= 2.45e+61))) tmp = a * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.5e+55], N[Not[LessEqual[a, 2.45e+61]], $MachinePrecision]], N[(a * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.5 \cdot 10^{+55} \lor \neg \left(a \leq 2.45 \cdot 10^{+61}\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.49999999999999998e55 or 2.45000000000000013e61 < a Initial program 80.8%
Taylor expanded in x around 0 74.9%
Taylor expanded in t around inf 42.8%
if -4.49999999999999998e55 < a < 2.45000000000000013e61Initial program 98.4%
associate-+l+98.4%
associate-*l*94.3%
Simplified94.3%
Taylor expanded in x around inf 41.5%
Final simplification42.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 91.3%
associate-+l+91.3%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in x around inf 28.0%
(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 2024113
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:alt
(! :herbie-platform default (if (< z -11820553527347888000) (+ (* z (+ (* b a) y)) (+ x (* t a))) (if (< z 47589743188364287/1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (* (+ (* b z) t) a) (+ (* z y) x)) (+ (* z (+ (* b a) y)) (+ x (* t a))))))
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b)))