
(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 17 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 (+ (+ (* (- 1.0 (log t)) z) (+ x y)) (* (+ a -0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return (((1.0 - log(t)) * z) + (x + y)) + ((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 = (((1.0d0 - log(t)) * z) + (x + y)) + ((a + (-0.5d0)) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (((1.0 - Math.log(t)) * z) + (x + y)) + ((a + -0.5) * b);
}
def code(x, y, z, t, a, b): return (((1.0 - math.log(t)) * z) + (x + y)) + ((a + -0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(1.0 - log(t)) * z) + Float64(x + y)) + Float64(Float64(a + -0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = (((1.0 - log(t)) * z) + (x + y)) + ((a + -0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(1 - \log t\right) \cdot z + \left(x + y\right)\right) + \left(a + -0.5\right) \cdot b
\end{array}
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 z around 0 99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (<= t_1 -5e+84)
(+ t_1 (+ x y))
(if (<= t_1 4e+156)
(+ (* (- 1.0 (log t)) z) (+ x y))
(+ (+ x y) (+ (* a b) (* -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+84) {
tmp = t_1 + (x + y);
} else if (t_1 <= 4e+156) {
tmp = ((1.0 - log(t)) * z) + (x + y);
} else {
tmp = (x + y) + ((a * b) + (-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+84)) then
tmp = t_1 + (x + y)
else if (t_1 <= 4d+156) then
tmp = ((1.0d0 - log(t)) * z) + (x + y)
else
tmp = (x + y) + ((a * b) + ((-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+84) {
tmp = t_1 + (x + y);
} else if (t_1 <= 4e+156) {
tmp = ((1.0 - Math.log(t)) * z) + (x + y);
} else {
tmp = (x + y) + ((a * b) + (-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+84: tmp = t_1 + (x + y) elif t_1 <= 4e+156: tmp = ((1.0 - math.log(t)) * z) + (x + y) else: tmp = (x + y) + ((a * b) + (-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+84) tmp = Float64(t_1 + Float64(x + y)); elseif (t_1 <= 4e+156) tmp = Float64(Float64(Float64(1.0 - log(t)) * z) + Float64(x + y)); else tmp = Float64(Float64(x + y) + Float64(Float64(a * b) + 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+84) tmp = t_1 + (x + y); elseif (t_1 <= 4e+156) tmp = ((1.0 - log(t)) * z) + (x + y); else tmp = (x + y) + ((a * b) + (-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[LessEqual[t$95$1, -5e+84], N[(t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 4e+156], N[(N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $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^{+84}:\\
\;\;\;\;t_1 + \left(x + y\right)\\
\mathbf{elif}\;t_1 \leq 4 \cdot 10^{+156}:\\
\;\;\;\;\left(1 - \log t\right) \cdot z + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(a \cdot b + -0.5 \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -5.0000000000000001e84Initial program 100.0%
Taylor expanded in z around 0 95.6%
if -5.0000000000000001e84 < (*.f64 (-.f64 a 1/2) b) < 3.9999999999999999e156Initial program 99.7%
remove-double-neg99.7%
distribute-rgt-neg-out99.7%
associate--l+99.7%
distribute-rgt-neg-in99.7%
sub-neg99.7%
metadata-eval99.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in z around 0 99.9%
Taylor expanded in b around 0 90.9%
if 3.9999999999999999e156 < (*.f64 (-.f64 a 1/2) b) Initial program 99.9%
Taylor expanded in z around 0 91.8%
Taylor expanded in a around 0 91.8%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log t) z)) (t_2 (* b (- a 0.5))))
(if (<= b -2.5e+128)
(- (+ z t_2) t_1)
(if (<= b 7.5e+86) (+ (+ (- z t_1) (+ x y)) (* a b)) (+ t_2 (+ x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(t) * z;
double t_2 = b * (a - 0.5);
double tmp;
if (b <= -2.5e+128) {
tmp = (z + t_2) - t_1;
} else if (b <= 7.5e+86) {
tmp = ((z - t_1) + (x + y)) + (a * b);
} else {
tmp = t_2 + (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) :: t_2
real(8) :: tmp
t_1 = log(t) * z
t_2 = b * (a - 0.5d0)
if (b <= (-2.5d+128)) then
tmp = (z + t_2) - t_1
else if (b <= 7.5d+86) then
tmp = ((z - t_1) + (x + y)) + (a * b)
else
tmp = t_2 + (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 = Math.log(t) * z;
double t_2 = b * (a - 0.5);
double tmp;
if (b <= -2.5e+128) {
tmp = (z + t_2) - t_1;
} else if (b <= 7.5e+86) {
tmp = ((z - t_1) + (x + y)) + (a * b);
} else {
tmp = t_2 + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.log(t) * z t_2 = b * (a - 0.5) tmp = 0 if b <= -2.5e+128: tmp = (z + t_2) - t_1 elif b <= 7.5e+86: tmp = ((z - t_1) + (x + y)) + (a * b) else: tmp = t_2 + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(log(t) * z) t_2 = Float64(b * Float64(a - 0.5)) tmp = 0.0 if (b <= -2.5e+128) tmp = Float64(Float64(z + t_2) - t_1); elseif (b <= 7.5e+86) tmp = Float64(Float64(Float64(z - t_1) + Float64(x + y)) + Float64(a * b)); else tmp = Float64(t_2 + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = log(t) * z; t_2 = b * (a - 0.5); tmp = 0.0; if (b <= -2.5e+128) tmp = (z + t_2) - t_1; elseif (b <= 7.5e+86) tmp = ((z - t_1) + (x + y)) + (a * b); else tmp = t_2 + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.5e+128], N[(N[(z + t$95$2), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[b, 7.5e+86], N[(N[(N[(z - t$95$1), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(t$95$2 + N[(x + y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot z\\
t_2 := b \cdot \left(a - 0.5\right)\\
\mathbf{if}\;b \leq -2.5 \cdot 10^{+128}:\\
\;\;\;\;\left(z + t_2\right) - t_1\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+86}:\\
\;\;\;\;\left(\left(z - t_1\right) + \left(x + y\right)\right) + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;t_2 + \left(x + y\right)\\
\end{array}
\end{array}
if b < -2.5e128Initial 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 y around 0 96.8%
Taylor expanded in x around 0 96.8%
if -2.5e128 < b < 7.4999999999999997e86Initial 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 inf 95.0%
*-commutative95.0%
Simplified95.0%
if 7.4999999999999997e86 < b Initial program 100.0%
Taylor expanded in z around 0 96.5%
Final simplification95.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (log t) z)))
(if (<= (+ x y) 1e+106)
(- (+ (* b (- a 0.5)) (+ x z)) t_1)
(+ (+ (- z t_1) (+ x y)) (* a b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = log(t) * z;
double tmp;
if ((x + y) <= 1e+106) {
tmp = ((b * (a - 0.5)) + (x + z)) - t_1;
} else {
tmp = ((z - t_1) + (x + y)) + (a * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = log(t) * z
if ((x + y) <= 1d+106) then
tmp = ((b * (a - 0.5d0)) + (x + z)) - t_1
else
tmp = ((z - t_1) + (x + y)) + (a * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = Math.log(t) * z;
double tmp;
if ((x + y) <= 1e+106) {
tmp = ((b * (a - 0.5)) + (x + z)) - t_1;
} else {
tmp = ((z - t_1) + (x + y)) + (a * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = math.log(t) * z tmp = 0 if (x + y) <= 1e+106: tmp = ((b * (a - 0.5)) + (x + z)) - t_1 else: tmp = ((z - t_1) + (x + y)) + (a * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(log(t) * z) tmp = 0.0 if (Float64(x + y) <= 1e+106) tmp = Float64(Float64(Float64(b * Float64(a - 0.5)) + Float64(x + z)) - t_1); else tmp = Float64(Float64(Float64(z - t_1) + Float64(x + y)) + Float64(a * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = log(t) * z; tmp = 0.0; if ((x + y) <= 1e+106) tmp = ((b * (a - 0.5)) + (x + z)) - t_1; else tmp = ((z - t_1) + (x + y)) + (a * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[Log[t], $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[N[(x + y), $MachinePrecision], 1e+106], N[(N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(N[(z - t$95$1), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log t \cdot z\\
\mathbf{if}\;x + y \leq 10^{+106}:\\
\;\;\;\;\left(b \cdot \left(a - 0.5\right) + \left(x + z\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;\left(\left(z - t_1\right) + \left(x + y\right)\right) + a \cdot b\\
\end{array}
\end{array}
if (+.f64 x y) < 1.00000000000000009e106Initial 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 y around 0 85.4%
if 1.00000000000000009e106 < (+.f64 x y) 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 inf 96.7%
*-commutative96.7%
Simplified96.7%
Final simplification88.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -4.7e+223) (not (<= z 3e+105))) (- (+ z (* b (- a 0.5))) (* (log t) z)) (+ (+ x y) (+ (* a b) (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -4.7e+223) || !(z <= 3e+105)) {
tmp = (z + (b * (a - 0.5))) - (log(t) * z);
} else {
tmp = (x + y) + ((a * b) + (-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) :: tmp
if ((z <= (-4.7d+223)) .or. (.not. (z <= 3d+105))) then
tmp = (z + (b * (a - 0.5d0))) - (log(t) * z)
else
tmp = (x + y) + ((a * b) + ((-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 tmp;
if ((z <= -4.7e+223) || !(z <= 3e+105)) {
tmp = (z + (b * (a - 0.5))) - (Math.log(t) * z);
} else {
tmp = (x + y) + ((a * b) + (-0.5 * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -4.7e+223) or not (z <= 3e+105): tmp = (z + (b * (a - 0.5))) - (math.log(t) * z) else: tmp = (x + y) + ((a * b) + (-0.5 * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -4.7e+223) || !(z <= 3e+105)) tmp = Float64(Float64(z + Float64(b * Float64(a - 0.5))) - Float64(log(t) * z)); else tmp = Float64(Float64(x + y) + Float64(Float64(a * b) + Float64(-0.5 * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -4.7e+223) || ~((z <= 3e+105))) tmp = (z + (b * (a - 0.5))) - (log(t) * z); else tmp = (x + y) + ((a * b) + (-0.5 * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -4.7e+223], N[Not[LessEqual[z, 3e+105]], $MachinePrecision]], N[(N[(z + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[Log[t], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.7 \cdot 10^{+223} \lor \neg \left(z \leq 3 \cdot 10^{+105}\right):\\
\;\;\;\;\left(z + b \cdot \left(a - 0.5\right)\right) - \log t \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(a \cdot b + -0.5 \cdot b\right)\\
\end{array}
\end{array}
if z < -4.70000000000000041e223 or 3.0000000000000001e105 < z Initial program 99.5%
remove-double-neg99.5%
distribute-rgt-neg-out99.5%
associate--l+99.5%
distribute-rgt-neg-in99.5%
sub-neg99.5%
metadata-eval99.5%
remove-double-neg99.5%
Simplified99.5%
Taylor expanded in y around 0 97.6%
Taylor expanded in x around 0 95.7%
if -4.70000000000000041e223 < z < 3.0000000000000001e105Initial program 99.9%
Taylor expanded in z around 0 93.0%
Taylor expanded in a around 0 93.0%
Final simplification93.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- 1.0 (log t)) z)))
(if (<= z -5e+265)
t_1
(if (<= z 2.3e+106) (+ (+ x y) (+ (* a b) (* -0.5 b))) (+ y t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (1.0 - log(t)) * z;
double tmp;
if (z <= -5e+265) {
tmp = t_1;
} else if (z <= 2.3e+106) {
tmp = (x + y) + ((a * b) + (-0.5 * b));
} 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 = (1.0d0 - log(t)) * z
if (z <= (-5d+265)) then
tmp = t_1
else if (z <= 2.3d+106) then
tmp = (x + y) + ((a * b) + ((-0.5d0) * b))
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 = (1.0 - Math.log(t)) * z;
double tmp;
if (z <= -5e+265) {
tmp = t_1;
} else if (z <= 2.3e+106) {
tmp = (x + y) + ((a * b) + (-0.5 * b));
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (1.0 - math.log(t)) * z tmp = 0 if z <= -5e+265: tmp = t_1 elif z <= 2.3e+106: tmp = (x + y) + ((a * b) + (-0.5 * b)) else: tmp = y + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(1.0 - log(t)) * z) tmp = 0.0 if (z <= -5e+265) tmp = t_1; elseif (z <= 2.3e+106) tmp = Float64(Float64(x + y) + Float64(Float64(a * b) + Float64(-0.5 * b))); else tmp = Float64(y + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (1.0 - log(t)) * z; tmp = 0.0; if (z <= -5e+265) tmp = t_1; elseif (z <= 2.3e+106) tmp = (x + y) + ((a * b) + (-0.5 * b)); else tmp = y + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -5e+265], t$95$1, If[LessEqual[z, 2.3e+106], N[(N[(x + y), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(1 - \log t\right) \cdot z\\
\mathbf{if}\;z \leq -5 \cdot 10^{+265}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{+106}:\\
\;\;\;\;\left(x + y\right) + \left(a \cdot b + -0.5 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if z < -5.0000000000000002e265Initial program 99.5%
remove-double-neg99.5%
distribute-rgt-neg-out99.5%
associate--l+99.5%
distribute-rgt-neg-in99.5%
sub-neg99.5%
metadata-eval99.5%
remove-double-neg99.5%
Simplified99.5%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 99.7%
if -5.0000000000000002e265 < z < 2.3000000000000002e106Initial program 99.9%
Taylor expanded in z around 0 92.3%
Taylor expanded in a around 0 92.4%
if 2.3000000000000002e106 < z Initial program 99.3%
remove-double-neg99.3%
distribute-rgt-neg-out99.3%
associate--l+99.3%
distribute-rgt-neg-in99.3%
sub-neg99.3%
metadata-eval99.3%
remove-double-neg99.3%
Simplified99.3%
Taylor expanded in z around 0 99.6%
Taylor expanded in b around 0 78.8%
Taylor expanded in x around 0 76.0%
Final simplification90.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= z -3.5e+265)
(* (- 1.0 (log t)) z)
(if (<= z 1.6e+99)
(+ (+ x y) (+ (* a b) (* -0.5 b)))
(- (+ x z) (* (log t) z)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.5e+265) {
tmp = (1.0 - log(t)) * z;
} else if (z <= 1.6e+99) {
tmp = (x + y) + ((a * b) + (-0.5 * b));
} else {
tmp = (x + z) - (log(t) * z);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.5d+265)) then
tmp = (1.0d0 - log(t)) * z
else if (z <= 1.6d+99) then
tmp = (x + y) + ((a * b) + ((-0.5d0) * b))
else
tmp = (x + z) - (log(t) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.5e+265) {
tmp = (1.0 - Math.log(t)) * z;
} else if (z <= 1.6e+99) {
tmp = (x + y) + ((a * b) + (-0.5 * b));
} else {
tmp = (x + z) - (Math.log(t) * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -3.5e+265: tmp = (1.0 - math.log(t)) * z elif z <= 1.6e+99: tmp = (x + y) + ((a * b) + (-0.5 * b)) else: tmp = (x + z) - (math.log(t) * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.5e+265) tmp = Float64(Float64(1.0 - log(t)) * z); elseif (z <= 1.6e+99) tmp = Float64(Float64(x + y) + Float64(Float64(a * b) + Float64(-0.5 * b))); else tmp = Float64(Float64(x + z) - Float64(log(t) * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -3.5e+265) tmp = (1.0 - log(t)) * z; elseif (z <= 1.6e+99) tmp = (x + y) + ((a * b) + (-0.5 * b)); else tmp = (x + z) - (log(t) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.5e+265], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[z, 1.6e+99], N[(N[(x + y), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + z), $MachinePrecision] - N[(N[Log[t], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+265}:\\
\;\;\;\;\left(1 - \log t\right) \cdot z\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+99}:\\
\;\;\;\;\left(x + y\right) + \left(a \cdot b + -0.5 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + z\right) - \log t \cdot z\\
\end{array}
\end{array}
if z < -3.5e265Initial program 99.5%
remove-double-neg99.5%
distribute-rgt-neg-out99.5%
associate--l+99.5%
distribute-rgt-neg-in99.5%
sub-neg99.5%
metadata-eval99.5%
remove-double-neg99.5%
Simplified99.5%
Taylor expanded in z around 0 99.7%
Taylor expanded in z around inf 99.7%
if -3.5e265 < z < 1.6e99Initial program 99.9%
Taylor expanded in z around 0 92.3%
Taylor expanded in a around 0 92.3%
if 1.6e99 < z Initial program 99.4%
remove-double-neg99.4%
distribute-rgt-neg-out99.4%
associate--l+99.4%
distribute-rgt-neg-in99.4%
sub-neg99.4%
metadata-eval99.4%
remove-double-neg99.4%
Simplified99.4%
Taylor expanded in b around 0 79.1%
Taylor expanded in y around 0 73.7%
Final simplification89.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3.5e+265) (not (<= z 2.3e+106))) (* (- 1.0 (log t)) z) (+ (+ x y) (+ (* a b) (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3.5e+265) || !(z <= 2.3e+106)) {
tmp = (1.0 - log(t)) * z;
} else {
tmp = (x + y) + ((a * b) + (-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) :: tmp
if ((z <= (-3.5d+265)) .or. (.not. (z <= 2.3d+106))) then
tmp = (1.0d0 - log(t)) * z
else
tmp = (x + y) + ((a * b) + ((-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 tmp;
if ((z <= -3.5e+265) || !(z <= 2.3e+106)) {
tmp = (1.0 - Math.log(t)) * z;
} else {
tmp = (x + y) + ((a * b) + (-0.5 * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3.5e+265) or not (z <= 2.3e+106): tmp = (1.0 - math.log(t)) * z else: tmp = (x + y) + ((a * b) + (-0.5 * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3.5e+265) || !(z <= 2.3e+106)) tmp = Float64(Float64(1.0 - log(t)) * z); else tmp = Float64(Float64(x + y) + Float64(Float64(a * b) + Float64(-0.5 * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3.5e+265) || ~((z <= 2.3e+106))) tmp = (1.0 - log(t)) * z; else tmp = (x + y) + ((a * b) + (-0.5 * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3.5e+265], N[Not[LessEqual[z, 2.3e+106]], $MachinePrecision]], N[(N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{+265} \lor \neg \left(z \leq 2.3 \cdot 10^{+106}\right):\\
\;\;\;\;\left(1 - \log t\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + \left(a \cdot b + -0.5 \cdot b\right)\\
\end{array}
\end{array}
if z < -3.5e265 or 2.3000000000000002e106 < z Initial program 99.4%
remove-double-neg99.4%
distribute-rgt-neg-out99.4%
associate--l+99.4%
distribute-rgt-neg-in99.4%
sub-neg99.4%
metadata-eval99.4%
remove-double-neg99.4%
Simplified99.4%
Taylor expanded in z around 0 99.6%
Taylor expanded in z around inf 78.3%
if -3.5e265 < z < 2.3000000000000002e106Initial program 99.9%
Taylor expanded in z around 0 92.3%
Taylor expanded in a around 0 92.4%
Final simplification89.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- a 0.5))))
(if (or (<= t_1 -1e+167) (not (<= t_1 2e+205)))
(+ 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 <= -1e+167) || !(t_1 <= 2e+205)) {
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 <= (-1d+167)) .or. (.not. (t_1 <= 2d+205))) 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 <= -1e+167) || !(t_1 <= 2e+205)) {
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 <= -1e+167) or not (t_1 <= 2e+205): 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 <= -1e+167) || !(t_1 <= 2e+205)) 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 <= -1e+167) || ~((t_1 <= 2e+205))) 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, -1e+167], N[Not[LessEqual[t$95$1, 2e+205]], $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 -1 \cdot 10^{+167} \lor \neg \left(t_1 \leq 2 \cdot 10^{+205}\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) < -1e167 or 2.00000000000000003e205 < (*.f64 (-.f64 a 1/2) 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 y around 0 95.7%
Taylor expanded in z around 0 89.2%
if -1e167 < (*.f64 (-.f64 a 1/2) b) < 2.00000000000000003e205Initial program 99.8%
Taylor expanded in z around 0 72.8%
Taylor expanded in a around 0 68.6%
*-commutative68.6%
Simplified68.6%
Final simplification75.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (- a 0.5)))) (if (or (<= t_1 -1e+130) (not (<= t_1 1e+120))) 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 <= -1e+130) || !(t_1 <= 1e+120)) {
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 <= (-1d+130)) .or. (.not. (t_1 <= 1d+120))) 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 <= -1e+130) || !(t_1 <= 1e+120)) {
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 <= -1e+130) or not (t_1 <= 1e+120): 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 <= -1e+130) || !(t_1 <= 1e+120)) 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 <= -1e+130) || ~((t_1 <= 1e+120))) 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, -1e+130], N[Not[LessEqual[t$95$1, 1e+120]], $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 -1 \cdot 10^{+130} \lor \neg \left(t_1 \leq 10^{+120}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -1.0000000000000001e130 or 9.9999999999999998e119 < (*.f64 (-.f64 a 1/2) 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 z around 0 99.9%
Taylor expanded in b around inf 79.1%
if -1.0000000000000001e130 < (*.f64 (-.f64 a 1/2) b) < 9.9999999999999998e119Initial program 99.7%
remove-double-neg99.7%
distribute-rgt-neg-out99.7%
associate--l+99.7%
distribute-rgt-neg-in99.7%
sub-neg99.7%
metadata-eval99.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in b around 0 90.0%
Taylor expanded in z around 0 61.7%
Final simplification69.1%
(FPCore (x y z t a b) :precision binary64 (+ (+ x y) (+ (* a b) (* -0.5 b))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + y) + ((a * b) + (-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) + ((a * b) + ((-0.5d0) * b))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + y) + ((a * b) + (-0.5 * b));
}
def code(x, y, z, t, a, b): return (x + y) + ((a * b) + (-0.5 * b))
function code(x, y, z, t, a, b) return Float64(Float64(x + y) + Float64(Float64(a * b) + Float64(-0.5 * b))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + y) + ((a * b) + (-0.5 * b)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + y), $MachinePrecision] + N[(N[(a * b), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x + y\right) + \left(a \cdot b + -0.5 \cdot b\right)
\end{array}
Initial program 99.8%
Taylor expanded in z around 0 80.2%
Taylor expanded in a around 0 80.2%
Final simplification80.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y 4.8e+129) (+ x (* b (- a 0.5))) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 4.8e+129) {
tmp = x + (b * (a - 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 (y <= 4.8d+129) then
tmp = x + (b * (a - 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 (y <= 4.8e+129) {
tmp = x + (b * (a - 0.5));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 4.8e+129: tmp = x + (b * (a - 0.5)) else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 4.8e+129) tmp = Float64(x + Float64(b * Float64(a - 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 (y <= 4.8e+129) tmp = x + (b * (a - 0.5)); else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 4.8e+129], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.8 \cdot 10^{+129}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < 4.7999999999999997e129Initial 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 y around 0 86.7%
Taylor expanded in z around 0 64.9%
if 4.7999999999999997e129 < y 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 b around 0 79.9%
Taylor expanded in z around 0 74.3%
Final simplification66.1%
(FPCore (x y z t a b) :precision binary64 (+ (* b (- a 0.5)) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
return (b * (a - 0.5)) + (x + y);
}
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)
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);
}
def code(x, y, z, t, a, b): return (b * (a - 0.5)) + (x + y)
function code(x, y, z, t, a, b) return Float64(Float64(b * Float64(a - 0.5)) + Float64(x + y)) end
function tmp = code(x, y, z, t, a, b) tmp = (b * (a - 0.5)) + (x + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
b \cdot \left(a - 0.5\right) + \left(x + y\right)
\end{array}
Initial program 99.8%
Taylor expanded in z around 0 80.2%
Final simplification80.2%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.45e+83) x (if (<= x 4.4e-244) (* a b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.45e+83) {
tmp = x;
} else if (x <= 4.4e-244) {
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 <= (-1.45d+83)) then
tmp = x
else if (x <= 4.4d-244) 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 <= -1.45e+83) {
tmp = x;
} else if (x <= 4.4e-244) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.45e+83: tmp = x elif x <= 4.4e-244: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.45e+83) tmp = x; elseif (x <= 4.4e-244) 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 <= -1.45e+83) tmp = x; elseif (x <= 4.4e-244) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.45e+83], x, If[LessEqual[x, 4.4e-244], N[(a * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+83}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{-244}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if x < -1.45e83Initial 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 x around inf 62.0%
if -1.45e83 < x < 4.39999999999999969e-244Initial program 99.7%
remove-double-neg99.7%
distribute-rgt-neg-out99.7%
associate--l+99.7%
distribute-rgt-neg-in99.7%
sub-neg99.7%
metadata-eval99.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in z around 0 99.9%
Taylor expanded in a around inf 33.5%
if 4.39999999999999969e-244 < x 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 y around inf 27.6%
Final simplification36.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a -2.65e+88) (* a b) (if (<= a 5e+127) (+ x y) (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.65e+88) {
tmp = a * b;
} else if (a <= 5e+127) {
tmp = x + y;
} 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 (a <= (-2.65d+88)) then
tmp = a * b
else if (a <= 5d+127) then
tmp = x + y
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 (a <= -2.65e+88) {
tmp = a * b;
} else if (a <= 5e+127) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -2.65e+88: tmp = a * b elif a <= 5e+127: tmp = x + y else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2.65e+88) tmp = Float64(a * b); elseif (a <= 5e+127) tmp = Float64(x + y); else tmp = Float64(a * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -2.65e+88) tmp = a * b; elseif (a <= 5e+127) tmp = x + y; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.65e+88], N[(a * b), $MachinePrecision], If[LessEqual[a, 5e+127], N[(x + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.65 \cdot 10^{+88}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \leq 5 \cdot 10^{+127}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if a < -2.64999999999999994e88 or 5.0000000000000004e127 < a 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 z around 0 99.9%
Taylor expanded in a around inf 65.7%
if -2.64999999999999994e88 < a < 5.0000000000000004e127Initial 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 b around 0 71.8%
Taylor expanded in z around 0 50.0%
Final simplification54.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y 2.3e+38) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 2.3e+38) {
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 (y <= 2.3d+38) 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 (y <= 2.3e+38) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 2.3e+38: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 2.3e+38) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 2.3e+38) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 2.3e+38], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.3 \cdot 10^{+38}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 2.3000000000000001e38Initial 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 x around inf 24.7%
if 2.3000000000000001e38 < y 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 y around inf 46.1%
Final simplification29.3%
(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.8%
distribute-rgt-neg-in99.8%
sub-neg99.8%
metadata-eval99.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in x around inf 22.7%
Final simplification22.7%
(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 2023268
(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)))