
(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 17 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 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (log (/ 1.0 c)) (- 0.5 b))) (* 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) + (log((1.0 / c)) * (0.5 - b))) + (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) + (log((1.0d0 / c)) * (0.5d0 - b))) + (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) + (Math.log((1.0 / c)) * (0.5 - b))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + (math.log((1.0 / c)) * (0.5 - b))) + (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(log(Float64(1.0 / c)) * Float64(0.5 - b))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + (log((1.0 / c)) * (0.5 - b))) + (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[Log[N[(1.0 / c), $MachinePrecision]], $MachinePrecision] * N[(0.5 - b), $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) + \log \left(\frac{1}{c}\right) \cdot \left(0.5 - b\right)\right) + y \cdot i
\end{array}
Initial program 99.9%
Taylor expanded in c around inf 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= (- b 0.5) -2e+130)
(+ (* y i) (+ a (+ z (* (- b 0.5) (log c)))))
(if (<= (- b 0.5) 1e+61)
(+ (* y i) (+ (+ (+ (+ (* x (log y)) z) t) a) (* (log c) -0.5)))
(+ (* y i) (+ (+ t a) (fma (log c) (+ b -0.5) z))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b - 0.5) <= -2e+130) {
tmp = (y * i) + (a + (z + ((b - 0.5) * log(c))));
} else if ((b - 0.5) <= 1e+61) {
tmp = (y * i) + (((((x * log(y)) + z) + t) + a) + (log(c) * -0.5));
} else {
tmp = (y * i) + ((t + a) + fma(log(c), (b + -0.5), z));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (Float64(b - 0.5) <= -2e+130) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(Float64(b - 0.5) * log(c))))); elseif (Float64(b - 0.5) <= 1e+61) tmp = Float64(Float64(y * i) + Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(log(c) * -0.5))); else tmp = Float64(Float64(y * i) + Float64(Float64(t + a) + fma(log(c), Float64(b + -0.5), z))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[N[(b - 0.5), $MachinePrecision], -2e+130], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 1e+61], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b - 0.5 \leq -2 \cdot 10^{+130}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + \left(b - 0.5\right) \cdot \log c\right)\right)\\
\mathbf{elif}\;b - 0.5 \leq 10^{+61}:\\
\;\;\;\;y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \log c \cdot -0.5\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + \mathsf{fma}\left(\log c, b + -0.5, z\right)\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -2.0000000000000001e130Initial program 99.7%
Taylor expanded in x around 0 96.9%
associate-+r+96.9%
sub-neg96.9%
metadata-eval96.9%
+-commutative96.9%
fma-def96.9%
+-commutative96.9%
Simplified96.9%
Taylor expanded in t around 0 85.1%
if -2.0000000000000001e130 < (-.f64 b 1/2) < 9.99999999999999949e60Initial program 99.9%
Taylor expanded in b around 0 99.7%
if 9.99999999999999949e60 < (-.f64 b 1/2) Initial program 99.9%
Taylor expanded in x around 0 96.0%
associate-+r+96.0%
sub-neg96.0%
metadata-eval96.0%
+-commutative96.0%
fma-def96.0%
+-commutative96.0%
Simplified96.0%
Final simplification97.0%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c)));
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c)))
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + 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]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right)
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x 2.6e+175) (+ a (+ (+ z t) (fma y i (* (log c) (+ b -0.5))))) (+ (* x (log y)) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= 2.6e+175) {
tmp = a + ((z + t) + fma(y, i, (log(c) * (b + -0.5))));
} else {
tmp = (x * log(y)) + (y * i);
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= 2.6e+175) tmp = Float64(a + Float64(Float64(z + t) + fma(y, i, Float64(log(c) * Float64(b + -0.5))))); else tmp = Float64(Float64(x * log(y)) + Float64(y * i)); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, 2.6e+175], N[(a + N[(N[(z + t), $MachinePrecision] + N[(y * i + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.6 \cdot 10^{+175}:\\
\;\;\;\;a + \left(\left(z + t\right) + \mathsf{fma}\left(y, i, \log c \cdot \left(b + -0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\end{array}
\end{array}
if x < 2.6e175Initial program 99.9%
Taylor expanded in x around 0 92.6%
associate-+r+92.6%
sub-neg92.6%
metadata-eval92.6%
*-commutative92.6%
fma-def92.6%
+-commutative92.6%
Simplified92.6%
if 2.6e175 < x Initial program 99.8%
Taylor expanded in x around inf 85.0%
Final simplification92.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x 2.6e+175) (+ (* y i) (+ a (+ t (+ z (* (- b 0.5) (log c)))))) (+ (* x (log y)) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= 2.6e+175) {
tmp = (y * i) + (a + (t + (z + ((b - 0.5) * log(c)))));
} else {
tmp = (x * log(y)) + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (x <= 2.6d+175) then
tmp = (y * i) + (a + (t + (z + ((b - 0.5d0) * log(c)))))
else
tmp = (x * log(y)) + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= 2.6e+175) {
tmp = (y * i) + (a + (t + (z + ((b - 0.5) * Math.log(c)))));
} else {
tmp = (x * Math.log(y)) + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= 2.6e+175: tmp = (y * i) + (a + (t + (z + ((b - 0.5) * math.log(c))))) else: tmp = (x * math.log(y)) + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= 2.6e+175) tmp = Float64(Float64(y * i) + Float64(a + Float64(t + Float64(z + Float64(Float64(b - 0.5) * log(c)))))); else tmp = Float64(Float64(x * log(y)) + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (x <= 2.6e+175) tmp = (y * i) + (a + (t + (z + ((b - 0.5) * log(c))))); else tmp = (x * log(y)) + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, 2.6e+175], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.6 \cdot 10^{+175}:\\
\;\;\;\;y \cdot i + \left(a + \left(t + \left(z + \left(b - 0.5\right) \cdot \log c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\end{array}
\end{array}
if x < 2.6e175Initial program 99.9%
Taylor expanded in x around 0 92.6%
if 2.6e175 < x Initial program 99.8%
Taylor expanded in x around inf 85.0%
Final simplification92.0%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (+ z t))))
(if (<= a 3.9e-179)
t_1
(if (<= a 1.1e-121)
(+ (* y i) (* b (log c)))
(if (<= a 9.3e-63)
t_1
(if (<= a 4.4e+33)
(+ (* x (log y)) (* y i))
(if (<= a 4.2e+99) (+ z (* y i)) (+ (* y i) (+ t a)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (z + t);
double tmp;
if (a <= 3.9e-179) {
tmp = t_1;
} else if (a <= 1.1e-121) {
tmp = (y * i) + (b * log(c));
} else if (a <= 9.3e-63) {
tmp = t_1;
} else if (a <= 4.4e+33) {
tmp = (x * log(y)) + (y * i);
} else if (a <= 4.2e+99) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (t + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = (y * i) + (z + t)
if (a <= 3.9d-179) then
tmp = t_1
else if (a <= 1.1d-121) then
tmp = (y * i) + (b * log(c))
else if (a <= 9.3d-63) then
tmp = t_1
else if (a <= 4.4d+33) then
tmp = (x * log(y)) + (y * i)
else if (a <= 4.2d+99) then
tmp = z + (y * i)
else
tmp = (y * i) + (t + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (z + t);
double tmp;
if (a <= 3.9e-179) {
tmp = t_1;
} else if (a <= 1.1e-121) {
tmp = (y * i) + (b * Math.log(c));
} else if (a <= 9.3e-63) {
tmp = t_1;
} else if (a <= 4.4e+33) {
tmp = (x * Math.log(y)) + (y * i);
} else if (a <= 4.2e+99) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (t + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + (z + t) tmp = 0 if a <= 3.9e-179: tmp = t_1 elif a <= 1.1e-121: tmp = (y * i) + (b * math.log(c)) elif a <= 9.3e-63: tmp = t_1 elif a <= 4.4e+33: tmp = (x * math.log(y)) + (y * i) elif a <= 4.2e+99: tmp = z + (y * i) else: tmp = (y * i) + (t + a) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(z + t)) tmp = 0.0 if (a <= 3.9e-179) tmp = t_1; elseif (a <= 1.1e-121) tmp = Float64(Float64(y * i) + Float64(b * log(c))); elseif (a <= 9.3e-63) tmp = t_1; elseif (a <= 4.4e+33) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); elseif (a <= 4.2e+99) tmp = Float64(z + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(t + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * i) + (z + t); tmp = 0.0; if (a <= 3.9e-179) tmp = t_1; elseif (a <= 1.1e-121) tmp = (y * i) + (b * log(c)); elseif (a <= 9.3e-63) tmp = t_1; elseif (a <= 4.4e+33) tmp = (x * log(y)) + (y * i); elseif (a <= 4.2e+99) tmp = z + (y * i); else tmp = (y * i) + (t + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 3.9e-179], t$95$1, If[LessEqual[a, 1.1e-121], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.3e-63], t$95$1, If[LessEqual[a, 4.4e+33], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.2e+99], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot i + \left(z + t\right)\\
\mathbf{if}\;a \leq 3.9 \cdot 10^{-179}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{-121}:\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{elif}\;a \leq 9.3 \cdot 10^{-63}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 4.4 \cdot 10^{+33}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{elif}\;a \leq 4.2 \cdot 10^{+99}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + a\right)\\
\end{array}
\end{array}
if a < 3.9000000000000003e-179 or 1.10000000000000011e-121 < a < 9.30000000000000007e-63Initial program 99.9%
Taylor expanded in x around 0 89.0%
associate-+r+89.0%
sub-neg89.0%
metadata-eval89.0%
+-commutative89.0%
fma-def89.0%
+-commutative89.0%
Simplified89.0%
Taylor expanded in a around 0 77.8%
+-commutative77.8%
sub-neg77.8%
metadata-eval77.8%
+-commutative77.8%
distribute-rgt-out77.8%
+-commutative77.8%
distribute-rgt-in77.8%
fma-def77.8%
Simplified77.8%
Taylor expanded in z around inf 58.6%
if 3.9000000000000003e-179 < a < 1.10000000000000011e-121Initial program 99.6%
Taylor expanded in c around inf 99.6%
Taylor expanded in b around inf 52.2%
*-commutative52.2%
associate-*r*52.2%
log-rec52.2%
neg-mul-152.2%
associate-*r*52.2%
metadata-eval52.2%
*-lft-identity52.2%
Simplified52.2%
if 9.30000000000000007e-63 < a < 4.39999999999999988e33Initial program 99.9%
Taylor expanded in x around inf 58.2%
if 4.39999999999999988e33 < a < 4.2000000000000002e99Initial program 99.9%
Taylor expanded in z around inf 51.8%
if 4.2000000000000002e99 < a Initial program 99.9%
Taylor expanded in x around 0 85.4%
associate-+r+85.4%
sub-neg85.4%
metadata-eval85.4%
+-commutative85.4%
fma-def85.4%
+-commutative85.4%
Simplified85.4%
Taylor expanded in b around inf 75.5%
Taylor expanded in b around 0 65.1%
+-commutative65.1%
Simplified65.1%
Final simplification58.8%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -1.5e+214)
(+ z (* y i))
(if (or (<= z -5e+187) (not (<= z -2e+135)))
(+ (* y i) (+ a (* b (log c))))
(+ (* y i) (+ z t)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.5e+214) {
tmp = z + (y * i);
} else if ((z <= -5e+187) || !(z <= -2e+135)) {
tmp = (y * i) + (a + (b * log(c)));
} else {
tmp = (y * i) + (z + t);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-1.5d+214)) then
tmp = z + (y * i)
else if ((z <= (-5d+187)) .or. (.not. (z <= (-2d+135)))) then
tmp = (y * i) + (a + (b * log(c)))
else
tmp = (y * i) + (z + t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1.5e+214) {
tmp = z + (y * i);
} else if ((z <= -5e+187) || !(z <= -2e+135)) {
tmp = (y * i) + (a + (b * Math.log(c)));
} else {
tmp = (y * i) + (z + t);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1.5e+214: tmp = z + (y * i) elif (z <= -5e+187) or not (z <= -2e+135): tmp = (y * i) + (a + (b * math.log(c))) else: tmp = (y * i) + (z + t) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1.5e+214) tmp = Float64(z + Float64(y * i)); elseif ((z <= -5e+187) || !(z <= -2e+135)) tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(z + t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1.5e+214) tmp = z + (y * i); elseif ((z <= -5e+187) || ~((z <= -2e+135))) tmp = (y * i) + (a + (b * log(c))); else tmp = (y * i) + (z + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1.5e+214], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -5e+187], N[Not[LessEqual[z, -2e+135]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{+214}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{elif}\;z \leq -5 \cdot 10^{+187} \lor \neg \left(z \leq -2 \cdot 10^{+135}\right):\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + t\right)\\
\end{array}
\end{array}
if z < -1.5000000000000001e214Initial program 100.0%
Taylor expanded in z around inf 73.3%
if -1.5000000000000001e214 < z < -5.0000000000000001e187 or -1.99999999999999992e135 < z Initial program 99.9%
Taylor expanded in x around 0 85.8%
associate-+r+85.8%
sub-neg85.8%
metadata-eval85.8%
+-commutative85.8%
fma-def85.8%
+-commutative85.8%
Simplified85.8%
Taylor expanded in b around inf 69.7%
Taylor expanded in t around 0 52.1%
*-commutative52.1%
Simplified52.1%
if -5.0000000000000001e187 < z < -1.99999999999999992e135Initial program 99.9%
Taylor expanded in x around 0 99.9%
associate-+r+99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in a around 0 85.7%
+-commutative85.7%
sub-neg85.7%
metadata-eval85.7%
+-commutative85.7%
distribute-rgt-out85.7%
+-commutative85.7%
distribute-rgt-in85.7%
fma-def85.7%
Simplified85.7%
Taylor expanded in z around inf 71.0%
Final simplification54.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= x 2.6e+175) (+ (* y i) (+ a (+ z (* (- b 0.5) (log c))))) (+ (* x (log y)) (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= 2.6e+175) {
tmp = (y * i) + (a + (z + ((b - 0.5) * log(c))));
} else {
tmp = (x * log(y)) + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (x <= 2.6d+175) then
tmp = (y * i) + (a + (z + ((b - 0.5d0) * log(c))))
else
tmp = (x * log(y)) + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (x <= 2.6e+175) {
tmp = (y * i) + (a + (z + ((b - 0.5) * Math.log(c))));
} else {
tmp = (x * Math.log(y)) + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if x <= 2.6e+175: tmp = (y * i) + (a + (z + ((b - 0.5) * math.log(c)))) else: tmp = (x * math.log(y)) + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (x <= 2.6e+175) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(Float64(b - 0.5) * log(c))))); else tmp = Float64(Float64(x * log(y)) + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (x <= 2.6e+175) tmp = (y * i) + (a + (z + ((b - 0.5) * log(c)))); else tmp = (x * log(y)) + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[x, 2.6e+175], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.6 \cdot 10^{+175}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + \left(b - 0.5\right) \cdot \log c\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\end{array}
\end{array}
if x < 2.6e175Initial program 99.9%
Taylor expanded in x around 0 92.6%
associate-+r+92.6%
sub-neg92.6%
metadata-eval92.6%
+-commutative92.6%
fma-def92.6%
+-commutative92.6%
Simplified92.6%
Taylor expanded in t around 0 74.1%
if 2.6e175 < x Initial program 99.8%
Taylor expanded in x around inf 85.0%
Final simplification75.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 9.5e+97) (+ z (+ (* y i) (* (- b 0.5) (log c)))) (+ (* 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 <= 9.5e+97) {
tmp = z + ((y * i) + ((b - 0.5) * log(c)));
} 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 <= 9.5d+97) then
tmp = z + ((y * i) + ((b - 0.5d0) * log(c)))
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 <= 9.5e+97) {
tmp = z + ((y * i) + ((b - 0.5) * Math.log(c)));
} 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 <= 9.5e+97: tmp = z + ((y * i) + ((b - 0.5) * math.log(c))) 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 <= 9.5e+97) tmp = Float64(z + Float64(Float64(y * i) + Float64(Float64(b - 0.5) * log(c)))); 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 <= 9.5e+97) tmp = z + ((y * i) + ((b - 0.5) * log(c))); 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, 9.5e+97], N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9.5 \cdot 10^{+97}:\\
\;\;\;\;z + \left(y \cdot i + \left(b - 0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 9.49999999999999975e97Initial program 99.9%
Taylor expanded in x around 0 87.0%
associate-+r+87.0%
sub-neg87.0%
metadata-eval87.0%
+-commutative87.0%
fma-def87.0%
+-commutative87.0%
Simplified87.0%
Taylor expanded in a around 0 77.8%
+-commutative77.8%
sub-neg77.8%
metadata-eval77.8%
+-commutative77.8%
distribute-rgt-out77.8%
+-commutative77.8%
distribute-rgt-in77.8%
fma-def77.8%
Simplified77.8%
Taylor expanded in t around 0 59.2%
if 9.49999999999999975e97 < a Initial program 99.9%
Taylor expanded in x around 0 85.4%
associate-+r+85.4%
sub-neg85.4%
metadata-eval85.4%
+-commutative85.4%
fma-def85.4%
+-commutative85.4%
Simplified85.4%
Taylor expanded in b around inf 75.5%
Taylor expanded in t around 0 65.8%
*-commutative65.8%
Simplified65.8%
Final simplification60.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.6e+98) (+ z (+ (* y i) (* (- b 0.5) (log c)))) (+ (* y i) (+ (+ t 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.6e+98) {
tmp = z + ((y * i) + ((b - 0.5) * log(c)));
} else {
tmp = (y * i) + ((t + 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.6d+98) then
tmp = z + ((y * i) + ((b - 0.5d0) * log(c)))
else
tmp = (y * i) + ((t + 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.6e+98) {
tmp = z + ((y * i) + ((b - 0.5) * Math.log(c)));
} else {
tmp = (y * i) + ((t + a) + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.6e+98: tmp = z + ((y * i) + ((b - 0.5) * math.log(c))) else: tmp = (y * i) + ((t + a) + (b * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.6e+98) tmp = Float64(z + Float64(Float64(y * i) + Float64(Float64(b - 0.5) * log(c)))); else tmp = Float64(Float64(y * i) + Float64(Float64(t + 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.6e+98) tmp = z + ((y * i) + ((b - 0.5) * log(c))); else tmp = (y * i) + ((t + a) + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.6e+98], N[(z + N[(N[(y * i), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(t + a), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.6 \cdot 10^{+98}:\\
\;\;\;\;z + \left(y \cdot i + \left(b - 0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(t + a\right) + b \cdot \log c\right)\\
\end{array}
\end{array}
if a < 1.6000000000000001e98Initial program 99.9%
Taylor expanded in x around 0 87.0%
associate-+r+87.0%
sub-neg87.0%
metadata-eval87.0%
+-commutative87.0%
fma-def87.0%
+-commutative87.0%
Simplified87.0%
Taylor expanded in a around 0 77.8%
+-commutative77.8%
sub-neg77.8%
metadata-eval77.8%
+-commutative77.8%
distribute-rgt-out77.8%
+-commutative77.8%
distribute-rgt-in77.8%
fma-def77.8%
Simplified77.8%
Taylor expanded in t around 0 59.2%
if 1.6000000000000001e98 < a Initial program 99.9%
Taylor expanded in x around 0 85.4%
associate-+r+85.4%
sub-neg85.4%
metadata-eval85.4%
+-commutative85.4%
fma-def85.4%
+-commutative85.4%
Simplified85.4%
Taylor expanded in b around inf 75.5%
Final simplification61.6%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= a 1.72e-62)
(+ (* y i) (+ z t))
(if (<= a 3.6e+32)
(+ (* x (log y)) (* y i))
(if (<= a 5.6e+100) (+ z (* y i)) (+ (* y i) (+ t a))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.72e-62) {
tmp = (y * i) + (z + t);
} else if (a <= 3.6e+32) {
tmp = (x * log(y)) + (y * i);
} else if (a <= 5.6e+100) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (t + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 1.72d-62) then
tmp = (y * i) + (z + t)
else if (a <= 3.6d+32) then
tmp = (x * log(y)) + (y * i)
else if (a <= 5.6d+100) then
tmp = z + (y * i)
else
tmp = (y * i) + (t + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.72e-62) {
tmp = (y * i) + (z + t);
} else if (a <= 3.6e+32) {
tmp = (x * Math.log(y)) + (y * i);
} else if (a <= 5.6e+100) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (t + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.72e-62: tmp = (y * i) + (z + t) elif a <= 3.6e+32: tmp = (x * math.log(y)) + (y * i) elif a <= 5.6e+100: tmp = z + (y * i) else: tmp = (y * i) + (t + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.72e-62) tmp = Float64(Float64(y * i) + Float64(z + t)); elseif (a <= 3.6e+32) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); elseif (a <= 5.6e+100) tmp = Float64(z + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(t + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.72e-62) tmp = (y * i) + (z + t); elseif (a <= 3.6e+32) tmp = (x * log(y)) + (y * i); elseif (a <= 5.6e+100) tmp = z + (y * i); else tmp = (y * i) + (t + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.72e-62], N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.6e+32], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.6e+100], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.72 \cdot 10^{-62}:\\
\;\;\;\;y \cdot i + \left(z + t\right)\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{+32}:\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{+100}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + a\right)\\
\end{array}
\end{array}
if a < 1.7199999999999999e-62Initial program 99.9%
Taylor expanded in x around 0 88.9%
associate-+r+88.9%
sub-neg88.9%
metadata-eval88.9%
+-commutative88.9%
fma-def88.9%
+-commutative88.9%
Simplified88.9%
Taylor expanded in a around 0 78.3%
+-commutative78.3%
sub-neg78.3%
metadata-eval78.3%
+-commutative78.3%
distribute-rgt-out78.3%
+-commutative78.3%
distribute-rgt-in78.3%
fma-def78.3%
Simplified78.3%
Taylor expanded in z around inf 58.6%
if 1.7199999999999999e-62 < a < 3.5999999999999997e32Initial program 99.9%
Taylor expanded in x around inf 58.2%
if 3.5999999999999997e32 < a < 5.5999999999999996e100Initial program 99.9%
Taylor expanded in z around inf 51.8%
if 5.5999999999999996e100 < a Initial program 99.9%
Taylor expanded in x around 0 85.4%
associate-+r+85.4%
sub-neg85.4%
metadata-eval85.4%
+-commutative85.4%
fma-def85.4%
+-commutative85.4%
Simplified85.4%
Taylor expanded in b around inf 75.5%
Taylor expanded in b around 0 65.1%
+-commutative65.1%
Simplified65.1%
Final simplification59.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.42e+100) (+ z (* y i)) (+ (* y i) (+ t a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.42e+100) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (t + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 1.42d+100) then
tmp = z + (y * i)
else
tmp = (y * i) + (t + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.42e+100) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (t + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.42e+100: tmp = z + (y * i) else: tmp = (y * i) + (t + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.42e+100) tmp = Float64(z + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(t + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.42e+100) tmp = z + (y * i); else tmp = (y * i) + (t + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.42e+100], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.42 \cdot 10^{+100}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + a\right)\\
\end{array}
\end{array}
if a < 1.41999999999999999e100Initial program 99.9%
Taylor expanded in z around inf 39.7%
if 1.41999999999999999e100 < a Initial program 99.9%
Taylor expanded in x around 0 85.4%
associate-+r+85.4%
sub-neg85.4%
metadata-eval85.4%
+-commutative85.4%
fma-def85.4%
+-commutative85.4%
Simplified85.4%
Taylor expanded in b around inf 75.5%
Taylor expanded in b around 0 65.1%
+-commutative65.1%
Simplified65.1%
Final simplification43.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 6.6e+101) (+ (* y i) (+ z t)) (+ (* y i) (+ t a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 6.6e+101) {
tmp = (y * i) + (z + t);
} else {
tmp = (y * i) + (t + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 6.6d+101) then
tmp = (y * i) + (z + t)
else
tmp = (y * i) + (t + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 6.6e+101) {
tmp = (y * i) + (z + t);
} else {
tmp = (y * i) + (t + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 6.6e+101: tmp = (y * i) + (z + t) else: tmp = (y * i) + (t + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 6.6e+101) tmp = Float64(Float64(y * i) + Float64(z + t)); else tmp = Float64(Float64(y * i) + Float64(t + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 6.6e+101) tmp = (y * i) + (z + t); else tmp = (y * i) + (t + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 6.6e+101], N[(N[(y * i), $MachinePrecision] + N[(z + t), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.6 \cdot 10^{+101}:\\
\;\;\;\;y \cdot i + \left(z + t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + a\right)\\
\end{array}
\end{array}
if a < 6.60000000000000022e101Initial program 99.9%
Taylor expanded in x around 0 87.0%
associate-+r+87.0%
sub-neg87.0%
metadata-eval87.0%
+-commutative87.0%
fma-def87.0%
+-commutative87.0%
Simplified87.0%
Taylor expanded in a around 0 77.8%
+-commutative77.8%
sub-neg77.8%
metadata-eval77.8%
+-commutative77.8%
distribute-rgt-out77.8%
+-commutative77.8%
distribute-rgt-in77.8%
fma-def77.8%
Simplified77.8%
Taylor expanded in z around inf 57.5%
if 6.60000000000000022e101 < a Initial program 99.9%
Taylor expanded in x around 0 85.4%
associate-+r+85.4%
sub-neg85.4%
metadata-eval85.4%
+-commutative85.4%
fma-def85.4%
+-commutative85.4%
Simplified85.4%
Taylor expanded in b around inf 75.5%
Taylor expanded in b around 0 65.1%
+-commutative65.1%
Simplified65.1%
Final simplification58.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -5.5e+134) 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 (z <= -5.5e+134) {
tmp = z;
} 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 <= (-5.5d+134)) then
tmp = z
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 <= -5.5e+134) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -5.5e+134: tmp = z else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -5.5e+134) tmp = z; 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 <= -5.5e+134) tmp = z; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -5.5e+134], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.5 \cdot 10^{+134}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -5.4999999999999999e134Initial program 99.9%
Taylor expanded in z around inf 57.0%
Taylor expanded in z around inf 37.5%
if -5.4999999999999999e134 < z Initial program 99.9%
Taylor expanded in a around inf 36.2%
Final simplification36.4%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 4.9e+101) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4.9e+101) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 4.9d+101) then
tmp = z + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4.9e+101) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 4.9e+101: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 4.9e+101) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 4.9e+101) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 4.9e+101], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.9 \cdot 10^{+101}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 4.89999999999999983e101Initial program 99.9%
Taylor expanded in z around inf 39.7%
if 4.89999999999999983e101 < a Initial program 99.9%
Taylor expanded in a around inf 55.4%
Final simplification42.0%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 2.52e+33) z (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 2.52e+33) {
tmp = z;
} 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 (y <= 2.52d+33) then
tmp = z
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 (y <= 2.52e+33) {
tmp = z;
} else {
tmp = y * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 2.52e+33: tmp = z else: tmp = y * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 2.52e+33) tmp = z; 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 (y <= 2.52e+33) tmp = z; else tmp = y * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 2.52e+33], z, N[(y * i), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.52 \cdot 10^{+33}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;y \cdot i\\
\end{array}
\end{array}
if y < 2.5200000000000001e33Initial program 99.9%
Taylor expanded in z around inf 29.0%
Taylor expanded in z around inf 25.9%
if 2.5200000000000001e33 < y Initial program 99.9%
Taylor expanded in y around inf 42.9%
*-commutative42.9%
Simplified42.9%
Final simplification33.8%
(FPCore (x y z t a b c i) :precision binary64 z)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return z;
}
def code(x, y, z, t, a, b, c, i): return z
function code(x, y, z, t, a, b, c, i) return z end
function tmp = code(x, y, z, t, a, b, c, i) tmp = z; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := z
\begin{array}{l}
\\
z
\end{array}
Initial program 99.9%
Taylor expanded in z around inf 38.7%
Taylor expanded in z around inf 18.4%
Final simplification18.4%
herbie shell --seed 2023334
(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)))