
(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 18 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 (+ (- (+ z (+ x y)) (* z (log t))) (* (- a 0.5) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((z + (x + y)) - (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 = ((z + (x + y)) - (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 ((z + (x + y)) - (z * Math.log(t))) + ((a - 0.5) * b);
}
def code(x, y, z, t, a, b): return ((z + (x + y)) - (z * math.log(t))) + ((a - 0.5) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z + Float64(x + y)) - Float64(z * log(t))) + Float64(Float64(a - 0.5) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((z + (x + y)) - (z * log(t))) + ((a - 0.5) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(z + N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z + \left(x + y\right)\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)))
(if (or (<= t_1 -1e+115) (not (<= t_1 2e+127)))
(+ (* b (+ a -0.5)) (+ x y))
(- (+ x (+ y (+ z (* b -0.5)))) (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if ((t_1 <= -1e+115) || !(t_1 <= 2e+127)) {
tmp = (b * (a + -0.5)) + (x + y);
} else {
tmp = (x + (y + (z + (b * -0.5)))) - (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 = (a - 0.5d0) * b
if ((t_1 <= (-1d+115)) .or. (.not. (t_1 <= 2d+127))) then
tmp = (b * (a + (-0.5d0))) + (x + y)
else
tmp = (x + (y + (z + (b * (-0.5d0))))) - (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 = (a - 0.5) * b;
double tmp;
if ((t_1 <= -1e+115) || !(t_1 <= 2e+127)) {
tmp = (b * (a + -0.5)) + (x + y);
} else {
tmp = (x + (y + (z + (b * -0.5)))) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b tmp = 0 if (t_1 <= -1e+115) or not (t_1 <= 2e+127): tmp = (b * (a + -0.5)) + (x + y) else: tmp = (x + (y + (z + (b * -0.5)))) - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if ((t_1 <= -1e+115) || !(t_1 <= 2e+127)) tmp = Float64(Float64(b * Float64(a + -0.5)) + Float64(x + y)); else tmp = Float64(Float64(x + Float64(y + Float64(z + Float64(b * -0.5)))) - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - 0.5) * b; tmp = 0.0; if ((t_1 <= -1e+115) || ~((t_1 <= 2e+127))) tmp = (b * (a + -0.5)) + (x + y); else tmp = (x + (y + (z + (b * -0.5)))) - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+115], N[Not[LessEqual[t$95$1, 2e+127]], $MachinePrecision]], N[(N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y + N[(z + N[(b * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+115} \lor \neg \left(t_1 \leq 2 \cdot 10^{+127}\right):\\
\;\;\;\;b \cdot \left(a + -0.5\right) + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(y + \left(z + b \cdot -0.5\right)\right)\right) - z \cdot \log t\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -1e115 or 1.99999999999999991e127 < (*.f64 (-.f64 a 1/2) b) Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 96.2%
+-commutative96.2%
Simplified96.2%
if -1e115 < (*.f64 (-.f64 a 1/2) b) < 1.99999999999999991e127Initial program 99.9%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 98.0%
Final simplification97.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (- a 0.5) b)))
(if (or (<= t_1 -1e+115) (not (<= t_1 5e+114)))
(+ (* b (+ a -0.5)) (+ x y))
(- (+ x (+ y z)) (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a - 0.5) * b;
double tmp;
if ((t_1 <= -1e+115) || !(t_1 <= 5e+114)) {
tmp = (b * (a + -0.5)) + (x + y);
} else {
tmp = (x + (y + 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 = (a - 0.5d0) * b
if ((t_1 <= (-1d+115)) .or. (.not. (t_1 <= 5d+114))) then
tmp = (b * (a + (-0.5d0))) + (x + y)
else
tmp = (x + (y + 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 = (a - 0.5) * b;
double tmp;
if ((t_1 <= -1e+115) || !(t_1 <= 5e+114)) {
tmp = (b * (a + -0.5)) + (x + y);
} else {
tmp = (x + (y + z)) - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a - 0.5) * b tmp = 0 if (t_1 <= -1e+115) or not (t_1 <= 5e+114): tmp = (b * (a + -0.5)) + (x + y) else: tmp = (x + (y + z)) - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a - 0.5) * b) tmp = 0.0 if ((t_1 <= -1e+115) || !(t_1 <= 5e+114)) tmp = Float64(Float64(b * Float64(a + -0.5)) + Float64(x + y)); else tmp = Float64(Float64(x + Float64(y + z)) - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a - 0.5) * b; tmp = 0.0; if ((t_1 <= -1e+115) || ~((t_1 <= 5e+114))) tmp = (b * (a + -0.5)) + (x + y); else tmp = (x + (y + z)) - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e+115], N[Not[LessEqual[t$95$1, 5e+114]], $MachinePrecision]], N[(N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a - 0.5\right) \cdot b\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+115} \lor \neg \left(t_1 \leq 5 \cdot 10^{+114}\right):\\
\;\;\;\;b \cdot \left(a + -0.5\right) + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(y + z\right)\right) - z \cdot \log t\\
\end{array}
\end{array}
if (*.f64 (-.f64 a 1/2) b) < -1e115 or 5.0000000000000001e114 < (*.f64 (-.f64 a 1/2) b) Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 94.8%
+-commutative94.8%
Simplified94.8%
if -1e115 < (*.f64 (-.f64 a 1/2) b) < 5.0000000000000001e114Initial program 99.9%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 98.6%
Taylor expanded in b around 0 93.5%
Final simplification94.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (+ a -0.5)))) (if (<= x -1.45e+125) (+ t_1 (+ x y)) (+ t_1 (+ y (* z (- 1.0 (log t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a + -0.5);
double tmp;
if (x <= -1.45e+125) {
tmp = t_1 + (x + y);
} else {
tmp = t_1 + (y + (z * (1.0 - log(t))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a + (-0.5d0))
if (x <= (-1.45d+125)) then
tmp = t_1 + (x + y)
else
tmp = t_1 + (y + (z * (1.0d0 - log(t))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a + -0.5);
double tmp;
if (x <= -1.45e+125) {
tmp = t_1 + (x + y);
} else {
tmp = t_1 + (y + (z * (1.0 - Math.log(t))));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a + -0.5) tmp = 0 if x <= -1.45e+125: tmp = t_1 + (x + y) else: tmp = t_1 + (y + (z * (1.0 - math.log(t)))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a + -0.5)) tmp = 0.0 if (x <= -1.45e+125) tmp = Float64(t_1 + Float64(x + y)); else tmp = Float64(t_1 + Float64(y + Float64(z * Float64(1.0 - log(t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a + -0.5); tmp = 0.0; if (x <= -1.45e+125) tmp = t_1 + (x + y); else tmp = t_1 + (y + (z * (1.0 - log(t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.45e+125], N[(t$95$1 + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(y + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a + -0.5\right)\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{+125}:\\
\;\;\;\;t_1 + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + \left(y + z \cdot \left(1 - \log t\right)\right)\\
\end{array}
\end{array}
if x < -1.44999999999999997e125Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 96.8%
+-commutative96.8%
Simplified96.8%
if -1.44999999999999997e125 < x Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Taylor expanded in x around 0 87.2%
Final simplification88.9%
(FPCore (x y z t a b) :precision binary64 (+ (* b (+ a -0.5)) (+ (* z (- 1.0 (log t))) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
return (b * (a + -0.5)) + ((z * (1.0 - log(t))) + (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))) + ((z * (1.0d0 - log(t))) + (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)) + ((z * (1.0 - Math.log(t))) + (x + y));
}
def code(x, y, z, t, a, b): return (b * (a + -0.5)) + ((z * (1.0 - math.log(t))) + (x + y))
function code(x, y, z, t, a, b) return Float64(Float64(b * Float64(a + -0.5)) + Float64(Float64(z * Float64(1.0 - log(t))) + Float64(x + y))) end
function tmp = code(x, y, z, t, a, b) tmp = (b * (a + -0.5)) + ((z * (1.0 - log(t))) + (x + y)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
b \cdot \left(a + -0.5\right) + \left(z \cdot \left(1 - \log t\right) + \left(x + y\right)\right)
\end{array}
Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 99.9%
Final simplification99.9%
(FPCore (x y z t a b) :precision binary64 (+ (+ (- z (* z (log t))) (+ x y)) (* b (+ a -0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return ((z - (z * log(t))) + (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 = ((z - (z * log(t))) + (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 ((z - (z * Math.log(t))) + (x + y)) + (b * (a + -0.5));
}
def code(x, y, z, t, a, b): return ((z - (z * math.log(t))) + (x + y)) + (b * (a + -0.5))
function code(x, y, z, t, a, b) return Float64(Float64(Float64(z - Float64(z * log(t))) + Float64(x + y)) + Float64(b * Float64(a + -0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = ((z - (z * log(t))) + (x + y)) + (b * (a + -0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(z - z \cdot \log t\right) + \left(x + y\right)\right) + b \cdot \left(a + -0.5\right)
\end{array}
Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))))
(if (<= z -3.7e+239)
(- (+ x z) t_1)
(if (<= z 5.5e+60) (+ (* b (+ a -0.5)) (+ x y)) (+ (- z t_1) (+ x y))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double tmp;
if (z <= -3.7e+239) {
tmp = (x + z) - t_1;
} else if (z <= 5.5e+60) {
tmp = (b * (a + -0.5)) + (x + y);
} else {
tmp = (z - t_1) + (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 = z * log(t)
if (z <= (-3.7d+239)) then
tmp = (x + z) - t_1
else if (z <= 5.5d+60) then
tmp = (b * (a + (-0.5d0))) + (x + y)
else
tmp = (z - t_1) + (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 = z * Math.log(t);
double tmp;
if (z <= -3.7e+239) {
tmp = (x + z) - t_1;
} else if (z <= 5.5e+60) {
tmp = (b * (a + -0.5)) + (x + y);
} else {
tmp = (z - t_1) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) tmp = 0 if z <= -3.7e+239: tmp = (x + z) - t_1 elif z <= 5.5e+60: tmp = (b * (a + -0.5)) + (x + y) else: tmp = (z - t_1) + (x + y) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) tmp = 0.0 if (z <= -3.7e+239) tmp = Float64(Float64(x + z) - t_1); elseif (z <= 5.5e+60) tmp = Float64(Float64(b * Float64(a + -0.5)) + Float64(x + y)); else tmp = Float64(Float64(z - t_1) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * log(t); tmp = 0.0; if (z <= -3.7e+239) tmp = (x + z) - t_1; elseif (z <= 5.5e+60) tmp = (b * (a + -0.5)) + (x + y); else tmp = (z - t_1) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.7e+239], N[(N[(x + z), $MachinePrecision] - t$95$1), $MachinePrecision], If[LessEqual[z, 5.5e+60], N[(N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(z - t$95$1), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
\mathbf{if}\;z \leq -3.7 \cdot 10^{+239}:\\
\;\;\;\;\left(x + z\right) - t_1\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{+60}:\\
\;\;\;\;b \cdot \left(a + -0.5\right) + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z - t_1\right) + \left(x + y\right)\\
\end{array}
\end{array}
if z < -3.69999999999999998e239Initial program 99.4%
associate--l+99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in a around 0 99.4%
Taylor expanded in b around 0 99.4%
Taylor expanded in y around 0 94.8%
+-commutative94.8%
Simplified94.8%
if -3.69999999999999998e239 < z < 5.5000000000000001e60Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 92.6%
+-commutative92.6%
Simplified92.6%
if 5.5000000000000001e60 < z Initial program 99.7%
associate--l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around 0 93.1%
Taylor expanded in b around 0 93.1%
associate-+r+93.1%
associate--l+93.1%
+-commutative93.1%
*-commutative93.1%
Applied egg-rr93.1%
Final simplification92.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -8e+239) (not (<= z 3.05e+113))) (- (+ x z) (* z (log t))) (+ (* b (+ a -0.5)) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -8e+239) || !(z <= 3.05e+113)) {
tmp = (x + z) - (z * log(t));
} else {
tmp = (b * (a + -0.5)) + (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 ((z <= (-8d+239)) .or. (.not. (z <= 3.05d+113))) then
tmp = (x + z) - (z * log(t))
else
tmp = (b * (a + (-0.5d0))) + (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 ((z <= -8e+239) || !(z <= 3.05e+113)) {
tmp = (x + z) - (z * Math.log(t));
} else {
tmp = (b * (a + -0.5)) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -8e+239) or not (z <= 3.05e+113): tmp = (x + z) - (z * math.log(t)) else: tmp = (b * (a + -0.5)) + (x + y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -8e+239) || !(z <= 3.05e+113)) tmp = Float64(Float64(x + z) - Float64(z * log(t))); else tmp = Float64(Float64(b * Float64(a + -0.5)) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -8e+239) || ~((z <= 3.05e+113))) tmp = (x + z) - (z * log(t)); else tmp = (b * (a + -0.5)) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -8e+239], N[Not[LessEqual[z, 3.05e+113]], $MachinePrecision]], N[(N[(x + z), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+239} \lor \neg \left(z \leq 3.05 \cdot 10^{+113}\right):\\
\;\;\;\;\left(x + z\right) - z \cdot \log t\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a + -0.5\right) + \left(x + y\right)\\
\end{array}
\end{array}
if z < -7.99999999999999993e239 or 3.04999999999999998e113 < z Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 95.1%
Taylor expanded in b around 0 95.1%
Taylor expanded in y around 0 87.6%
+-commutative87.6%
Simplified87.6%
if -7.99999999999999993e239 < z < 3.04999999999999998e113Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 91.0%
+-commutative91.0%
Simplified91.0%
Final simplification90.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -3e+239) (not (<= z 9.8e+113))) (* z (- 1.0 (log t))) (+ (* b (+ a -0.5)) (+ x y))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -3e+239) || !(z <= 9.8e+113)) {
tmp = z * (1.0 - log(t));
} else {
tmp = (b * (a + -0.5)) + (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 ((z <= (-3d+239)) .or. (.not. (z <= 9.8d+113))) then
tmp = z * (1.0d0 - log(t))
else
tmp = (b * (a + (-0.5d0))) + (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 ((z <= -3e+239) || !(z <= 9.8e+113)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = (b * (a + -0.5)) + (x + y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -3e+239) or not (z <= 9.8e+113): tmp = z * (1.0 - math.log(t)) else: tmp = (b * (a + -0.5)) + (x + y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -3e+239) || !(z <= 9.8e+113)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(Float64(b * Float64(a + -0.5)) + Float64(x + y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -3e+239) || ~((z <= 9.8e+113))) tmp = z * (1.0 - log(t)); else tmp = (b * (a + -0.5)) + (x + y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -3e+239], N[Not[LessEqual[z, 9.8e+113]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3 \cdot 10^{+239} \lor \neg \left(z \leq 9.8 \cdot 10^{+113}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a + -0.5\right) + \left(x + y\right)\\
\end{array}
\end{array}
if z < -2.9999999999999999e239 or 9.80000000000000043e113 < z Initial program 99.6%
associate--l+99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in a around 0 95.0%
Taylor expanded in b around 0 95.0%
Taylor expanded in z around inf 75.9%
if -2.9999999999999999e239 < z < 9.80000000000000043e113Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 91.0%
+-commutative91.0%
Simplified91.0%
Final simplification88.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -2.45e+240) (* z (- 1.0 (log t))) (if (<= z 9.2e+113) (+ (* b (+ a -0.5)) (+ x y)) (- z (* z (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.45e+240) {
tmp = z * (1.0 - log(t));
} else if (z <= 9.2e+113) {
tmp = (b * (a + -0.5)) + (x + y);
} else {
tmp = z - (z * log(t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-2.45d+240)) then
tmp = z * (1.0d0 - log(t))
else if (z <= 9.2d+113) then
tmp = (b * (a + (-0.5d0))) + (x + y)
else
tmp = z - (z * log(t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.45e+240) {
tmp = z * (1.0 - Math.log(t));
} else if (z <= 9.2e+113) {
tmp = (b * (a + -0.5)) + (x + y);
} else {
tmp = z - (z * Math.log(t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -2.45e+240: tmp = z * (1.0 - math.log(t)) elif z <= 9.2e+113: tmp = (b * (a + -0.5)) + (x + y) else: tmp = z - (z * math.log(t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.45e+240) tmp = Float64(z * Float64(1.0 - log(t))); elseif (z <= 9.2e+113) tmp = Float64(Float64(b * Float64(a + -0.5)) + Float64(x + y)); else tmp = Float64(z - Float64(z * log(t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -2.45e+240) tmp = z * (1.0 - log(t)); elseif (z <= 9.2e+113) tmp = (b * (a + -0.5)) + (x + y); else tmp = z - (z * log(t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.45e+240], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 9.2e+113], N[(N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision] + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(z - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.45 \cdot 10^{+240}:\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{elif}\;z \leq 9.2 \cdot 10^{+113}:\\
\;\;\;\;b \cdot \left(a + -0.5\right) + \left(x + y\right)\\
\mathbf{else}:\\
\;\;\;\;z - z \cdot \log t\\
\end{array}
\end{array}
if z < -2.45e240Initial program 99.4%
associate--l+99.3%
sub-neg99.3%
metadata-eval99.3%
Simplified99.3%
Taylor expanded in a around 0 99.4%
Taylor expanded in b around 0 99.4%
Taylor expanded in z around inf 85.7%
if -2.45e240 < z < 9.19999999999999987e113Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around 0 91.0%
+-commutative91.0%
Simplified91.0%
if 9.19999999999999987e113 < z Initial program 99.6%
Taylor expanded in z around inf 78.7%
Taylor expanded in b around 0 72.5%
Final simplification88.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -2.25e+74) (not (<= b 6.2e+46))) (* (- a 0.5) b) (+ x y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -2.25e+74) || !(b <= 6.2e+46)) {
tmp = (a - 0.5) * 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 ((b <= (-2.25d+74)) .or. (.not. (b <= 6.2d+46))) then
tmp = (a - 0.5d0) * 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 ((b <= -2.25e+74) || !(b <= 6.2e+46)) {
tmp = (a - 0.5) * b;
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -2.25e+74) or not (b <= 6.2e+46): tmp = (a - 0.5) * b else: tmp = x + y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -2.25e+74) || !(b <= 6.2e+46)) tmp = Float64(Float64(a - 0.5) * b); else tmp = Float64(x + y); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -2.25e+74) || ~((b <= 6.2e+46))) tmp = (a - 0.5) * b; else tmp = x + y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -2.25e+74], N[Not[LessEqual[b, 6.2e+46]], $MachinePrecision]], N[(N[(a - 0.5), $MachinePrecision] * b), $MachinePrecision], N[(x + y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.25 \cdot 10^{+74} \lor \neg \left(b \leq 6.2 \cdot 10^{+46}\right):\\
\;\;\;\;\left(a - 0.5\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if b < -2.25e74 or 6.1999999999999995e46 < b Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around inf 69.3%
if -2.25e74 < b < 6.1999999999999995e46Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 89.1%
Taylor expanded in b around 0 86.1%
Taylor expanded in z around 0 59.4%
+-commutative59.4%
Simplified59.4%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.6e+162) (+ 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 <= 1.6e+162) {
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 <= 1.6d+162) 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 <= 1.6e+162) {
tmp = x + (b * (a + -0.5));
} else {
tmp = x + y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.6e+162: 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 <= 1.6e+162) 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 <= 1.6e+162) 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, 1.6e+162], 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 1.6 \cdot 10^{+162}:\\
\;\;\;\;x + b \cdot \left(a + -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;x + y\\
\end{array}
\end{array}
if y < 1.6000000000000001e162Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 64.3%
if 1.6000000000000001e162 < y Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around 0 94.6%
Taylor expanded in b around 0 91.9%
Taylor expanded in z around 0 83.1%
+-commutative83.1%
Simplified83.1%
Final simplification66.9%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (* b (+ a -0.5)))) (if (<= y 1.7e+25) (+ x t_1) (+ y t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a + -0.5);
double tmp;
if (y <= 1.7e+25) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = b * (a + (-0.5d0))
if (y <= 1.7d+25) then
tmp = x + t_1
else
tmp = y + t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (a + -0.5);
double tmp;
if (y <= 1.7e+25) {
tmp = x + t_1;
} else {
tmp = y + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (a + -0.5) tmp = 0 if y <= 1.7e+25: tmp = x + t_1 else: tmp = y + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(a + -0.5)) tmp = 0.0 if (y <= 1.7e+25) tmp = Float64(x + t_1); else tmp = Float64(y + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (a + -0.5); tmp = 0.0; if (y <= 1.7e+25) tmp = x + t_1; else tmp = y + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(a + -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 1.7e+25], N[(x + t$95$1), $MachinePrecision], N[(y + t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(a + -0.5\right)\\
\mathbf{if}\;y \leq 1.7 \cdot 10^{+25}:\\
\;\;\;\;x + t_1\\
\mathbf{else}:\\
\;\;\;\;y + t_1\\
\end{array}
\end{array}
if y < 1.69999999999999992e25Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 63.9%
if 1.69999999999999992e25 < y Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 83.9%
Final simplification68.5%
(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.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around 0 79.7%
+-commutative79.7%
Simplified79.7%
Final simplification79.7%
(FPCore (x y z t a b) :precision binary64 (if (<= y 5.1e-46) x (if (<= y 8.5e+161) (* a b) y)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 5.1e-46) {
tmp = x;
} else if (y <= 8.5e+161) {
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 (y <= 5.1d-46) then
tmp = x
else if (y <= 8.5d+161) 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 (y <= 5.1e-46) {
tmp = x;
} else if (y <= 8.5e+161) {
tmp = a * b;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 5.1e-46: tmp = x elif y <= 8.5e+161: tmp = a * b else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 5.1e-46) tmp = x; elseif (y <= 8.5e+161) 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 (y <= 5.1e-46) tmp = x; elseif (y <= 8.5e+161) tmp = a * b; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 5.1e-46], x, If[LessEqual[y, 8.5e+161], N[(a * b), $MachinePrecision], y]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.1 \cdot 10^{-46}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{+161}:\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 5.0999999999999997e-46Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 79.4%
Taylor expanded in b around 0 66.7%
Taylor expanded in x around inf 30.8%
if 5.0999999999999997e-46 < y < 8.50000000000000007e161Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 46.1%
*-commutative46.1%
Simplified46.1%
if 8.50000000000000007e161 < y Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around 0 94.6%
Taylor expanded in b around 0 91.9%
Taylor expanded in y around inf 77.0%
Final simplification39.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -3.6e+150) (* a b) (if (<= b 2.2e+129) (+ x y) (* a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -3.6e+150) {
tmp = a * b;
} else if (b <= 2.2e+129) {
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 (b <= (-3.6d+150)) then
tmp = a * b
else if (b <= 2.2d+129) 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 (b <= -3.6e+150) {
tmp = a * b;
} else if (b <= 2.2e+129) {
tmp = x + y;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -3.6e+150: tmp = a * b elif b <= 2.2e+129: tmp = x + y else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -3.6e+150) tmp = Float64(a * b); elseif (b <= 2.2e+129) 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 (b <= -3.6e+150) tmp = a * b; elseif (b <= 2.2e+129) tmp = x + y; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -3.6e+150], N[(a * b), $MachinePrecision], If[LessEqual[b, 2.2e+129], N[(x + y), $MachinePrecision], N[(a * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{+150}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;b \leq 2.2 \cdot 10^{+129}:\\
\;\;\;\;x + y\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if b < -3.59999999999999986e150 or 2.1999999999999999e129 < b Initial program 100.0%
associate--l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around inf 52.9%
*-commutative52.9%
Simplified52.9%
if -3.59999999999999986e150 < b < 2.1999999999999999e129Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 86.3%
Taylor expanded in b around 0 81.4%
Taylor expanded in z around 0 55.9%
+-commutative55.9%
Simplified55.9%
Final simplification55.2%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.2e+25) x y))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.2e+25) {
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 <= 1.2d+25) 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 <= 1.2e+25) {
tmp = x;
} else {
tmp = y;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.2e+25: tmp = x else: tmp = y return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.2e+25) tmp = x; else tmp = y; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.2e+25) tmp = x; else tmp = y; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.2e+25], x, y]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.2 \cdot 10^{+25}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y\\
\end{array}
\end{array}
if y < 1.19999999999999998e25Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 77.8%
Taylor expanded in b around 0 64.4%
Taylor expanded in x around inf 28.4%
if 1.19999999999999998e25 < y Initial program 99.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 75.5%
Taylor expanded in b around 0 70.4%
Taylor expanded in y around inf 54.4%
Final simplification34.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.9%
associate--l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 77.3%
Taylor expanded in b around 0 65.7%
Taylor expanded in x around inf 23.5%
Final simplification23.5%
(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 2023297
(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)))