
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (- b 0.5) (log c) (+ (fma x (log y) (+ z t)) a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return fma(y, i, fma((b - 0.5), log(c), (fma(x, log(y), (z + t)) + a)));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b - 0.5), log(c), Float64(fma(x, log(y), Float64(z + t)) + a))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(y * i + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b - 0.5, \log c, \mathsf{fma}\left(x, \log y, z + t\right) + a\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
fma-def99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-def99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ t a) (+ z (* x (log y)))) (fma y i (* (log c) (+ b -0.5)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((t + a) + (z + (x * log(y)))) + fma(y, i, (log(c) * (b + -0.5)));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(t + a) + Float64(z + Float64(x * log(y)))) + fma(y, i, Float64(log(c) * Float64(b + -0.5)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(t + a), $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(t + a\right) + \left(z + x \cdot \log y\right)\right) + \mathsf{fma}\left(y, i, \log c \cdot \left(b + -0.5\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-def99.8%
Applied egg-rr99.8%
+-commutative99.8%
metadata-eval99.8%
sub-neg99.8%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (+ b -0.5))))
(if (<= i -0.00175)
(+ (* y i) (+ a (+ (+ z t) t_1)))
(if (<= i 2.35)
(+ a (+ t (+ z (+ (* x (log y)) (* (- b 0.5) (log c))))))
(+ (+ z (fma y i t_1)) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b + -0.5);
double tmp;
if (i <= -0.00175) {
tmp = (y * i) + (a + ((z + t) + t_1));
} else if (i <= 2.35) {
tmp = a + (t + (z + ((x * log(y)) + ((b - 0.5) * log(c)))));
} else {
tmp = (z + fma(y, i, t_1)) + (t + a);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b + -0.5)) tmp = 0.0 if (i <= -0.00175) tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(z + t) + t_1))); elseif (i <= 2.35) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(Float64(b - 0.5) * log(c)))))); else tmp = Float64(Float64(z + fma(y, i, t_1)) + Float64(t + a)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -0.00175], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(z + t), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 2.35], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(y * i + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b + -0.5\right)\\
\mathbf{if}\;i \leq -0.00175:\\
\;\;\;\;y \cdot i + \left(a + \left(\left(z + t\right) + t_1\right)\right)\\
\mathbf{elif}\;i \leq 2.35:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + \left(b - 0.5\right) \cdot \log c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \mathsf{fma}\left(y, i, t_1\right)\right) + \left(t + a\right)\\
\end{array}
\end{array}
if i < -0.00175000000000000004Initial program 99.9%
Taylor expanded in x around 0 87.6%
associate-+r+87.6%
sub-neg87.6%
metadata-eval87.6%
+-commutative87.6%
Simplified87.6%
if -0.00175000000000000004 < i < 2.35000000000000009Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-def99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 96.8%
if 2.35000000000000009 < i Initial program 99.9%
Taylor expanded in x around 0 91.8%
+-commutative91.8%
+-commutative91.8%
associate-+l+91.8%
*-commutative91.8%
sub-neg91.8%
metadata-eval91.8%
*-commutative91.8%
fma-udef91.8%
*-commutative91.8%
+-commutative91.8%
+-commutative91.8%
Simplified91.8%
Final simplification93.5%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ t a) (+ z (* x (log y)))) (+ (* y i) (* (log c) (+ b -0.5)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((t + a) + (z + (x * log(y)))) + ((y * i) + (log(c) * (b + -0.5)));
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = ((t + a) + (z + (x * log(y)))) + ((y * i) + (log(c) * (b + (-0.5d0))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((t + a) + (z + (x * Math.log(y)))) + ((y * i) + (Math.log(c) * (b + -0.5)));
}
def code(x, y, z, t, a, b, c, i): return ((t + a) + (z + (x * math.log(y)))) + ((y * i) + (math.log(c) * (b + -0.5)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(t + a) + Float64(z + Float64(x * log(y)))) + Float64(Float64(y * i) + Float64(log(c) * Float64(b + -0.5)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((t + a) + (z + (x * log(y)))) + ((y * i) + (log(c) * (b + -0.5))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(t + a), $MachinePrecision] + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(t + a\right) + \left(z + x \cdot \log y\right)\right) + \left(y \cdot i + \log c \cdot \left(b + -0.5\right)\right)
\end{array}
Initial program 99.8%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-def99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.4e+180)
(+ a (+ t (+ z t_1)))
(if (<= x 4.4e+215)
(+ (* y i) (+ (+ t a) (fma (log c) (+ b -0.5) z)))
(+ t_1 (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -1.4e+180) {
tmp = a + (t + (z + t_1));
} else if (x <= 4.4e+215) {
tmp = (y * i) + ((t + a) + fma(log(c), (b + -0.5), z));
} else {
tmp = t_1 + (y * i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -1.4e+180) tmp = Float64(a + Float64(t + Float64(z + t_1))); elseif (x <= 4.4e+215) tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + fma(log(c), Float64(b + -0.5), z))); else tmp = Float64(t_1 + Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.4e+180], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.4e+215], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.4 \cdot 10^{+180}:\\
\;\;\;\;a + \left(t + \left(z + t_1\right)\right)\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+215}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + y \cdot i\\
\end{array}
\end{array}
if x < -1.40000000000000006e180Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 88.0%
Taylor expanded in b around 0 84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in x around inf 84.4%
if -1.40000000000000006e180 < x < 4.4000000000000003e215Initial program 99.9%
Taylor expanded in x around 0 93.2%
+-commutative93.2%
+-commutative93.2%
associate-+l+93.2%
+-commutative93.2%
sub-neg93.2%
metadata-eval93.2%
fma-def93.2%
+-commutative93.2%
+-commutative93.2%
Simplified93.2%
if 4.4000000000000003e215 < x Initial program 99.7%
Taylor expanded in x around inf 96.6%
Final simplification92.6%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ a (+ z (+ (* x (log y)) (* (- b 0.5) (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (a + (z + ((x * log(y)) + ((b - 0.5) * log(c)))));
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + (a + (z + ((x * log(y)) + ((b - 0.5d0) * log(c)))))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (a + (z + ((x * Math.log(y)) + ((b - 0.5) * Math.log(c)))));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (a + (z + ((x * math.log(y)) + ((b - 0.5) * math.log(c)))))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(a + Float64(z + Float64(Float64(x * log(y)) + Float64(Float64(b - 0.5) * log(c)))))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (a + (z + ((x * log(y)) + ((b - 0.5) * log(c))))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(a + \left(z + \left(x \cdot \log y + \left(b - 0.5\right) \cdot \log c\right)\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in t around 0 82.7%
Final simplification82.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -8.2e+181)
(+ a (+ t (+ z t_1)))
(if (<= x 1e+211)
(+ (* y i) (+ a (+ (+ z t) (* (log c) (+ b -0.5)))))
(+ t_1 (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -8.2e+181) {
tmp = a + (t + (z + t_1));
} else if (x <= 1e+211) {
tmp = (y * i) + (a + ((z + t) + (log(c) * (b + -0.5))));
} else {
tmp = t_1 + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (x <= (-8.2d+181)) then
tmp = a + (t + (z + t_1))
else if (x <= 1d+211) then
tmp = (y * i) + (a + ((z + t) + (log(c) * (b + (-0.5d0)))))
else
tmp = t_1 + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (x <= -8.2e+181) {
tmp = a + (t + (z + t_1));
} else if (x <= 1e+211) {
tmp = (y * i) + (a + ((z + t) + (Math.log(c) * (b + -0.5))));
} else {
tmp = t_1 + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if x <= -8.2e+181: tmp = a + (t + (z + t_1)) elif x <= 1e+211: tmp = (y * i) + (a + ((z + t) + (math.log(c) * (b + -0.5)))) else: tmp = t_1 + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -8.2e+181) tmp = Float64(a + Float64(t + Float64(z + t_1))); elseif (x <= 1e+211) tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(z + t) + Float64(log(c) * Float64(b + -0.5))))); else tmp = Float64(t_1 + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); tmp = 0.0; if (x <= -8.2e+181) tmp = a + (t + (z + t_1)); elseif (x <= 1e+211) tmp = (y * i) + (a + ((z + t) + (log(c) * (b + -0.5)))); else tmp = t_1 + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.2e+181], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1e+211], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -8.2 \cdot 10^{+181}:\\
\;\;\;\;a + \left(t + \left(z + t_1\right)\right)\\
\mathbf{elif}\;x \leq 10^{+211}:\\
\;\;\;\;y \cdot i + \left(a + \left(\left(z + t\right) + \log c \cdot \left(b + -0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + y \cdot i\\
\end{array}
\end{array}
if x < -8.20000000000000035e181Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 88.0%
Taylor expanded in b around 0 84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in x around inf 84.4%
if -8.20000000000000035e181 < x < 9.9999999999999996e210Initial program 99.9%
Taylor expanded in x around 0 93.2%
associate-+r+93.2%
sub-neg93.2%
metadata-eval93.2%
+-commutative93.2%
Simplified93.2%
if 9.9999999999999996e210 < x Initial program 99.7%
Taylor expanded in x around inf 96.6%
Final simplification92.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y)))
(t_2 (+ t_1 (* y i)))
(t_3 (+ a (+ z (* (- b 0.5) (log c))))))
(if (<= x -7.2e+130)
(+ a (+ t (+ z t_1)))
(if (<= x 4e+99)
t_3
(if (<= x 3.8e+118)
t_2
(if (<= x 5e+165) t_3 (if (<= x 1.15e+208) (+ a (* y i)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double t_2 = t_1 + (y * i);
double t_3 = a + (z + ((b - 0.5) * log(c)));
double tmp;
if (x <= -7.2e+130) {
tmp = a + (t + (z + t_1));
} else if (x <= 4e+99) {
tmp = t_3;
} else if (x <= 3.8e+118) {
tmp = t_2;
} else if (x <= 5e+165) {
tmp = t_3;
} else if (x <= 1.15e+208) {
tmp = a + (y * i);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x * log(y)
t_2 = t_1 + (y * i)
t_3 = a + (z + ((b - 0.5d0) * log(c)))
if (x <= (-7.2d+130)) then
tmp = a + (t + (z + t_1))
else if (x <= 4d+99) then
tmp = t_3
else if (x <= 3.8d+118) then
tmp = t_2
else if (x <= 5d+165) then
tmp = t_3
else if (x <= 1.15d+208) then
tmp = a + (y * i)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double t_2 = t_1 + (y * i);
double t_3 = a + (z + ((b - 0.5) * Math.log(c)));
double tmp;
if (x <= -7.2e+130) {
tmp = a + (t + (z + t_1));
} else if (x <= 4e+99) {
tmp = t_3;
} else if (x <= 3.8e+118) {
tmp = t_2;
} else if (x <= 5e+165) {
tmp = t_3;
} else if (x <= 1.15e+208) {
tmp = a + (y * i);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) t_2 = t_1 + (y * i) t_3 = a + (z + ((b - 0.5) * math.log(c))) tmp = 0 if x <= -7.2e+130: tmp = a + (t + (z + t_1)) elif x <= 4e+99: tmp = t_3 elif x <= 3.8e+118: tmp = t_2 elif x <= 5e+165: tmp = t_3 elif x <= 1.15e+208: tmp = a + (y * i) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(t_1 + Float64(y * i)) t_3 = Float64(a + Float64(z + Float64(Float64(b - 0.5) * log(c)))) tmp = 0.0 if (x <= -7.2e+130) tmp = Float64(a + Float64(t + Float64(z + t_1))); elseif (x <= 4e+99) tmp = t_3; elseif (x <= 3.8e+118) tmp = t_2; elseif (x <= 5e+165) tmp = t_3; elseif (x <= 1.15e+208) tmp = Float64(a + Float64(y * i)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); t_2 = t_1 + (y * i); t_3 = a + (z + ((b - 0.5) * log(c))); tmp = 0.0; if (x <= -7.2e+130) tmp = a + (t + (z + t_1)); elseif (x <= 4e+99) tmp = t_3; elseif (x <= 3.8e+118) tmp = t_2; elseif (x <= 5e+165) tmp = t_3; elseif (x <= 1.15e+208) tmp = a + (y * i); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.2e+130], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4e+99], t$95$3, If[LessEqual[x, 3.8e+118], t$95$2, If[LessEqual[x, 5e+165], t$95$3, If[LessEqual[x, 1.15e+208], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := t_1 + y \cdot i\\
t_3 := a + \left(z + \left(b - 0.5\right) \cdot \log c\right)\\
\mathbf{if}\;x \leq -7.2 \cdot 10^{+130}:\\
\;\;\;\;a + \left(t + \left(z + t_1\right)\right)\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+99}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+118}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 5 \cdot 10^{+165}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{+208}:\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -7.2000000000000002e130Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 85.7%
Taylor expanded in b around 0 80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x around inf 80.5%
if -7.2000000000000002e130 < x < 3.9999999999999999e99 or 3.80000000000000016e118 < x < 4.9999999999999997e165Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
fma-def99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 79.6%
Taylor expanded in x around 0 75.7%
Taylor expanded in t around 0 55.3%
if 3.9999999999999999e99 < x < 3.80000000000000016e118 or 1.15e208 < x Initial program 99.7%
Taylor expanded in x around inf 92.5%
if 4.9999999999999997e165 < x < 1.15e208Initial program 100.0%
Taylor expanded in a around inf 56.4%
Final simplification62.3%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y)))
(t_2 (+ t_1 (* y i)))
(t_3 (+ z (* (- b 0.5) (log c)))))
(if (<= x -5.8e+122)
(+ a (+ t (+ z t_1)))
(if (<= x 1.5e+99)
(+ a (+ t t_3))
(if (<= x 6.7e+121)
t_2
(if (<= x 4.3e+165)
(+ a t_3)
(if (<= x 1.15e+208) (+ a (* y i)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double t_2 = t_1 + (y * i);
double t_3 = z + ((b - 0.5) * log(c));
double tmp;
if (x <= -5.8e+122) {
tmp = a + (t + (z + t_1));
} else if (x <= 1.5e+99) {
tmp = a + (t + t_3);
} else if (x <= 6.7e+121) {
tmp = t_2;
} else if (x <= 4.3e+165) {
tmp = a + t_3;
} else if (x <= 1.15e+208) {
tmp = a + (y * i);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = x * log(y)
t_2 = t_1 + (y * i)
t_3 = z + ((b - 0.5d0) * log(c))
if (x <= (-5.8d+122)) then
tmp = a + (t + (z + t_1))
else if (x <= 1.5d+99) then
tmp = a + (t + t_3)
else if (x <= 6.7d+121) then
tmp = t_2
else if (x <= 4.3d+165) then
tmp = a + t_3
else if (x <= 1.15d+208) then
tmp = a + (y * i)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double t_2 = t_1 + (y * i);
double t_3 = z + ((b - 0.5) * Math.log(c));
double tmp;
if (x <= -5.8e+122) {
tmp = a + (t + (z + t_1));
} else if (x <= 1.5e+99) {
tmp = a + (t + t_3);
} else if (x <= 6.7e+121) {
tmp = t_2;
} else if (x <= 4.3e+165) {
tmp = a + t_3;
} else if (x <= 1.15e+208) {
tmp = a + (y * i);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) t_2 = t_1 + (y * i) t_3 = z + ((b - 0.5) * math.log(c)) tmp = 0 if x <= -5.8e+122: tmp = a + (t + (z + t_1)) elif x <= 1.5e+99: tmp = a + (t + t_3) elif x <= 6.7e+121: tmp = t_2 elif x <= 4.3e+165: tmp = a + t_3 elif x <= 1.15e+208: tmp = a + (y * i) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(t_1 + Float64(y * i)) t_3 = Float64(z + Float64(Float64(b - 0.5) * log(c))) tmp = 0.0 if (x <= -5.8e+122) tmp = Float64(a + Float64(t + Float64(z + t_1))); elseif (x <= 1.5e+99) tmp = Float64(a + Float64(t + t_3)); elseif (x <= 6.7e+121) tmp = t_2; elseif (x <= 4.3e+165) tmp = Float64(a + t_3); elseif (x <= 1.15e+208) tmp = Float64(a + Float64(y * i)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); t_2 = t_1 + (y * i); t_3 = z + ((b - 0.5) * log(c)); tmp = 0.0; if (x <= -5.8e+122) tmp = a + (t + (z + t_1)); elseif (x <= 1.5e+99) tmp = a + (t + t_3); elseif (x <= 6.7e+121) tmp = t_2; elseif (x <= 4.3e+165) tmp = a + t_3; elseif (x <= 1.15e+208) tmp = a + (y * i); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.8e+122], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.5e+99], N[(a + N[(t + t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 6.7e+121], t$95$2, If[LessEqual[x, 4.3e+165], N[(a + t$95$3), $MachinePrecision], If[LessEqual[x, 1.15e+208], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := t_1 + y \cdot i\\
t_3 := z + \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;x \leq -5.8 \cdot 10^{+122}:\\
\;\;\;\;a + \left(t + \left(z + t_1\right)\right)\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+99}:\\
\;\;\;\;a + \left(t + t_3\right)\\
\mathbf{elif}\;x \leq 6.7 \cdot 10^{+121}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 4.3 \cdot 10^{+165}:\\
\;\;\;\;a + t_3\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{+208}:\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -5.8000000000000002e122Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 85.7%
Taylor expanded in b around 0 80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in x around inf 80.5%
if -5.8000000000000002e122 < x < 1.50000000000000007e99Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
fma-def99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 79.6%
Taylor expanded in x around 0 76.3%
if 1.50000000000000007e99 < x < 6.6999999999999999e121 or 1.15e208 < x Initial program 99.7%
Taylor expanded in x around inf 92.5%
if 6.6999999999999999e121 < x < 4.3e165Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-def99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 79.3%
Taylor expanded in x around 0 63.9%
Taylor expanded in t around 0 47.9%
if 4.3e165 < x < 1.15e208Initial program 100.0%
Taylor expanded in a around inf 56.4%
Final simplification76.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -1.22e+181)
(+ a (+ t (+ z t_1)))
(if (<= x 4.5e+212)
(+ (* y i) (+ a (+ z (* (- b 0.5) (log c)))))
(+ t_1 (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -1.22e+181) {
tmp = a + (t + (z + t_1));
} else if (x <= 4.5e+212) {
tmp = (y * i) + (a + (z + ((b - 0.5) * log(c))));
} else {
tmp = t_1 + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (x <= (-1.22d+181)) then
tmp = a + (t + (z + t_1))
else if (x <= 4.5d+212) then
tmp = (y * i) + (a + (z + ((b - 0.5d0) * log(c))))
else
tmp = t_1 + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (x <= -1.22e+181) {
tmp = a + (t + (z + t_1));
} else if (x <= 4.5e+212) {
tmp = (y * i) + (a + (z + ((b - 0.5) * Math.log(c))));
} else {
tmp = t_1 + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if x <= -1.22e+181: tmp = a + (t + (z + t_1)) elif x <= 4.5e+212: tmp = (y * i) + (a + (z + ((b - 0.5) * math.log(c)))) else: tmp = t_1 + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -1.22e+181) tmp = Float64(a + Float64(t + Float64(z + t_1))); elseif (x <= 4.5e+212) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(Float64(b - 0.5) * log(c))))); else tmp = Float64(t_1 + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); tmp = 0.0; if (x <= -1.22e+181) tmp = a + (t + (z + t_1)); elseif (x <= 4.5e+212) tmp = (y * i) + (a + (z + ((b - 0.5) * log(c)))); else tmp = t_1 + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.22e+181], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+212], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.22 \cdot 10^{+181}:\\
\;\;\;\;a + \left(t + \left(z + t_1\right)\right)\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+212}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + \left(b - 0.5\right) \cdot \log c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t_1 + y \cdot i\\
\end{array}
\end{array}
if x < -1.22e181Initial program 99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
fma-def99.7%
+-commutative99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
fma-def99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 88.0%
Taylor expanded in b around 0 84.4%
*-commutative84.4%
Simplified84.4%
Taylor expanded in x around inf 84.4%
if -1.22e181 < x < 4.5000000000000002e212Initial program 99.9%
Taylor expanded in x around 0 93.2%
+-commutative93.2%
+-commutative93.2%
associate-+l+93.2%
+-commutative93.2%
sub-neg93.2%
metadata-eval93.2%
fma-def93.2%
+-commutative93.2%
+-commutative93.2%
Simplified93.2%
Taylor expanded in t around 0 74.4%
if 4.5000000000000002e212 < x Initial program 99.7%
Taylor expanded in x around inf 96.6%
Final simplification76.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= i -5e+167)
(+ t_1 (* y i))
(if (<= i 7.6e+131) (+ a (+ t (+ z t_1))) (+ z (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (i <= -5e+167) {
tmp = t_1 + (y * i);
} else if (i <= 7.6e+131) {
tmp = a + (t + (z + t_1));
} else {
tmp = z + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (i <= (-5d+167)) then
tmp = t_1 + (y * i)
else if (i <= 7.6d+131) then
tmp = a + (t + (z + t_1))
else
tmp = z + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (i <= -5e+167) {
tmp = t_1 + (y * i);
} else if (i <= 7.6e+131) {
tmp = a + (t + (z + t_1));
} else {
tmp = z + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if i <= -5e+167: tmp = t_1 + (y * i) elif i <= 7.6e+131: tmp = a + (t + (z + t_1)) else: tmp = z + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (i <= -5e+167) tmp = Float64(t_1 + Float64(y * i)); elseif (i <= 7.6e+131) tmp = Float64(a + Float64(t + Float64(z + t_1))); else tmp = Float64(z + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); tmp = 0.0; if (i <= -5e+167) tmp = t_1 + (y * i); elseif (i <= 7.6e+131) tmp = a + (t + (z + t_1)); else tmp = z + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[i, -5e+167], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 7.6e+131], N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;i \leq -5 \cdot 10^{+167}:\\
\;\;\;\;t_1 + y \cdot i\\
\mathbf{elif}\;i \leq 7.6 \cdot 10^{+131}:\\
\;\;\;\;a + \left(t + \left(z + t_1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z + y \cdot i\\
\end{array}
\end{array}
if i < -4.9999999999999997e167Initial program 99.9%
Taylor expanded in x around inf 74.0%
if -4.9999999999999997e167 < i < 7.6000000000000007e131Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-def99.8%
Applied egg-rr99.8%
Taylor expanded in y around 0 90.3%
Taylor expanded in b around 0 73.0%
*-commutative73.0%
Simplified73.0%
Taylor expanded in x around inf 71.1%
if 7.6000000000000007e131 < i Initial program 99.9%
Taylor expanded in z around inf 66.8%
Final simplification70.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= a 7e-127)
(+ z (* y i))
(if (<= a 9e+99)
(+ t_1 (* y i))
(if (<= a 3.9e+120)
(+ a (+ z t))
(if (<= a 2.1e+126) t_1 (+ a (* y i))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (a <= 7e-127) {
tmp = z + (y * i);
} else if (a <= 9e+99) {
tmp = t_1 + (y * i);
} else if (a <= 3.9e+120) {
tmp = a + (z + t);
} else if (a <= 2.1e+126) {
tmp = t_1;
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = x * log(y)
if (a <= 7d-127) then
tmp = z + (y * i)
else if (a <= 9d+99) then
tmp = t_1 + (y * i)
else if (a <= 3.9d+120) then
tmp = a + (z + t)
else if (a <= 2.1d+126) then
tmp = t_1
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double tmp;
if (a <= 7e-127) {
tmp = z + (y * i);
} else if (a <= 9e+99) {
tmp = t_1 + (y * i);
} else if (a <= 3.9e+120) {
tmp = a + (z + t);
} else if (a <= 2.1e+126) {
tmp = t_1;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if a <= 7e-127: tmp = z + (y * i) elif a <= 9e+99: tmp = t_1 + (y * i) elif a <= 3.9e+120: tmp = a + (z + t) elif a <= 2.1e+126: tmp = t_1 else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (a <= 7e-127) tmp = Float64(z + Float64(y * i)); elseif (a <= 9e+99) tmp = Float64(t_1 + Float64(y * i)); elseif (a <= 3.9e+120) tmp = Float64(a + Float64(z + t)); elseif (a <= 2.1e+126) tmp = t_1; else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); tmp = 0.0; if (a <= 7e-127) tmp = z + (y * i); elseif (a <= 9e+99) tmp = t_1 + (y * i); elseif (a <= 3.9e+120) tmp = a + (z + t); elseif (a <= 2.1e+126) tmp = t_1; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 7e-127], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+99], N[(t$95$1 + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.9e+120], N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.1e+126], t$95$1, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;a \leq 7 \cdot 10^{-127}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+99}:\\
\;\;\;\;t_1 + y \cdot i\\
\mathbf{elif}\;a \leq 3.9 \cdot 10^{+120}:\\
\;\;\;\;a + \left(z + t\right)\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{+126}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 6.99999999999999979e-127Initial program 99.9%
Taylor expanded in z around inf 41.3%
if 6.99999999999999979e-127 < a < 8.9999999999999999e99Initial program 99.7%
Taylor expanded in x around inf 44.7%
if 8.9999999999999999e99 < a < 3.8999999999999998e120Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+l+100.0%
fma-def100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
fma-def100.0%
Applied egg-rr100.0%
Taylor expanded in y around 0 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in z around inf 100.0%
if 3.8999999999999998e120 < a < 2.0999999999999999e126Initial program 100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+l+100.0%
fma-def100.0%
+-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
fma-def100.0%
Applied egg-rr100.0%
Taylor expanded in x around inf 50.2%
if 2.0999999999999999e126 < a Initial program 99.9%
Taylor expanded in a around inf 57.4%
Final simplification44.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.7e+190) z (if (or (<= z -3.2e+138) (not (<= z -1.35e+116))) (+ a (* y i)) z)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.7e+190) {
tmp = z;
} else if ((z <= -3.2e+138) || !(z <= -1.35e+116)) {
tmp = a + (y * i);
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.7d+190)) then
tmp = z
else if ((z <= (-3.2d+138)) .or. (.not. (z <= (-1.35d+116)))) then
tmp = a + (y * i)
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.7e+190) {
tmp = z;
} else if ((z <= -3.2e+138) || !(z <= -1.35e+116)) {
tmp = a + (y * i);
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.7e+190: tmp = z elif (z <= -3.2e+138) or not (z <= -1.35e+116): tmp = a + (y * i) else: tmp = z return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.7e+190) tmp = z; elseif ((z <= -3.2e+138) || !(z <= -1.35e+116)) tmp = Float64(a + Float64(y * i)); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.7e+190) tmp = z; elseif ((z <= -3.2e+138) || ~((z <= -1.35e+116))) tmp = a + (y * i); else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.7e+190], z, If[Or[LessEqual[z, -3.2e+138], N[Not[LessEqual[z, -1.35e+116]], $MachinePrecision]], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{+190}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{+138} \lor \neg \left(z \leq -1.35 \cdot 10^{+116}\right):\\
\;\;\;\;a + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -1.7e190 or -3.2000000000000001e138 < z < -1.35e116Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
fma-def99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 50.7%
if -1.7e190 < z < -3.2000000000000001e138 or -1.35e116 < z Initial program 99.8%
Taylor expanded in a around inf 39.1%
Final simplification40.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.25e+112) z (if (<= z -1.15e+28) (* y i) a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.25e+112) {
tmp = z;
} else if (z <= -1.15e+28) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.25d+112)) then
tmp = z
else if (z <= (-1.15d+28)) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.25e+112) {
tmp = z;
} else if (z <= -1.15e+28) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.25e+112: tmp = z elif z <= -1.15e+28: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.25e+112) tmp = z; elseif (z <= -1.15e+28) tmp = Float64(y * i); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.25e+112) tmp = z; elseif (z <= -1.15e+28) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.25e+112], z, If[LessEqual[z, -1.15e+28], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+112}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -1.15 \cdot 10^{+28}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.25e112Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
fma-def99.9%
Applied egg-rr99.9%
Taylor expanded in z around inf 41.5%
if -1.25e112 < z < -1.14999999999999992e28Initial program 99.9%
Taylor expanded in y around inf 38.4%
*-commutative38.4%
Simplified38.4%
if -1.14999999999999992e28 < z Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-def99.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 17.3%
Final simplification22.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.2e+113) (+ a (+ z t)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.2e+113) {
tmp = a + (z + t);
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.2d+113)) then
tmp = a + (z + t)
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.2e+113) {
tmp = a + (z + t);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.2e+113: tmp = a + (z + t) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.2e+113) tmp = Float64(a + Float64(z + t)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.2e+113) tmp = a + (z + t); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.2e+113], N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+113}:\\
\;\;\;\;a + \left(z + t\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.19999999999999992e113Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
fma-def99.9%
+-commutative99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
fma-def99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 89.2%
Taylor expanded in x around 0 78.6%
Taylor expanded in z around inf 68.2%
if -1.19999999999999992e113 < z Initial program 99.8%
Taylor expanded in a around inf 38.4%
Final simplification42.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.85e+112) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.85e+112) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 1.85d+112) then
tmp = z + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.85e+112) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.85e+112: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.85e+112) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.85e+112) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.85e+112], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.85 \cdot 10^{+112}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 1.85000000000000002e112Initial program 99.8%
Taylor expanded in z around inf 39.7%
if 1.85000000000000002e112 < a Initial program 99.9%
Taylor expanded in a around inf 55.6%
Final simplification42.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.4e+89) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.4e+89) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-2.4d+89)) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.4e+89) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.4e+89: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.4e+89) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2.4e+89) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.4e+89], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+89}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -2.40000000000000004e89Initial program 99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-def99.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 37.9%
if -2.40000000000000004e89 < z Initial program 99.8%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-def99.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 16.4%
Final simplification19.7%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
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), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.8%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.8%
fma-def99.8%
+-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
fma-def99.8%
Applied egg-rr99.8%
Taylor expanded in a around inf 16.5%
Final simplification16.5%
herbie shell --seed 2023285
(FPCore (x y z t a b c i)
:name "Numeric.SpecFunctions:logBeta from math-functions-0.1.5.2, B"
:precision binary64
(+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))