
(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 25 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 (+ (+ z a) (fma (+ b -0.5) (log c) (fma y i (fma x (log y) t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (z + a) + fma((b + -0.5), log(c), fma(y, i, fma(x, log(y), t)));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(z + a) + fma(Float64(b + -0.5), log(c), fma(y, i, fma(x, log(y), t)))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(z + a), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(y * i + N[(x * N[Log[y], $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, \mathsf{fma}\left(y, i, \mathsf{fma}\left(x, \log y, t\right)\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<= t_1 -1e+168)
(+ (+ z a) (+ (* y i) (* b (log c))))
(if (<= t_1 2e+216)
(+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* -0.5 (log c))))
(+ (+ z a) (fma (log c) (+ b -0.5) (* y i)))))))
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 (t_1 <= -1e+168) {
tmp = (z + a) + ((y * i) + (b * log(c)));
} else if (t_1 <= 2e+216) {
tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (-0.5 * log(c)));
} else {
tmp = (z + a) + fma(log(c), (b + -0.5), (y * i));
}
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 (t_1 <= -1e+168) tmp = Float64(Float64(z + a) + Float64(Float64(y * i) + Float64(b * log(c)))); elseif (t_1 <= 2e+216) tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(-0.5 * log(c)))); else tmp = Float64(Float64(z + a) + fma(log(c), Float64(b + -0.5), Float64(y * i))); 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[t$95$1, -1e+168], N[(N[(z + a), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+216], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+168}:\\
\;\;\;\;\left(z + a\right) + \left(y \cdot i + b \cdot \log c\right)\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+216}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + -0.5 \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) + \mathsf{fma}\left(\log c, b + -0.5, y \cdot i\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 b 1/2) (log.f64 c)) < -9.9999999999999993e167Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 97.2%
*-commutative97.2%
Simplified97.2%
Taylor expanded in t around 0 84.2%
Taylor expanded in b around inf 84.2%
if -9.9999999999999993e167 < (*.f64 (-.f64 b 1/2) (log.f64 c)) < 2e216Initial program 99.9%
Taylor expanded in b around 0 97.0%
if 2e216 < (*.f64 (-.f64 b 1/2) (log.f64 c)) Initial program 99.5%
+-commutative99.5%
associate-+l+99.5%
associate-+r+99.5%
+-commutative99.5%
associate-+r+99.5%
associate-+r+99.5%
associate-+l+99.5%
+-commutative99.5%
associate-+r+99.5%
associate-+r+99.5%
fma-def99.6%
sub-neg99.6%
metadata-eval99.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in t around 0 94.6%
fma-def94.7%
sub-neg94.7%
metadata-eval94.7%
Simplified94.7%
Final simplification95.0%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (fma x (log y) z) (+ a t)) (+ (* (+ 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 (fma(x, log(y), z) + (a + t)) + (((b + -0.5) * log(c)) + (y * i));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(fma(x, log(y), z) + Float64(a + t)) + Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(a + t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\mathsf{fma}\left(x, \log y, z\right) + \left(a + t\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)
\end{array}
Initial program 99.8%
associate-+l+99.8%
associate-+l+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Final simplification99.8%
(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.8%
Final simplification99.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.9e+184) (not (<= x 2e+171))) (+ (* x (log y)) (+ a (+ z (* -0.5 (log c))))) (+ (+ z a) (fma (+ b -0.5) (log c) (+ t (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4.9e+184) || !(x <= 2e+171)) {
tmp = (x * log(y)) + (a + (z + (-0.5 * log(c))));
} else {
tmp = (z + a) + fma((b + -0.5), log(c), (t + (y * i)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4.9e+184) || !(x <= 2e+171)) tmp = Float64(Float64(x * log(y)) + Float64(a + Float64(z + Float64(-0.5 * log(c))))); else tmp = Float64(Float64(z + a) + fma(Float64(b + -0.5), log(c), Float64(t + Float64(y * i)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4.9e+184], N[Not[LessEqual[x, 2e+171]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(t + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.9 \cdot 10^{+184} \lor \neg \left(x \leq 2 \cdot 10^{+171}\right):\\
\;\;\;\;x \cdot \log y + \left(a + \left(z + -0.5 \cdot \log c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, t + y \cdot i\right)\\
\end{array}
\end{array}
if x < -4.90000000000000029e184 or 1.99999999999999991e171 < x Initial program 99.7%
Taylor expanded in b around 0 96.7%
Taylor expanded in t around 0 87.0%
fma-def87.0%
Simplified87.0%
Taylor expanded in y around 0 75.8%
if -4.90000000000000029e184 < x < 1.99999999999999991e171Initial program 99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 95.5%
*-commutative95.5%
Simplified95.5%
Final simplification90.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.95e+170) (not (<= x 4.8e+166))) (+ (* y i) (+ (* -0.5 (log c)) (+ a (* x (log y))))) (+ (+ z a) (fma (+ b -0.5) (log c) (+ t (* y i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.95e+170) || !(x <= 4.8e+166)) {
tmp = (y * i) + ((-0.5 * log(c)) + (a + (x * log(y))));
} else {
tmp = (z + a) + fma((b + -0.5), log(c), (t + (y * i)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.95e+170) || !(x <= 4.8e+166)) tmp = Float64(Float64(y * i) + Float64(Float64(-0.5 * log(c)) + Float64(a + Float64(x * log(y))))); else tmp = Float64(Float64(z + a) + fma(Float64(b + -0.5), log(c), Float64(t + Float64(y * i)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.95e+170], N[Not[LessEqual[x, 4.8e+166]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(t + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.95 \cdot 10^{+170} \lor \neg \left(x \leq 4.8 \cdot 10^{+166}\right):\\
\;\;\;\;y \cdot i + \left(-0.5 \cdot \log c + \left(a + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, t + y \cdot i\right)\\
\end{array}
\end{array}
if x < -1.9500000000000001e170 or 4.79999999999999984e166 < x Initial program 99.7%
Taylor expanded in b around 0 96.9%
Taylor expanded in x around inf 83.0%
if -1.9500000000000001e170 < x < 4.79999999999999984e166Initial program 99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 95.9%
*-commutative95.9%
Simplified95.9%
Final simplification92.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -3e+175)
(+ (+ z a) (+ t_1 (+ t (* (log c) (- b 0.5)))))
(if (<= x 4.6e+167)
(+ (+ z a) (fma (+ b -0.5) (log c) (+ t (* y i))))
(+ (* y i) (+ (* -0.5 (log c)) (+ a t_1)))))))
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 <= -3e+175) {
tmp = (z + a) + (t_1 + (t + (log(c) * (b - 0.5))));
} else if (x <= 4.6e+167) {
tmp = (z + a) + fma((b + -0.5), log(c), (t + (y * i)));
} else {
tmp = (y * i) + ((-0.5 * log(c)) + (a + t_1));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -3e+175) tmp = Float64(Float64(z + a) + Float64(t_1 + Float64(t + Float64(log(c) * Float64(b - 0.5))))); elseif (x <= 4.6e+167) tmp = Float64(Float64(z + a) + fma(Float64(b + -0.5), log(c), Float64(t + Float64(y * i)))); else tmp = Float64(Float64(y * i) + Float64(Float64(-0.5 * log(c)) + Float64(a + t_1))); 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, -3e+175], N[(N[(z + a), $MachinePrecision] + N[(t$95$1 + N[(t + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.6e+167], N[(N[(z + a), $MachinePrecision] + N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision] + N[(t + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -3 \cdot 10^{+175}:\\
\;\;\;\;\left(z + a\right) + \left(t_1 + \left(t + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{+167}:\\
\;\;\;\;\left(z + a\right) + \mathsf{fma}\left(b + -0.5, \log c, t + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(-0.5 \cdot \log c + \left(a + t_1\right)\right)\\
\end{array}
\end{array}
if x < -3.0000000000000002e175Initial program 99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+r+99.7%
associate-+r+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
associate-+r+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in y around 0 93.9%
if -3.0000000000000002e175 < x < 4.59999999999999976e167Initial program 99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 95.5%
*-commutative95.5%
Simplified95.5%
if 4.59999999999999976e167 < x Initial program 99.8%
Taylor expanded in b around 0 99.8%
Taylor expanded in x around inf 82.4%
Final simplification93.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.35e+177) (not (<= x 1.4e+171))) (+ (* x (log y)) (+ a (+ z (* -0.5 (log c))))) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ (+ z a) t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.35e+177) || !(x <= 1.4e+171)) {
tmp = (x * log(y)) + (a + (z + (-0.5 * log(c))));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + ((z + a) + 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 ((x <= (-1.35d+177)) .or. (.not. (x <= 1.4d+171))) then
tmp = (x * log(y)) + (a + (z + ((-0.5d0) * log(c))))
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + ((z + a) + 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 ((x <= -1.35e+177) || !(x <= 1.4e+171)) {
tmp = (x * Math.log(y)) + (a + (z + (-0.5 * Math.log(c))));
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + ((z + a) + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.35e+177) or not (x <= 1.4e+171): tmp = (x * math.log(y)) + (a + (z + (-0.5 * math.log(c)))) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + ((z + a) + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.35e+177) || !(x <= 1.4e+171)) tmp = Float64(Float64(x * log(y)) + Float64(a + Float64(z + Float64(-0.5 * log(c))))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(Float64(z + a) + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.35e+177) || ~((x <= 1.4e+171))) tmp = (x * log(y)) + (a + (z + (-0.5 * log(c)))); else tmp = (y * i) + ((log(c) * (b - 0.5)) + ((z + a) + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.35e+177], N[Not[LessEqual[x, 1.4e+171]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(z + a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+177} \lor \neg \left(x \leq 1.4 \cdot 10^{+171}\right):\\
\;\;\;\;x \cdot \log y + \left(a + \left(z + -0.5 \cdot \log c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(\left(z + a\right) + t\right)\right)\\
\end{array}
\end{array}
if x < -1.34999999999999995e177 or 1.40000000000000002e171 < x Initial program 99.7%
Taylor expanded in b around 0 96.7%
Taylor expanded in t around 0 87.0%
fma-def87.0%
Simplified87.0%
Taylor expanded in y around 0 75.8%
if -1.34999999999999995e177 < x < 1.40000000000000002e171Initial program 99.9%
Taylor expanded in x around 0 95.5%
+-commutative95.5%
associate-+l+95.5%
+-commutative95.5%
Simplified95.5%
Final simplification90.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.6e+189) (not (<= x 2.1e+170))) (+ a (+ (* -0.5 (log c)) (* x (log y)))) (+ (* y i) (+ (* (log c) (- b 0.5)) (+ (+ z a) t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4.6e+189) || !(x <= 2.1e+170)) {
tmp = a + ((-0.5 * log(c)) + (x * log(y)));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + ((z + a) + 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 ((x <= (-4.6d+189)) .or. (.not. (x <= 2.1d+170))) then
tmp = a + (((-0.5d0) * log(c)) + (x * log(y)))
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + ((z + a) + 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 ((x <= -4.6e+189) || !(x <= 2.1e+170)) {
tmp = a + ((-0.5 * Math.log(c)) + (x * Math.log(y)));
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + ((z + a) + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -4.6e+189) or not (x <= 2.1e+170): tmp = a + ((-0.5 * math.log(c)) + (x * math.log(y))) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + ((z + a) + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4.6e+189) || !(x <= 2.1e+170)) tmp = Float64(a + Float64(Float64(-0.5 * log(c)) + Float64(x * log(y)))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(Float64(z + a) + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -4.6e+189) || ~((x <= 2.1e+170))) tmp = a + ((-0.5 * log(c)) + (x * log(y))); else tmp = (y * i) + ((log(c) * (b - 0.5)) + ((z + a) + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4.6e+189], N[Not[LessEqual[x, 2.1e+170]], $MachinePrecision]], N[(a + N[(N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(z + a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{+189} \lor \neg \left(x \leq 2.1 \cdot 10^{+170}\right):\\
\;\;\;\;a + \left(-0.5 \cdot \log c + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(\left(z + a\right) + t\right)\right)\\
\end{array}
\end{array}
if x < -4.6e189 or 2.09999999999999998e170 < x Initial program 99.7%
Taylor expanded in b around 0 96.6%
Taylor expanded in x around inf 82.0%
Taylor expanded in y around 0 70.4%
if -4.6e189 < x < 2.09999999999999998e170Initial program 99.9%
Taylor expanded in x around 0 95.0%
+-commutative95.0%
associate-+l+95.0%
+-commutative95.0%
Simplified95.0%
Final simplification89.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -2.5e+205) (not (<= (- b 0.5) 5e+203))) (+ a (* (log c) (- b 0.5))) (+ (+ z a) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -2.5e+205) || !((b - 0.5) <= 5e+203)) {
tmp = a + (log(c) * (b - 0.5));
} else {
tmp = (z + 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 (((b - 0.5d0) <= (-2.5d+205)) .or. (.not. ((b - 0.5d0) <= 5d+203))) then
tmp = a + (log(c) * (b - 0.5d0))
else
tmp = (z + 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 (((b - 0.5) <= -2.5e+205) || !((b - 0.5) <= 5e+203)) {
tmp = a + (Math.log(c) * (b - 0.5));
} else {
tmp = (z + a) + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -2.5e+205) or not ((b - 0.5) <= 5e+203): tmp = a + (math.log(c) * (b - 0.5)) else: tmp = (z + a) + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -2.5e+205) || !(Float64(b - 0.5) <= 5e+203)) tmp = Float64(a + Float64(log(c) * Float64(b - 0.5))); else tmp = Float64(Float64(z + a) + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -2.5e+205) || ~(((b - 0.5) <= 5e+203))) tmp = a + (log(c) * (b - 0.5)); else tmp = (z + a) + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -2.5e+205], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 5e+203]], $MachinePrecision]], N[(a + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -2.5 \cdot 10^{+205} \lor \neg \left(b - 0.5 \leq 5 \cdot 10^{+203}\right):\\
\;\;\;\;a + \log c \cdot \left(b - 0.5\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) + y \cdot i\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -2.5000000000000001e205 or 4.99999999999999994e203 < (-.f64 b 1/2) Initial program 99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+r+99.7%
associate-+r+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
associate-+r+99.7%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in t around 0 85.5%
Taylor expanded in z around 0 80.2%
Taylor expanded in y around 0 69.3%
if -2.5000000000000001e205 < (-.f64 b 1/2) < 4.99999999999999994e203Initial program 99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 55.0%
*-commutative55.0%
Simplified55.0%
Final simplification57.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= (- b 0.5) -2.5e+205) (not (<= (- b 0.5) 5e+192))) (+ (+ z a) (* b (log c))) (+ (+ z a) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (((b - 0.5) <= -2.5e+205) || !((b - 0.5) <= 5e+192)) {
tmp = (z + a) + (b * log(c));
} else {
tmp = (z + 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 (((b - 0.5d0) <= (-2.5d+205)) .or. (.not. ((b - 0.5d0) <= 5d+192))) then
tmp = (z + a) + (b * log(c))
else
tmp = (z + 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 (((b - 0.5) <= -2.5e+205) || !((b - 0.5) <= 5e+192)) {
tmp = (z + a) + (b * Math.log(c));
} else {
tmp = (z + a) + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if ((b - 0.5) <= -2.5e+205) or not ((b - 0.5) <= 5e+192): tmp = (z + a) + (b * math.log(c)) else: tmp = (z + a) + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((Float64(b - 0.5) <= -2.5e+205) || !(Float64(b - 0.5) <= 5e+192)) tmp = Float64(Float64(z + a) + Float64(b * log(c))); else tmp = Float64(Float64(z + a) + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (((b - 0.5) <= -2.5e+205) || ~(((b - 0.5) <= 5e+192))) tmp = (z + a) + (b * log(c)); else tmp = (z + a) + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[N[(b - 0.5), $MachinePrecision], -2.5e+205], N[Not[LessEqual[N[(b - 0.5), $MachinePrecision], 5e+192]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -2.5 \cdot 10^{+205} \lor \neg \left(b - 0.5 \leq 5 \cdot 10^{+192}\right):\\
\;\;\;\;\left(z + a\right) + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) + y \cdot i\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -2.5000000000000001e205 or 5.00000000000000033e192 < (-.f64 b 1/2) Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around inf 76.6%
if -2.5000000000000001e205 < (-.f64 b 1/2) < 5.00000000000000033e192Initial program 99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 54.1%
*-commutative54.1%
Simplified54.1%
Final simplification58.6%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (log c))))
(if (<= (- b 0.5) -4e+166)
(+ (* y i) (+ a t_1))
(if (<= (- b 0.5) 5e+192) (+ (+ z a) (* y i)) (+ (+ z a) t_1)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double tmp;
if ((b - 0.5) <= -4e+166) {
tmp = (y * i) + (a + t_1);
} else if ((b - 0.5) <= 5e+192) {
tmp = (z + a) + (y * i);
} else {
tmp = (z + a) + 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 = b * log(c)
if ((b - 0.5d0) <= (-4d+166)) then
tmp = (y * i) + (a + t_1)
else if ((b - 0.5d0) <= 5d+192) then
tmp = (z + a) + (y * i)
else
tmp = (z + a) + 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 = b * Math.log(c);
double tmp;
if ((b - 0.5) <= -4e+166) {
tmp = (y * i) + (a + t_1);
} else if ((b - 0.5) <= 5e+192) {
tmp = (z + a) + (y * i);
} else {
tmp = (z + a) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) tmp = 0 if (b - 0.5) <= -4e+166: tmp = (y * i) + (a + t_1) elif (b - 0.5) <= 5e+192: tmp = (z + a) + (y * i) else: tmp = (z + a) + t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) tmp = 0.0 if (Float64(b - 0.5) <= -4e+166) tmp = Float64(Float64(y * i) + Float64(a + t_1)); elseif (Float64(b - 0.5) <= 5e+192) tmp = Float64(Float64(z + a) + Float64(y * i)); else tmp = Float64(Float64(z + a) + t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * log(c); tmp = 0.0; if ((b - 0.5) <= -4e+166) tmp = (y * i) + (a + t_1); elseif ((b - 0.5) <= 5e+192) tmp = (z + a) + (y * i); else tmp = (z + a) + t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -4e+166], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 5e+192], N[(N[(z + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] + t$95$1), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;b - 0.5 \leq -4 \cdot 10^{+166}:\\
\;\;\;\;y \cdot i + \left(a + t_1\right)\\
\mathbf{elif}\;b - 0.5 \leq 5 \cdot 10^{+192}:\\
\;\;\;\;\left(z + a\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) + t_1\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -3.99999999999999976e166Initial program 99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+r+99.7%
associate-+r+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
associate-+r+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 94.4%
*-commutative94.4%
Simplified94.4%
Taylor expanded in t around 0 83.6%
Taylor expanded in z around 0 79.4%
Taylor expanded in b around inf 79.4%
if -3.99999999999999976e166 < (-.f64 b 1/2) < 5.00000000000000033e192Initial program 99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 54.4%
*-commutative54.4%
Simplified54.4%
if 5.00000000000000033e192 < (-.f64 b 1/2) Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in b around inf 87.2%
Final simplification60.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (* (log c) (- b 0.5)) (+ (+ z a) t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((log(c) * (b - 0.5)) + ((z + a) + t));
}
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) + ((log(c) * (b - 0.5d0)) + ((z + a) + t))
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) + ((Math.log(c) * (b - 0.5)) + ((z + a) + t));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((math.log(c) * (b - 0.5)) + ((z + a) + t))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(Float64(z + a) + t))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((log(c) * (b - 0.5)) + ((z + a) + t)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(z + a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(\left(z + a\right) + t\right)\right)
\end{array}
Initial program 99.8%
Taylor expanded in x around 0 81.0%
+-commutative81.0%
associate-+l+81.0%
+-commutative81.0%
Simplified81.0%
Final simplification81.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.15e+156) (+ (* y i) (+ z (* (log c) (- b 0.5)))) (if (<= a 1.65e+211) (+ (+ z a) (* y i)) (+ (* y i) (+ a (* b (log c)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.15e+156) {
tmp = (y * i) + (z + (log(c) * (b - 0.5)));
} else if (a <= 1.65e+211) {
tmp = (z + a) + (y * i);
} else {
tmp = (y * i) + (a + (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) :: tmp
if (a <= 1.15d+156) then
tmp = (y * i) + (z + (log(c) * (b - 0.5d0)))
else if (a <= 1.65d+211) then
tmp = (z + a) + (y * i)
else
tmp = (y * i) + (a + (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 tmp;
if (a <= 1.15e+156) {
tmp = (y * i) + (z + (Math.log(c) * (b - 0.5)));
} else if (a <= 1.65e+211) {
tmp = (z + a) + (y * i);
} else {
tmp = (y * i) + (a + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.15e+156: tmp = (y * i) + (z + (math.log(c) * (b - 0.5))) elif a <= 1.65e+211: tmp = (z + a) + (y * i) else: tmp = (y * i) + (a + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.15e+156) tmp = Float64(Float64(y * i) + Float64(z + Float64(log(c) * Float64(b - 0.5)))); elseif (a <= 1.65e+211) tmp = Float64(Float64(z + a) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.15e+156) tmp = (y * i) + (z + (log(c) * (b - 0.5))); elseif (a <= 1.65e+211) tmp = (z + a) + (y * i); else tmp = (y * i) + (a + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.15e+156], N[(N[(y * i), $MachinePrecision] + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.65e+211], N[(N[(z + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.15 \cdot 10^{+156}:\\
\;\;\;\;y \cdot i + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{elif}\;a \leq 1.65 \cdot 10^{+211}:\\
\;\;\;\;\left(z + a\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 1.1499999999999999e156Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 81.7%
*-commutative81.7%
Simplified81.7%
Taylor expanded in t around 0 64.4%
Taylor expanded in a around 0 55.1%
if 1.1499999999999999e156 < a < 1.64999999999999992e211Initial program 100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+r+100.0%
associate-+r+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
associate-+r+100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 47.1%
*-commutative47.1%
Simplified47.1%
if 1.64999999999999992e211 < a Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 81.9%
*-commutative81.9%
Simplified81.9%
Taylor expanded in t around 0 78.9%
Taylor expanded in z around 0 78.9%
Taylor expanded in b around inf 78.9%
Final simplification56.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -9.5e-14) (+ (+ z a) (+ (* y i) (* b (log c)))) (+ (* y i) (+ a (* (log c) (- b 0.5))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -9.5e-14) {
tmp = (z + a) + ((y * i) + (b * log(c)));
} else {
tmp = (y * i) + (a + (log(c) * (b - 0.5)));
}
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 <= (-9.5d-14)) then
tmp = (z + a) + ((y * i) + (b * log(c)))
else
tmp = (y * i) + (a + (log(c) * (b - 0.5d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -9.5e-14) {
tmp = (z + a) + ((y * i) + (b * Math.log(c)));
} else {
tmp = (y * i) + (a + (Math.log(c) * (b - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -9.5e-14: tmp = (z + a) + ((y * i) + (b * math.log(c))) else: tmp = (y * i) + (a + (math.log(c) * (b - 0.5))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -9.5e-14) tmp = Float64(Float64(z + a) + Float64(Float64(y * i) + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(log(c) * Float64(b - 0.5)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -9.5e-14) tmp = (z + a) + ((y * i) + (b * log(c))); else tmp = (y * i) + (a + (log(c) * (b - 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -9.5e-14], N[(N[(z + a), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{-14}:\\
\;\;\;\;\left(z + a\right) + \left(y \cdot i + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \log c \cdot \left(b - 0.5\right)\right)\\
\end{array}
\end{array}
if z < -9.4999999999999999e-14Initial program 99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 82.1%
*-commutative82.1%
Simplified82.1%
Taylor expanded in t around 0 75.7%
Taylor expanded in b around inf 75.7%
if -9.4999999999999999e-14 < z Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 80.6%
*-commutative80.6%
Simplified80.6%
Taylor expanded in t around 0 60.5%
Taylor expanded in z around 0 51.2%
Final simplification58.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.85e-118) (+ (+ z a) (+ t (* (log c) (- b 0.5)))) (+ (+ z a) (+ (* y i) (* b (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.85e-118) {
tmp = (z + a) + (t + (log(c) * (b - 0.5)));
} else {
tmp = (z + a) + ((y * i) + (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) :: tmp
if (y <= 1.85d-118) then
tmp = (z + a) + (t + (log(c) * (b - 0.5d0)))
else
tmp = (z + a) + ((y * i) + (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 tmp;
if (y <= 1.85e-118) {
tmp = (z + a) + (t + (Math.log(c) * (b - 0.5)));
} else {
tmp = (z + a) + ((y * i) + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 1.85e-118: tmp = (z + a) + (t + (math.log(c) * (b - 0.5))) else: tmp = (z + a) + ((y * i) + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.85e-118) tmp = Float64(Float64(z + a) + Float64(t + Float64(log(c) * Float64(b - 0.5)))); else tmp = Float64(Float64(z + a) + Float64(Float64(y * i) + Float64(b * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 1.85e-118) tmp = (z + a) + (t + (log(c) * (b - 0.5))); else tmp = (z + a) + ((y * i) + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.85e-118], N[(N[(z + a), $MachinePrecision] + N[(t + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.85 \cdot 10^{-118}:\\
\;\;\;\;\left(z + a\right) + \left(t + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) + \left(y \cdot i + b \cdot \log c\right)\\
\end{array}
\end{array}
if y < 1.85000000000000007e-118Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in x around 0 74.6%
*-commutative74.6%
Simplified74.6%
Taylor expanded in y around 0 73.9%
if 1.85000000000000007e-118 < y Initial program 99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in t around 0 67.4%
Taylor expanded in b around inf 67.4%
Final simplification69.4%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ z a) (+ (* 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 (z + a) + ((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 = (z + a) + ((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 (z + a) + ((y * i) + (Math.log(c) * (b - 0.5)));
}
def code(x, y, z, t, a, b, c, i): return (z + a) + ((y * i) + (math.log(c) * (b - 0.5)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(z + a) + Float64(Float64(y * i) + Float64(log(c) * Float64(b - 0.5)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (z + a) + ((y * i) + (log(c) * (b - 0.5))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(z + a), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z + a\right) + \left(y \cdot i + \log c \cdot \left(b - 0.5\right)\right)
\end{array}
Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around 0 81.0%
*-commutative81.0%
Simplified81.0%
Taylor expanded in t around 0 64.8%
Final simplification64.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -9e+251) (not (<= b 1.8e+205))) (* b (log c)) (+ (+ z a) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -9e+251) || !(b <= 1.8e+205)) {
tmp = b * log(c);
} else {
tmp = (z + 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 ((b <= (-9d+251)) .or. (.not. (b <= 1.8d+205))) then
tmp = b * log(c)
else
tmp = (z + 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 ((b <= -9e+251) || !(b <= 1.8e+205)) {
tmp = b * Math.log(c);
} else {
tmp = (z + a) + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -9e+251) or not (b <= 1.8e+205): tmp = b * math.log(c) else: tmp = (z + a) + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -9e+251) || !(b <= 1.8e+205)) tmp = Float64(b * log(c)); else tmp = Float64(Float64(z + a) + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -9e+251) || ~((b <= 1.8e+205))) tmp = b * log(c); else tmp = (z + a) + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -9e+251], N[Not[LessEqual[b, 1.8e+205]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9 \cdot 10^{+251} \lor \neg \left(b \leq 1.8 \cdot 10^{+205}\right):\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) + y \cdot i\\
\end{array}
\end{array}
if b < -8.9999999999999997e251 or 1.80000000000000001e205 < b Initial program 99.7%
+-commutative99.7%
associate-+l+99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+r+99.7%
associate-+r+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+r+99.7%
associate-+r+99.7%
fma-def99.7%
sub-neg99.7%
metadata-eval99.7%
Simplified99.7%
Taylor expanded in x around 0 96.8%
*-commutative96.8%
Simplified96.8%
Taylor expanded in t around 0 91.1%
Taylor expanded in z around 0 88.2%
Taylor expanded in b around inf 71.0%
if -8.9999999999999997e251 < b < 1.80000000000000001e205Initial program 99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 53.3%
*-commutative53.3%
Simplified53.3%
Final simplification55.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.75e+159) z (if (<= z -2.75e+53) (* 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.75e+159) {
tmp = z;
} else if (z <= -2.75e+53) {
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.75d+159)) then
tmp = z
else if (z <= (-2.75d+53)) 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.75e+159) {
tmp = z;
} else if (z <= -2.75e+53) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.75e+159: tmp = z elif z <= -2.75e+53: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.75e+159) tmp = z; elseif (z <= -2.75e+53) 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.75e+159) tmp = z; elseif (z <= -2.75e+53) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.75e+159], z, If[LessEqual[z, -2.75e+53], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+159}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -2.75 \cdot 10^{+53}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.75e159Initial program 100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+r+100.0%
associate-+r+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
associate-+r+100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 59.4%
if -1.75e159 < z < -2.74999999999999988e53Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 59.4%
*-commutative59.4%
Simplified59.4%
Taylor expanded in i around inf 39.5%
if -2.74999999999999988e53 < z Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 13.1%
Final simplification22.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= i -5e+205) (* y i) (if (<= i 2.85e+135) (+ z a) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (i <= -5e+205) {
tmp = y * i;
} else if (i <= 2.85e+135) {
tmp = z + a;
} else {
tmp = 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 (i <= (-5d+205)) then
tmp = y * i
else if (i <= 2.85d+135) then
tmp = z + a
else
tmp = 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 (i <= -5e+205) {
tmp = y * i;
} else if (i <= 2.85e+135) {
tmp = z + a;
} else {
tmp = y * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if i <= -5e+205: tmp = y * i elif i <= 2.85e+135: tmp = z + a else: tmp = y * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (i <= -5e+205) tmp = Float64(y * i); elseif (i <= 2.85e+135) tmp = Float64(z + a); else tmp = Float64(y * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (i <= -5e+205) tmp = y * i; elseif (i <= 2.85e+135) tmp = z + a; else tmp = y * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[i, -5e+205], N[(y * i), $MachinePrecision], If[LessEqual[i, 2.85e+135], N[(z + a), $MachinePrecision], N[(y * i), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -5 \cdot 10^{+205}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;i \leq 2.85 \cdot 10^{+135}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot i\\
\end{array}
\end{array}
if i < -5.0000000000000002e205 or 2.8500000000000001e135 < i Initial program 99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+r+99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 62.3%
*-commutative62.3%
Simplified62.3%
Taylor expanded in i around inf 47.5%
if -5.0000000000000002e205 < i < 2.8500000000000001e135Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 43.5%
*-commutative43.5%
Simplified43.5%
Taylor expanded in y around 0 33.4%
Final simplification37.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.4e+156) (+ z a) (+ 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 <= -2.4e+156) {
tmp = z + a;
} 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 <= (-2.4d+156)) then
tmp = z + a
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 <= -2.4e+156) {
tmp = z + a;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.4e+156: tmp = z + a else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.4e+156) tmp = Float64(z + a); 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 <= -2.4e+156) tmp = z + a; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.4e+156], N[(z + a), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{+156}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -2.4000000000000001e156Initial program 100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+r+100.0%
associate-+r+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
associate-+r+100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 77.5%
*-commutative77.5%
Simplified77.5%
Taylor expanded in y around 0 71.6%
if -2.4000000000000001e156 < z Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 44.5%
*-commutative44.5%
Simplified44.5%
Taylor expanded in z around 0 36.1%
+-commutative36.1%
Simplified36.1%
Final simplification40.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.8e+111) (+ 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 (z <= -1.8e+111) {
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 (z <= (-1.8d+111)) 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 (z <= -1.8e+111) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.8e+111: 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 (z <= -1.8e+111) 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 (z <= -1.8e+111) 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[z, -1.8e+111], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{+111}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -1.8000000000000001e111Initial program 100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+r+100.0%
associate-+r+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
associate-+r+100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in y around inf 75.8%
*-commutative75.8%
Simplified75.8%
Taylor expanded in a around 0 66.8%
+-commutative66.8%
Simplified66.8%
if -1.8000000000000001e111 < z Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in y around inf 43.1%
*-commutative43.1%
Simplified43.1%
Taylor expanded in z around 0 35.2%
+-commutative35.2%
Simplified35.2%
Final simplification40.6%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ z a) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (z + a) + (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 = (z + a) + (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 (z + a) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (z + a) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(z + a) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (z + a) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(z + a), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z + a\right) + y \cdot i
\end{array}
Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in y around inf 48.7%
*-commutative48.7%
Simplified48.7%
Final simplification48.7%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -1.9e+111) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.9e+111) {
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 <= (-1.9d+111)) 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 <= -1.9e+111) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.9e+111: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.9e+111) 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 <= -1.9e+111) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.9e+111], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+111}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -1.89999999999999988e111Initial program 100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
+-commutative100.0%
associate-+r+100.0%
associate-+r+100.0%
associate-+l+100.0%
+-commutative100.0%
associate-+r+100.0%
associate-+r+100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
Simplified100.0%
Taylor expanded in z around inf 48.7%
if -1.89999999999999988e111 < z Initial program 99.8%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf 14.0%
Final simplification20.0%
(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%
+-commutative99.8%
associate-+l+99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
associate-+l+99.8%
+-commutative99.8%
associate-+r+99.8%
associate-+r+99.8%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
Simplified99.9%
Taylor expanded in a around inf 13.5%
Final simplification13.5%
herbie shell --seed 2023192
(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)))