
(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 15 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 (+ (+ (+ x y) (- z (* z (log t)))) (+ (* b a) (* b -0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (z - (z * log(t)))) + ((b * a) + (b * -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 = ((x + y) + (z - (z * log(t)))) + ((b * a) + (b * (-0.5d0)))
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)))) + ((b * a) + (b * -0.5));
}
def code(x, y, z, t, a, b): return ((x + y) + (z - (z * math.log(t)))) + ((b * a) + (b * -0.5))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + y) + Float64(z - Float64(z * log(t)))) + Float64(Float64(b * a) + Float64(b * -0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + y) + (z - (z * log(t)))) + ((b * a) + (b * -0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b * a), $MachinePrecision] + N[(b * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(b \cdot a + b \cdot -0.5\right)
\end{array}
Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
*-commutative99.9%
distribute-lft-in99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -7e+61) (not (<= a 1.4e+95))) (+ (* b a) (+ (+ x y) z)) (+ (+ (+ x y) (- z (* z (log t)))) (* b -0.5))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7e+61) || !(a <= 1.4e+95)) {
tmp = (b * a) + ((x + y) + z);
} else {
tmp = ((x + y) + (z - (z * log(t)))) + (b * -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 ((a <= (-7d+61)) .or. (.not. (a <= 1.4d+95))) then
tmp = (b * a) + ((x + y) + z)
else
tmp = ((x + y) + (z - (z * log(t)))) + (b * (-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 ((a <= -7e+61) || !(a <= 1.4e+95)) {
tmp = (b * a) + ((x + y) + z);
} else {
tmp = ((x + y) + (z - (z * Math.log(t)))) + (b * -0.5);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -7e+61) or not (a <= 1.4e+95): tmp = (b * a) + ((x + y) + z) else: tmp = ((x + y) + (z - (z * math.log(t)))) + (b * -0.5) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -7e+61) || !(a <= 1.4e+95)) tmp = Float64(Float64(b * a) + Float64(Float64(x + y) + z)); else tmp = Float64(Float64(Float64(x + y) + Float64(z - Float64(z * log(t)))) + Float64(b * -0.5)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -7e+61) || ~((a <= 1.4e+95))) tmp = (b * a) + ((x + y) + z); else tmp = ((x + y) + (z - (z * log(t)))) + (b * -0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7e+61], N[Not[LessEqual[a, 1.4e+95]], $MachinePrecision]], N[(N[(b * a), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + y), $MachinePrecision] + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * -0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+61} \lor \neg \left(a \leq 1.4 \cdot 10^{+95}\right):\\
\;\;\;\;b \cdot a + \left(\left(x + y\right) + z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + y\right) + \left(z - z \cdot \log t\right)\right) + b \cdot -0.5\\
\end{array}
\end{array}
if a < -7.00000000000000036e61 or 1.3999999999999999e95 < a Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
add-cube-cbrt99.6%
pow399.6%
Applied egg-rr99.6%
Taylor expanded in z around 0 85.1%
Taylor expanded in a around inf 85.1%
*-commutative85.1%
Simplified85.1%
if -7.00000000000000036e61 < a < 1.3999999999999999e95Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in a around 0 96.7%
Final simplification92.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x y) (- z (* z (log t))))))
(if (or (<= a -2.15e+29) (not (<= a 2.4e-7)))
(+ t_1 (* b a))
(+ t_1 (* b -0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + y) + (z - (z * log(t)));
double tmp;
if ((a <= -2.15e+29) || !(a <= 2.4e-7)) {
tmp = t_1 + (b * a);
} else {
tmp = t_1 + (b * -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) :: t_1
real(8) :: tmp
t_1 = (x + y) + (z - (z * log(t)))
if ((a <= (-2.15d+29)) .or. (.not. (a <= 2.4d-7))) then
tmp = t_1 + (b * a)
else
tmp = t_1 + (b * (-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 t_1 = (x + y) + (z - (z * Math.log(t)));
double tmp;
if ((a <= -2.15e+29) || !(a <= 2.4e-7)) {
tmp = t_1 + (b * a);
} else {
tmp = t_1 + (b * -0.5);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + y) + (z - (z * math.log(t))) tmp = 0 if (a <= -2.15e+29) or not (a <= 2.4e-7): tmp = t_1 + (b * a) else: tmp = t_1 + (b * -0.5) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + y) + Float64(z - Float64(z * log(t)))) tmp = 0.0 if ((a <= -2.15e+29) || !(a <= 2.4e-7)) tmp = Float64(t_1 + Float64(b * a)); else tmp = Float64(t_1 + Float64(b * -0.5)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + y) + (z - (z * log(t))); tmp = 0.0; if ((a <= -2.15e+29) || ~((a <= 2.4e-7))) tmp = t_1 + (b * a); else tmp = t_1 + (b * -0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -2.15e+29], N[Not[LessEqual[a, 2.4e-7]], $MachinePrecision]], N[(t$95$1 + N[(b * a), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(b * -0.5), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + \left(z - z \cdot \log t\right)\\
\mathbf{if}\;a \leq -2.15 \cdot 10^{+29} \lor \neg \left(a \leq 2.4 \cdot 10^{-7}\right):\\
\;\;\;\;t_1 + b \cdot a\\
\mathbf{else}:\\
\;\;\;\;t_1 + b \cdot -0.5\\
\end{array}
\end{array}
if a < -2.1500000000000001e29 or 2.39999999999999979e-7 < a Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in a around inf 99.9%
*-commutative80.6%
Simplified99.9%
if -2.1500000000000001e29 < a < 2.39999999999999979e-7Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in a around 0 98.8%
Final simplification99.3%
(FPCore (x y z t a b) :precision binary64 (+ (+ (+ x y) (* z (- 1.0 (log t)))) (* b (+ a -0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return ((x + y) + (z * (1.0 - 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 = ((x + y) + (z * (1.0d0 - 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 ((x + y) + (z * (1.0 - Math.log(t)))) + (b * (a + -0.5));
}
def code(x, y, z, t, a, b): return ((x + y) + (z * (1.0 - math.log(t)))) + (b * (a + -0.5))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x + y) + Float64(z * Float64(1.0 - log(t)))) + Float64(b * Float64(a + -0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = ((x + y) + (z * (1.0 - log(t)))) + (b * (a + -0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + y), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + y\right) + z \cdot \left(1 - \log t\right)\right) + b \cdot \left(a + -0.5\right)
\end{array}
Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x y) z)))
(if (<= b -3.7e+43)
(+ (* b (+ a -0.5)) t_1)
(if (<= b 3e+17)
(- (+ y (+ x z)) (* z (log t)))
(+ (+ (* b a) (* b -0.5)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + y) + z;
double tmp;
if (b <= -3.7e+43) {
tmp = (b * (a + -0.5)) + t_1;
} else if (b <= 3e+17) {
tmp = (y + (x + z)) - (z * log(t));
} else {
tmp = ((b * a) + (b * -0.5)) + 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 = (x + y) + z
if (b <= (-3.7d+43)) then
tmp = (b * (a + (-0.5d0))) + t_1
else if (b <= 3d+17) then
tmp = (y + (x + z)) - (z * log(t))
else
tmp = ((b * a) + (b * (-0.5d0))) + 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 + y) + z;
double tmp;
if (b <= -3.7e+43) {
tmp = (b * (a + -0.5)) + t_1;
} else if (b <= 3e+17) {
tmp = (y + (x + z)) - (z * Math.log(t));
} else {
tmp = ((b * a) + (b * -0.5)) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + y) + z tmp = 0 if b <= -3.7e+43: tmp = (b * (a + -0.5)) + t_1 elif b <= 3e+17: tmp = (y + (x + z)) - (z * math.log(t)) else: tmp = ((b * a) + (b * -0.5)) + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + y) + z) tmp = 0.0 if (b <= -3.7e+43) tmp = Float64(Float64(b * Float64(a + -0.5)) + t_1); elseif (b <= 3e+17) tmp = Float64(Float64(y + Float64(x + z)) - Float64(z * log(t))); else tmp = Float64(Float64(Float64(b * a) + Float64(b * -0.5)) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + y) + z; tmp = 0.0; if (b <= -3.7e+43) tmp = (b * (a + -0.5)) + t_1; elseif (b <= 3e+17) tmp = (y + (x + z)) - (z * log(t)); else tmp = ((b * a) + (b * -0.5)) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[b, -3.7e+43], N[(N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[b, 3e+17], N[(N[(y + N[(x + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(b * a), $MachinePrecision] + N[(b * -0.5), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + z\\
\mathbf{if}\;b \leq -3.7 \cdot 10^{+43}:\\
\;\;\;\;b \cdot \left(a + -0.5\right) + t_1\\
\mathbf{elif}\;b \leq 3 \cdot 10^{+17}:\\
\;\;\;\;\left(y + \left(x + z\right)\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\left(b \cdot a + b \cdot -0.5\right) + t_1\\
\end{array}
\end{array}
if b < -3.7000000000000001e43Initial program 100.0%
remove-double-neg100.0%
distribute-rgt-neg-out100.0%
associate--l+100.0%
distribute-rgt-neg-in100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
Simplified100.0%
add-cube-cbrt99.8%
pow399.9%
Applied egg-rr99.9%
Taylor expanded in z around 0 90.7%
if -3.7000000000000001e43 < b < 3e17Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in a around 0 93.1%
Taylor expanded in b around 0 89.3%
if 3e17 < b Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
add-cube-cbrt99.9%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 89.2%
*-commutative99.9%
distribute-lft-in99.9%
Applied egg-rr89.2%
Final simplification89.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x y) z)) (t_2 (* z (- 1.0 (log t)))))
(if (<= z -1.8e+186)
t_2
(if (<= z 3.4e+165)
(+ (+ (* b a) (* b -0.5)) t_1)
(if (<= z 3.8e+192) t_2 (+ (* b (+ a -0.5)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + y) + z;
double t_2 = z * (1.0 - log(t));
double tmp;
if (z <= -1.8e+186) {
tmp = t_2;
} else if (z <= 3.4e+165) {
tmp = ((b * a) + (b * -0.5)) + t_1;
} else if (z <= 3.8e+192) {
tmp = t_2;
} else {
tmp = (b * (a + -0.5)) + 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 + y) + z
t_2 = z * (1.0d0 - log(t))
if (z <= (-1.8d+186)) then
tmp = t_2
else if (z <= 3.4d+165) then
tmp = ((b * a) + (b * (-0.5d0))) + t_1
else if (z <= 3.8d+192) then
tmp = t_2
else
tmp = (b * (a + (-0.5d0))) + 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 + y) + z;
double t_2 = z * (1.0 - Math.log(t));
double tmp;
if (z <= -1.8e+186) {
tmp = t_2;
} else if (z <= 3.4e+165) {
tmp = ((b * a) + (b * -0.5)) + t_1;
} else if (z <= 3.8e+192) {
tmp = t_2;
} else {
tmp = (b * (a + -0.5)) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + y) + z t_2 = z * (1.0 - math.log(t)) tmp = 0 if z <= -1.8e+186: tmp = t_2 elif z <= 3.4e+165: tmp = ((b * a) + (b * -0.5)) + t_1 elif z <= 3.8e+192: tmp = t_2 else: tmp = (b * (a + -0.5)) + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + y) + z) t_2 = Float64(z * Float64(1.0 - log(t))) tmp = 0.0 if (z <= -1.8e+186) tmp = t_2; elseif (z <= 3.4e+165) tmp = Float64(Float64(Float64(b * a) + Float64(b * -0.5)) + t_1); elseif (z <= 3.8e+192) tmp = t_2; else tmp = Float64(Float64(b * Float64(a + -0.5)) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + y) + z; t_2 = z * (1.0 - log(t)); tmp = 0.0; if (z <= -1.8e+186) tmp = t_2; elseif (z <= 3.4e+165) tmp = ((b * a) + (b * -0.5)) + t_1; elseif (z <= 3.8e+192) tmp = t_2; else tmp = (b * (a + -0.5)) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+186], t$95$2, If[LessEqual[z, 3.4e+165], N[(N[(N[(b * a), $MachinePrecision] + N[(b * -0.5), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[z, 3.8e+192], t$95$2, N[(N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + z\\
t_2 := z \cdot \left(1 - \log t\right)\\
\mathbf{if}\;z \leq -1.8 \cdot 10^{+186}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{+165}:\\
\;\;\;\;\left(b \cdot a + b \cdot -0.5\right) + t_1\\
\mathbf{elif}\;z \leq 3.8 \cdot 10^{+192}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a + -0.5\right) + t_1\\
\end{array}
\end{array}
if z < -1.8000000000000001e186 or 3.40000000000000011e165 < z < 3.7999999999999999e192Initial program 99.4%
remove-double-neg99.4%
distribute-rgt-neg-out99.4%
associate--l+99.5%
distribute-rgt-neg-in99.5%
sub-neg99.5%
metadata-eval99.5%
remove-double-neg99.5%
Simplified99.5%
Taylor expanded in a around 0 86.4%
Taylor expanded in z around inf 75.1%
if -1.8000000000000001e186 < z < 3.40000000000000011e165Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
add-cube-cbrt99.7%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in z around 0 87.5%
*-commutative99.9%
distribute-lft-in99.9%
Applied egg-rr87.5%
if 3.7999999999999999e192 < z Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
add-cube-cbrt99.2%
pow399.2%
Applied egg-rr99.2%
Taylor expanded in z around 0 56.2%
Final simplification82.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -0.4) (not (<= a 92000000000000.0))) (+ (* b a) (+ (+ x y) z)) (+ (+ x y) (* b -0.5))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -0.4) || !(a <= 92000000000000.0)) {
tmp = (b * a) + ((x + y) + z);
} else {
tmp = (x + y) + (b * -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 ((a <= (-0.4d0)) .or. (.not. (a <= 92000000000000.0d0))) then
tmp = (b * a) + ((x + y) + z)
else
tmp = (x + y) + (b * (-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 ((a <= -0.4) || !(a <= 92000000000000.0)) {
tmp = (b * a) + ((x + y) + z);
} else {
tmp = (x + y) + (b * -0.5);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -0.4) or not (a <= 92000000000000.0): tmp = (b * a) + ((x + y) + z) else: tmp = (x + y) + (b * -0.5) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -0.4) || !(a <= 92000000000000.0)) tmp = Float64(Float64(b * a) + Float64(Float64(x + y) + z)); else tmp = Float64(Float64(x + y) + Float64(b * -0.5)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -0.4) || ~((a <= 92000000000000.0))) tmp = (b * a) + ((x + y) + z); else tmp = (x + y) + (b * -0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -0.4], N[Not[LessEqual[a, 92000000000000.0]], $MachinePrecision]], N[(N[(b * a), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(b * -0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -0.4 \lor \neg \left(a \leq 92000000000000\right):\\
\;\;\;\;b \cdot a + \left(\left(x + y\right) + z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + b \cdot -0.5\\
\end{array}
\end{array}
if a < -0.40000000000000002 or 9.2e13 < a Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
add-cube-cbrt99.6%
pow399.5%
Applied egg-rr99.5%
Taylor expanded in z around 0 80.8%
Taylor expanded in a around inf 80.8%
*-commutative80.8%
Simplified80.8%
if -0.40000000000000002 < a < 9.2e13Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in a around 0 98.8%
Taylor expanded in z around 0 72.4%
Final simplification76.3%
(FPCore (x y z t a b) :precision binary64 (+ (+ (* b a) (* b -0.5)) (+ (+ x y) z)))
double code(double x, double y, double z, double t, double a, double b) {
return ((b * a) + (b * -0.5)) + ((x + y) + z);
}
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 = ((b * a) + (b * (-0.5d0))) + ((x + y) + z)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((b * a) + (b * -0.5)) + ((x + y) + z);
}
def code(x, y, z, t, a, b): return ((b * a) + (b * -0.5)) + ((x + y) + z)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(b * a) + Float64(b * -0.5)) + Float64(Float64(x + y) + z)) end
function tmp = code(x, y, z, t, a, b) tmp = ((b * a) + (b * -0.5)) + ((x + y) + z); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(b * a), $MachinePrecision] + N[(b * -0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(b \cdot a + b \cdot -0.5\right) + \left(\left(x + y\right) + z\right)
\end{array}
Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
add-cube-cbrt99.5%
pow399.5%
Applied egg-rr99.5%
Taylor expanded in z around 0 77.2%
*-commutative99.9%
distribute-lft-in99.9%
Applied egg-rr77.3%
Final simplification77.3%
(FPCore (x y z t a b) :precision binary64 (+ (* b (+ a -0.5)) (+ (+ x y) z)))
double code(double x, double y, double z, double t, double a, double b) {
return (b * (a + -0.5)) + ((x + y) + z);
}
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 = (b * (a + (-0.5d0))) + ((x + y) + z)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (b * (a + -0.5)) + ((x + y) + z);
}
def code(x, y, z, t, a, b): return (b * (a + -0.5)) + ((x + y) + z)
function code(x, y, z, t, a, b) return Float64(Float64(b * Float64(a + -0.5)) + Float64(Float64(x + y) + z)) end
function tmp = code(x, y, z, t, a, b) tmp = (b * (a + -0.5)) + ((x + y) + z); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
b \cdot \left(a + -0.5\right) + \left(\left(x + y\right) + z\right)
\end{array}
Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
add-cube-cbrt99.5%
pow399.5%
Applied egg-rr99.5%
Taylor expanded in z around 0 77.2%
Final simplification77.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -8e+130) (not (<= b 1.25e+125))) (+ x (* b -0.5)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -8e+130) || !(b <= 1.25e+125)) {
tmp = x + (b * -0.5);
} else {
tmp = x + 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 ((b <= (-8d+130)) .or. (.not. (b <= 1.25d+125))) then
tmp = x + (b * (-0.5d0))
else
tmp = x + 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 ((b <= -8e+130) || !(b <= 1.25e+125)) {
tmp = x + (b * -0.5);
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -8e+130) or not (b <= 1.25e+125): tmp = x + (b * -0.5) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -8e+130) || !(b <= 1.25e+125)) tmp = Float64(x + Float64(b * -0.5)); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -8e+130) || ~((b <= 1.25e+125))) tmp = x + (b * -0.5); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -8e+130], N[Not[LessEqual[b, 1.25e+125]], $MachinePrecision]], N[(x + N[(b * -0.5), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+130} \lor \neg \left(b \leq 1.25 \cdot 10^{+125}\right):\\
\;\;\;\;x + b \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -8.0000000000000005e130 or 1.24999999999999991e125 < b Initial program 100.0%
remove-double-neg100.0%
distribute-rgt-neg-out100.0%
associate--l+100.0%
distribute-rgt-neg-in100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
Simplified100.0%
Taylor expanded in a around 0 59.3%
Taylor expanded in z around 0 56.2%
Taylor expanded in y around 0 44.0%
if -8.0000000000000005e130 < b < 1.24999999999999991e125Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in a around 0 87.6%
Taylor expanded in z around 0 57.7%
Taylor expanded in b around 0 53.5%
Final simplification51.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.35e+134) (* b -0.5) (if (<= b 4.5e+183) (+ x y) (* b -0.5))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.35e+134) {
tmp = b * -0.5;
} else if (b <= 4.5e+183) {
tmp = x + y;
} else {
tmp = b * -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 (b <= (-1.35d+134)) then
tmp = b * (-0.5d0)
else if (b <= 4.5d+183) then
tmp = x + y
else
tmp = b * (-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 (b <= -1.35e+134) {
tmp = b * -0.5;
} else if (b <= 4.5e+183) {
tmp = x + y;
} else {
tmp = b * -0.5;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.35e+134: tmp = b * -0.5 elif b <= 4.5e+183: tmp = x + y else: tmp = b * -0.5 return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.35e+134) tmp = Float64(b * -0.5); elseif (b <= 4.5e+183) tmp = Float64(x + y); else tmp = Float64(b * -0.5); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.35e+134) tmp = b * -0.5; elseif (b <= 4.5e+183) tmp = x + y; else tmp = b * -0.5; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.35e+134], N[(b * -0.5), $MachinePrecision], If[LessEqual[b, 4.5e+183], N[(x + y), $MachinePrecision], N[(b * -0.5), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.35 \cdot 10^{+134}:\\
\;\;\;\;b \cdot -0.5\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+183}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;b \cdot -0.5\\
\end{array}
\end{array}
if b < -1.35e134 or 4.50000000000000017e183 < b Initial program 99.9%
remove-double-neg99.9%
distribute-rgt-neg-out99.9%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in a around 0 57.3%
Taylor expanded in z around 0 53.1%
Taylor expanded in b around inf 42.7%
if -1.35e134 < b < 4.50000000000000017e183Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in a around 0 85.7%
Taylor expanded in z around 0 58.3%
Taylor expanded in b around 0 52.3%
Final simplification50.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.6e+77) (+ x (* b -0.5)) (+ y (* b -0.5))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.6e+77) {
tmp = x + (b * -0.5);
} else {
tmp = y + (b * -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 (x <= (-2.6d+77)) then
tmp = x + (b * (-0.5d0))
else
tmp = y + (b * (-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 (x <= -2.6e+77) {
tmp = x + (b * -0.5);
} else {
tmp = y + (b * -0.5);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.6e+77: tmp = x + (b * -0.5) else: tmp = y + (b * -0.5) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.6e+77) tmp = Float64(x + Float64(b * -0.5)); else tmp = Float64(y + Float64(b * -0.5)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.6e+77) tmp = x + (b * -0.5); else tmp = y + (b * -0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.6e+77], N[(x + N[(b * -0.5), $MachinePrecision]), $MachinePrecision], N[(y + N[(b * -0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.6 \cdot 10^{+77}:\\
\;\;\;\;x + b \cdot -0.5\\
\mathbf{else}:\\
\;\;\;\;y + b \cdot -0.5\\
\end{array}
\end{array}
if x < -2.6000000000000002e77Initial program 100.0%
remove-double-neg100.0%
distribute-rgt-neg-out100.0%
associate--l+100.0%
distribute-rgt-neg-in100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
Simplified100.0%
Taylor expanded in a around 0 77.9%
Taylor expanded in z around 0 67.1%
Taylor expanded in y around 0 53.3%
if -2.6000000000000002e77 < x Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in a around 0 80.7%
Taylor expanded in z around 0 55.2%
Taylor expanded in x around 0 38.9%
Final simplification41.4%
(FPCore (x y z t a b) :precision binary64 (+ (+ x y) (* b -0.5)))
double code(double x, double y, double z, double t, double a, double b) {
return (x + y) + (b * -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 = (x + y) + (b * (-0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + y) + (b * -0.5);
}
def code(x, y, z, t, a, b): return (x + y) + (b * -0.5)
function code(x, y, z, t, a, b) return Float64(Float64(x + y) + Float64(b * -0.5)) end
function tmp = code(x, y, z, t, a, b) tmp = (x + y) + (b * -0.5); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + y), $MachinePrecision] + N[(b * -0.5), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) + b \cdot -0.5
\end{array}
Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in a around 0 80.2%
Taylor expanded in z around 0 57.3%
Final simplification57.3%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.8e+77) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.8e+77) {
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 <= (-1.8d+77)) 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 <= -1.8e+77) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.8e+77: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.8e+77) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.8e+77) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.8e+77], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+77}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -1.7999999999999999e77Initial program 100.0%
remove-double-neg100.0%
distribute-rgt-neg-out100.0%
associate--l+100.0%
distribute-rgt-neg-in100.0%
sub-neg100.0%
metadata-eval100.0%
remove-double-neg100.0%
Simplified100.0%
Taylor expanded in a around 0 77.9%
Taylor expanded in x around inf 46.4%
if -1.7999999999999999e77 < x Initial program 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in a around 0 80.7%
Taylor expanded in y around inf 24.8%
Final simplification28.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 99.8%
remove-double-neg99.8%
distribute-rgt-neg-out99.8%
associate--l+99.9%
distribute-rgt-neg-in99.9%
sub-neg99.9%
metadata-eval99.9%
remove-double-neg99.9%
Simplified99.9%
Taylor expanded in a around 0 80.2%
Taylor expanded in x around inf 23.4%
Final simplification23.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 2023274
(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)))