
(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 (+ (- (+ 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 + Float64(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[(x + N[(y + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x + \left(y + z\right)\right) - z \cdot \log t\right) + \left(a + -0.5\right) \cdot b
\end{array}
Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ x (+ y z)) (* z (log t)))))
(if (or (<= (- a 0.5) -5e+16) (not (<= (- a 0.5) -0.4)))
(+ t_1 (* a b))
(+ t_1 (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y + z)) - (z * log(t));
double tmp;
if (((a - 0.5) <= -5e+16) || !((a - 0.5) <= -0.4)) {
tmp = t_1 + (a * b);
} else {
tmp = t_1 + (-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 = (x + (y + z)) - (z * log(t))
if (((a - 0.5d0) <= (-5d+16)) .or. (.not. ((a - 0.5d0) <= (-0.4d0)))) then
tmp = t_1 + (a * b)
else
tmp = t_1 + ((-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 = (x + (y + z)) - (z * Math.log(t));
double tmp;
if (((a - 0.5) <= -5e+16) || !((a - 0.5) <= -0.4)) {
tmp = t_1 + (a * b);
} else {
tmp = t_1 + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y + z)) - (z * math.log(t)) tmp = 0 if ((a - 0.5) <= -5e+16) or not ((a - 0.5) <= -0.4): tmp = t_1 + (a * b) else: tmp = t_1 + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y + z)) - Float64(z * log(t))) tmp = 0.0 if ((Float64(a - 0.5) <= -5e+16) || !(Float64(a - 0.5) <= -0.4)) tmp = Float64(t_1 + Float64(a * b)); else tmp = Float64(t_1 + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y + z)) - (z * log(t)); tmp = 0.0; if (((a - 0.5) <= -5e+16) || ~(((a - 0.5) <= -0.4))) tmp = t_1 + (a * b); else tmp = t_1 + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y + z), $MachinePrecision]), $MachinePrecision] - N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -5e+16], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], -0.4]], $MachinePrecision]], N[(t$95$1 + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + \left(y + z\right)\right) - z \cdot \log t\\
\mathbf{if}\;a - 0.5 \leq -5 \cdot 10^{+16} \lor \neg \left(a - 0.5 \leq -0.4\right):\\
\;\;\;\;t\_1 + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;t\_1 + -0.5 \cdot b\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -5e16 or -0.40000000000000002 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 99.9%
if -5e16 < (-.f64 a #s(literal 1/2 binary64)) < -0.40000000000000002Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 99.8%
Final simplification99.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))))
(if (or (<= (- a 0.5) -1e+112) (not (<= (- a 0.5) 4e+37)))
(+ (* a b) (- (+ y z) t_1))
(+ (- (+ x (+ y z)) t_1) (* -0.5 b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double tmp;
if (((a - 0.5) <= -1e+112) || !((a - 0.5) <= 4e+37)) {
tmp = (a * b) + ((y + z) - t_1);
} else {
tmp = ((x + (y + z)) - t_1) + (-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 = z * log(t)
if (((a - 0.5d0) <= (-1d+112)) .or. (.not. ((a - 0.5d0) <= 4d+37))) then
tmp = (a * b) + ((y + z) - t_1)
else
tmp = ((x + (y + z)) - t_1) + ((-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 = z * Math.log(t);
double tmp;
if (((a - 0.5) <= -1e+112) || !((a - 0.5) <= 4e+37)) {
tmp = (a * b) + ((y + z) - t_1);
} else {
tmp = ((x + (y + z)) - t_1) + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) tmp = 0 if ((a - 0.5) <= -1e+112) or not ((a - 0.5) <= 4e+37): tmp = (a * b) + ((y + z) - t_1) else: tmp = ((x + (y + z)) - t_1) + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) tmp = 0.0 if ((Float64(a - 0.5) <= -1e+112) || !(Float64(a - 0.5) <= 4e+37)) tmp = Float64(Float64(a * b) + Float64(Float64(y + z) - t_1)); else tmp = Float64(Float64(Float64(x + Float64(y + z)) - t_1) + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * log(t); tmp = 0.0; if (((a - 0.5) <= -1e+112) || ~(((a - 0.5) <= 4e+37))) tmp = (a * b) + ((y + z) - t_1); else tmp = ((x + (y + z)) - t_1) + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[Log[t], $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -1e+112], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], 4e+37]], $MachinePrecision]], N[(N[(a * b), $MachinePrecision] + N[(N[(y + z), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + N[(y + z), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision] + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
\mathbf{if}\;a - 0.5 \leq -1 \cdot 10^{+112} \lor \neg \left(a - 0.5 \leq 4 \cdot 10^{+37}\right):\\
\;\;\;\;a \cdot b + \left(\left(y + z\right) - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x + \left(y + z\right)\right) - t\_1\right) + -0.5 \cdot b\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -9.9999999999999993e111 or 3.99999999999999982e37 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 99.9%
Taylor expanded in x around 0 91.0%
+-commutative91.0%
Simplified91.0%
if -9.9999999999999993e111 < (-.f64 a #s(literal 1/2 binary64)) < 3.99999999999999982e37Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around 0 97.1%
Final simplification95.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))))
(if (<= (+ x y) -1e-63)
(+ (* a b) (- (+ x z) t_1))
(if (<= (+ x y) 1e+66)
(+ (* (+ a -0.5) b) (- z t_1))
(+ (* a b) (- (+ y z) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double tmp;
if ((x + y) <= -1e-63) {
tmp = (a * b) + ((x + z) - t_1);
} else if ((x + y) <= 1e+66) {
tmp = ((a + -0.5) * b) + (z - t_1);
} else {
tmp = (a * b) + ((y + z) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * log(t)
if ((x + y) <= (-1d-63)) then
tmp = (a * b) + ((x + z) - t_1)
else if ((x + y) <= 1d+66) then
tmp = ((a + (-0.5d0)) * b) + (z - t_1)
else
tmp = (a * b) + ((y + z) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * Math.log(t);
double tmp;
if ((x + y) <= -1e-63) {
tmp = (a * b) + ((x + z) - t_1);
} else if ((x + y) <= 1e+66) {
tmp = ((a + -0.5) * b) + (z - t_1);
} else {
tmp = (a * b) + ((y + z) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) tmp = 0 if (x + y) <= -1e-63: tmp = (a * b) + ((x + z) - t_1) elif (x + y) <= 1e+66: tmp = ((a + -0.5) * b) + (z - t_1) else: tmp = (a * b) + ((y + z) - t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) tmp = 0.0 if (Float64(x + y) <= -1e-63) tmp = Float64(Float64(a * b) + Float64(Float64(x + z) - t_1)); elseif (Float64(x + y) <= 1e+66) tmp = Float64(Float64(Float64(a + -0.5) * b) + Float64(z - t_1)); else tmp = Float64(Float64(a * b) + Float64(Float64(y + z) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * log(t); tmp = 0.0; if ((x + y) <= -1e-63) tmp = (a * b) + ((x + z) - t_1); elseif ((x + y) <= 1e+66) tmp = ((a + -0.5) * b) + (z - t_1); else tmp = (a * b) + ((y + z) - t_1); 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[N[(x + y), $MachinePrecision], -1e-63], N[(N[(a * b), $MachinePrecision] + N[(N[(x + z), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 1e+66], N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(z - t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(a * b), $MachinePrecision] + N[(N[(y + z), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
\mathbf{if}\;x + y \leq -1 \cdot 10^{-63}:\\
\;\;\;\;a \cdot b + \left(\left(x + z\right) - t\_1\right)\\
\mathbf{elif}\;x + y \leq 10^{+66}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b + \left(z - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot b + \left(\left(y + z\right) - t\_1\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -1.00000000000000007e-63Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 89.8%
Taylor expanded in y around 0 70.5%
+-commutative70.5%
Simplified70.5%
if -1.00000000000000007e-63 < (+.f64 x y) < 9.99999999999999945e65Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 91.2%
if 9.99999999999999945e65 < (+.f64 x y) Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around inf 95.3%
Taylor expanded in x around 0 59.5%
+-commutative59.5%
Simplified59.5%
Final simplification72.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))))
(if (<= (+ x y) -1e-63)
(+ (* a b) (- (+ x z) t_1))
(if (<= (+ x y) 5e+62)
(+ (* (+ a -0.5) b) (- z t_1))
(+ (* -0.5 b) (- (+ y z) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double tmp;
if ((x + y) <= -1e-63) {
tmp = (a * b) + ((x + z) - t_1);
} else if ((x + y) <= 5e+62) {
tmp = ((a + -0.5) * b) + (z - t_1);
} else {
tmp = (-0.5 * b) + ((y + z) - t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = z * log(t)
if ((x + y) <= (-1d-63)) then
tmp = (a * b) + ((x + z) - t_1)
else if ((x + y) <= 5d+62) then
tmp = ((a + (-0.5d0)) * b) + (z - t_1)
else
tmp = ((-0.5d0) * b) + ((y + z) - t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * Math.log(t);
double tmp;
if ((x + y) <= -1e-63) {
tmp = (a * b) + ((x + z) - t_1);
} else if ((x + y) <= 5e+62) {
tmp = ((a + -0.5) * b) + (z - t_1);
} else {
tmp = (-0.5 * b) + ((y + z) - t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) tmp = 0 if (x + y) <= -1e-63: tmp = (a * b) + ((x + z) - t_1) elif (x + y) <= 5e+62: tmp = ((a + -0.5) * b) + (z - t_1) else: tmp = (-0.5 * b) + ((y + z) - t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) tmp = 0.0 if (Float64(x + y) <= -1e-63) tmp = Float64(Float64(a * b) + Float64(Float64(x + z) - t_1)); elseif (Float64(x + y) <= 5e+62) tmp = Float64(Float64(Float64(a + -0.5) * b) + Float64(z - t_1)); else tmp = Float64(Float64(-0.5 * b) + Float64(Float64(y + z) - t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * log(t); tmp = 0.0; if ((x + y) <= -1e-63) tmp = (a * b) + ((x + z) - t_1); elseif ((x + y) <= 5e+62) tmp = ((a + -0.5) * b) + (z - t_1); else tmp = (-0.5 * b) + ((y + z) - t_1); 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[N[(x + y), $MachinePrecision], -1e-63], N[(N[(a * b), $MachinePrecision] + N[(N[(x + z), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 5e+62], N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(z - t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(-0.5 * b), $MachinePrecision] + N[(N[(y + z), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
\mathbf{if}\;x + y \leq -1 \cdot 10^{-63}:\\
\;\;\;\;a \cdot b + \left(\left(x + z\right) - t\_1\right)\\
\mathbf{elif}\;x + y \leq 5 \cdot 10^{+62}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b + \left(z - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;-0.5 \cdot b + \left(\left(y + z\right) - t\_1\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -1.00000000000000007e-63Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 89.8%
Taylor expanded in y around 0 70.5%
+-commutative70.5%
Simplified70.5%
if -1.00000000000000007e-63 < (+.f64 x y) < 5.00000000000000029e62Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 91.8%
if 5.00000000000000029e62 < (+.f64 x y) Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in a around 0 84.5%
Taylor expanded in x around 0 49.4%
+-commutative58.2%
Simplified49.4%
Final simplification68.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (log t))))
(if (<= (+ x y) -1e-63)
(+ (* a b) (- (+ x z) t_1))
(if (<= (+ x y) 5e+92)
(+ (* (+ a -0.5) b) (- z t_1))
(+ (+ x y) (* z (- 1.0 (log t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * log(t);
double tmp;
if ((x + y) <= -1e-63) {
tmp = (a * b) + ((x + z) - t_1);
} else if ((x + y) <= 5e+92) {
tmp = ((a + -0.5) * b) + (z - t_1);
} else {
tmp = (x + 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 = z * log(t)
if ((x + y) <= (-1d-63)) then
tmp = (a * b) + ((x + z) - t_1)
else if ((x + y) <= 5d+92) then
tmp = ((a + (-0.5d0)) * b) + (z - t_1)
else
tmp = (x + 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 = z * Math.log(t);
double tmp;
if ((x + y) <= -1e-63) {
tmp = (a * b) + ((x + z) - t_1);
} else if ((x + y) <= 5e+92) {
tmp = ((a + -0.5) * b) + (z - t_1);
} else {
tmp = (x + y) + (z * (1.0 - Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * math.log(t) tmp = 0 if (x + y) <= -1e-63: tmp = (a * b) + ((x + z) - t_1) elif (x + y) <= 5e+92: tmp = ((a + -0.5) * b) + (z - t_1) else: tmp = (x + y) + (z * (1.0 - math.log(t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * log(t)) tmp = 0.0 if (Float64(x + y) <= -1e-63) tmp = Float64(Float64(a * b) + Float64(Float64(x + z) - t_1)); elseif (Float64(x + y) <= 5e+92) tmp = Float64(Float64(Float64(a + -0.5) * b) + Float64(z - t_1)); else tmp = Float64(Float64(x + y) + Float64(z * Float64(1.0 - log(t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * log(t); tmp = 0.0; if ((x + y) <= -1e-63) tmp = (a * b) + ((x + z) - t_1); elseif ((x + y) <= 5e+92) tmp = ((a + -0.5) * b) + (z - t_1); else tmp = (x + y) + (z * (1.0 - log(t))); 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[N[(x + y), $MachinePrecision], -1e-63], N[(N[(a * b), $MachinePrecision] + N[(N[(x + z), $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(x + y), $MachinePrecision], 5e+92], N[(N[(N[(a + -0.5), $MachinePrecision] * b), $MachinePrecision] + N[(z - t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \log t\\
\mathbf{if}\;x + y \leq -1 \cdot 10^{-63}:\\
\;\;\;\;a \cdot b + \left(\left(x + z\right) - t\_1\right)\\
\mathbf{elif}\;x + y \leq 5 \cdot 10^{+92}:\\
\;\;\;\;\left(a + -0.5\right) \cdot b + \left(z - t\_1\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if (+.f64 x y) < -1.00000000000000007e-63Initial program 99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l-99.8%
+-commutative99.8%
associate-+l+99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 89.8%
Taylor expanded in y around 0 70.5%
+-commutative70.5%
Simplified70.5%
if -1.00000000000000007e-63 < (+.f64 x y) < 5.00000000000000022e92Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 88.2%
if 5.00000000000000022e92 < (+.f64 x y) Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in b around 0 81.1%
Final simplification78.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.45e+110) (not (<= b 2.4e+123))) (+ x (* b (- a 0.5))) (+ (+ x y) (* z (- 1.0 (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.45e+110) || !(b <= 2.4e+123)) {
tmp = x + (b * (a - 0.5));
} else {
tmp = (x + 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) :: tmp
if ((b <= (-1.45d+110)) .or. (.not. (b <= 2.4d+123))) then
tmp = x + (b * (a - 0.5d0))
else
tmp = (x + 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 tmp;
if ((b <= -1.45e+110) || !(b <= 2.4e+123)) {
tmp = x + (b * (a - 0.5));
} else {
tmp = (x + y) + (z * (1.0 - Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.45e+110) or not (b <= 2.4e+123): tmp = x + (b * (a - 0.5)) else: tmp = (x + y) + (z * (1.0 - math.log(t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.45e+110) || !(b <= 2.4e+123)) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(Float64(x + y) + 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 ((b <= -1.45e+110) || ~((b <= 2.4e+123))) tmp = x + (b * (a - 0.5)); else tmp = (x + y) + (z * (1.0 - log(t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.45e+110], N[Not[LessEqual[b, 2.4e+123]], $MachinePrecision]], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + y), $MachinePrecision] + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.45 \cdot 10^{+110} \lor \neg \left(b \leq 2.4 \cdot 10^{+123}\right):\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + y\right) + z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if b < -1.45e110 or 2.39999999999999989e123 < b Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 85.3%
+-commutative48.1%
Simplified85.3%
Taylor expanded in z around 0 81.8%
if -1.45e110 < b < 2.39999999999999989e123Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in b around 0 84.9%
Final simplification84.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.7e+113) (not (<= z 3.2e+97))) (+ x (* z (- 1.0 (log t)))) (+ x (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.7e+113) || !(z <= 3.2e+97)) {
tmp = x + (z * (1.0 - log(t)));
} else {
tmp = x + (b * (a - 0.5));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-2.7d+113)) .or. (.not. (z <= 3.2d+97))) then
tmp = x + (z * (1.0d0 - log(t)))
else
tmp = x + (b * (a - 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.7e+113) || !(z <= 3.2e+97)) {
tmp = x + (z * (1.0 - Math.log(t)));
} else {
tmp = x + (b * (a - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.7e+113) or not (z <= 3.2e+97): tmp = x + (z * (1.0 - math.log(t))) else: tmp = x + (b * (a - 0.5)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.7e+113) || !(z <= 3.2e+97)) tmp = Float64(x + Float64(z * Float64(1.0 - log(t)))); else tmp = Float64(x + Float64(b * Float64(a - 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -2.7e+113) || ~((z <= 3.2e+97))) tmp = x + (z * (1.0 - log(t))); else tmp = x + (b * (a - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.7e+113], N[Not[LessEqual[z, 3.2e+97]], $MachinePrecision]], N[(x + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+113} \lor \neg \left(z \leq 3.2 \cdot 10^{+97}\right):\\
\;\;\;\;x + z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if z < -2.70000000000000011e113 or 3.20000000000000016e97 < z Initial program 99.8%
+-commutative99.8%
associate--l+99.7%
associate-+r+99.7%
+-commutative99.7%
*-lft-identity99.7%
metadata-eval99.7%
*-commutative99.7%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 71.9%
if -2.70000000000000011e113 < z < 3.20000000000000016e97Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 78.2%
+-commutative61.1%
Simplified78.2%
Taylor expanded in z around 0 73.4%
Final simplification72.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= z -1.05e+188) (not (<= z 3.6e+99))) (* z (- 1.0 (log t))) (+ x (* b (- a 0.5)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.05e+188) || !(z <= 3.6e+99)) {
tmp = z * (1.0 - log(t));
} else {
tmp = x + (b * (a - 0.5));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((z <= (-1.05d+188)) .or. (.not. (z <= 3.6d+99))) then
tmp = z * (1.0d0 - log(t))
else
tmp = x + (b * (a - 0.5d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -1.05e+188) || !(z <= 3.6e+99)) {
tmp = z * (1.0 - Math.log(t));
} else {
tmp = x + (b * (a - 0.5));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (z <= -1.05e+188) or not (z <= 3.6e+99): tmp = z * (1.0 - math.log(t)) else: tmp = x + (b * (a - 0.5)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -1.05e+188) || !(z <= 3.6e+99)) tmp = Float64(z * Float64(1.0 - log(t))); else tmp = Float64(x + Float64(b * Float64(a - 0.5))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((z <= -1.05e+188) || ~((z <= 3.6e+99))) tmp = z * (1.0 - log(t)); else tmp = x + (b * (a - 0.5)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -1.05e+188], N[Not[LessEqual[z, 3.6e+99]], $MachinePrecision]], N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+188} \lor \neg \left(z \leq 3.6 \cdot 10^{+99}\right):\\
\;\;\;\;z \cdot \left(1 - \log t\right)\\
\mathbf{else}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if z < -1.04999999999999993e188 or 3.6000000000000002e99 < z Initial program 99.7%
+-commutative99.7%
associate--l+99.7%
associate-+r+99.7%
+-commutative99.7%
*-lft-identity99.7%
metadata-eval99.7%
*-commutative99.7%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 74.6%
Taylor expanded in z around inf 61.5%
if -1.04999999999999993e188 < z < 3.6000000000000002e99Initial program 100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l-100.0%
+-commutative100.0%
associate-+l+100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around 0 79.0%
+-commutative62.3%
Simplified79.0%
Taylor expanded in z around 0 71.6%
Final simplification68.8%
(FPCore (x y z t a b) :precision binary64 (if (<= y 6.3e+93) (+ x (* b (- a 0.5))) (+ y (* z (- 1.0 (log t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 6.3e+93) {
tmp = x + (b * (a - 0.5));
} else {
tmp = 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) :: tmp
if (y <= 6.3d+93) then
tmp = x + (b * (a - 0.5d0))
else
tmp = 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 tmp;
if (y <= 6.3e+93) {
tmp = x + (b * (a - 0.5));
} else {
tmp = y + (z * (1.0 - Math.log(t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 6.3e+93: tmp = x + (b * (a - 0.5)) else: tmp = y + (z * (1.0 - math.log(t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 6.3e+93) tmp = Float64(x + Float64(b * Float64(a - 0.5))); else tmp = Float64(y + 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 (y <= 6.3e+93) tmp = x + (b * (a - 0.5)); else tmp = y + (z * (1.0 - log(t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 6.3e+93], N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y + N[(z * N[(1.0 - N[Log[t], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.3 \cdot 10^{+93}:\\
\;\;\;\;x + b \cdot \left(a - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y + z \cdot \left(1 - \log t\right)\\
\end{array}
\end{array}
if y < 6.29999999999999987e93Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 88.2%
+-commutative74.2%
Simplified88.2%
Taylor expanded in z around 0 64.0%
if 6.29999999999999987e93 < y Initial program 100.0%
+-commutative100.0%
associate--l+100.0%
associate-+r+100.0%
+-commutative100.0%
*-lft-identity100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-rgt-out--100.0%
metadata-eval100.0%
fma-define100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 66.7%
Final simplification64.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -6.4e+87)
(* a b)
(if (<= a -1.2e-290)
x
(if (<= a 8.8e-141) (* -0.5 b) (if (<= a 3.6e+80) x (* a b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6.4e+87) {
tmp = a * b;
} else if (a <= -1.2e-290) {
tmp = x;
} else if (a <= 8.8e-141) {
tmp = -0.5 * b;
} else if (a <= 3.6e+80) {
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 (a <= (-6.4d+87)) then
tmp = a * b
else if (a <= (-1.2d-290)) then
tmp = x
else if (a <= 8.8d-141) then
tmp = (-0.5d0) * b
else if (a <= 3.6d+80) 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 (a <= -6.4e+87) {
tmp = a * b;
} else if (a <= -1.2e-290) {
tmp = x;
} else if (a <= 8.8e-141) {
tmp = -0.5 * b;
} else if (a <= 3.6e+80) {
tmp = x;
} else {
tmp = a * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6.4e+87: tmp = a * b elif a <= -1.2e-290: tmp = x elif a <= 8.8e-141: tmp = -0.5 * b elif a <= 3.6e+80: tmp = x else: tmp = a * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6.4e+87) tmp = Float64(a * b); elseif (a <= -1.2e-290) tmp = x; elseif (a <= 8.8e-141) tmp = Float64(-0.5 * b); elseif (a <= 3.6e+80) 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 (a <= -6.4e+87) tmp = a * b; elseif (a <= -1.2e-290) tmp = x; elseif (a <= 8.8e-141) tmp = -0.5 * b; elseif (a <= 3.6e+80) tmp = x; else tmp = a * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6.4e+87], N[(a * b), $MachinePrecision], If[LessEqual[a, -1.2e-290], x, If[LessEqual[a, 8.8e-141], N[(-0.5 * b), $MachinePrecision], If[LessEqual[a, 3.6e+80], x, N[(a * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.4 \cdot 10^{+87}:\\
\;\;\;\;a \cdot b\\
\mathbf{elif}\;a \leq -1.2 \cdot 10^{-290}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 8.8 \cdot 10^{-141}:\\
\;\;\;\;-0.5 \cdot b\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{+80}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a \cdot b\\
\end{array}
\end{array}
if a < -6.4000000000000001e87 or 3.59999999999999995e80 < a Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in z around inf 72.5%
Taylor expanded in z around 0 61.3%
if -6.4000000000000001e87 < a < -1.2e-290 or 8.80000000000000037e-141 < a < 3.59999999999999995e80Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 60.8%
Taylor expanded in z around 0 35.4%
if -1.2e-290 < a < 8.80000000000000037e-141Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 47.3%
Taylor expanded in a around 0 47.3%
Taylor expanded in z around 0 30.6%
*-commutative30.6%
Simplified30.6%
Final simplification41.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (- a 0.5) -5e+98) (not (<= (- a 0.5) 4e+79))) (* a b) (+ x (* -0.5 b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a - 0.5) <= -5e+98) || !((a - 0.5) <= 4e+79)) {
tmp = a * b;
} else {
tmp = x + (-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 (((a - 0.5d0) <= (-5d+98)) .or. (.not. ((a - 0.5d0) <= 4d+79))) then
tmp = a * b
else
tmp = x + ((-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 (((a - 0.5) <= -5e+98) || !((a - 0.5) <= 4e+79)) {
tmp = a * b;
} else {
tmp = x + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a - 0.5) <= -5e+98) or not ((a - 0.5) <= 4e+79): tmp = a * b else: tmp = x + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a - 0.5) <= -5e+98) || !(Float64(a - 0.5) <= 4e+79)) tmp = Float64(a * b); else tmp = Float64(x + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a - 0.5) <= -5e+98) || ~(((a - 0.5) <= 4e+79))) tmp = a * b; else tmp = x + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a - 0.5), $MachinePrecision], -5e+98], N[Not[LessEqual[N[(a - 0.5), $MachinePrecision], 4e+79]], $MachinePrecision]], N[(a * b), $MachinePrecision], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a - 0.5 \leq -5 \cdot 10^{+98} \lor \neg \left(a - 0.5 \leq 4 \cdot 10^{+79}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + -0.5 \cdot b\\
\end{array}
\end{array}
if (-.f64 a #s(literal 1/2 binary64)) < -4.9999999999999998e98 or 3.99999999999999987e79 < (-.f64 a #s(literal 1/2 binary64)) Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in z around inf 72.5%
Taylor expanded in z around 0 61.3%
if -4.9999999999999998e98 < (-.f64 a #s(literal 1/2 binary64)) < 3.99999999999999987e79Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 78.7%
+-commutative60.2%
Simplified78.7%
Taylor expanded in z around 0 54.8%
Taylor expanded in a around 0 52.1%
Final simplification54.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.2e-21) (not (<= a 2.2e+39))) (+ x (* a b)) (+ x (* -0.5 b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.2e-21) || !(a <= 2.2e+39)) {
tmp = x + (a * b);
} else {
tmp = x + (-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 ((a <= (-4.2d-21)) .or. (.not. (a <= 2.2d+39))) then
tmp = x + (a * b)
else
tmp = x + ((-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 ((a <= -4.2e-21) || !(a <= 2.2e+39)) {
tmp = x + (a * b);
} else {
tmp = x + (-0.5 * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.2e-21) or not (a <= 2.2e+39): tmp = x + (a * b) else: tmp = x + (-0.5 * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.2e-21) || !(a <= 2.2e+39)) tmp = Float64(x + Float64(a * b)); else tmp = Float64(x + Float64(-0.5 * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -4.2e-21) || ~((a <= 2.2e+39))) tmp = x + (a * b); else tmp = x + (-0.5 * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.2e-21], N[Not[LessEqual[a, 2.2e+39]], $MachinePrecision]], N[(x + N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x + N[(-0.5 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{-21} \lor \neg \left(a \leq 2.2 \cdot 10^{+39}\right):\\
\;\;\;\;x + a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + -0.5 \cdot b\\
\end{array}
\end{array}
if a < -4.20000000000000025e-21 or 2.2000000000000001e39 < a Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 86.2%
+-commutative86.2%
Simplified86.2%
Taylor expanded in z around 0 66.6%
Taylor expanded in a around inf 66.6%
*-commutative66.6%
Simplified66.6%
if -4.20000000000000025e-21 < a < 2.2000000000000001e39Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 77.8%
+-commutative56.2%
Simplified77.8%
Taylor expanded in z around 0 53.5%
Taylor expanded in a around 0 53.3%
Final simplification58.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.85e+90) (not (<= a 3e+81))) (* a b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.85e+90) || !(a <= 3e+81)) {
tmp = a * b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-3.85d+90)) .or. (.not. (a <= 3d+81))) then
tmp = a * b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.85e+90) || !(a <= 3e+81)) {
tmp = a * b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.85e+90) or not (a <= 3e+81): tmp = a * b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.85e+90) || !(a <= 3e+81)) tmp = Float64(a * b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -3.85e+90) || ~((a <= 3e+81))) tmp = a * b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.85e+90], N[Not[LessEqual[a, 3e+81]], $MachinePrecision]], N[(a * b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.85 \cdot 10^{+90} \lor \neg \left(a \leq 3 \cdot 10^{+81}\right):\\
\;\;\;\;a \cdot b\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -3.85000000000000017e90 or 2.99999999999999997e81 < a Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 80.2%
*-commutative80.2%
Simplified80.2%
Taylor expanded in z around inf 72.5%
Taylor expanded in z around 0 61.3%
if -3.85000000000000017e90 < a < 2.99999999999999997e81Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 57.2%
Taylor expanded in z around 0 33.9%
Final simplification41.7%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.4e+104) x (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.4e+104) {
tmp = x;
} else {
tmp = 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 (x <= (-2.4d+104)) then
tmp = x
else
tmp = 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 (x <= -2.4e+104) {
tmp = x;
} else {
tmp = b * (a - 0.5);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.4e+104: tmp = x else: tmp = b * (a - 0.5) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.4e+104) tmp = x; else tmp = Float64(b * Float64(a - 0.5)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.4e+104) tmp = x; else tmp = b * (a - 0.5); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.4e+104], x, N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.4 \cdot 10^{+104}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a - 0.5\right)\\
\end{array}
\end{array}
if x < -2.4e104Initial program 99.8%
+-commutative99.8%
associate--l+99.8%
associate-+r+99.8%
+-commutative99.8%
*-lft-identity99.8%
metadata-eval99.8%
*-commutative99.8%
distribute-rgt-out--99.8%
metadata-eval99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around inf 83.0%
Taylor expanded in z around 0 61.8%
if -2.4e104 < x Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 59.2%
Taylor expanded in z around 0 37.3%
(FPCore (x y z t a b) :precision binary64 (+ x (* b (- a 0.5))))
double code(double x, double y, double z, double t, double a, double b) {
return x + (b * (a - 0.5));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x + (b * (a - 0.5d0))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x + (b * (a - 0.5));
}
def code(x, y, z, t, a, b): return x + (b * (a - 0.5))
function code(x, y, z, t, a, b) return Float64(x + Float64(b * Float64(a - 0.5))) end
function tmp = code(x, y, z, t, a, b) tmp = x + (b * (a - 0.5)); end
code[x_, y_, z_, t_, a_, b_] := N[(x + N[(b * N[(a - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + b \cdot \left(a - 0.5\right)
\end{array}
Initial program 99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l-99.9%
+-commutative99.9%
associate-+l+99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around 0 81.1%
+-commutative67.8%
Simplified81.1%
Taylor expanded in z around 0 58.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.9%
+-commutative99.9%
associate--l+99.9%
associate-+r+99.9%
+-commutative99.9%
*-lft-identity99.9%
metadata-eval99.9%
*-commutative99.9%
distribute-rgt-out--99.9%
metadata-eval99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf 48.8%
Taylor expanded in z around 0 26.9%
(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 2024141
(FPCore (x y z t a b)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 1/2) b)))
(+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))