
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (fma y i (fma (+ b -0.5) (log c) (+ 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 (or (<= x -1.2e+233) (not (<= x 1.35e+233))) (+ a (+ t (+ z (+ (* x (log y)) (* (log c) (- b 0.5)))))) (+ (+ a (+ z t)) (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 tmp;
if ((x <= -1.2e+233) || !(x <= 1.35e+233)) {
tmp = a + (t + (z + ((x * log(y)) + (log(c) * (b - 0.5)))));
} else {
tmp = (a + (z + t)) + fma(log(c), (b + -0.5), (y * i));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.2e+233) || !(x <= 1.35e+233)) tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(log(c) * Float64(b - 0.5)))))); else tmp = Float64(Float64(a + Float64(z + t)) + fma(log(c), Float64(b + -0.5), Float64(y * i))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.2e+233], N[Not[LessEqual[x, 1.35e+233]], $MachinePrecision]], 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[(a + N[(z + t), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.2 \cdot 10^{+233} \lor \neg \left(x \leq 1.35 \cdot 10^{+233}\right):\\
\;\;\;\;a + \left(t + \left(z + \left(x \cdot \log y + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + \left(z + t\right)\right) + \mathsf{fma}\left(\log c, b + -0.5, y \cdot i\right)\\
\end{array}
\end{array}
if x < -1.20000000000000001e233 or 1.35000000000000004e233 < x Initial program 99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in y around 0 88.1%
if -1.20000000000000001e233 < x < 1.35000000000000004e233Initial 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 96.0%
associate-+r+96.0%
+-commutative96.0%
*-commutative96.0%
sub-neg96.0%
metadata-eval96.0%
associate-+r+96.0%
+-commutative96.0%
+-commutative96.0%
fma-define96.0%
+-commutative96.0%
Simplified96.0%
Final simplification94.7%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ z (* x (log y))))) (* (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) {
return ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5))) + (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))) + (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))) + (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))) + (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(b - 0.5))) + 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))) + (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[(b - 0.5), $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(b - 0.5\right)\right) + y \cdot i
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (+ (+ a (+ z t)) (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) {
return (a + (z + t)) + fma(log(c), (b + -0.5), (y * i));
}
function code(x, y, z, t, a, b, c, i) return Float64(Float64(a + Float64(z + t)) + fma(log(c), Float64(b + -0.5), Float64(y * i))) end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(a + \left(z + t\right)\right) + \mathsf{fma}\left(\log c, b + -0.5, y \cdot i\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%
Taylor expanded in x around 0 84.8%
associate-+r+84.8%
+-commutative84.8%
*-commutative84.8%
sub-neg84.8%
metadata-eval84.8%
associate-+r+84.8%
+-commutative84.8%
+-commutative84.8%
fma-define84.8%
+-commutative84.8%
Simplified84.8%
Final simplification84.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ z t))))
(if (or (<= i -4.5e-42) (not (<= i 8e+54)))
(+ (* y i) t_1)
(+ 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 = a + (z + t);
double tmp;
if ((i <= -4.5e-42) || !(i <= 8e+54)) {
tmp = (y * i) + t_1;
} else {
tmp = 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 = a + (z + t)
if ((i <= (-4.5d-42)) .or. (.not. (i <= 8d+54))) then
tmp = (y * i) + t_1
else
tmp = 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 = a + (z + t);
double tmp;
if ((i <= -4.5e-42) || !(i <= 8e+54)) {
tmp = (y * i) + t_1;
} else {
tmp = t_1 + (b * Math.log(c));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (z + t) tmp = 0 if (i <= -4.5e-42) or not (i <= 8e+54): tmp = (y * i) + t_1 else: tmp = t_1 + (b * math.log(c)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(z + t)) tmp = 0.0 if ((i <= -4.5e-42) || !(i <= 8e+54)) tmp = Float64(Float64(y * i) + t_1); else tmp = Float64(t_1 + Float64(b * log(c))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (z + t); tmp = 0.0; if ((i <= -4.5e-42) || ~((i <= 8e+54))) tmp = (y * i) + t_1; else tmp = t_1 + (b * log(c)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[i, -4.5e-42], N[Not[LessEqual[i, 8e+54]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \left(z + t\right)\\
\mathbf{if}\;i \leq -4.5 \cdot 10^{-42} \lor \neg \left(i \leq 8 \cdot 10^{+54}\right):\\
\;\;\;\;y \cdot i + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 + b \cdot \log c\\
\end{array}
\end{array}
if i < -4.5e-42 or 8.0000000000000006e54 < i 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 x around 0 88.0%
associate-+r+88.0%
+-commutative88.0%
*-commutative88.0%
sub-neg88.0%
metadata-eval88.0%
associate-+r+88.0%
+-commutative88.0%
+-commutative88.0%
fma-define88.0%
+-commutative88.0%
Simplified88.0%
Taylor expanded in y around inf 79.1%
*-commutative79.1%
Simplified79.1%
if -4.5e-42 < i < 8.0000000000000006e54Initial 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 81.8%
associate-+r+81.8%
+-commutative81.8%
*-commutative81.8%
sub-neg81.8%
metadata-eval81.8%
associate-+r+81.8%
+-commutative81.8%
+-commutative81.8%
fma-define81.8%
+-commutative81.8%
Simplified81.8%
Taylor expanded in b around inf 79.5%
*-commutative79.5%
Simplified79.5%
Final simplification79.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.25e+94) (+ (* y i) (+ z (* b (log c)))) (+ (+ a (+ z t)) (+ (* y i) (* -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 (a <= 1.25e+94) {
tmp = (y * i) + (z + (b * log(c)));
} else {
tmp = (a + (z + t)) + ((y * i) + (-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 (a <= 1.25d+94) then
tmp = (y * i) + (z + (b * log(c)))
else
tmp = (a + (z + t)) + ((y * i) + ((-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 (a <= 1.25e+94) {
tmp = (y * i) + (z + (b * Math.log(c)));
} else {
tmp = (a + (z + t)) + ((y * i) + (-0.5 * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.25e+94: tmp = (y * i) + (z + (b * math.log(c))) else: tmp = (a + (z + t)) + ((y * i) + (-0.5 * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.25e+94) tmp = Float64(Float64(y * i) + Float64(z + Float64(b * log(c)))); else tmp = Float64(Float64(a + Float64(z + t)) + Float64(Float64(y * i) + Float64(-0.5 * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.25e+94) tmp = (y * i) + (z + (b * log(c))); else tmp = (a + (z + t)) + ((y * i) + (-0.5 * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.25e+94], N[(N[(y * i), $MachinePrecision] + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision] + N[(N[(y * i), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.25 \cdot 10^{+94}:\\
\;\;\;\;y \cdot i + \left(z + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a + \left(z + t\right)\right) + \left(y \cdot i + -0.5 \cdot \log c\right)\\
\end{array}
\end{array}
if a < 1.25000000000000003e94Initial program 99.9%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around inf 60.3%
if 1.25000000000000003e94 < a Initial 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.8%
+-commutative99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in x around 0 82.4%
associate-+r+82.4%
+-commutative82.4%
*-commutative82.4%
sub-neg82.4%
metadata-eval82.4%
associate-+r+82.4%
+-commutative82.4%
+-commutative82.4%
fma-define82.4%
+-commutative82.4%
Simplified82.4%
Taylor expanded in b around 0 64.8%
Final simplification61.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -1.55e+151) (not (<= b 1.55e+188))) (+ (* b (log c)) (+ z a)) (+ (* y i) (+ a (+ z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -1.55e+151) || !(b <= 1.55e+188)) {
tmp = (b * log(c)) + (z + a);
} else {
tmp = (y * i) + (a + (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 ((b <= (-1.55d+151)) .or. (.not. (b <= 1.55d+188))) then
tmp = (b * log(c)) + (z + a)
else
tmp = (y * i) + (a + (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 ((b <= -1.55e+151) || !(b <= 1.55e+188)) {
tmp = (b * Math.log(c)) + (z + a);
} else {
tmp = (y * i) + (a + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -1.55e+151) or not (b <= 1.55e+188): tmp = (b * math.log(c)) + (z + a) else: tmp = (y * i) + (a + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -1.55e+151) || !(b <= 1.55e+188)) tmp = Float64(Float64(b * log(c)) + Float64(z + a)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -1.55e+151) || ~((b <= 1.55e+188))) tmp = (b * log(c)) + (z + a); else tmp = (y * i) + (a + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -1.55e+151], N[Not[LessEqual[b, 1.55e+188]], $MachinePrecision]], N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{+151} \lor \neg \left(b \leq 1.55 \cdot 10^{+188}\right):\\
\;\;\;\;b \cdot \log c + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if b < -1.5500000000000001e151 or 1.5500000000000001e188 < b Initial program 99.7%
associate-+l+99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
associate-+l+99.7%
+-commutative99.7%
fma-define99.7%
+-commutative99.7%
fma-define99.7%
Simplified99.8%
Taylor expanded in x around 0 95.2%
associate-+r+95.2%
+-commutative95.2%
*-commutative95.2%
sub-neg95.2%
metadata-eval95.2%
associate-+r+95.2%
+-commutative95.2%
+-commutative95.2%
fma-define95.2%
+-commutative95.2%
Simplified95.2%
Taylor expanded in b around inf 83.1%
*-commutative83.1%
Simplified83.1%
Taylor expanded in t around 0 73.4%
if -1.5500000000000001e151 < b < 1.5500000000000001e188Initial 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 81.3%
associate-+r+81.3%
+-commutative81.3%
*-commutative81.3%
sub-neg81.3%
metadata-eval81.3%
associate-+r+81.3%
+-commutative81.3%
+-commutative81.3%
fma-define81.3%
+-commutative81.3%
Simplified81.3%
Taylor expanded in y around inf 77.9%
*-commutative77.9%
Simplified77.9%
Final simplification76.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -1.8e+225) (not (<= b 6e+221))) (+ (+ t a) (* b (log c))) (+ (* y i) (+ a (+ z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -1.8e+225) || !(b <= 6e+221)) {
tmp = (t + a) + (b * log(c));
} else {
tmp = (y * i) + (a + (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 ((b <= (-1.8d+225)) .or. (.not. (b <= 6d+221))) then
tmp = (t + a) + (b * log(c))
else
tmp = (y * i) + (a + (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 ((b <= -1.8e+225) || !(b <= 6e+221)) {
tmp = (t + a) + (b * Math.log(c));
} else {
tmp = (y * i) + (a + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -1.8e+225) or not (b <= 6e+221): tmp = (t + a) + (b * math.log(c)) else: tmp = (y * i) + (a + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -1.8e+225) || !(b <= 6e+221)) tmp = Float64(Float64(t + a) + Float64(b * log(c))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -1.8e+225) || ~((b <= 6e+221))) tmp = (t + a) + (b * log(c)); else tmp = (y * i) + (a + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -1.8e+225], N[Not[LessEqual[b, 6e+221]], $MachinePrecision]], N[(N[(t + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.8 \cdot 10^{+225} \lor \neg \left(b \leq 6 \cdot 10^{+221}\right):\\
\;\;\;\;\left(t + a\right) + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if b < -1.7999999999999999e225 or 6.0000000000000003e221 < b Initial 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.8%
+-commutative99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
associate-+r+99.8%
+-commutative99.8%
*-commutative99.8%
sub-neg99.8%
metadata-eval99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
fma-define99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in b around inf 91.4%
*-commutative91.4%
Simplified91.4%
Taylor expanded in z around 0 84.9%
if -1.7999999999999999e225 < b < 6.0000000000000003e221Initial 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 82.4%
associate-+r+82.4%
+-commutative82.4%
*-commutative82.4%
sub-neg82.4%
metadata-eval82.4%
associate-+r+82.4%
+-commutative82.4%
+-commutative82.4%
fma-define82.4%
+-commutative82.4%
Simplified82.4%
Taylor expanded in y around inf 76.2%
*-commutative76.2%
Simplified76.2%
Final simplification77.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= b -1e+223) (* y (* b (/ (log c) y))) (if (<= b 5.1e+223) (+ (* y i) (+ a (+ z t))) (* i (* b (/ (log c) i))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (b <= -1e+223) {
tmp = y * (b * (log(c) / y));
} else if (b <= 5.1e+223) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = i * (b * (log(c) / 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 <= (-1d+223)) then
tmp = y * (b * (log(c) / y))
else if (b <= 5.1d+223) then
tmp = (y * i) + (a + (z + t))
else
tmp = i * (b * (log(c) / 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 <= -1e+223) {
tmp = y * (b * (Math.log(c) / y));
} else if (b <= 5.1e+223) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = i * (b * (Math.log(c) / i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if b <= -1e+223: tmp = y * (b * (math.log(c) / y)) elif b <= 5.1e+223: tmp = (y * i) + (a + (z + t)) else: tmp = i * (b * (math.log(c) / i)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (b <= -1e+223) tmp = Float64(y * Float64(b * Float64(log(c) / y))); elseif (b <= 5.1e+223) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); else tmp = Float64(i * Float64(b * Float64(log(c) / i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (b <= -1e+223) tmp = y * (b * (log(c) / y)); elseif (b <= 5.1e+223) tmp = (y * i) + (a + (z + t)); else tmp = i * (b * (log(c) / i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[b, -1e+223], N[(y * N[(b * N[(N[Log[c], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.1e+223], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(b * N[(N[Log[c], $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1 \cdot 10^{+223}:\\
\;\;\;\;y \cdot \left(b \cdot \frac{\log c}{y}\right)\\
\mathbf{elif}\;b \leq 5.1 \cdot 10^{+223}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(b \cdot \frac{\log c}{i}\right)\\
\end{array}
\end{array}
if b < -1.00000000000000005e223Initial 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%
Simplified100.0%
Taylor expanded in x around 0 94.5%
associate-+r+94.5%
+-commutative94.5%
*-commutative94.5%
sub-neg94.5%
metadata-eval94.5%
associate-+r+94.5%
+-commutative94.5%
+-commutative94.5%
fma-define94.5%
+-commutative94.5%
Simplified94.5%
Taylor expanded in y around inf 58.3%
associate-+r+58.3%
associate-+r+58.3%
associate-/l*58.3%
sub-neg58.3%
metadata-eval58.3%
Simplified58.3%
Taylor expanded in b around inf 42.9%
associate-/l*42.8%
Simplified42.8%
if -1.00000000000000005e223 < b < 5.09999999999999966e223Initial 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 82.8%
associate-+r+82.8%
+-commutative82.8%
*-commutative82.8%
sub-neg82.8%
metadata-eval82.8%
associate-+r+82.8%
+-commutative82.8%
+-commutative82.8%
fma-define82.8%
+-commutative82.8%
Simplified82.8%
Taylor expanded in y around inf 76.6%
*-commutative76.6%
Simplified76.6%
if 5.09999999999999966e223 < b Initial program 99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-+r+99.6%
+-commutative99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
fma-define99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in i around inf 71.3%
associate-+r+71.3%
associate-+r+71.3%
associate-/l*71.6%
sub-neg71.6%
metadata-eval71.6%
Simplified71.6%
Taylor expanded in b around inf 55.8%
associate-/l*55.9%
Simplified55.9%
Final simplification72.7%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (* (log c) (- b 0.5)) (+ a (+ z 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)) + (a + (z + 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)) + (a + (z + 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)) + (a + (z + t)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((math.log(c) * (b - 0.5)) + (a + (z + 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(a + Float64(z + t)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + 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[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in x around 0 84.8%
Final simplification84.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.6e+94) (+ (* y i) (+ z (* b (log c)))) (+ (* y i) (+ a (+ z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.6e+94) {
tmp = (y * i) + (z + (b * log(c)));
} else {
tmp = (y * i) + (a + (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 (a <= 1.6d+94) then
tmp = (y * i) + (z + (b * log(c)))
else
tmp = (y * i) + (a + (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 (a <= 1.6e+94) {
tmp = (y * i) + (z + (b * Math.log(c)));
} else {
tmp = (y * i) + (a + (z + t));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.6e+94: tmp = (y * i) + (z + (b * math.log(c))) else: tmp = (y * i) + (a + (z + t)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.6e+94) tmp = Float64(Float64(y * i) + Float64(z + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.6e+94) tmp = (y * i) + (z + (b * log(c))); else tmp = (y * i) + (a + (z + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.6e+94], N[(N[(y * i), $MachinePrecision] + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.6 \cdot 10^{+94}:\\
\;\;\;\;y \cdot i + \left(z + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if a < 1.60000000000000007e94Initial program 99.9%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in z around inf 60.3%
if 1.60000000000000007e94 < a Initial 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.8%
+-commutative99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in x around 0 82.4%
associate-+r+82.4%
+-commutative82.4%
*-commutative82.4%
sub-neg82.4%
metadata-eval82.4%
associate-+r+82.4%
+-commutative82.4%
+-commutative82.4%
fma-define82.4%
+-commutative82.4%
Simplified82.4%
Taylor expanded in y around inf 64.8%
*-commutative64.8%
Simplified64.8%
Final simplification61.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= b 5.1e+223) (+ (* y i) (+ a (+ z t))) (* i (* b (/ (log c) i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (b <= 5.1e+223) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = i * (b * (log(c) / 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 <= 5.1d+223) then
tmp = (y * i) + (a + (z + t))
else
tmp = i * (b * (log(c) / 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 <= 5.1e+223) {
tmp = (y * i) + (a + (z + t));
} else {
tmp = i * (b * (Math.log(c) / i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if b <= 5.1e+223: tmp = (y * i) + (a + (z + t)) else: tmp = i * (b * (math.log(c) / i)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (b <= 5.1e+223) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + t))); else tmp = Float64(i * Float64(b * Float64(log(c) / i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (b <= 5.1e+223) tmp = (y * i) + (a + (z + t)); else tmp = i * (b * (log(c) / i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[b, 5.1e+223], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(i * N[(b * N[(N[Log[c], $MachinePrecision] / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq 5.1 \cdot 10^{+223}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;i \cdot \left(b \cdot \frac{\log c}{i}\right)\\
\end{array}
\end{array}
if b < 5.09999999999999966e223Initial 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 83.7%
associate-+r+83.7%
+-commutative83.7%
*-commutative83.7%
sub-neg83.7%
metadata-eval83.7%
associate-+r+83.7%
+-commutative83.7%
+-commutative83.7%
fma-define83.7%
+-commutative83.7%
Simplified83.7%
Taylor expanded in y around inf 72.3%
*-commutative72.3%
Simplified72.3%
if 5.09999999999999966e223 < b Initial program 99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
fma-define99.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
associate-+r+99.6%
+-commutative99.6%
*-commutative99.6%
sub-neg99.6%
metadata-eval99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
fma-define99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in i around inf 71.3%
associate-+r+71.3%
associate-+r+71.3%
associate-/l*71.6%
sub-neg71.6%
metadata-eval71.6%
Simplified71.6%
Taylor expanded in b around inf 55.8%
associate-/l*55.9%
Simplified55.9%
Final simplification71.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -65000.0) (not (<= i 5.8e-8))) (* i (+ y (/ a i))) z))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -65000.0) || !(i <= 5.8e-8)) {
tmp = i * (y + (a / i));
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((i <= (-65000.0d0)) .or. (.not. (i <= 5.8d-8))) then
tmp = i * (y + (a / i))
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -65000.0) || !(i <= 5.8e-8)) {
tmp = i * (y + (a / i));
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -65000.0) or not (i <= 5.8e-8): tmp = i * (y + (a / i)) else: tmp = z return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -65000.0) || !(i <= 5.8e-8)) tmp = Float64(i * Float64(y + Float64(a / i))); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((i <= -65000.0) || ~((i <= 5.8e-8))) tmp = i * (y + (a / i)); else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -65000.0], N[Not[LessEqual[i, 5.8e-8]], $MachinePrecision]], N[(i * N[(y + N[(a / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], z]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;i \leq -65000 \lor \neg \left(i \leq 5.8 \cdot 10^{-8}\right):\\
\;\;\;\;i \cdot \left(y + \frac{a}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if i < -65000 or 5.8000000000000003e-8 < i 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 i around inf 99.7%
associate-/l*99.7%
sub-neg99.7%
metadata-eval99.7%
associate-/l*99.7%
+-commutative99.7%
Simplified99.7%
Taylor expanded in a around inf 59.0%
if -65000 < i < 5.8000000000000003e-8Initial 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.8%
+-commutative99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in z around inf 22.4%
Final simplification41.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a -5e-128) z (if (<= a 4e+91) (* 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 <= -5e-128) {
tmp = z;
} else if (a <= 4e+91) {
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 <= (-5d-128)) then
tmp = z
else if (a <= 4d+91) 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 <= -5e-128) {
tmp = z;
} else if (a <= 4e+91) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= -5e-128: tmp = z elif a <= 4e+91: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= -5e-128) tmp = z; elseif (a <= 4e+91) 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 <= -5e-128) tmp = z; elseif (a <= 4e+91) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, -5e-128], z, If[LessEqual[a, 4e+91], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -5 \cdot 10^{-128}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 4 \cdot 10^{+91}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -5.0000000000000001e-128Initial 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 z around inf 18.4%
if -5.0000000000000001e-128 < a < 4.00000000000000032e91Initial 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.8%
+-commutative99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in y around inf 28.4%
*-commutative28.4%
Simplified28.4%
if 4.00000000000000032e91 < a Initial 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.8%
+-commutative99.8%
fma-define99.8%
Simplified99.8%
Taylor expanded in a around inf 39.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.6e+167) (* i (+ y (/ z i))) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.6e+167) {
tmp = i * (y + (z / 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 <= 1.6d+167) then
tmp = i * (y + (z / 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 <= 1.6e+167) {
tmp = i * (y + (z / i));
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.6e+167: tmp = i * (y + (z / i)) else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.6e+167) tmp = Float64(i * Float64(y + Float64(z / 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 <= 1.6e+167) tmp = i * (y + (z / i)); else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.6e+167], N[(i * N[(y + N[(z / i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.6 \cdot 10^{+167}:\\
\;\;\;\;i \cdot \left(y + \frac{z}{i}\right)\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 1.5999999999999999e167Initial 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.8%
+-commutative99.8%
fma-define99.8%
Simplified99.9%
Taylor expanded in i around inf 69.2%
associate-/l*69.2%
sub-neg69.2%
metadata-eval69.2%
associate-/l*69.2%
+-commutative69.2%
Simplified69.2%
Taylor expanded in z around inf 38.3%
if 1.5999999999999999e167 < 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 45.8%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ a (+ z t))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (a + (z + 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) + (a + (z + 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) + (a + (z + t));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (a + (z + t))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(a + Float64(z + t))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (a + (z + t)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(a + \left(z + t\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%
Taylor expanded in x around 0 84.8%
associate-+r+84.8%
+-commutative84.8%
*-commutative84.8%
sub-neg84.8%
metadata-eval84.8%
associate-+r+84.8%
+-commutative84.8%
+-commutative84.8%
fma-define84.8%
+-commutative84.8%
Simplified84.8%
Taylor expanded in y around inf 69.1%
*-commutative69.1%
Simplified69.1%
Final simplification69.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 8.2e+113) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 8.2e+113) {
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 (a <= 8.2d+113) 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 (a <= 8.2e+113) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 8.2e+113: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 8.2e+113) 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 (a <= 8.2e+113) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 8.2e+113], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8.2 \cdot 10^{+113}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 8.19999999999999985e113Initial 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 z around inf 20.3%
if 8.19999999999999985e113 < a 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 42.2%
(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 15.6%
herbie shell --seed 2024181
(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)))