
(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 15 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 -1.4e+25) (not (<= z 4e-21))) (* 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 <= -1.4e+25) || !(z <= 4e-21)) {
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 <= (-1.4d+25)) .or. (.not. (z <= 4d-21))) 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 <= -1.4e+25) || !(z <= 4e-21)) {
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 <= -1.4e+25) or not (z <= 4e-21): 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 <= -1.4e+25) || !(z <= 4e-21)) 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 <= -1.4e+25) || ~((z <= 4e-21))) 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, -1.4e+25], N[Not[LessEqual[z, 4e-21]], $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 -1.4 \cdot 10^{+25} \lor \neg \left(z \leq 4 \cdot 10^{-21}\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 < -1.4000000000000001e25 or 3.99999999999999963e-21 < z Initial program 91.0%
associate-+l+91.0%
associate-*l*82.4%
Simplified82.4%
Taylor expanded in z around inf 96.6%
+-commutative96.6%
associate-+r+96.6%
associate-/l*99.1%
distribute-lft-out99.9%
Simplified99.9%
if -1.4000000000000001e25 < z < 3.99999999999999963e-21Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.35e-54) (not (<= z 1.95e-87))) (* z (+ y (+ (* a (+ b (/ t z))) (/ x z)))) (+ x (+ (* a (* z b)) (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.35e-54) || !(z <= 1.95e-87)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = x + ((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 <= (-1.35d-54)) .or. (.not. (z <= 1.95d-87))) then
tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
else
tmp = x + ((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 <= -1.35e-54) || !(z <= 1.95e-87)) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = x + ((a * (z * b)) + (a * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.35e-54) or not (z <= 1.95e-87): tmp = z * (y + ((a * (b + (t / z))) + (x / z))) else: tmp = x + ((a * (z * b)) + (a * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.35e-54) || !(z <= 1.95e-87)) tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))); else tmp = Float64(x + 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 <= -1.35e-54) || ~((z <= 1.95e-87))) tmp = z * (y + ((a * (b + (t / z))) + (x / z))); else tmp = x + ((a * (z * b)) + (a * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.35e-54], N[Not[LessEqual[z, 1.95e-87]], $MachinePrecision]], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-54} \lor \neg \left(z \leq 1.95 \cdot 10^{-87}\right):\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot \left(z \cdot b\right) + a \cdot t\right)\\
\end{array}
\end{array}
if z < -1.35000000000000013e-54 or 1.9499999999999999e-87 < z Initial program 92.9%
associate-+l+92.9%
associate-*l*86.2%
Simplified86.2%
Taylor expanded in z around inf 95.5%
+-commutative95.5%
associate-+r+95.5%
associate-/l*97.4%
distribute-lft-out98.7%
Simplified98.7%
if -1.35000000000000013e-54 < z < 1.9499999999999999e-87Initial program 100.0%
associate-+l+100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in y around 0 93.2%
Final simplification96.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ y (* a b)))))
(if (<= z -1.2e+124)
t_1
(if (<= z -1.6e-69) (+ x (* z y)) (if (<= z 8e+67) (+ x (* a t)) t_1)))))
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 <= -1.2e+124) {
tmp = t_1;
} else if (z <= -1.6e-69) {
tmp = x + (z * y);
} else if (z <= 8e+67) {
tmp = x + (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 = z * (y + (a * b))
if (z <= (-1.2d+124)) then
tmp = t_1
else if (z <= (-1.6d-69)) then
tmp = x + (z * y)
else if (z <= 8d+67) then
tmp = x + (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 = z * (y + (a * b));
double tmp;
if (z <= -1.2e+124) {
tmp = t_1;
} else if (z <= -1.6e-69) {
tmp = x + (z * y);
} else if (z <= 8e+67) {
tmp = x + (a * t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (y + (a * b)) tmp = 0 if z <= -1.2e+124: tmp = t_1 elif z <= -1.6e-69: tmp = x + (z * y) elif z <= 8e+67: tmp = x + (a * t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(y + Float64(a * b))) tmp = 0.0 if (z <= -1.2e+124) tmp = t_1; elseif (z <= -1.6e-69) tmp = Float64(x + Float64(z * y)); elseif (z <= 8e+67) tmp = Float64(x + Float64(a * t)); else tmp = t_1; 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 <= -1.2e+124) tmp = t_1; elseif (z <= -1.6e-69) tmp = x + (z * y); elseif (z <= 8e+67) tmp = x + (a * t); else tmp = t_1; 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, -1.2e+124], t$95$1, If[LessEqual[z, -1.6e-69], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8e+67], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(y + a \cdot b\right)\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{-69}:\\
\;\;\;\;x + z \cdot y\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+67}:\\
\;\;\;\;x + a \cdot t\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.20000000000000003e124 or 7.99999999999999986e67 < z Initial program 91.0%
associate-+l+91.0%
associate-*l*79.0%
Simplified79.0%
Taylor expanded in z around inf 90.1%
+-commutative90.1%
Simplified90.1%
if -1.20000000000000003e124 < z < -1.59999999999999999e-69Initial program 92.3%
associate-+l+92.3%
associate-*l*94.8%
Simplified94.8%
Taylor expanded in a around 0 67.9%
if -1.59999999999999999e-69 < z < 7.99999999999999986e67Initial program 100.0%
associate-+l+100.0%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in z around 0 80.5%
+-commutative80.5%
Simplified80.5%
Final simplification81.9%
(FPCore (x y z t a b) :precision binary64 (if (<= z -7e+130) (* b (* z a)) (if (or (<= z -2.4e-71) (not (<= z 8e+67))) (+ x (* z y)) (+ x (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7e+130) {
tmp = b * (z * a);
} else if ((z <= -2.4e-71) || !(z <= 8e+67)) {
tmp = x + (z * y);
} 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 <= (-7d+130)) then
tmp = b * (z * a)
else if ((z <= (-2.4d-71)) .or. (.not. (z <= 8d+67))) then
tmp = x + (z * y)
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 <= -7e+130) {
tmp = b * (z * a);
} else if ((z <= -2.4e-71) || !(z <= 8e+67)) {
tmp = x + (z * y);
} else {
tmp = x + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -7e+130: tmp = b * (z * a) elif (z <= -2.4e-71) or not (z <= 8e+67): tmp = x + (z * y) else: tmp = x + (a * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7e+130) tmp = Float64(b * Float64(z * a)); elseif ((z <= -2.4e-71) || !(z <= 8e+67)) tmp = Float64(x + Float64(z * y)); 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 <= -7e+130) tmp = b * (z * a); elseif ((z <= -2.4e-71) || ~((z <= 8e+67))) tmp = x + (z * y); else tmp = x + (a * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7e+130], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -2.4e-71], N[Not[LessEqual[z, 8e+67]], $MachinePrecision]], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x + N[(a * t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{+130}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{elif}\;z \leq -2.4 \cdot 10^{-71} \lor \neg \left(z \leq 8 \cdot 10^{+67}\right):\\
\;\;\;\;x + z \cdot y\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot t\\
\end{array}
\end{array}
if z < -7.0000000000000002e130Initial program 83.6%
associate-+l+83.6%
associate-*l*78.7%
Simplified78.7%
Taylor expanded in a around inf 79.3%
Taylor expanded in b around inf 55.8%
*-commutative55.8%
associate-*l*60.8%
Simplified60.8%
if -7.0000000000000002e130 < z < -2.4e-71 or 7.99999999999999986e67 < z Initial program 94.5%
associate-+l+94.5%
associate-*l*85.9%
Simplified85.9%
Taylor expanded in a around 0 67.5%
if -2.4e-71 < z < 7.99999999999999986e67Initial program 100.0%
associate-+l+100.0%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in z around 0 80.5%
+-commutative80.5%
Simplified80.5%
Final simplification73.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1e+105) (* a (* z b)) (if (or (<= a -8.5e+34) (not (<= a 6.5e+141))) (* a t) (+ x (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1e+105) {
tmp = a * (z * b);
} else if ((a <= -8.5e+34) || !(a <= 6.5e+141)) {
tmp = a * t;
} else {
tmp = x + (z * y);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1d+105)) then
tmp = a * (z * b)
else if ((a <= (-8.5d+34)) .or. (.not. (a <= 6.5d+141))) then
tmp = a * t
else
tmp = x + (z * y)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1e+105) {
tmp = a * (z * b);
} else if ((a <= -8.5e+34) || !(a <= 6.5e+141)) {
tmp = a * t;
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1e+105: tmp = a * (z * b) elif (a <= -8.5e+34) or not (a <= 6.5e+141): tmp = a * t else: tmp = x + (z * y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1e+105) tmp = Float64(a * Float64(z * b)); elseif ((a <= -8.5e+34) || !(a <= 6.5e+141)) tmp = Float64(a * t); else tmp = Float64(x + Float64(z * y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1e+105) tmp = a * (z * b); elseif ((a <= -8.5e+34) || ~((a <= 6.5e+141))) tmp = a * t; else tmp = x + (z * y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1e+105], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[a, -8.5e+34], N[Not[LessEqual[a, 6.5e+141]], $MachinePrecision]], N[(a * t), $MachinePrecision], N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \cdot 10^{+105}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;a \leq -8.5 \cdot 10^{+34} \lor \neg \left(a \leq 6.5 \cdot 10^{+141}\right):\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -9.9999999999999994e104Initial program 84.5%
associate-+l+84.5%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in z around inf 74.2%
+-commutative74.2%
associate-+r+74.2%
associate-/l*76.8%
distribute-lft-out82.3%
Simplified82.3%
Taylor expanded in b around inf 51.5%
*-commutative51.5%
Simplified51.5%
if -9.9999999999999994e104 < a < -8.5000000000000003e34 or 6.50000000000000053e141 < a Initial program 94.6%
associate-+l+94.6%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in z around inf 70.7%
+-commutative70.7%
associate-+r+70.7%
associate-/l*72.4%
distribute-lft-out72.6%
Simplified72.6%
Taylor expanded in t around inf 54.8%
if -8.5000000000000003e34 < a < 6.50000000000000053e141Initial program 98.7%
associate-+l+98.7%
associate-*l*89.8%
Simplified89.8%
Taylor expanded in a around 0 64.3%
Final simplification60.3%
(FPCore (x y z t a b) :precision binary64 (if (<= z -8.5e+85) (* z (+ y (+ (* a (+ b (/ t z))) (/ x z)))) (+ (* b (* z a)) (+ (+ x (* z y)) (* a t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -8.5e+85) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = (b * (z * a)) + ((x + (z * y)) + (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 <= (-8.5d+85)) then
tmp = z * (y + ((a * (b + (t / z))) + (x / z)))
else
tmp = (b * (z * a)) + ((x + (z * y)) + (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 <= -8.5e+85) {
tmp = z * (y + ((a * (b + (t / z))) + (x / z)));
} else {
tmp = (b * (z * a)) + ((x + (z * y)) + (a * t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -8.5e+85: tmp = z * (y + ((a * (b + (t / z))) + (x / z))) else: tmp = (b * (z * a)) + ((x + (z * y)) + (a * t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -8.5e+85) tmp = Float64(z * Float64(y + Float64(Float64(a * Float64(b + Float64(t / z))) + Float64(x / z)))); else tmp = Float64(Float64(b * Float64(z * a)) + Float64(Float64(x + Float64(z * y)) + Float64(a * t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -8.5e+85) tmp = z * (y + ((a * (b + (t / z))) + (x / z))); else tmp = (b * (z * a)) + ((x + (z * y)) + (a * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -8.5e+85], N[(z * N[(y + N[(N[(a * N[(b + N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision] + N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+85}:\\
\;\;\;\;z \cdot \left(y + \left(a \cdot \left(b + \frac{t}{z}\right) + \frac{x}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(z \cdot a\right) + \left(\left(x + z \cdot y\right) + a \cdot t\right)\\
\end{array}
\end{array}
if z < -8.4999999999999994e85Initial program 80.2%
associate-+l+80.2%
associate-*l*78.5%
Simplified78.5%
Taylor expanded in z around inf 93.2%
+-commutative93.2%
associate-+r+93.2%
associate-/l*97.7%
distribute-lft-out99.9%
Simplified99.9%
if -8.4999999999999994e85 < z Initial program 99.0%
Final simplification99.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.3e-58) (not (<= z 7.5e+67))) (+ x (* z (+ y (* a b)))) (+ (+ x (* z y)) (* a t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.3e-58) || !(z <= 7.5e+67)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (x + (z * y)) + (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 <= (-2.3d-58)) .or. (.not. (z <= 7.5d+67))) then
tmp = x + (z * (y + (a * b)))
else
tmp = (x + (z * y)) + (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 <= -2.3e-58) || !(z <= 7.5e+67)) {
tmp = x + (z * (y + (a * b)));
} else {
tmp = (x + (z * y)) + (a * t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.3e-58) or not (z <= 7.5e+67): tmp = x + (z * (y + (a * b))) else: tmp = (x + (z * y)) + (a * t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.3e-58) || !(z <= 7.5e+67)) tmp = Float64(x + Float64(z * Float64(y + Float64(a * b)))); else tmp = Float64(Float64(x + Float64(z * y)) + Float64(a * t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.3e-58) || ~((z <= 7.5e+67))) tmp = x + (z * (y + (a * b))); else tmp = (x + (z * y)) + (a * t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.3e-58], N[Not[LessEqual[z, 7.5e+67]], $MachinePrecision]], N[(x + N[(z * N[(y + N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * y), $MachinePrecision]), $MachinePrecision] + N[(a * t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{-58} \lor \neg \left(z \leq 7.5 \cdot 10^{+67}\right):\\
\;\;\;\;x + z \cdot \left(y + a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + z \cdot y\right) + a \cdot t\\
\end{array}
\end{array}
if z < -2.2999999999999999e-58 or 7.5000000000000005e67 < z Initial program 91.2%
associate-+l+91.2%
associate-*l*83.5%
Simplified83.5%
Taylor expanded in t around 0 79.7%
+-commutative79.7%
associate-*r*90.5%
distribute-rgt-in92.9%
Simplified92.9%
if -2.2999999999999999e-58 < z < 7.5000000000000005e67Initial program 100.0%
associate-+l+100.0%
associate-*l*99.3%
Simplified99.3%
Taylor expanded in t around inf 90.5%
Final simplification91.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.7e-69) (not (<= z 2.2e+70))) (+ 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.7e-69) || !(z <= 2.2e+70)) {
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.7d-69)) .or. (.not. (z <= 2.2d+70))) 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.7e-69) || !(z <= 2.2e+70)) {
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.7e-69) or not (z <= 2.2e+70): 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.7e-69) || !(z <= 2.2e+70)) 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.7e-69) || ~((z <= 2.2e+70))) 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.7e-69], N[Not[LessEqual[z, 2.2e+70]], $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.7 \cdot 10^{-69} \lor \neg \left(z \leq 2.2 \cdot 10^{+70}\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.70000000000000004e-69 or 2.20000000000000001e70 < z Initial program 91.4%
associate-+l+91.4%
associate-*l*83.8%
Simplified83.8%
Taylor expanded in t around 0 80.1%
+-commutative80.1%
associate-*r*90.7%
distribute-rgt-in93.1%
Simplified93.1%
if -1.70000000000000004e-69 < z < 2.20000000000000001e70Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
associate-*l*99.2%
*-commutative99.2%
*-commutative99.2%
distribute-rgt-out99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in y around 0 89.4%
Final simplification91.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.5e+121) (not (<= z 1.02e+68))) (* 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 <= -3.5e+121) || !(z <= 1.02e+68)) {
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 <= (-3.5d+121)) .or. (.not. (z <= 1.02d+68))) 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 <= -3.5e+121) || !(z <= 1.02e+68)) {
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 <= -3.5e+121) or not (z <= 1.02e+68): 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 <= -3.5e+121) || !(z <= 1.02e+68)) 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 <= -3.5e+121) || ~((z <= 1.02e+68))) 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, -3.5e+121], N[Not[LessEqual[z, 1.02e+68]], $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 -3.5 \cdot 10^{+121} \lor \neg \left(z \leq 1.02 \cdot 10^{+68}\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.5e121 or 1.02e68 < z Initial program 91.3%
associate-+l+91.3%
associate-*l*79.7%
Simplified79.7%
Taylor expanded in z around inf 89.4%
+-commutative89.4%
Simplified89.4%
if -3.5e121 < z < 1.02e68Initial program 98.2%
associate-+l+98.2%
+-commutative98.2%
fma-define98.2%
associate-*l*98.2%
*-commutative98.2%
*-commutative98.2%
distribute-rgt-out99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in y around 0 86.4%
Final simplification87.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.1e+124) (* b (* z a)) (if (<= z -3.2e-83) x (if (<= z 6.5e+68) (* a t) (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.1e+124) {
tmp = b * (z * a);
} else if (z <= -3.2e-83) {
tmp = x;
} else if (z <= 6.5e+68) {
tmp = a * t;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-1.1d+124)) then
tmp = b * (z * a)
else if (z <= (-3.2d-83)) then
tmp = x
else if (z <= 6.5d+68) then
tmp = a * t
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.1e+124) {
tmp = b * (z * a);
} else if (z <= -3.2e-83) {
tmp = x;
} else if (z <= 6.5e+68) {
tmp = a * t;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.1e+124: tmp = b * (z * a) elif z <= -3.2e-83: tmp = x elif z <= 6.5e+68: tmp = a * t else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.1e+124) tmp = Float64(b * Float64(z * a)); elseif (z <= -3.2e-83) tmp = x; elseif (z <= 6.5e+68) tmp = Float64(a * t); else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.1e+124) tmp = b * (z * a); elseif (z <= -3.2e-83) tmp = x; elseif (z <= 6.5e+68) tmp = a * t; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.1e+124], N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.2e-83], x, If[LessEqual[z, 6.5e+68], N[(a * t), $MachinePrecision], N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+124}:\\
\;\;\;\;b \cdot \left(z \cdot a\right)\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-83}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+68}:\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if z < -1.1e124Initial program 83.6%
associate-+l+83.6%
associate-*l*78.7%
Simplified78.7%
Taylor expanded in a around inf 79.3%
Taylor expanded in b around inf 55.8%
*-commutative55.8%
associate-*l*60.8%
Simplified60.8%
if -1.1e124 < z < -3.2000000000000001e-83Initial program 93.0%
associate-+l+93.0%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in x around inf 43.1%
if -3.2000000000000001e-83 < z < 6.5000000000000005e68Initial program 100.0%
associate-+l+100.0%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in z around inf 64.8%
+-commutative64.8%
associate-+r+64.8%
associate-/l*58.5%
distribute-lft-out59.4%
Simplified59.4%
Taylor expanded in t around inf 51.2%
if 6.5000000000000005e68 < z Initial program 96.1%
associate-+l+96.1%
associate-*l*79.2%
Simplified79.2%
Taylor expanded in y around inf 61.2%
*-commutative61.2%
Simplified61.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -4.2e+124) (* a (* z b)) (if (<= z -1.95e-84) x (if (<= z 6.5e+67) (* a t) (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.2e+124) {
tmp = a * (z * b);
} else if (z <= -1.95e-84) {
tmp = x;
} else if (z <= 6.5e+67) {
tmp = a * t;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-4.2d+124)) then
tmp = a * (z * b)
else if (z <= (-1.95d-84)) then
tmp = x
else if (z <= 6.5d+67) then
tmp = a * t
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.2e+124) {
tmp = a * (z * b);
} else if (z <= -1.95e-84) {
tmp = x;
} else if (z <= 6.5e+67) {
tmp = a * t;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4.2e+124: tmp = a * (z * b) elif z <= -1.95e-84: tmp = x elif z <= 6.5e+67: tmp = a * t else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.2e+124) tmp = Float64(a * Float64(z * b)); elseif (z <= -1.95e-84) tmp = x; elseif (z <= 6.5e+67) tmp = Float64(a * t); else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4.2e+124) tmp = a * (z * b); elseif (z <= -1.95e-84) tmp = x; elseif (z <= 6.5e+67) tmp = a * t; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.2e+124], N[(a * N[(z * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.95e-84], x, If[LessEqual[z, 6.5e+67], N[(a * t), $MachinePrecision], N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+124}:\\
\;\;\;\;a \cdot \left(z \cdot b\right)\\
\mathbf{elif}\;z \leq -1.95 \cdot 10^{-84}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{+67}:\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if z < -4.20000000000000023e124Initial program 83.6%
associate-+l+83.6%
associate-*l*78.7%
Simplified78.7%
Taylor expanded in z around inf 94.3%
+-commutative94.3%
associate-+r+94.3%
associate-/l*97.1%
distribute-lft-out99.9%
Simplified99.9%
Taylor expanded in b around inf 55.8%
*-commutative55.8%
Simplified55.8%
if -4.20000000000000023e124 < z < -1.95000000000000011e-84Initial program 93.0%
associate-+l+93.0%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in x around inf 43.1%
if -1.95000000000000011e-84 < z < 6.4999999999999995e67Initial program 100.0%
associate-+l+100.0%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in z around inf 64.8%
+-commutative64.8%
associate-+r+64.8%
associate-/l*58.5%
distribute-lft-out59.4%
Simplified59.4%
Taylor expanded in t around inf 51.2%
if 6.4999999999999995e67 < z Initial program 96.1%
associate-+l+96.1%
associate-*l*79.2%
Simplified79.2%
Taylor expanded in y around inf 61.2%
*-commutative61.2%
Simplified61.2%
(FPCore (x y z t a b) :precision binary64 (if (<= z -5e+148) (* z y) (if (<= z -2.85e-90) x (if (<= z 2.7e+68) (* a t) (* z y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5e+148) {
tmp = z * y;
} else if (z <= -2.85e-90) {
tmp = x;
} else if (z <= 2.7e+68) {
tmp = a * t;
} else {
tmp = z * y;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-5d+148)) then
tmp = z * y
else if (z <= (-2.85d-90)) then
tmp = x
else if (z <= 2.7d+68) then
tmp = a * t
else
tmp = z * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5e+148) {
tmp = z * y;
} else if (z <= -2.85e-90) {
tmp = x;
} else if (z <= 2.7e+68) {
tmp = a * t;
} else {
tmp = z * y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -5e+148: tmp = z * y elif z <= -2.85e-90: tmp = x elif z <= 2.7e+68: tmp = a * t else: tmp = z * y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5e+148) tmp = Float64(z * y); elseif (z <= -2.85e-90) tmp = x; elseif (z <= 2.7e+68) tmp = Float64(a * t); else tmp = Float64(z * y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -5e+148) tmp = z * y; elseif (z <= -2.85e-90) tmp = x; elseif (z <= 2.7e+68) tmp = a * t; else tmp = z * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5e+148], N[(z * y), $MachinePrecision], If[LessEqual[z, -2.85e-90], x, If[LessEqual[z, 2.7e+68], N[(a * t), $MachinePrecision], N[(z * y), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{+148}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;z \leq -2.85 \cdot 10^{-90}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+68}:\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot y\\
\end{array}
\end{array}
if z < -5.00000000000000024e148 or 2.69999999999999991e68 < z Initial program 91.7%
associate-+l+91.7%
associate-*l*78.0%
Simplified78.0%
Taylor expanded in y around inf 51.7%
*-commutative51.7%
Simplified51.7%
if -5.00000000000000024e148 < z < -2.8500000000000001e-90Initial program 91.6%
associate-+l+91.6%
associate-*l*95.7%
Simplified95.7%
Taylor expanded in x around inf 41.8%
if -2.8500000000000001e-90 < z < 2.69999999999999991e68Initial program 100.0%
associate-+l+100.0%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in z around inf 64.8%
+-commutative64.8%
associate-+r+64.8%
associate-/l*58.5%
distribute-lft-out59.4%
Simplified59.4%
Taylor expanded in t around inf 51.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.8e-30) (not (<= a 6500.0))) (* 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 <= -2.8e-30) || !(a <= 6500.0)) {
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 <= (-2.8d-30)) .or. (.not. (a <= 6500.0d0))) 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 <= -2.8e-30) || !(a <= 6500.0)) {
tmp = a * (t + (z * b));
} else {
tmp = x + (z * y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.8e-30) or not (a <= 6500.0): 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 <= -2.8e-30) || !(a <= 6500.0)) 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 <= -2.8e-30) || ~((a <= 6500.0))) 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, -2.8e-30], N[Not[LessEqual[a, 6500.0]], $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 -2.8 \cdot 10^{-30} \lor \neg \left(a \leq 6500\right):\\
\;\;\;\;a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot y\\
\end{array}
\end{array}
if a < -2.79999999999999988e-30 or 6500 < a Initial program 91.5%
associate-+l+91.5%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in a around inf 96.9%
Taylor expanded in a around inf 75.6%
*-commutative75.6%
Simplified75.6%
if -2.79999999999999988e-30 < a < 6500Initial program 100.0%
associate-+l+100.0%
associate-*l*88.7%
Simplified88.7%
Taylor expanded in a around 0 70.4%
Final simplification73.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.85e+57) x (if (<= x 2.9e+53) (* a t) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.85e+57) {
tmp = x;
} else if (x <= 2.9e+53) {
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 (x <= (-2.85d+57)) then
tmp = x
else if (x <= 2.9d+53) 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 (x <= -2.85e+57) {
tmp = x;
} else if (x <= 2.9e+53) {
tmp = a * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.85e+57: tmp = x elif x <= 2.9e+53: tmp = a * t else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.85e+57) tmp = x; elseif (x <= 2.9e+53) 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 (x <= -2.85e+57) tmp = x; elseif (x <= 2.9e+53) tmp = a * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.85e+57], x, If[LessEqual[x, 2.9e+53], N[(a * t), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.85 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+53}:\\
\;\;\;\;a \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.8499999999999999e57 or 2.9000000000000002e53 < x Initial program 96.4%
associate-+l+96.4%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in x around inf 46.7%
if -2.8499999999999999e57 < x < 2.9000000000000002e53Initial program 95.2%
associate-+l+95.2%
associate-*l*90.6%
Simplified90.6%
Taylor expanded in z around inf 89.3%
+-commutative89.3%
associate-+r+89.3%
associate-/l*83.9%
distribute-lft-out85.4%
Simplified85.4%
Taylor expanded in t around inf 40.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 95.7%
associate-+l+95.7%
associate-*l*91.6%
Simplified91.6%
Taylor expanded in x around inf 24.8%
(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 2024091
(FPCore (x y z t a b)
:name "Graphics.Rasterific.CubicBezier:cachedBezierAt from Rasterific-0.6.1"
:precision binary64
:alt
(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)))