
(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 22 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) (+ z (fma x (log y) (+ 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), (z + fma(x, log(y), (t + a)))));
}
function code(x, y, z, t, a, b, c, i) return fma(y, i, fma(Float64(b + -0.5), log(c), Float64(z + fma(x, log(y), Float64(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[(z + N[(x * N[Log[y], $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y, i, \mathsf{fma}\left(b + -0.5, \log c, z + \mathsf{fma}\left(x, \log y, t + a\right)\right)\right)
\end{array}
Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -4.7e+109)
(+ (* y i) (+ a (+ z (* x (log y)))))
(if (<= x 1.1e+102)
(fma y i (+ (* (+ b -0.5) (log c)) (+ z (+ t a))))
(+ (* y i) (+ a (fma x (log y) (+ z t)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -4.7e+109) {
tmp = (y * i) + (a + (z + (x * log(y))));
} else if (x <= 1.1e+102) {
tmp = fma(y, i, (((b + -0.5) * log(c)) + (z + (t + a))));
} else {
tmp = (y * i) + (a + fma(x, log(y), (z + t)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -4.7e+109) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); elseif (x <= 1.1e+102) tmp = fma(y, i, Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(z + Float64(t + a)))); else tmp = Float64(Float64(y * i) + Float64(a + fma(x, log(y), Float64(z + t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -4.7e+109], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.1e+102], N[(y * i + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.7 \cdot 10^{+109}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+102}:\\
\;\;\;\;\mathsf{fma}\left(y, i, \left(b + -0.5\right) \cdot \log c + \left(z + \left(t + a\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \mathsf{fma}\left(x, \log y, z + t\right)\right)\\
\end{array}
\end{array}
if x < -4.69999999999999998e109Initial program 100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around 0 94.1%
+-commutative94.1%
+-commutative94.1%
associate-+r+94.1%
fma-undefine94.1%
+-commutative94.1%
Simplified94.1%
Taylor expanded in t around 0 84.9%
if -4.69999999999999998e109 < x < 1.10000000000000004e102Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in x around 0 97.0%
associate-+r+97.0%
sub-neg97.0%
metadata-eval97.0%
associate-+r+97.0%
+-commutative97.0%
+-commutative97.0%
associate-+l+97.0%
+-commutative97.0%
+-commutative97.0%
Simplified97.0%
if 1.10000000000000004e102 < x Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in b around 0 97.6%
+-commutative97.6%
+-commutative97.6%
associate-+r+97.6%
fma-undefine97.7%
+-commutative97.7%
Simplified97.7%
Final simplification95.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= y 4e-121)
(+ a (+ t (+ z (+ t_1 (* (log c) (- b 0.5))))))
(+ (* y i) (+ (+ a (+ t (+ z t_1))) (* b (log c)))))))
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 (y <= 4e-121) {
tmp = a + (t + (z + (t_1 + (log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + ((a + (t + (z + t_1))) + (b * log(c)));
}
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 (y <= 4d-121) then
tmp = a + (t + (z + (t_1 + (log(c) * (b - 0.5d0)))))
else
tmp = (y * i) + ((a + (t + (z + t_1))) + (b * log(c)))
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 (y <= 4e-121) {
tmp = a + (t + (z + (t_1 + (Math.log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + ((a + (t + (z + t_1))) + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) tmp = 0 if y <= 4e-121: tmp = a + (t + (z + (t_1 + (math.log(c) * (b - 0.5))))) else: tmp = (y * i) + ((a + (t + (z + t_1))) + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (y <= 4e-121) tmp = Float64(a + Float64(t + Float64(z + Float64(t_1 + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + t_1))) + Float64(b * log(c)))); 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 (y <= 4e-121) tmp = a + (t + (z + (t_1 + (log(c) * (b - 0.5))))); else tmp = (y * i) + ((a + (t + (z + t_1))) + (b * log(c))); 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[y, 4e-121], N[(a + N[(t + N[(z + N[(t$95$1 + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;y \leq 4 \cdot 10^{-121}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_1 + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(t + \left(z + t\_1\right)\right)\right) + b \cdot \log c\right)\\
\end{array}
\end{array}
if y < 3.9999999999999999e-121Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around 0 99.9%
if 3.9999999999999999e-121 < y Initial program 99.9%
Taylor expanded in b around inf 99.0%
*-commutative99.0%
Simplified99.0%
Final simplification99.3%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= x -1.9e+109)
(+ (* y i) (+ a (+ z (* x (log y)))))
(if (<= x 2e+100)
(+ (+ z (+ t a)) (+ (* y i) (* (+ b -0.5) (log c))))
(+ (* y i) (+ a (fma x (log y) (+ z t)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= -1.9e+109) {
tmp = (y * i) + (a + (z + (x * log(y))));
} else if (x <= 2e+100) {
tmp = (z + (t + a)) + ((y * i) + ((b + -0.5) * log(c)));
} else {
tmp = (y * i) + (a + fma(x, log(y), (z + t)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= -1.9e+109) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); elseif (x <= 2e+100) tmp = Float64(Float64(z + Float64(t + a)) + Float64(Float64(y * i) + Float64(Float64(b + -0.5) * log(c)))); else tmp = Float64(Float64(y * i) + Float64(a + fma(x, log(y), Float64(z + t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, -1.9e+109], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+100], N[(N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.9 \cdot 10^{+109}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+100}:\\
\;\;\;\;\left(z + \left(t + a\right)\right) + \left(y \cdot i + \left(b + -0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \mathsf{fma}\left(x, \log y, z + t\right)\right)\\
\end{array}
\end{array}
if x < -1.90000000000000019e109Initial program 100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around 0 94.1%
+-commutative94.1%
+-commutative94.1%
associate-+r+94.1%
fma-undefine94.1%
+-commutative94.1%
Simplified94.1%
Taylor expanded in t around 0 84.9%
if -1.90000000000000019e109 < x < 2.00000000000000003e100Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 97.0%
associate-+r+97.0%
Simplified97.0%
if 2.00000000000000003e100 < x Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in b around 0 97.6%
+-commutative97.6%
+-commutative97.6%
associate-+r+97.6%
fma-undefine97.7%
+-commutative97.7%
Simplified97.7%
Final simplification95.5%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (+ (+ b 0.5) -1.0))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + (z + (x * log(y))))) + (log(c) * ((b + 0.5) + -1.0))) + (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 = ((a + (t + (z + (x * log(y))))) + (log(c) * ((b + 0.5d0) + (-1.0d0)))) + (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 ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * ((b + 0.5) + -1.0))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * ((b + 0.5) + -1.0))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(Float64(b + 0.5) + -1.0))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((a + (t + (z + (x * log(y))))) + (log(c) * ((b + 0.5) + -1.0))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(N[(b + 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(\left(b + 0.5\right) + -1\right)\right) + y \cdot i
\end{array}
Initial program 99.9%
sub-neg99.9%
metadata-eval99.9%
expm1-log1p-u76.0%
Applied egg-rr76.0%
expm1-define76.0%
sub-neg76.0%
log1p-undefine76.0%
rem-exp-log99.9%
+-commutative99.9%
associate-+r+99.9%
metadata-eval99.9%
+-commutative99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 0.018) (+ a (+ t (+ z (+ (* x (log y)) (* (log c) (- b 0.5)))))) (+ (* y i) (+ a (fma x (log y) (+ z t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 0.018) {
tmp = a + (t + (z + ((x * log(y)) + (log(c) * (b - 0.5)))));
} else {
tmp = (y * i) + (a + fma(x, log(y), (z + t)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 0.018) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(y * i) + Float64(a + fma(x, log(y), Float64(z + t)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 0.018], N[(a + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.018:\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \mathsf{fma}\left(x, \log y, z + t\right)\right)\\
\end{array}
\end{array}
if y < 0.0179999999999999986Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around 0 97.8%
if 0.0179999999999999986 < y Initial program 99.9%
Taylor expanded in b around inf 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in b around 0 94.4%
+-commutative94.4%
+-commutative94.4%
associate-+r+94.4%
fma-undefine94.4%
+-commutative94.4%
Simplified94.4%
Final simplification96.2%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (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 = (y * i) + ((a + (t + (z + (x * log(y))))) + (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 (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.8e+109) (not (<= x 6.5e+104))) (+ (* y i) (+ a (+ z (* x (log y))))) (+ (+ z (+ t a)) (+ (* y i) (* (+ b -0.5) (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -6.8e+109) || !(x <= 6.5e+104)) {
tmp = (y * i) + (a + (z + (x * log(y))));
} else {
tmp = (z + (t + a)) + ((y * i) + ((b + -0.5) * log(c)));
}
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 ((x <= (-6.8d+109)) .or. (.not. (x <= 6.5d+104))) then
tmp = (y * i) + (a + (z + (x * log(y))))
else
tmp = (z + (t + a)) + ((y * i) + ((b + (-0.5d0)) * log(c)))
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 ((x <= -6.8e+109) || !(x <= 6.5e+104)) {
tmp = (y * i) + (a + (z + (x * Math.log(y))));
} else {
tmp = (z + (t + a)) + ((y * i) + ((b + -0.5) * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -6.8e+109) or not (x <= 6.5e+104): tmp = (y * i) + (a + (z + (x * math.log(y)))) else: tmp = (z + (t + a)) + ((y * i) + ((b + -0.5) * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -6.8e+109) || !(x <= 6.5e+104)) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); else tmp = Float64(Float64(z + Float64(t + a)) + Float64(Float64(y * i) + Float64(Float64(b + -0.5) * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -6.8e+109) || ~((x <= 6.5e+104))) tmp = (y * i) + (a + (z + (x * log(y)))); else tmp = (z + (t + a)) + ((y * i) + ((b + -0.5) * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -6.8e+109], N[Not[LessEqual[x, 6.5e+104]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+109} \lor \neg \left(x \leq 6.5 \cdot 10^{+104}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + \left(t + a\right)\right) + \left(y \cdot i + \left(b + -0.5\right) \cdot \log c\right)\\
\end{array}
\end{array}
if x < -6.80000000000000013e109 or 6.5000000000000005e104 < x Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in b around 0 96.1%
+-commutative96.1%
+-commutative96.1%
associate-+r+96.1%
fma-undefine96.1%
+-commutative96.1%
Simplified96.1%
Taylor expanded in t around 0 88.5%
if -6.80000000000000013e109 < x < 6.5000000000000005e104Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 97.0%
associate-+r+97.0%
Simplified97.0%
Final simplification94.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -5e+131) (not (<= (- b 0.5) 4e+227))) (+ a (+ (* y i) (* (+ b -0.5) (log c)))) (+ (+ t a) (fma y i z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -5e+131) || !((b - 0.5) <= 4e+227)) {
tmp = a + ((y * i) + ((b + -0.5) * log(c)));
} else {
tmp = (t + a) + fma(y, i, z);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -5e+131) || !(Float64(b - 0.5) <= 4e+227)) tmp = Float64(a + Float64(Float64(y * i) + Float64(Float64(b + -0.5) * log(c)))); else tmp = Float64(Float64(t + a) + fma(y, i, z)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -5e+131], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 4e+227]], $MachinePrecision]], N[(a + N[(N[(y * i), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + a), $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -5 \cdot 10^{+131} \lor \neg \left(b - 0.5 \leq 4 \cdot 10^{+227}\right):\\
\;\;\;\;a + \left(y \cdot i + \left(b + -0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t + a\right) + \mathsf{fma}\left(y, i, z\right)\\
\end{array}
\end{array}
if (-.f64 b #s(literal 1/2 binary64)) < -4.99999999999999995e131 or 4.0000000000000004e227 < (-.f64 b #s(literal 1/2 binary64)) Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in a around inf 83.0%
if -4.99999999999999995e131 < (-.f64 b #s(literal 1/2 binary64)) < 4.0000000000000004e227Initial program 100.0%
Taylor expanded in b around inf 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in b around 0 94.6%
+-commutative94.6%
+-commutative94.6%
associate-+r+94.6%
fma-undefine94.6%
+-commutative94.6%
Simplified94.6%
Taylor expanded in x around 0 75.4%
associate-+r+75.4%
+-commutative75.4%
*-commutative75.4%
fma-define75.4%
Simplified75.4%
Final simplification76.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -8.8e+169) (not (<= b 2.6e+227))) (+ a (+ (* y i) (* (+ b -0.5) (log c)))) (+ (+ a (+ t (+ z (* x (log y))))) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -8.8e+169) || !(b <= 2.6e+227)) {
tmp = a + ((y * i) + ((b + -0.5) * log(c)));
} else {
tmp = (a + (t + (z + (x * log(y))))) + (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 ((b <= (-8.8d+169)) .or. (.not. (b <= 2.6d+227))) then
tmp = a + ((y * i) + ((b + (-0.5d0)) * log(c)))
else
tmp = (a + (t + (z + (x * log(y))))) + (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 ((b <= -8.8e+169) || !(b <= 2.6e+227)) {
tmp = a + ((y * i) + ((b + -0.5) * Math.log(c)));
} else {
tmp = (a + (t + (z + (x * Math.log(y))))) + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -8.8e+169) or not (b <= 2.6e+227): tmp = a + ((y * i) + ((b + -0.5) * math.log(c))) else: tmp = (a + (t + (z + (x * math.log(y))))) + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -8.8e+169) || !(b <= 2.6e+227)) tmp = Float64(a + Float64(Float64(y * i) + Float64(Float64(b + -0.5) * log(c)))); else tmp = Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -8.8e+169) || ~((b <= 2.6e+227))) tmp = a + ((y * i) + ((b + -0.5) * log(c))); else tmp = (a + (t + (z + (x * log(y))))) + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -8.8e+169], N[Not[LessEqual[b, 2.6e+227]], $MachinePrecision]], N[(a + N[(N[(y * i), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.8 \cdot 10^{+169} \lor \neg \left(b \leq 2.6 \cdot 10^{+227}\right):\\
\;\;\;\;a + \left(y \cdot i + \left(b + -0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + y \cdot i\\
\end{array}
\end{array}
if b < -8.8000000000000001e169 or 2.59999999999999982e227 < b Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 89.6%
if -8.8000000000000001e169 < b < 2.59999999999999982e227Initial program 99.9%
Taylor expanded in b around inf 97.3%
*-commutative97.3%
Simplified97.3%
Taylor expanded in b around 0 94.1%
Final simplification93.4%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -1.9e+217)
(+ z (* y i))
(if (<= z -1.36e+104)
(+ a (+ z t))
(if (<= z -9.6e+56)
(+ (* x (log y)) (* y i))
(+ (* y i) (+ a (* t (+ 1.0 (/ z t)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.9e+217) {
tmp = z + (y * i);
} else if (z <= -1.36e+104) {
tmp = a + (z + t);
} else if (z <= -9.6e+56) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (y * i) + (a + (t * (1.0 + (z / t))));
}
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.9d+217)) then
tmp = z + (y * i)
else if (z <= (-1.36d+104)) then
tmp = a + (z + t)
else if (z <= (-9.6d+56)) then
tmp = (x * log(y)) + (y * i)
else
tmp = (y * i) + (a + (t * (1.0d0 + (z / t))))
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.9e+217) {
tmp = z + (y * i);
} else if (z <= -1.36e+104) {
tmp = a + (z + t);
} else if (z <= -9.6e+56) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = (y * i) + (a + (t * (1.0 + (z / t))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.9e+217: tmp = z + (y * i) elif z <= -1.36e+104: tmp = a + (z + t) elif z <= -9.6e+56: tmp = (x * math.log(y)) + (y * i) else: tmp = (y * i) + (a + (t * (1.0 + (z / t)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.9e+217) tmp = Float64(z + Float64(y * i)); elseif (z <= -1.36e+104) tmp = Float64(a + Float64(z + t)); elseif (z <= -9.6e+56) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t * Float64(1.0 + Float64(z / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.9e+217) tmp = z + (y * i); elseif (z <= -1.36e+104) tmp = a + (z + t); elseif (z <= -9.6e+56) tmp = (x * log(y)) + (y * i); else tmp = (y * i) + (a + (t * (1.0 + (z / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.9e+217], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.36e+104], N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -9.6e+56], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t * N[(1.0 + N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+217}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -1.36 \cdot 10^{+104}:\\
\;\;\;\;a + \left(z + t\right)\\
\mathbf{elif}\;z \leq -9.6 \cdot 10^{+56}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t \cdot \left(1 + \frac{z}{t}\right)\right)\\
\end{array}
\end{array}
if z < -1.90000000000000001e217Initial program 99.9%
sub-neg99.9%
metadata-eval99.9%
add-cube-cbrt99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 78.7%
if -1.90000000000000001e217 < z < -1.3599999999999999e104Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in a around inf 82.2%
+-commutative82.2%
associate-+l+82.2%
Simplified82.2%
Taylor expanded in z around inf 57.6%
Taylor expanded in a around 0 62.0%
if -1.3599999999999999e104 < z < -9.60000000000000053e56Initial program 100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 43.8%
if -9.60000000000000053e56 < z Initial program 99.9%
Taylor expanded in b around inf 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in b around 0 85.7%
+-commutative85.7%
+-commutative85.7%
associate-+r+85.7%
fma-undefine85.7%
+-commutative85.7%
Simplified85.7%
Taylor expanded in t around inf 70.0%
associate-/l*69.5%
Simplified69.5%
Taylor expanded in x around 0 59.6%
Final simplification60.7%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (* (+ b -0.5) (log c)))))
(if (<= b -4.8e+169)
(+ a t_1)
(if (<= b 7.8e+185) (+ (* y i) (+ a (+ z (* x (log y))))) (+ z t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + ((b + -0.5) * log(c));
double tmp;
if (b <= -4.8e+169) {
tmp = a + t_1;
} else if (b <= 7.8e+185) {
tmp = (y * i) + (a + (z + (x * log(y))));
} else {
tmp = z + t_1;
}
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 = (y * i) + ((b + (-0.5d0)) * log(c))
if (b <= (-4.8d+169)) then
tmp = a + t_1
else if (b <= 7.8d+185) then
tmp = (y * i) + (a + (z + (x * log(y))))
else
tmp = 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 c, double i) {
double t_1 = (y * i) + ((b + -0.5) * Math.log(c));
double tmp;
if (b <= -4.8e+169) {
tmp = a + t_1;
} else if (b <= 7.8e+185) {
tmp = (y * i) + (a + (z + (x * Math.log(y))));
} else {
tmp = z + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + ((b + -0.5) * math.log(c)) tmp = 0 if b <= -4.8e+169: tmp = a + t_1 elif b <= 7.8e+185: tmp = (y * i) + (a + (z + (x * math.log(y)))) else: tmp = z + t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(Float64(b + -0.5) * log(c))) tmp = 0.0 if (b <= -4.8e+169) tmp = Float64(a + t_1); elseif (b <= 7.8e+185) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); else tmp = Float64(z + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * i) + ((b + -0.5) * log(c)); tmp = 0.0; if (b <= -4.8e+169) tmp = a + t_1; elseif (b <= 7.8e+185) tmp = (y * i) + (a + (z + (x * log(y)))); else tmp = z + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * i), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.8e+169], N[(a + t$95$1), $MachinePrecision], If[LessEqual[b, 7.8e+185], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot i + \left(b + -0.5\right) \cdot \log c\\
\mathbf{if}\;b \leq -4.8 \cdot 10^{+169}:\\
\;\;\;\;a + t\_1\\
\mathbf{elif}\;b \leq 7.8 \cdot 10^{+185}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z + t\_1\\
\end{array}
\end{array}
if b < -4.7999999999999997e169Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 88.2%
if -4.7999999999999997e169 < b < 7.7999999999999997e185Initial program 99.9%
Taylor expanded in b around inf 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in b around 0 94.4%
+-commutative94.4%
+-commutative94.4%
associate-+r+94.4%
fma-undefine94.4%
+-commutative94.4%
Simplified94.4%
Taylor expanded in t around 0 75.3%
if 7.7999999999999997e185 < b Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in z around inf 98.6%
Final simplification78.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.05e+177) (not (<= x 3.5e+205))) (+ (* x (log y)) (* y i)) (+ (+ t a) (fma y i z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.05e+177) || !(x <= 3.5e+205)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (t + a) + fma(y, i, z);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.05e+177) || !(x <= 3.5e+205)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(t + a) + fma(y, i, z)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.05e+177], N[Not[LessEqual[x, 3.5e+205]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(t + a), $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{+177} \lor \neg \left(x \leq 3.5 \cdot 10^{+205}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;\left(t + a\right) + \mathsf{fma}\left(y, i, z\right)\\
\end{array}
\end{array}
if x < -1.05000000000000006e177 or 3.4999999999999998e205 < x Initial program 99.9%
Taylor expanded in b around inf 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around inf 85.1%
if -1.05000000000000006e177 < x < 3.4999999999999998e205Initial program 99.9%
Taylor expanded in b around inf 97.1%
*-commutative97.1%
Simplified97.1%
Taylor expanded in b around 0 81.5%
+-commutative81.5%
+-commutative81.5%
associate-+r+81.5%
fma-undefine81.5%
+-commutative81.5%
Simplified81.5%
Taylor expanded in x around 0 75.7%
associate-+r+75.7%
+-commutative75.7%
*-commutative75.7%
fma-define75.7%
Simplified75.7%
Final simplification77.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 3.9e+68) (+ z (+ (* y i) (* (+ b -0.5) (log c)))) (+ (+ t a) (fma y i z))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 3.9e+68) {
tmp = z + ((y * i) + ((b + -0.5) * log(c)));
} else {
tmp = (t + a) + fma(y, i, z);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 3.9e+68) tmp = Float64(z + Float64(Float64(y * i) + Float64(Float64(b + -0.5) * log(c)))); else tmp = Float64(Float64(t + a) + fma(y, i, z)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 3.9e+68], N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t + a), $MachinePrecision] + N[(y * i + z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.9 \cdot 10^{+68}:\\
\;\;\;\;z + \left(y \cdot i + \left(b + -0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t + a\right) + \mathsf{fma}\left(y, i, z\right)\\
\end{array}
\end{array}
if a < 3.90000000000000019e68Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in z around inf 56.6%
if 3.90000000000000019e68 < a Initial program 100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in b around 0 90.3%
+-commutative90.3%
+-commutative90.3%
associate-+r+90.3%
fma-undefine90.3%
+-commutative90.3%
Simplified90.3%
Taylor expanded in x around 0 80.9%
associate-+r+80.9%
+-commutative80.9%
*-commutative80.9%
fma-define80.9%
Simplified80.9%
Final simplification61.2%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -3.45e+218)
(+ z (* y i))
(if (<= z -6.8e+104)
(+ a (+ z t))
(+ (* y i) (+ a (* t (+ 1.0 (/ z t))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -3.45e+218) {
tmp = z + (y * i);
} else if (z <= -6.8e+104) {
tmp = a + (z + t);
} else {
tmp = (y * i) + (a + (t * (1.0 + (z / t))));
}
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 <= (-3.45d+218)) then
tmp = z + (y * i)
else if (z <= (-6.8d+104)) then
tmp = a + (z + t)
else
tmp = (y * i) + (a + (t * (1.0d0 + (z / t))))
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 <= -3.45e+218) {
tmp = z + (y * i);
} else if (z <= -6.8e+104) {
tmp = a + (z + t);
} else {
tmp = (y * i) + (a + (t * (1.0 + (z / t))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -3.45e+218: tmp = z + (y * i) elif z <= -6.8e+104: tmp = a + (z + t) else: tmp = (y * i) + (a + (t * (1.0 + (z / t)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -3.45e+218) tmp = Float64(z + Float64(y * i)); elseif (z <= -6.8e+104) tmp = Float64(a + Float64(z + t)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(t * Float64(1.0 + Float64(z / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -3.45e+218) tmp = z + (y * i); elseif (z <= -6.8e+104) tmp = a + (z + t); else tmp = (y * i) + (a + (t * (1.0 + (z / t)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -3.45e+218], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -6.8e+104], N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t * N[(1.0 + N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.45 \cdot 10^{+218}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -6.8 \cdot 10^{+104}:\\
\;\;\;\;a + \left(z + t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t \cdot \left(1 + \frac{z}{t}\right)\right)\\
\end{array}
\end{array}
if z < -3.4500000000000001e218Initial program 99.9%
sub-neg99.9%
metadata-eval99.9%
add-cube-cbrt99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 78.7%
if -3.4500000000000001e218 < z < -6.7999999999999994e104Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in a around inf 82.2%
+-commutative82.2%
associate-+l+82.2%
Simplified82.2%
Taylor expanded in z around inf 57.6%
Taylor expanded in a around 0 62.0%
if -6.7999999999999994e104 < z Initial program 99.9%
Taylor expanded in b around inf 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in b around 0 85.3%
+-commutative85.3%
+-commutative85.3%
associate-+r+85.3%
fma-undefine85.3%
+-commutative85.3%
Simplified85.3%
Taylor expanded in t around inf 69.2%
associate-/l*68.7%
Simplified68.7%
Taylor expanded in x around 0 59.1%
Final simplification60.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -4.5e+217) (+ z (* y i)) (if (<= z -5.8e+70) (+ 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 <= -4.5e+217) {
tmp = z + (y * i);
} else if (z <= -5.8e+70) {
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 <= (-4.5d+217)) then
tmp = z + (y * i)
else if (z <= (-5.8d+70)) 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 <= -4.5e+217) {
tmp = z + (y * i);
} else if (z <= -5.8e+70) {
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 <= -4.5e+217: tmp = z + (y * i) elif z <= -5.8e+70: 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 <= -4.5e+217) tmp = Float64(z + Float64(y * i)); elseif (z <= -5.8e+70) 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 <= -4.5e+217) tmp = z + (y * i); elseif (z <= -5.8e+70) 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, -4.5e+217], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.8e+70], N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+217}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{+70}:\\
\;\;\;\;a + \left(z + t\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -4.49999999999999988e217Initial program 99.9%
sub-neg99.9%
metadata-eval99.9%
add-cube-cbrt99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in z around inf 78.7%
if -4.49999999999999988e217 < z < -5.7999999999999997e70Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in a around inf 86.0%
+-commutative86.0%
associate-+l+86.0%
Simplified85.9%
Taylor expanded in z around inf 53.0%
Taylor expanded in a around 0 56.5%
if -5.7999999999999997e70 < z Initial program 99.9%
sub-neg99.9%
metadata-eval99.9%
add-cube-cbrt99.7%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in a around inf 40.4%
Final simplification44.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.4e-68) (+ z t) (if (<= a 1.65e+100) (* y i) (+ t a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.4e-68) {
tmp = z + t;
} else if (a <= 1.65e+100) {
tmp = y * i;
} else {
tmp = t + 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 (a <= 1.4d-68) then
tmp = z + t
else if (a <= 1.65d+100) then
tmp = y * i
else
tmp = t + 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 (a <= 1.4e-68) {
tmp = z + t;
} else if (a <= 1.65e+100) {
tmp = y * i;
} else {
tmp = t + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.4e-68: tmp = z + t elif a <= 1.65e+100: tmp = y * i else: tmp = t + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.4e-68) tmp = Float64(z + t); elseif (a <= 1.65e+100) tmp = Float64(y * i); else tmp = Float64(t + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.4e-68) tmp = z + t; elseif (a <= 1.65e+100) tmp = y * i; else tmp = t + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.4e-68], N[(z + t), $MachinePrecision], If[LessEqual[a, 1.65e+100], N[(y * i), $MachinePrecision], N[(t + a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.4 \cdot 10^{-68}:\\
\;\;\;\;z + t\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{+100}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;t + a\\
\end{array}
\end{array}
if a < 1.4000000000000001e-68Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in a around inf 62.5%
+-commutative62.5%
associate-+l+62.5%
Simplified61.8%
Taylor expanded in z around inf 26.7%
Taylor expanded in a around 0 32.0%
if 1.4000000000000001e-68 < a < 1.6500000000000001e100Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+l+99.8%
+-commutative99.8%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around inf 26.5%
*-commutative26.5%
Simplified26.5%
if 1.6500000000000001e100 < a Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in a around inf 100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified99.9%
Taylor expanded in z around inf 66.9%
Taylor expanded in z around 0 55.1%
Taylor expanded in a around 0 55.1%
Final simplification34.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -4.3e+71) (+ 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 <= -4.3e+71) {
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 <= (-4.3d+71)) 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 <= -4.3e+71) {
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 <= -4.3e+71: 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 <= -4.3e+71) 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 <= -4.3e+71) 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, -4.3e+71], N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+71}:\\
\;\;\;\;a + \left(z + t\right)\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -4.29999999999999984e71Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in a around inf 81.1%
+-commutative81.1%
associate-+l+81.1%
Simplified81.0%
Taylor expanded in z around inf 50.7%
Taylor expanded in a around 0 59.1%
if -4.29999999999999984e71 < z Initial program 99.9%
sub-neg99.9%
metadata-eval99.9%
add-cube-cbrt99.7%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in a around inf 40.4%
Final simplification43.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -6.5e+140) (+ 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 <= -6.5e+140) {
tmp = 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 <= (-6.5d+140)) then
tmp = 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 <= -6.5e+140) {
tmp = z + t;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -6.5e+140: tmp = z + t else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -6.5e+140) tmp = 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 <= -6.5e+140) tmp = z + t; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -6.5e+140], N[(z + t), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.5 \cdot 10^{+140}:\\
\;\;\;\;z + t\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -6.4999999999999999e140Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in a around inf 75.3%
+-commutative75.3%
associate-+l+75.3%
Simplified75.2%
Taylor expanded in z around inf 48.8%
Taylor expanded in a around 0 53.7%
if -6.4999999999999999e140 < z Initial program 99.9%
sub-neg99.9%
metadata-eval99.9%
add-cube-cbrt99.7%
pow399.7%
Applied egg-rr99.7%
Taylor expanded in a around inf 40.5%
Final simplification42.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.4e+100) (* y i) (+ t a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.4e+100) {
tmp = y * i;
} else {
tmp = t + 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 (a <= 2.4d+100) then
tmp = y * i
else
tmp = t + 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 (a <= 2.4e+100) {
tmp = y * i;
} else {
tmp = t + a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.4e+100: tmp = y * i else: tmp = t + a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.4e+100) tmp = Float64(y * i); else tmp = Float64(t + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 2.4e+100) tmp = y * i; else tmp = t + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.4e+100], N[(y * i), $MachinePrecision], N[(t + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.4 \cdot 10^{+100}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;t + a\\
\end{array}
\end{array}
if a < 2.40000000000000012e100Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around inf 27.0%
*-commutative27.0%
Simplified27.0%
if 2.40000000000000012e100 < a Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in a around inf 100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified99.9%
Taylor expanded in z around inf 66.9%
Taylor expanded in z around 0 55.1%
Taylor expanded in a around 0 55.1%
Final simplification31.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.1e+100) (* y i) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.1e+100) {
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 (a <= 2.1d+100) 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 (a <= 2.1e+100) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.1e+100: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.1e+100) 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 (a <= 2.1e+100) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.1e+100], N[(y * i), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.1 \cdot 10^{+100}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 2.0999999999999999e100Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in y around inf 27.0%
*-commutative27.0%
Simplified27.0%
if 2.0999999999999999e100 < a Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+l+100.0%
+-commutative100.0%
fma-define100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
Taylor expanded in a around inf 100.0%
+-commutative100.0%
associate-+l+100.0%
Simplified99.9%
Taylor expanded in z around inf 66.9%
Taylor expanded in a around inf 45.8%
Final simplification29.9%
(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.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
Simplified99.9%
Taylor expanded in a around inf 72.6%
+-commutative72.6%
associate-+l+72.6%
Simplified72.0%
Taylor expanded in z around inf 35.2%
Taylor expanded in a around inf 15.5%
Final simplification15.5%
herbie shell --seed 2024158
(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)))