
(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 14 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 (fma z (- 1.0 (log t)) (fma (+ a -0.5) b y))))
double code(double x, double y, double z, double t, double a, double b) {
return x + fma(z, (1.0 - log(t)), fma((a + -0.5), b, y));
}
function code(x, y, z, t, a, b) return Float64(x + fma(z, Float64(1.0 - log(t)), fma(Float64(a + -0.5), b, y))) end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \mathsf{fma}\left(z, 1 - \log t, \mathsf{fma}\left(a + -0.5, b, y\right)\right)
\end{array}
Initial program 99.5%
associate--l+99.5%
associate-+l+99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+r+99.5%
+-commutative99.5%
+-commutative99.5%
*-commutative99.5%
cancel-sign-sub-inv99.5%
distribute-rgt1-in99.5%
*-commutative99.5%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= t_1 -2e+67) (not (<= t_1 1e+38)))
(+ (+ x y) t_1)
(- (+ y (+ x z)) (* z (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 ((t_1 <= -2e+67) || !(t_1 <= 1e+38)) {
tmp = (x + y) + t_1;
} else {
tmp = (y + (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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-2d+67)) .or. (.not. (t_1 <= 1d+38))) then
tmp = (x + y) + t_1
else
tmp = (y + (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 t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+67) || !(t_1 <= 1e+38)) {
tmp = (x + y) + t_1;
} else {
tmp = (y + (x + z)) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -2e+67) or not (t_1 <= 1e+38): tmp = (x + y) + t_1 else: tmp = (y + (x + z)) - (z * 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 ((t_1 <= -2e+67) || !(t_1 <= 1e+38)) tmp = Float64(Float64(x + y) + t_1); else tmp = Float64(Float64(y + Float64(x + z)) - Float64(z * 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 ((t_1 <= -2e+67) || ~((t_1 <= 1e+38))) tmp = (x + y) + t_1; else tmp = (y + (x + z)) - (z * 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[Or[LessEqual[t$95$1, -2e+67], N[Not[LessEqual[t$95$1, 1e+38]], $MachinePrecision]], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision], N[(N[(y + N[(x + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+67} \lor \neg \left(t_1 \leq 10^{+38}\right):\\
\;\;\;\;\left(x + y\right) + t_1\\
\mathbf{else}:\\
\;\;\;\;\left(y + \left(x + z\right)\right) - z \cdot \log t\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -1.99999999999999997e67 or 9.99999999999999977e37 < (*.f64 (-.f64 a 1/2) b) Initial program 99.2%
associate--l+99.2%
sub-neg99.2%
metadata-eval99.2%
Simplified99.2%
Taylor expanded in z around 0 94.4%
if -1.99999999999999997e67 < (*.f64 (-.f64 a 1/2) b) < 9.99999999999999977e37Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around 0 98.3%
Final simplification96.4%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (<= (+ x y) 5e+55) (- (+ t_1 (+ x z)) (* z (log t))) (+ (+ x 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 ((x + y) <= 5e+55) {
tmp = (t_1 + (x + z)) - (z * log(t));
} else {
tmp = (x + 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 ((x + y) <= 5d+55) then
tmp = (t_1 + (x + z)) - (z * log(t))
else
tmp = (x + 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 ((x + y) <= 5e+55) {
tmp = (t_1 + (x + z)) - (z * Math.log(t));
} else {
tmp = (x + y) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (x + y) <= 5e+55: tmp = (t_1 + (x + z)) - (z * math.log(t)) else: tmp = (x + 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(x + y) <= 5e+55) tmp = Float64(Float64(t_1 + Float64(x + z)) - Float64(z * log(t))); else tmp = Float64(Float64(x + 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 ((x + y) <= 5e+55) tmp = (t_1 + (x + z)) - (z * log(t)); else tmp = (x + 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[(x + y), $MachinePrecision], 5e+55], N[(N[(t$95$1 + N[(x + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;x + y \leq 5 \cdot 10^{+55}:\\
\;\;\;\;\left(t_1 + \left(x + z\right)\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + t_1\\
\end{array}
\end{array}
if (+.f64 x y) < 5.00000000000000046e55Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 87.3%
if 5.00000000000000046e55 < (+.f64 x y) Initial program 98.7%
associate--l+98.7%
sub-neg98.7%
metadata-eval98.7%
Simplified98.7%
Taylor expanded in z around 0 90.5%
Final simplification88.3%
(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(x + y) + Float64(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[(x + y), $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(x + y\right) + \left(z - z \cdot \log t\right)\right) + \left(a + -0.5\right) \cdot b
\end{array}
Initial program 99.5%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= z -6e+243)
(and (not (<= z -4.5e+227))
(or (<= z -8.2e+175) (not (<= z 1.65e+201)))))
(* z (- 1.0 (log t)))
(+ (+ x y) (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -6e+243) || (!(z <= -4.5e+227) && ((z <= -8.2e+175) || !(z <= 1.65e+201)))) {
tmp = z * (1.0 - log(t));
} else {
tmp = (x + y) + (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 <= (-6d+243)) .or. (.not. (z <= (-4.5d+227))) .and. (z <= (-8.2d+175)) .or. (.not. (z <= 1.65d+201))) then
tmp = z * (1.0d0 - log(t))
else
tmp = (x + y) + (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 <= -6e+243) || (!(z <= -4.5e+227) && ((z <= -8.2e+175) || !(z <= 1.65e+201)))) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = (x + y) + (b * (a - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -6e+243) or (not (z <= -4.5e+227) and ((z <= -8.2e+175) or not (z <= 1.65e+201))): tmp = z * (1.0 - math.log(t)) else: tmp = (x + y) + (b * (a - 0.5)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -6e+243) || (!(z <= -4.5e+227) && ((z <= -8.2e+175) || !(z <= 1.65e+201)))) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(Float64(x + y) + 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 <= -6e+243) || (~((z <= -4.5e+227)) && ((z <= -8.2e+175) || ~((z <= 1.65e+201))))) tmp = z * (1.0 - log(t)); else tmp = (x + y) + (b * (a - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -6e+243], And[N[Not[LessEqual[z, -4.5e+227]], $MachinePrecision], Or[LessEqual[z, -8.2e+175], N[Not[LessEqual[z, 1.65e+201]], $MachinePrecision]]]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+243} \lor \neg \left(z \leq -4.5 \cdot 10^{+227}\right) \land \left(z \leq -8.2 \cdot 10^{+175} \lor \neg \left(z \leq 1.65 \cdot 10^{+201}\right)\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if z < -5.99999999999999969e243 or -4.5e227 < z < -8.19999999999999955e175 or 1.65e201 < z Initial program 97.6%
associate--l+97.6%
sub-neg97.6%
metadata-eval97.6%
Simplified97.6%
Taylor expanded in y around 0 95.6%
Taylor expanded in z around inf 73.2%
if -5.99999999999999969e243 < z < -4.5e227 or -8.19999999999999955e175 < z < 1.65e201Initial program 99.9%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 90.3%
Final simplification87.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -4.1e+241)
(- z (* z (log t)))
(if (or (<= z -3.2e+227) (and (not (<= z -3.1e+175)) (<= z 2e+194)))
(+ (+ x y) (* b (- a 0.5)))
(* z (- 1.0 (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.1e+241) {
tmp = z - (z * log(t));
} else if ((z <= -3.2e+227) || (!(z <= -3.1e+175) && (z <= 2e+194))) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = 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) :: tmp
if (z <= (-4.1d+241)) then
tmp = z - (z * log(t))
else if ((z <= (-3.2d+227)) .or. (.not. (z <= (-3.1d+175))) .and. (z <= 2d+194)) then
tmp = (x + y) + (b * (a - 0.5d0))
else
tmp = 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 tmp;
if (z <= -4.1e+241) {
tmp = z - (z * Math.log(t));
} else if ((z <= -3.2e+227) || (!(z <= -3.1e+175) && (z <= 2e+194))) {
tmp = (x + y) + (b * (a - 0.5));
} else {
tmp = z * (1.0 - Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -4.1e+241: tmp = z - (z * math.log(t)) elif (z <= -3.2e+227) or (not (z <= -3.1e+175) and (z <= 2e+194)): tmp = (x + y) + (b * (a - 0.5)) else: tmp = z * (1.0 - math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.1e+241) tmp = Float64(z - Float64(z * log(t))); elseif ((z <= -3.2e+227) || (!(z <= -3.1e+175) && (z <= 2e+194))) tmp = Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))); else tmp = Float64(z * Float64(1.0 - log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -4.1e+241) tmp = z - (z * log(t)); elseif ((z <= -3.2e+227) || (~((z <= -3.1e+175)) && (z <= 2e+194))) tmp = (x + y) + (b * (a - 0.5)); else tmp = z * (1.0 - log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.1e+241], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3.2e+227], And[N[Not[LessEqual[z, -3.1e+175]], $MachinePrecision], LessEqual[z, 2e+194]]], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.1 \cdot 10^{+241}:\\
\;\;\;\;z - z \cdot \log t\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{+227} \lor \neg \left(z \leq -3.1 \cdot 10^{+175}\right) \land z \leq 2 \cdot 10^{+194}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if z < -4.10000000000000015e241Initial program 99.7%
associate--l+99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 99.7%
Taylor expanded in b around 0 72.4%
Taylor expanded in z around inf 72.2%
*-commutative72.2%
sub-neg72.2%
log-rec72.2%
distribute-rgt-in72.4%
*-lft-identity72.4%
log-rec72.4%
cancel-sign-sub-inv72.4%
Simplified72.4%
if -4.10000000000000015e241 < z < -3.19999999999999988e227 or -3.09999999999999984e175 < z < 1.99999999999999989e194Initial program 99.9%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 90.3%
if -3.19999999999999988e227 < z < -3.09999999999999984e175 or 1.99999999999999989e194 < z Initial program 96.3%
associate--l+96.3%
sub-neg96.3%
metadata-eval96.3%
Simplified96.3%
Taylor expanded in y around 0 93.1%
Taylor expanded in z around inf 73.8%
Final simplification87.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.7e+174) (not (<= z 1.7e+203))) (+ x (* z (- 1.0 (log t)))) (+ (+ x y) (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.7e+174) || !(z <= 1.7e+203)) {
tmp = x + (z * (1.0 - log(t)));
} else {
tmp = (x + y) + (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 <= (-3.7d+174)) .or. (.not. (z <= 1.7d+203))) then
tmp = x + (z * (1.0d0 - log(t)))
else
tmp = (x + y) + (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 <= -3.7e+174) || !(z <= 1.7e+203)) {
tmp = x + (z * (1.0 - Math.log(t)));
} else {
tmp = (x + y) + (b * (a - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.7e+174) or not (z <= 1.7e+203): tmp = x + (z * (1.0 - math.log(t))) else: tmp = (x + y) + (b * (a - 0.5)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.7e+174) || !(z <= 1.7e+203)) tmp = Float64(x + Float64(z * Float64(1.0 - log(t)))); else tmp = Float64(Float64(x + y) + 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 <= -3.7e+174) || ~((z <= 1.7e+203))) tmp = x + (z * (1.0 - log(t))); else tmp = (x + y) + (b * (a - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.7e+174], N[Not[LessEqual[z, 1.7e+203]], $MachinePrecision]], N[(x + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.7 \cdot 10^{+174} \lor \neg \left(z \leq 1.7 \cdot 10^{+203}\right):\\
\;\;\;\;x + z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if z < -3.7000000000000002e174 or 1.7000000000000001e203 < z Initial program 97.8%
associate--l+97.8%
associate-+l+97.8%
associate-+l+97.8%
+-commutative97.8%
associate-+r+97.8%
+-commutative97.8%
+-commutative97.8%
*-commutative97.8%
cancel-sign-sub-inv97.8%
distribute-rgt1-in97.8%
*-commutative97.8%
fma-def99.7%
+-commutative99.7%
unsub-neg99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in z around inf 71.9%
if -3.7000000000000002e174 < z < 1.7000000000000001e203Initial program 99.9%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 90.2%
Final simplification86.4%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -2e+99) (not (<= t_1 5e-14))) (+ x t_1) (+ x 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 ((t_1 <= -2e+99) || !(t_1 <= 5e-14)) {
tmp = x + t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-2d+99)) .or. (.not. (t_1 <= 5d-14))) then
tmp = x + t_1
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 t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -2e+99) || !(t_1 <= 5e-14)) {
tmp = x + t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -2e+99) or not (t_1 <= 5e-14): tmp = x + t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -2e+99) || !(t_1 <= 5e-14)) tmp = Float64(x + t_1); else tmp = Float64(x + 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 ((t_1 <= -2e+99) || ~((t_1 <= 5e-14))) tmp = x + t_1; else tmp = x + 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[Or[LessEqual[t$95$1, -2e+99], N[Not[LessEqual[t$95$1, 5e-14]], $MachinePrecision]], N[(x + t$95$1), $MachinePrecision], N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -2 \cdot 10^{+99} \lor \neg \left(t_1 \leq 5 \cdot 10^{-14}\right):\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -1.9999999999999999e99 or 5.0000000000000002e-14 < (*.f64 (-.f64 a 1/2) b) Initial program 99.2%
associate--l+99.2%
associate-+l+99.2%
associate-+l+99.2%
+-commutative99.2%
associate-+r+99.2%
+-commutative99.2%
+-commutative99.2%
*-commutative99.2%
cancel-sign-sub-inv99.2%
distribute-rgt1-in99.2%
*-commutative99.2%
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 81.0%
if -1.9999999999999999e99 < (*.f64 (-.f64 a 1/2) b) < 5.0000000000000002e-14Initial 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 63.4%
Final simplification72.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= t_1 -5e+212) (not (<= t_1 5e+81)))
(+ x t_1)
(+ (+ x y) (* -0.5 b)))))
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 <= -5e+212) || !(t_1 <= 5e+81)) {
tmp = x + t_1;
} else {
tmp = (x + y) + (-0.5 * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-5d+212)) .or. (.not. (t_1 <= 5d+81))) then
tmp = x + t_1
else
tmp = (x + y) + ((-0.5d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -5e+212) || !(t_1 <= 5e+81)) {
tmp = x + t_1;
} else {
tmp = (x + y) + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -5e+212) or not (t_1 <= 5e+81): tmp = x + t_1 else: tmp = (x + y) + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -5e+212) || !(t_1 <= 5e+81)) tmp = Float64(x + t_1); else tmp = Float64(Float64(x + y) + Float64(-0.5 * b)); 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 <= -5e+212) || ~((t_1 <= 5e+81))) tmp = x + t_1; else tmp = (x + y) + (-0.5 * b); 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, -5e+212], N[Not[LessEqual[t$95$1, 5e+81]], $MachinePrecision]], N[(x + t$95$1), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+212} \lor \neg \left(t_1 \leq 5 \cdot 10^{+81}\right):\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + -0.5 \cdot b\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -4.99999999999999992e212 or 4.9999999999999998e81 < (*.f64 (-.f64 a 1/2) b) Initial program 98.9%
associate--l+98.9%
associate-+l+98.9%
associate-+l+98.9%
+-commutative98.9%
associate-+r+98.9%
+-commutative98.9%
+-commutative98.9%
*-commutative98.9%
cancel-sign-sub-inv98.9%
distribute-rgt1-in98.9%
*-commutative98.9%
fma-def100.0%
+-commutative100.0%
unsub-neg100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 89.4%
if -4.99999999999999992e212 < (*.f64 (-.f64 a 1/2) b) < 4.9999999999999998e81Initial program 99.8%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around 0 68.0%
Taylor expanded in a around 0 67.2%
*-commutative67.2%
Simplified67.2%
Final simplification75.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -5e+212) (not (<= t_1 1e+37))) t_1 (+ x 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 ((t_1 <= -5e+212) || !(t_1 <= 1e+37)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = b * (a - 0.5d0)
if ((t_1 <= (-5d+212)) .or. (.not. (t_1 <= 1d+37))) then
tmp = t_1
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 t_1 = b * (a - 0.5);
double tmp;
if ((t_1 <= -5e+212) || !(t_1 <= 1e+37)) {
tmp = t_1;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a - 0.5) tmp = 0 if (t_1 <= -5e+212) or not (t_1 <= 1e+37): tmp = t_1 else: tmp = x + y return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if ((t_1 <= -5e+212) || !(t_1 <= 1e+37)) tmp = t_1; else tmp = Float64(x + 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 ((t_1 <= -5e+212) || ~((t_1 <= 1e+37))) tmp = t_1; else tmp = x + 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[Or[LessEqual[t$95$1, -5e+212], N[Not[LessEqual[t$95$1, 1e+37]], $MachinePrecision]], t$95$1, N[(x + y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+212} \lor \neg \left(t_1 \leq 10^{+37}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -4.99999999999999992e212 or 9.99999999999999954e36 < (*.f64 (-.f64 a 1/2) b) Initial program 99.0%
associate--l+99.0%
sub-neg99.0%
metadata-eval99.0%
Simplified99.0%
Taylor expanded in y around 0 90.8%
Taylor expanded in x around 0 85.3%
Taylor expanded in b around inf 82.3%
if -4.99999999999999992e212 < (*.f64 (-.f64 a 1/2) b) < 9.99999999999999954e36Initial 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 60.8%
Final simplification69.6%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= a -1.16e+93)
(and (not (<= a 8.2e+108))
(or (<= a 1.3e+152) (not (<= a 4.2e+201)))))
(* a b)
(+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.16e+93) || (!(a <= 8.2e+108) && ((a <= 1.3e+152) || !(a <= 4.2e+201)))) {
tmp = a * b;
} 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 ((a <= (-1.16d+93)) .or. (.not. (a <= 8.2d+108)) .and. (a <= 1.3d+152) .or. (.not. (a <= 4.2d+201))) then
tmp = a * b
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 ((a <= -1.16e+93) || (!(a <= 8.2e+108) && ((a <= 1.3e+152) || !(a <= 4.2e+201)))) {
tmp = a * b;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.16e+93) or (not (a <= 8.2e+108) and ((a <= 1.3e+152) or not (a <= 4.2e+201))): tmp = a * b else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.16e+93) || (!(a <= 8.2e+108) && ((a <= 1.3e+152) || !(a <= 4.2e+201)))) tmp = Float64(a * b); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.16e+93) || (~((a <= 8.2e+108)) && ((a <= 1.3e+152) || ~((a <= 4.2e+201))))) tmp = a * b; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.16e+93], And[N[Not[LessEqual[a, 8.2e+108]], $MachinePrecision], Or[LessEqual[a, 1.3e+152], N[Not[LessEqual[a, 4.2e+201]], $MachinePrecision]]]], N[(a * b), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.16 \cdot 10^{+93} \lor \neg \left(a \leq 8.2 \cdot 10^{+108}\right) \land \left(a \leq 1.3 \cdot 10^{+152} \lor \neg \left(a \leq 4.2 \cdot 10^{+201}\right)\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if a < -1.16e93 or 8.1999999999999998e108 < a < 1.3e152 or 4.1999999999999998e201 < a Initial 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 a around inf 86.9%
Taylor expanded in x around 0 78.8%
if -1.16e93 < a < 8.1999999999999998e108 or 1.3e152 < a < 4.1999999999999998e201Initial program 99.4%
associate--l+99.4%
associate-+l+99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
+-commutative99.4%
+-commutative99.4%
*-commutative99.4%
cancel-sign-sub-inv99.4%
distribute-rgt1-in99.4%
*-commutative99.4%
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 50.5%
Final simplification57.1%
(FPCore (x y z t a b) :precision binary64 (+ (+ x y) (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + y) + (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) + (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) + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return (x + y) + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(Float64(x + y) + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + y) + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + y), $MachinePrecision] + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.5%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in z around 0 78.8%
Final simplification78.8%
(FPCore (x y z t a b) :precision binary64 (if (<= x -3.5e+99) x (* a b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -3.5e+99) {
tmp = 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 (x <= (-3.5d+99)) then
tmp = 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 (x <= -3.5e+99) {
tmp = x;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -3.5e+99: tmp = x else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -3.5e+99) tmp = x; else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -3.5e+99) tmp = x; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -3.5e+99], x, N[(a * b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.5 \cdot 10^{+99}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if x < -3.4999999999999998e99Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in x around inf 66.6%
if -3.4999999999999998e99 < x Initial program 99.4%
associate--l+99.4%
associate-+l+99.4%
associate-+l+99.4%
+-commutative99.4%
associate-+r+99.4%
+-commutative99.4%
+-commutative99.4%
*-commutative99.4%
cancel-sign-sub-inv99.4%
distribute-rgt1-in99.4%
*-commutative99.4%
fma-def99.9%
+-commutative99.9%
unsub-neg99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 42.0%
Taylor expanded in x around 0 28.3%
Final simplification35.4%
(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.5%
associate--l+99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Taylor expanded in x around inf 25.3%
Final simplification25.3%
(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 2023192
(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)))