
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * 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) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * log(t))) + ((a - 0.5) * 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) - (z * log(t))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((x + y) + z) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return (((x + y) + z) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(x + y) + z) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((x + y) + z) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
(FPCore (x y z t a b) :precision binary64 (fma (+ a -0.5) b (- (+ y (+ x z)) (* z (log t)))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((a + -0.5), b, ((y + (x + z)) - (z * log(t))));
}
function code(x, y, z, t, a, b) return fma(Float64(a + -0.5), b, Float64(Float64(y + Float64(x + z)) - Float64(z * log(t)))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(a + -0.5), $MachinePrecision] * b + N[(N[(y + N[(x + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(a + -0.5, b, \left(y + \left(x + z\right)\right) - z \cdot \log t\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
associate-+l+99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (- z (* z (log t))))) (t_2 (+ y (* z (- 1.0 (log t))))))
(if (<= z -1.6e+203)
t_2
(if (<= z 1.3e+133)
(+ (+ z (+ y x)) (* b (- a 0.5)))
(if (<= z 1.75e+214)
t_1
(if (<= z 2.5e+227)
(+ (+ y x) (* (+ a -0.5) b))
(if (<= z 5e+249) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z - (z * log(t)));
double t_2 = y + (z * (1.0 - log(t)));
double tmp;
if (z <= -1.6e+203) {
tmp = t_2;
} else if (z <= 1.3e+133) {
tmp = (z + (y + x)) + (b * (a - 0.5));
} else if (z <= 1.75e+214) {
tmp = t_1;
} else if (z <= 2.5e+227) {
tmp = (y + x) + ((a + -0.5) * b);
} else if (z <= 5e+249) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = x + (z - (z * log(t)))
t_2 = y + (z * (1.0d0 - log(t)))
if (z <= (-1.6d+203)) then
tmp = t_2
else if (z <= 1.3d+133) then
tmp = (z + (y + x)) + (b * (a - 0.5d0))
else if (z <= 1.75d+214) then
tmp = t_1
else if (z <= 2.5d+227) then
tmp = (y + x) + ((a + (-0.5d0)) * b)
else if (z <= 5d+249) then
tmp = t_2
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 = x + (z - (z * Math.log(t)));
double t_2 = y + (z * (1.0 - Math.log(t)));
double tmp;
if (z <= -1.6e+203) {
tmp = t_2;
} else if (z <= 1.3e+133) {
tmp = (z + (y + x)) + (b * (a - 0.5));
} else if (z <= 1.75e+214) {
tmp = t_1;
} else if (z <= 2.5e+227) {
tmp = (y + x) + ((a + -0.5) * b);
} else if (z <= 5e+249) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z - (z * math.log(t))) t_2 = y + (z * (1.0 - math.log(t))) tmp = 0 if z <= -1.6e+203: tmp = t_2 elif z <= 1.3e+133: tmp = (z + (y + x)) + (b * (a - 0.5)) elif z <= 1.75e+214: tmp = t_1 elif z <= 2.5e+227: tmp = (y + x) + ((a + -0.5) * b) elif z <= 5e+249: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z - Float64(z * log(t)))) t_2 = Float64(y + Float64(z * Float64(1.0 - log(t)))) tmp = 0.0 if (z <= -1.6e+203) tmp = t_2; elseif (z <= 1.3e+133) tmp = Float64(Float64(z + Float64(y + x)) + Float64(b * Float64(a - 0.5))); elseif (z <= 1.75e+214) tmp = t_1; elseif (z <= 2.5e+227) tmp = Float64(Float64(y + x) + Float64(Float64(a + -0.5) * b)); elseif (z <= 5e+249) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z - (z * log(t))); t_2 = y + (z * (1.0 - log(t))); tmp = 0.0; if (z <= -1.6e+203) tmp = t_2; elseif (z <= 1.3e+133) tmp = (z + (y + x)) + (b * (a - 0.5)); elseif (z <= 1.75e+214) tmp = t_1; elseif (z <= 2.5e+227) tmp = (y + x) + ((a + -0.5) * b); elseif (z <= 5e+249) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+203], t$95$2, If[LessEqual[z, 1.3e+133], N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.75e+214], t$95$1, If[LessEqual[z, 2.5e+227], N[(N[(y + x), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5e+249], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - z \cdot \log t\right)\\
t_2 := y + z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+203}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.3 \cdot 10^{+133}:\\
\;\;\;\;\left(z + \left(y + x\right)\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{elif}\;z \leq 1.75 \cdot 10^{+214}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{+227}:\\
\;\;\;\;\left(y + x\right) + \left(a + -0.5\right) \cdot b\\
\mathbf{elif}\;z \leq 5 \cdot 10^{+249}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -1.5999999999999998e203 or 2.4999999999999998e227 < z < 4.9999999999999996e249Initial program 99.6%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in b around 0 77.2%
Taylor expanded in z around 0 77.3%
Taylor expanded in x around 0 70.2%
if -1.5999999999999998e203 < z < 1.2999999999999999e133Initial program 99.9%
add-cube-cbrt99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 95.7%
+-commutative95.7%
associate-+r+95.7%
+-commutative95.7%
Simplified95.7%
if 1.2999999999999999e133 < z < 1.75e214 or 4.9999999999999996e249 < z Initial program 99.5%
associate--l+99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
*-commutative99.6%
cancel-sign-sub-inv99.6%
distribute-rgt1-in99.5%
*-commutative99.5%
fma-def99.5%
+-commutative99.5%
unsub-neg99.5%
fma-def99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around inf 87.4%
sub-neg87.4%
+-commutative87.4%
distribute-rgt1-in87.5%
cancel-sign-sub-inv87.5%
Simplified87.5%
if 1.75e214 < z < 2.4999999999999998e227Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 84.1%
Final simplification91.9%
(FPCore (x y z t a b) :precision binary64 (if (<= (+ y x) 2e+61) (- (+ (+ x z) (* b (- a 0.5))) (* z (log t))) (fma (+ a -0.5) b y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y + x) <= 2e+61) {
tmp = ((x + z) + (b * (a - 0.5))) - (z * log(t));
} else {
tmp = fma((a + -0.5), b, y);
}
return tmp;
}
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(y + x) <= 2e+61) tmp = Float64(Float64(Float64(x + z) + Float64(b * Float64(a - 0.5))) - Float64(z * log(t))); else tmp = fma(Float64(a + -0.5), b, y); end return tmp end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(y + x), $MachinePrecision], 2e+61], N[(N[(N[(x + z), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + -0.5), $MachinePrecision] * b + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + x \leq 2 \cdot 10^{+61}:\\
\;\;\;\;\left(\left(x + z\right) + b \cdot \left(a - 0.5\right)\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a + -0.5, b, y\right)\\
\end{array}
\end{array}
if (+.f64 x y) < 1.9999999999999999e61Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around 0 86.9%
if 1.9999999999999999e61 < (+.f64 x y) Initial program 99.9%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 90.3%
Taylor expanded in x around 0 68.0%
fma-def68.0%
sub-neg68.0%
metadata-eval68.0%
Simplified68.0%
Final simplification81.7%
(FPCore (x y z t a b) :precision binary64 (- (+ (+ (+ y (+ x z)) (* -0.5 b)) (* a b)) (* z (log t))))
double code(double x, double y, double z, double t, double a, double b) {
return (((y + (x + z)) + (-0.5 * b)) + (a * b)) - (z * log(t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (((y + (x + z)) + ((-0.5d0) * b)) + (a * b)) - (z * log(t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((y + (x + z)) + (-0.5 * b)) + (a * b)) - (z * Math.log(t));
}
def code(x, y, z, t, a, b): return (((y + (x + z)) + (-0.5 * b)) + (a * b)) - (z * math.log(t))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(y + Float64(x + z)) + Float64(-0.5 * b)) + Float64(a * b)) - Float64(z * log(t))) end
function tmp = code(x, y, z, t, a, b) tmp = (((y + (x + z)) + (-0.5 * b)) + (a * b)) - (z * log(t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(y + N[(x + z), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(y + \left(x + z\right)\right) + -0.5 \cdot b\right) + a \cdot b\right) - z \cdot \log t
\end{array}
Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 99.8%
Final simplification99.8%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ y x) (- z (* z (log t)))) (* (+ a -0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((y + x) + (z - (z * log(t)))) + ((a + -0.5) * 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 = ((y + x) + (z - (z * log(t)))) + ((a + (-0.5d0)) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((y + x) + (z - (z * Math.log(t)))) + ((a + -0.5) * b);
}
def code(x, y, z, t, a, b): return ((y + x) + (z - (z * math.log(t)))) + ((a + -0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(y + x) + Float64(z - Float64(z * log(t)))) + Float64(Float64(a + -0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((y + x) + (z - (z * log(t)))) + ((a + -0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(y + x), $MachinePrecision] + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(y + x\right) + \left(z - z \cdot \log t\right)\right) + \left(a + -0.5\right) \cdot b
\end{array}
Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y z t a b) :precision binary64 (+ (- (+ z (+ y x)) (* z (log t))) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return ((z + (y + x)) - (z * log(t))) + (b * (a - 0.5));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((z + (y + x)) - (z * log(t))) + (b * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((z + (y + x)) - (z * Math.log(t))) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return ((z + (y + x)) - (z * math.log(t))) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z + Float64(y + x)) - Float64(z * log(t))) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = ((z + (y + x)) - (z * log(t))) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + \left(y + x\right)\right) - z \cdot \log t\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.8%
Final simplification99.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -2.2e+205)
(+ y t_1)
(if (<= z 5.15e+101) (+ (+ z (+ y x)) (* b (- a 0.5))) (+ (+ y x) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - log(t));
double tmp;
if (z <= -2.2e+205) {
tmp = y + t_1;
} else if (z <= 5.15e+101) {
tmp = (z + (y + x)) + (b * (a - 0.5));
} else {
tmp = (y + x) + 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 * (1.0d0 - log(t))
if (z <= (-2.2d+205)) then
tmp = y + t_1
else if (z <= 5.15d+101) then
tmp = (z + (y + x)) + (b * (a - 0.5d0))
else
tmp = (y + x) + 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 * (1.0 - Math.log(t));
double tmp;
if (z <= -2.2e+205) {
tmp = y + t_1;
} else if (z <= 5.15e+101) {
tmp = (z + (y + x)) + (b * (a - 0.5));
} else {
tmp = (y + x) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) tmp = 0 if z <= -2.2e+205: tmp = y + t_1 elif z <= 5.15e+101: tmp = (z + (y + x)) + (b * (a - 0.5)) else: tmp = (y + x) + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - log(t))) tmp = 0.0 if (z <= -2.2e+205) tmp = Float64(y + t_1); elseif (z <= 5.15e+101) tmp = Float64(Float64(z + Float64(y + x)) + Float64(b * Float64(a - 0.5))); else tmp = Float64(Float64(y + x) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - log(t)); tmp = 0.0; if (z <= -2.2e+205) tmp = y + t_1; elseif (z <= 5.15e+101) tmp = (z + (y + x)) + (b * (a - 0.5)); else tmp = (y + x) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.2e+205], N[(y + t$95$1), $MachinePrecision], If[LessEqual[z, 5.15e+101], N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y + x), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{+205}:\\
\;\;\;\;y + t_1\\
\mathbf{elif}\;z \leq 5.15 \cdot 10^{+101}:\\
\;\;\;\;\left(z + \left(y + x\right)\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y + x\right) + t_1\\
\end{array}
\end{array}
if z < -2.1999999999999998e205Initial program 99.7%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in b around 0 73.0%
Taylor expanded in z around 0 73.0%
Taylor expanded in x around 0 64.5%
if -2.1999999999999998e205 < z < 5.14999999999999998e101Initial program 99.9%
add-cube-cbrt99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 96.9%
+-commutative96.9%
associate-+r+96.9%
+-commutative96.9%
Simplified96.9%
if 5.14999999999999998e101 < z Initial program 99.6%
associate--l+99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
*-commutative99.6%
cancel-sign-sub-inv99.6%
distribute-rgt1-in99.6%
*-commutative99.6%
fma-def99.6%
+-commutative99.6%
unsub-neg99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in b around 0 87.0%
Final simplification92.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= z -1.08e+220)
(- (+ z t_1) (* z (log t)))
(if (<= z 5.2e+101)
(+ (+ z (+ y x)) t_1)
(+ (+ y x) (* z (- 1.0 (log t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if (z <= -1.08e+220) {
tmp = (z + t_1) - (z * log(t));
} else if (z <= 5.2e+101) {
tmp = (z + (y + x)) + t_1;
} else {
tmp = (y + x) + (z * (1.0 - log(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 = b * (a - 0.5d0)
if (z <= (-1.08d+220)) then
tmp = (z + t_1) - (z * log(t))
else if (z <= 5.2d+101) then
tmp = (z + (y + x)) + t_1
else
tmp = (y + x) + (z * (1.0d0 - log(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 = b * (a - 0.5);
double tmp;
if (z <= -1.08e+220) {
tmp = (z + t_1) - (z * Math.log(t));
} else if (z <= 5.2e+101) {
tmp = (z + (y + x)) + t_1;
} else {
tmp = (y + x) + (z * (1.0 - Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if z <= -1.08e+220: tmp = (z + t_1) - (z * math.log(t)) elif z <= 5.2e+101: tmp = (z + (y + x)) + t_1 else: tmp = (y + x) + (z * (1.0 - math.log(t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (z <= -1.08e+220) tmp = Float64(Float64(z + t_1) - Float64(z * log(t))); elseif (z <= 5.2e+101) tmp = Float64(Float64(z + Float64(y + x)) + t_1); else tmp = Float64(Float64(y + x) + Float64(z * Float64(1.0 - log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if (z <= -1.08e+220) tmp = (z + t_1) - (z * log(t)); elseif (z <= 5.2e+101) tmp = (z + (y + x)) + t_1; else tmp = (y + x) + (z * (1.0 - log(t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.08e+220], N[(N[(z + t$95$1), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e+101], N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(y + x), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;z \leq -1.08 \cdot 10^{+220}:\\
\;\;\;\;\left(z + t_1\right) - z \cdot \log t\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+101}:\\
\;\;\;\;\left(z + \left(y + x\right)\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;\left(y + x\right) + z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if z < -1.08e220Initial program 99.7%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in y around 0 88.2%
Taylor expanded in x around 0 83.4%
if -1.08e220 < z < 5.2e101Initial program 99.9%
add-cube-cbrt99.9%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 95.9%
+-commutative95.9%
associate-+r+95.9%
+-commutative95.9%
Simplified95.9%
if 5.2e101 < z Initial program 99.6%
associate--l+99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
*-commutative99.6%
cancel-sign-sub-inv99.6%
distribute-rgt1-in99.6%
*-commutative99.6%
fma-def99.6%
+-commutative99.6%
unsub-neg99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in b around 0 87.0%
Final simplification93.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (- 1.0 (log t)))))
(if (<= z -1.6e+271)
t_1
(if (<= z 1.85e+133) (+ (+ z (+ y x)) (* b (- a 0.5))) (+ x t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (1.0 - log(t));
double tmp;
if (z <= -1.6e+271) {
tmp = t_1;
} else if (z <= 1.85e+133) {
tmp = (z + (y + x)) + (b * (a - 0.5));
} else {
tmp = x + 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 * (1.0d0 - log(t))
if (z <= (-1.6d+271)) then
tmp = t_1
else if (z <= 1.85d+133) then
tmp = (z + (y + x)) + (b * (a - 0.5d0))
else
tmp = x + 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 * (1.0 - Math.log(t));
double tmp;
if (z <= -1.6e+271) {
tmp = t_1;
} else if (z <= 1.85e+133) {
tmp = (z + (y + x)) + (b * (a - 0.5));
} else {
tmp = x + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (1.0 - math.log(t)) tmp = 0 if z <= -1.6e+271: tmp = t_1 elif z <= 1.85e+133: tmp = (z + (y + x)) + (b * (a - 0.5)) else: tmp = x + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(1.0 - log(t))) tmp = 0.0 if (z <= -1.6e+271) tmp = t_1; elseif (z <= 1.85e+133) tmp = Float64(Float64(z + Float64(y + x)) + Float64(b * Float64(a - 0.5))); else tmp = Float64(x + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (1.0 - log(t)); tmp = 0.0; if (z <= -1.6e+271) tmp = t_1; elseif (z <= 1.85e+133) tmp = (z + (y + x)) + (b * (a - 0.5)); else tmp = x + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.6e+271], t$95$1, If[LessEqual[z, 1.85e+133], N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -1.6 \cdot 10^{+271}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{+133}:\\
\;\;\;\;\left(z + \left(y + x\right)\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + t_1\\
\end{array}
\end{array}
if z < -1.6000000000000001e271Initial program 99.5%
associate--l+99.0%
sub-neg99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in a around 0 99.5%
Taylor expanded in z around inf 88.1%
if -1.6000000000000001e271 < z < 1.85000000000000012e133Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 93.2%
+-commutative93.2%
associate-+r+93.2%
+-commutative93.2%
Simplified93.2%
if 1.85000000000000012e133 < z Initial program 99.6%
associate--l+99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
*-commutative99.6%
cancel-sign-sub-inv99.6%
distribute-rgt1-in99.6%
*-commutative99.6%
fma-def99.6%
+-commutative99.6%
unsub-neg99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 76.4%
Final simplification90.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.5e+271)
(* z (- 1.0 (log t)))
(if (<= z 5.8e+132)
(+ (+ z (+ y x)) (* b (- a 0.5)))
(+ x (- z (* z (log t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.5e+271) {
tmp = z * (1.0 - log(t));
} else if (z <= 5.8e+132) {
tmp = (z + (y + x)) + (b * (a - 0.5));
} else {
tmp = x + (z - (z * log(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.5d+271)) then
tmp = z * (1.0d0 - log(t))
else if (z <= 5.8d+132) then
tmp = (z + (y + x)) + (b * (a - 0.5d0))
else
tmp = x + (z - (z * log(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.5e+271) {
tmp = z * (1.0 - Math.log(t));
} else if (z <= 5.8e+132) {
tmp = (z + (y + x)) + (b * (a - 0.5));
} else {
tmp = x + (z - (z * Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.5e+271: tmp = z * (1.0 - math.log(t)) elif z <= 5.8e+132: tmp = (z + (y + x)) + (b * (a - 0.5)) else: tmp = x + (z - (z * math.log(t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.5e+271) tmp = Float64(z * Float64(1.0 - log(t))); elseif (z <= 5.8e+132) tmp = Float64(Float64(z + Float64(y + x)) + Float64(b * Float64(a - 0.5))); else tmp = Float64(x + Float64(z - Float64(z * log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.5e+271) tmp = z * (1.0 - log(t)); elseif (z <= 5.8e+132) tmp = (z + (y + x)) + (b * (a - 0.5)); else tmp = x + (z - (z * log(t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.5e+271], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e+132], N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+271}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{+132}:\\
\;\;\;\;\left(z + \left(y + x\right)\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(z - z \cdot \log t\right)\\
\end{array}
\end{array}
if z < -1.5e271Initial program 99.5%
associate--l+99.0%
sub-neg99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in a around 0 99.5%
Taylor expanded in z around inf 88.1%
if -1.5e271 < z < 5.7999999999999997e132Initial program 99.9%
add-cube-cbrt99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 93.2%
+-commutative93.2%
associate-+r+93.2%
+-commutative93.2%
Simplified93.2%
if 5.7999999999999997e132 < z Initial program 99.6%
associate--l+99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
*-commutative99.6%
cancel-sign-sub-inv99.6%
distribute-rgt1-in99.6%
*-commutative99.6%
fma-def99.6%
+-commutative99.6%
unsub-neg99.6%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in z around inf 76.4%
sub-neg76.4%
+-commutative76.4%
distribute-rgt1-in76.4%
cancel-sign-sub-inv76.4%
Simplified76.4%
Final simplification90.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.5e+271) (not (<= z 4.5e+235))) (* z (- 1.0 (log t))) (+ (+ z (+ y x)) (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.5e+271) || !(z <= 4.5e+235)) {
tmp = z * (1.0 - log(t));
} else {
tmp = (z + (y + x)) + (b * (a - 0.5));
}
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.5d+271)) .or. (.not. (z <= 4.5d+235))) then
tmp = z * (1.0d0 - log(t))
else
tmp = (z + (y + x)) + (b * (a - 0.5d0))
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.5e+271) || !(z <= 4.5e+235)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = (z + (y + x)) + (b * (a - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.5e+271) or not (z <= 4.5e+235): tmp = z * (1.0 - math.log(t)) else: tmp = (z + (y + x)) + (b * (a - 0.5)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.5e+271) || !(z <= 4.5e+235)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(Float64(z + Float64(y + x)) + Float64(b * Float64(a - 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.5e+271) || ~((z <= 4.5e+235))) tmp = z * (1.0 - log(t)); else tmp = (z + (y + x)) + (b * (a - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.5e+271], N[Not[LessEqual[z, 4.5e+235]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+271} \lor \neg \left(z \leq 4.5 \cdot 10^{+235}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \left(y + x\right)\right) + b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if z < -1.5e271 or 4.5e235 < z Initial program 99.4%
associate--l+99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in a around 0 99.4%
Taylor expanded in z around inf 85.7%
if -1.5e271 < z < 4.5e235Initial program 99.9%
add-cube-cbrt99.7%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 88.7%
+-commutative88.7%
associate-+r+88.7%
+-commutative88.7%
Simplified88.7%
Final simplification88.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= (+ y x) -1e-98)
(+ x (* a b))
(if (<= (+ y x) 1e+61)
t_1
(if (<= (+ y x) 9e+135) (+ y x) (if (<= (+ y x) 5e+185) t_1 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((y + x) <= -1e-98) {
tmp = x + (a * b);
} else if ((y + x) <= 1e+61) {
tmp = t_1;
} else if ((y + x) <= 9e+135) {
tmp = y + x;
} else if ((y + x) <= 5e+185) {
tmp = t_1;
} else {
tmp = 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((y + x) <= (-1d-98)) then
tmp = x + (a * b)
else if ((y + x) <= 1d+61) then
tmp = t_1
else if ((y + x) <= 9d+135) then
tmp = y + x
else if ((y + x) <= 5d+185) then
tmp = t_1
else
tmp = y
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 = b * (a - 0.5);
double tmp;
if ((y + x) <= -1e-98) {
tmp = x + (a * b);
} else if ((y + x) <= 1e+61) {
tmp = t_1;
} else if ((y + x) <= 9e+135) {
tmp = y + x;
} else if ((y + x) <= 5e+185) {
tmp = t_1;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (y + x) <= -1e-98: tmp = x + (a * b) elif (y + x) <= 1e+61: tmp = t_1 elif (y + x) <= 9e+135: tmp = y + x elif (y + x) <= 5e+185: tmp = t_1 else: tmp = y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (Float64(y + x) <= -1e-98) tmp = Float64(x + Float64(a * b)); elseif (Float64(y + x) <= 1e+61) tmp = t_1; elseif (Float64(y + x) <= 9e+135) tmp = Float64(y + x); elseif (Float64(y + x) <= 5e+185) tmp = t_1; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((y + x) <= -1e-98) tmp = x + (a * b); elseif ((y + x) <= 1e+61) tmp = t_1; elseif ((y + x) <= 9e+135) tmp = y + x; elseif ((y + x) <= 5e+185) tmp = t_1; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(y + x), $MachinePrecision], -1e-98], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(y + x), $MachinePrecision], 1e+61], t$95$1, If[LessEqual[N[(y + x), $MachinePrecision], 9e+135], N[(y + x), $MachinePrecision], If[LessEqual[N[(y + x), $MachinePrecision], 5e+185], t$95$1, y]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;y + x \leq -1 \cdot 10^{-98}:\\
\;\;\;\;x + a \cdot b\\
\mathbf{elif}\;y + x \leq 10^{+61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y + x \leq 9 \cdot 10^{+135}:\\
\;\;\;\;y + x\\
\mathbf{elif}\;y + x \leq 5 \cdot 10^{+185}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if (+.f64 x y) < -9.99999999999999939e-99Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 58.3%
if -9.99999999999999939e-99 < (+.f64 x y) < 9.99999999999999949e60 or 9.00000000000000014e135 < (+.f64 x y) < 4.9999999999999999e185Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in b around inf 70.6%
if 9.99999999999999949e60 < (+.f64 x y) < 9.00000000000000014e135Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 62.9%
if 4.9999999999999999e185 < (+.f64 x y) Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in y around inf 41.1%
Final simplification58.6%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -1e+196) (not (<= t_1 5e+190))) t_1 (+ y x))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+196) || !(t_1 <= 5e+190)) {
tmp = t_1;
} else {
tmp = y + 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-1d+196)) .or. (.not. (t_1 <= 5d+190))) then
tmp = t_1
else
tmp = y + x
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 = b * (a - 0.5);
double tmp;
if ((t_1 <= -1e+196) || !(t_1 <= 5e+190)) {
tmp = t_1;
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -1e+196) or not (t_1 <= 5e+190): tmp = t_1 else: tmp = y + x return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -1e+196) || !(t_1 <= 5e+190)) tmp = t_1; else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((t_1 <= -1e+196) || ~((t_1 <= 5e+190))) tmp = t_1; else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+196], N[Not[LessEqual[t$95$1, 5e+190]], $MachinePrecision]], t$95$1, N[(y + x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+196} \lor \neg \left(t_1 \leq 5 \cdot 10^{+190}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -9.9999999999999995e195 or 5.00000000000000036e190 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.9%
Taylor expanded in b around inf 87.2%
if -9.9999999999999995e195 < (*.f64 (-.f64 a 1/2) b) < 5.00000000000000036e190Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 59.2%
Final simplification68.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -2.6e+57)
x
(if (<= x -2.4e-220)
(* a b)
(if (<= x 7.2e-136) y (if (<= x 2e+41) (* a b) y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.6e+57) {
tmp = x;
} else if (x <= -2.4e-220) {
tmp = a * b;
} else if (x <= 7.2e-136) {
tmp = y;
} else if (x <= 2e+41) {
tmp = a * b;
} else {
tmp = 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 (x <= (-2.6d+57)) then
tmp = x
else if (x <= (-2.4d-220)) then
tmp = a * b
else if (x <= 7.2d-136) then
tmp = y
else if (x <= 2d+41) then
tmp = a * b
else
tmp = 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 (x <= -2.6e+57) {
tmp = x;
} else if (x <= -2.4e-220) {
tmp = a * b;
} else if (x <= 7.2e-136) {
tmp = y;
} else if (x <= 2e+41) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.6e+57: tmp = x elif x <= -2.4e-220: tmp = a * b elif x <= 7.2e-136: tmp = y elif x <= 2e+41: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.6e+57) tmp = x; elseif (x <= -2.4e-220) tmp = Float64(a * b); elseif (x <= 7.2e-136) tmp = y; elseif (x <= 2e+41) tmp = Float64(a * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.6e+57) tmp = x; elseif (x <= -2.4e-220) tmp = a * b; elseif (x <= 7.2e-136) tmp = y; elseif (x <= 2e+41) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.6e+57], x, If[LessEqual[x, -2.4e-220], N[(a * b), $MachinePrecision], If[LessEqual[x, 7.2e-136], y, If[LessEqual[x, 2e+41], N[(a * b), $MachinePrecision], y]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{+57}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-220}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-136}:\\
\;\;\;\;y\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+41}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -2.6e57Initial program 99.9%
associate--l+100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
+-commutative100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
distribute-rgt1-in100.0%
*-commutative100.0%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 56.5%
if -2.6e57 < x < -2.4000000000000001e-220 or 7.1999999999999996e-136 < x < 2.00000000000000001e41Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in a around inf 31.1%
*-commutative31.1%
Simplified31.1%
if -2.4000000000000001e-220 < x < 7.1999999999999996e-136 or 2.00000000000000001e41 < x Initial program 99.9%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 99.9%
Taylor expanded in y around inf 25.1%
Final simplification36.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.2e-62) (not (<= b 3.4e-145))) (+ x (* b (- a 0.5))) (+ y x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.2e-62) || !(b <= 3.4e-145)) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + 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 ((b <= (-2.2d-62)) .or. (.not. (b <= 3.4d-145))) then
tmp = x + (b * (a - 0.5d0))
else
tmp = y + 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 ((b <= -2.2e-62) || !(b <= 3.4e-145)) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.2e-62) or not (b <= 3.4e-145): tmp = x + (b * (a - 0.5)) else: tmp = y + x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.2e-62) || !(b <= 3.4e-145)) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(y + x); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.2e-62) || ~((b <= 3.4e-145))) tmp = x + (b * (a - 0.5)); else tmp = y + x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.2e-62], N[Not[LessEqual[b, 3.4e-145]], $MachinePrecision]], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.2 \cdot 10^{-62} \lor \neg \left(b \leq 3.4 \cdot 10^{-145}\right):\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + x\\
\end{array}
\end{array}
if b < -2.20000000000000017e-62 or 3.3999999999999999e-145 < b Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 73.2%
if -2.20000000000000017e-62 < b < 3.3999999999999999e-145Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 70.0%
Final simplification72.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ y x) 2e-19) (+ x t_1) (+ y t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((y + x) <= 2e-19) {
tmp = x + t_1;
} else {
tmp = y + 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 = b * (a - 0.5d0)
if ((y + x) <= 2d-19) then
tmp = x + t_1
else
tmp = y + 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 = b * (a - 0.5);
double tmp;
if ((y + x) <= 2e-19) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (y + x) <= 2e-19: tmp = x + t_1 else: tmp = y + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (Float64(y + x) <= 2e-19) tmp = Float64(x + t_1); else tmp = Float64(y + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a - 0.5); tmp = 0.0; if ((y + x) <= 2e-19) tmp = x + t_1; else tmp = y + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(y + x), $MachinePrecision], 2e-19], N[(x + t$95$1), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;y + x \leq 2 \cdot 10^{-19}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if (+.f64 x y) < 2e-19Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around inf 67.4%
if 2e-19 < (+.f64 x y) Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 82.7%
Taylor expanded in x around 0 63.7%
Final simplification66.1%
(FPCore (x y z t a b) :precision binary64 (+ (+ (* -0.5 b) (+ y x)) (* a b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((-0.5 * b) + (y + x)) + (a * 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 = (((-0.5d0) * b) + (y + x)) + (a * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((-0.5 * b) + (y + x)) + (a * b);
}
def code(x, y, z, t, a, b): return ((-0.5 * b) + (y + x)) + (a * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(-0.5 * b) + Float64(y + x)) + Float64(a * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((-0.5 * b) + (y + x)) + (a * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(-0.5 * b), $MachinePrecision] + N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(-0.5 \cdot b + \left(y + x\right)\right) + a \cdot b
\end{array}
Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in z around 0 82.1%
Final simplification82.1%
(FPCore (x y z t a b) :precision binary64 (+ (+ z (+ y x)) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return (z + (y + x)) + (b * (a - 0.5));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (z + (y + x)) + (b * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (z + (y + x)) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return (z + (y + x)) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(z + Float64(y + x)) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = (z + (y + x)) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z + N[(y + x), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z + \left(y + x\right)\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.8%
add-cube-cbrt99.6%
pow399.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 82.5%
+-commutative82.5%
associate-+r+82.5%
+-commutative82.5%
Simplified82.5%
Final simplification82.5%
(FPCore (x y z t a b) :precision binary64 (+ (+ y x) (* (+ a -0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (y + x) + ((a + -0.5) * 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 = (y + x) + ((a + (-0.5d0)) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (y + x) + ((a + -0.5) * b);
}
def code(x, y, z, t, a, b): return (y + x) + ((a + -0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(y + x) + Float64(Float64(a + -0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (y + x) + ((a + -0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + x), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y + x\right) + \left(a + -0.5\right) \cdot b
\end{array}
Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 82.1%
Final simplification82.1%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.65e-23) x (if (<= x -8e-222) (* -0.5 b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.65e-23) {
tmp = x;
} else if (x <= -8e-222) {
tmp = -0.5 * b;
} else {
tmp = 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 (x <= (-2.65d-23)) then
tmp = x
else if (x <= (-8d-222)) then
tmp = (-0.5d0) * b
else
tmp = 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 (x <= -2.65e-23) {
tmp = x;
} else if (x <= -8e-222) {
tmp = -0.5 * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.65e-23: tmp = x elif x <= -8e-222: tmp = -0.5 * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.65e-23) tmp = x; elseif (x <= -8e-222) tmp = Float64(-0.5 * b); else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.65e-23) tmp = x; elseif (x <= -8e-222) tmp = -0.5 * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.65e-23], x, If[LessEqual[x, -8e-222], N[(-0.5 * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.65 \cdot 10^{-23}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-222}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -2.65000000000000021e-23Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 48.2%
if -2.65000000000000021e-23 < x < -8.00000000000000038e-222Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in b around inf 52.6%
Taylor expanded in a around 0 28.3%
*-commutative28.3%
Simplified28.3%
if -8.00000000000000038e-222 < x Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in y around inf 24.4%
Final simplification33.1%
(FPCore (x y z t a b) :precision binary64 (if (<= b -8e+190) (* a b) (if (<= b 6.6e+65) (+ y x) (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8e+190) {
tmp = a * b;
} else if (b <= 6.6e+65) {
tmp = y + x;
} else {
tmp = a * b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-8d+190)) then
tmp = a * b
else if (b <= 6.6d+65) then
tmp = y + x
else
tmp = a * b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8e+190) {
tmp = a * b;
} else if (b <= 6.6e+65) {
tmp = y + x;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -8e+190: tmp = a * b elif b <= 6.6e+65: tmp = y + x else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -8e+190) tmp = Float64(a * b); elseif (b <= 6.6e+65) tmp = Float64(y + x); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -8e+190) tmp = a * b; elseif (b <= 6.6e+65) tmp = y + x; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -8e+190], N[(a * b), $MachinePrecision], If[LessEqual[b, 6.6e+65], N[(y + x), $MachinePrecision], N[(a * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+190}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;b \leq 6.6 \cdot 10^{+65}:\\
\;\;\;\;y + x\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if b < -8.0000000000000006e190 or 6.60000000000000046e65 < b Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 99.9%
Taylor expanded in a around inf 54.9%
*-commutative54.9%
Simplified54.9%
if -8.0000000000000006e190 < b < 6.60000000000000046e65Initial program 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 56.9%
Final simplification56.3%
(FPCore (x y z t a b) :precision binary64 (if (<= x -3.9e-75) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.9e-75) {
tmp = x;
} else {
tmp = 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 (x <= (-3.9d-75)) then
tmp = x
else
tmp = 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 (x <= -3.9e-75) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -3.9e-75: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -3.9e-75) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -3.9e-75) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3.9e-75], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.9 \cdot 10^{-75}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -3.9000000000000001e-75Initial program 99.9%
associate--l+99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
distribute-rgt1-in99.9%
*-commutative99.9%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 45.0%
if -3.9000000000000001e-75 < x Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 99.8%
Taylor expanded in y around inf 25.0%
Final simplification32.5%
(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 99.8%
associate--l+99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
distribute-rgt1-in99.8%
*-commutative99.8%
fma-def99.8%
+-commutative99.8%
unsub-neg99.8%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 25.4%
Final simplification25.4%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - pow(log(t), 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * 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) + (((1.0d0 - (log(t) ** 2.0d0)) * z) / (1.0d0 + log(t)))) + ((a - 0.5d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (((1.0 - Math.pow(Math.log(t), 2.0)) * z) / (1.0 + Math.log(t)))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return ((x + y) + (((1.0 - math.pow(math.log(t), 2.0)) * z) / (1.0 + math.log(t)))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + y) + Float64(Float64(Float64(1.0 - (log(t) ^ 2.0)) * z) / Float64(1.0 + log(t)))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + y) + (((1.0 - (log(t) ^ 2.0)) * z) / (1.0 + log(t)))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(N[(N[(1.0 - N[Power[N[Log[t], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] / N[(1.0 + N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y\right) + \frac{\left(1 - {\log t}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b
\end{array}
herbie shell --seed 2023199
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(+ (+ (+ x y) (/ (* (- 1.0 (pow (log t) 2.0)) z) (+ 1.0 (log t)))) (* (- a 0.5) b))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))