
(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 15 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 (+ (+ (+ (+ t (+ (* x (log y)) z)) 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 (((t + ((x * log(y)) + z)) + 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 = (((t + ((x * log(y)) + z)) + 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 (((t + ((x * Math.log(y)) + z)) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((t + ((x * math.log(y)) + z)) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(t + Float64(Float64(x * log(y)) + z)) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((t + ((x * log(y)) + z)) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $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(t + \left(x \cdot \log y + z\right)\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Initial program 99.5%
Final simplification99.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x (log y)) z)))
(if (<= x -1.32e+98)
(+ (* y i) (+ a t_1))
(if (<= x 4e+169)
(+ a (+ t (+ z (fma (log c) (+ b -0.5) (* y i)))))
(+ (* y i) (+ (+ (+ t t_1) a) (* (log c) -0.5)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * log(y)) + z;
double tmp;
if (x <= -1.32e+98) {
tmp = (y * i) + (a + t_1);
} else if (x <= 4e+169) {
tmp = a + (t + (z + fma(log(c), (b + -0.5), (y * i))));
} else {
tmp = (y * i) + (((t + t_1) + a) + (log(c) * -0.5));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * log(y)) + z) tmp = 0.0 if (x <= -1.32e+98) tmp = Float64(Float64(y * i) + Float64(a + t_1)); elseif (x <= 4e+169) tmp = Float64(a + Float64(t + Float64(z + fma(log(c), Float64(b + -0.5), Float64(y * i))))); else tmp = Float64(Float64(y * i) + Float64(Float64(Float64(t + t_1) + a) + Float64(log(c) * -0.5))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]}, If[LessEqual[x, -1.32e+98], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4e+169], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(t + t$95$1), $MachinePrecision] + a), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y + z\\
\mathbf{if}\;x \leq -1.32 \cdot 10^{+98}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+169}:\\
\;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(\log c, b + -0.5, y \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(\left(t + t\_1\right) + a\right) + \log c \cdot -0.5\right)\\
\end{array}
\end{array}
if x < -1.3200000000000001e98Initial program 97.5%
Taylor expanded in b around 0 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 83.8%
Taylor expanded in x around inf 83.8%
if -1.3200000000000001e98 < x < 3.99999999999999974e169Initial program 99.8%
Taylor expanded in x around 0 97.5%
+-commutative97.5%
sub-neg97.5%
metadata-eval97.5%
*-commutative97.5%
fma-undefine97.5%
Simplified97.5%
if 3.99999999999999974e169 < x Initial program 99.8%
Taylor expanded in b around 0 99.8%
*-commutative99.8%
Simplified99.8%
Final simplification95.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))))
(if (<= x -4.1e+99)
(+ (* y i) (+ a (+ t_1 z)))
(if (<= x 4e+169)
(+ a (+ t (+ z (fma (log c) (+ b -0.5) (* y i)))))
(+ (* y i) (+ a (+ z (+ t_1 (* (log c) -0.5)))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double tmp;
if (x <= -4.1e+99) {
tmp = (y * i) + (a + (t_1 + z));
} else if (x <= 4e+169) {
tmp = a + (t + (z + fma(log(c), (b + -0.5), (y * i))));
} else {
tmp = (y * i) + (a + (z + (t_1 + (log(c) * -0.5))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) tmp = 0.0 if (x <= -4.1e+99) tmp = Float64(Float64(y * i) + Float64(a + Float64(t_1 + z))); elseif (x <= 4e+169) tmp = Float64(a + Float64(t + Float64(z + fma(log(c), Float64(b + -0.5), Float64(y * i))))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(t_1 + Float64(log(c) * -0.5))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.1e+99], N[(N[(y * i), $MachinePrecision] + N[(a + N[(t$95$1 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4e+169], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(t$95$1 + N[(N[Log[c], $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
\mathbf{if}\;x \leq -4.1 \cdot 10^{+99}:\\
\;\;\;\;y \cdot i + \left(a + \left(t\_1 + z\right)\right)\\
\mathbf{elif}\;x \leq 4 \cdot 10^{+169}:\\
\;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(\log c, b + -0.5, y \cdot i\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + \left(t\_1 + \log c \cdot -0.5\right)\right)\right)\\
\end{array}
\end{array}
if x < -4.09999999999999979e99Initial program 97.5%
Taylor expanded in b around 0 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 83.8%
Taylor expanded in x around inf 83.8%
if -4.09999999999999979e99 < x < 3.99999999999999974e169Initial program 99.8%
Taylor expanded in x around 0 97.5%
+-commutative97.5%
sub-neg97.5%
metadata-eval97.5%
*-commutative97.5%
fma-undefine97.5%
Simplified97.5%
if 3.99999999999999974e169 < x Initial program 99.8%
Taylor expanded in b around 0 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 96.7%
Final simplification95.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.05e+100) (not (<= x 4e+169))) (+ (* y i) (+ a (+ (* x (log y)) z))) (+ a (+ t (+ z (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.05e+100) || !(x <= 4e+169)) {
tmp = (y * i) + (a + ((x * log(y)) + z));
} else {
tmp = a + (t + (z + 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.05e+100) || !(x <= 4e+169)) tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(x * log(y)) + z))); else tmp = Float64(a + Float64(t + Float64(z + 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.05e+100], N[Not[LessEqual[x, 4e+169]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.05 \cdot 10^{+100} \lor \neg \left(x \leq 4 \cdot 10^{+169}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \mathsf{fma}\left(\log c, b + -0.5, y \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.0499999999999999e100 or 3.99999999999999974e169 < x Initial program 98.5%
Taylor expanded in b around 0 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 89.0%
Taylor expanded in x around inf 89.0%
if -1.0499999999999999e100 < x < 3.99999999999999974e169Initial program 99.8%
Taylor expanded in x around 0 97.5%
+-commutative97.5%
sub-neg97.5%
metadata-eval97.5%
*-commutative97.5%
fma-undefine97.5%
Simplified97.5%
Final simplification95.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.8e+99) (not (<= x 1.65e+174))) (+ (* y i) (+ a (+ (* x (log y)) z))) (+ (* y i) (+ (* (- b 0.5) (log c)) (+ a (+ z t))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.8e+99) || !(x <= 1.65e+174)) {
tmp = (y * i) + (a + ((x * log(y)) + z));
} else {
tmp = (y * i) + (((b - 0.5) * log(c)) + (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 ((x <= (-1.8d+99)) .or. (.not. (x <= 1.65d+174))) then
tmp = (y * i) + (a + ((x * log(y)) + z))
else
tmp = (y * i) + (((b - 0.5d0) * log(c)) + (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 ((x <= -1.8e+99) || !(x <= 1.65e+174)) {
tmp = (y * i) + (a + ((x * Math.log(y)) + z));
} else {
tmp = (y * i) + (((b - 0.5) * Math.log(c)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.8e+99) or not (x <= 1.65e+174): tmp = (y * i) + (a + ((x * math.log(y)) + z)) else: tmp = (y * i) + (((b - 0.5) * math.log(c)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.8e+99) || !(x <= 1.65e+174)) tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(x * log(y)) + z))); else tmp = Float64(Float64(y * i) + Float64(Float64(Float64(b - 0.5) * log(c)) + 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 ((x <= -1.8e+99) || ~((x <= 1.65e+174))) tmp = (y * i) + (a + ((x * log(y)) + z)); else tmp = (y * i) + (((b - 0.5) * log(c)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.8e+99], N[Not[LessEqual[x, 1.65e+174]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+99} \lor \neg \left(x \leq 1.65 \cdot 10^{+174}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\left(b - 0.5\right) \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.8000000000000001e99 or 1.65e174 < x Initial program 98.5%
Taylor expanded in b around 0 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 89.0%
Taylor expanded in x around inf 89.0%
if -1.8000000000000001e99 < x < 1.65e174Initial program 99.8%
Taylor expanded in z around inf 94.0%
+-commutative94.0%
associate-/l*93.5%
fma-define93.5%
Simplified93.5%
Taylor expanded in z around inf 97.5%
Final simplification95.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -8.5e+99) (not (<= x 4e+169))) (+ (* y i) (+ a (+ (* x (log y)) z))) (+ a (+ t (+ z (+ (* (- 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) {
double tmp;
if ((x <= -8.5e+99) || !(x <= 4e+169)) {
tmp = (y * i) + (a + ((x * log(y)) + z));
} else {
tmp = a + (t + (z + (((b - 0.5) * log(c)) + (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 <= (-8.5d+99)) .or. (.not. (x <= 4d+169))) then
tmp = (y * i) + (a + ((x * log(y)) + z))
else
tmp = a + (t + (z + (((b - 0.5d0) * log(c)) + (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 <= -8.5e+99) || !(x <= 4e+169)) {
tmp = (y * i) + (a + ((x * Math.log(y)) + z));
} else {
tmp = a + (t + (z + (((b - 0.5) * Math.log(c)) + (y * i))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -8.5e+99) or not (x <= 4e+169): tmp = (y * i) + (a + ((x * math.log(y)) + z)) else: tmp = a + (t + (z + (((b - 0.5) * math.log(c)) + (y * i)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -8.5e+99) || !(x <= 4e+169)) tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(x * log(y)) + z))); else tmp = Float64(a + Float64(t + Float64(z + Float64(Float64(Float64(b - 0.5) * log(c)) + Float64(y * i))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -8.5e+99) || ~((x <= 4e+169))) tmp = (y * i) + (a + ((x * log(y)) + z)); else tmp = a + (t + (z + (((b - 0.5) * log(c)) + (y * i)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -8.5e+99], N[Not[LessEqual[x, 4e+169]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+99} \lor \neg \left(x \leq 4 \cdot 10^{+169}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(\left(b - 0.5\right) \cdot \log c + y \cdot i\right)\right)\right)\\
\end{array}
\end{array}
if x < -8.49999999999999984e99 or 3.99999999999999974e169 < x Initial program 98.5%
Taylor expanded in b around 0 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 89.0%
Taylor expanded in x around inf 89.0%
if -8.49999999999999984e99 < x < 3.99999999999999974e169Initial program 99.8%
Taylor expanded in x around 0 97.5%
Final simplification95.0%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -2.5e+222) (not (<= b 1.4e+207))) (* b (log c)) (+ (* y i) (+ a (+ (* x (log y)) z)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -2.5e+222) || !(b <= 1.4e+207)) {
tmp = b * log(c);
} else {
tmp = (y * i) + (a + ((x * log(y)) + 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 ((b <= (-2.5d+222)) .or. (.not. (b <= 1.4d+207))) then
tmp = b * log(c)
else
tmp = (y * i) + (a + ((x * log(y)) + 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 ((b <= -2.5e+222) || !(b <= 1.4e+207)) {
tmp = b * Math.log(c);
} else {
tmp = (y * i) + (a + ((x * Math.log(y)) + z));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -2.5e+222) or not (b <= 1.4e+207): tmp = b * math.log(c) else: tmp = (y * i) + (a + ((x * math.log(y)) + z)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -2.5e+222) || !(b <= 1.4e+207)) tmp = Float64(b * log(c)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(x * log(y)) + z))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -2.5e+222) || ~((b <= 1.4e+207))) tmp = b * log(c); else tmp = (y * i) + (a + ((x * log(y)) + z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -2.5e+222], N[Not[LessEqual[b, 1.4e+207]], $MachinePrecision]], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.5 \cdot 10^{+222} \lor \neg \left(b \leq 1.4 \cdot 10^{+207}\right):\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\\
\end{array}
\end{array}
if b < -2.50000000000000012e222 or 1.40000000000000005e207 < b Initial program 96.1%
Taylor expanded in b around inf 78.6%
*-commutative78.6%
Simplified78.6%
if -2.50000000000000012e222 < b < 1.40000000000000005e207Initial program 99.9%
Taylor expanded in b around 0 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in t around 0 77.5%
Taylor expanded in x around inf 75.5%
Final simplification75.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* b (log c))))
(if (<= b -1.42e+222)
t_1
(if (<= b 1.3e+207)
(+ (* y i) (+ a (+ (* x (log y)) z)))
(* z (+ (/ t_1 z) 1.0))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * log(c);
double tmp;
if (b <= -1.42e+222) {
tmp = t_1;
} else if (b <= 1.3e+207) {
tmp = (y * i) + (a + ((x * log(y)) + z));
} else {
tmp = z * ((t_1 / z) + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = b * log(c)
if (b <= (-1.42d+222)) then
tmp = t_1
else if (b <= 1.3d+207) then
tmp = (y * i) + (a + ((x * log(y)) + z))
else
tmp = z * ((t_1 / z) + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = b * Math.log(c);
double tmp;
if (b <= -1.42e+222) {
tmp = t_1;
} else if (b <= 1.3e+207) {
tmp = (y * i) + (a + ((x * Math.log(y)) + z));
} else {
tmp = z * ((t_1 / z) + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = b * math.log(c) tmp = 0 if b <= -1.42e+222: tmp = t_1 elif b <= 1.3e+207: tmp = (y * i) + (a + ((x * math.log(y)) + z)) else: tmp = z * ((t_1 / z) + 1.0) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(b * log(c)) tmp = 0.0 if (b <= -1.42e+222) tmp = t_1; elseif (b <= 1.3e+207) tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(x * log(y)) + z))); else tmp = Float64(z * Float64(Float64(t_1 / z) + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = b * log(c); tmp = 0.0; if (b <= -1.42e+222) tmp = t_1; elseif (b <= 1.3e+207) tmp = (y * i) + (a + ((x * log(y)) + z)); else tmp = z * ((t_1 / z) + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.42e+222], t$95$1, If[LessEqual[b, 1.3e+207], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(t$95$1 / z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \log c\\
\mathbf{if}\;b \leq -1.42 \cdot 10^{+222}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 1.3 \cdot 10^{+207}:\\
\;\;\;\;y \cdot i + \left(a + \left(x \cdot \log y + z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(\frac{t\_1}{z} + 1\right)\\
\end{array}
\end{array}
if b < -1.41999999999999997e222Initial program 99.6%
Taylor expanded in b around inf 83.5%
*-commutative83.5%
Simplified83.5%
if -1.41999999999999997e222 < b < 1.2999999999999999e207Initial program 99.9%
Taylor expanded in b around 0 93.9%
*-commutative93.9%
Simplified93.9%
Taylor expanded in t around 0 77.5%
Taylor expanded in x around inf 75.5%
if 1.2999999999999999e207 < b Initial program 93.6%
Taylor expanded in z around -inf 56.2%
Taylor expanded in b around inf 44.4%
*-commutative44.4%
Simplified44.4%
Final simplification73.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -9.6e+131) (not (<= x 4.7e+82))) (+ z (+ (* x (log y)) (* y i))) (+ (* y i) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -9.6e+131) || !(x <= 4.7e+82)) {
tmp = z + ((x * log(y)) + (y * i));
} else {
tmp = (y * i) + (z + 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 ((x <= (-9.6d+131)) .or. (.not. (x <= 4.7d+82))) then
tmp = z + ((x * log(y)) + (y * i))
else
tmp = (y * i) + (z + 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 ((x <= -9.6e+131) || !(x <= 4.7e+82)) {
tmp = z + ((x * Math.log(y)) + (y * i));
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -9.6e+131) or not (x <= 4.7e+82): tmp = z + ((x * math.log(y)) + (y * i)) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -9.6e+131) || !(x <= 4.7e+82)) tmp = Float64(z + Float64(Float64(x * log(y)) + Float64(y * i))); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -9.6e+131) || ~((x <= 4.7e+82))) tmp = z + ((x * log(y)) + (y * i)); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -9.6e+131], N[Not[LessEqual[x, 4.7e+82]], $MachinePrecision]], N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.6 \cdot 10^{+131} \lor \neg \left(x \leq 4.7 \cdot 10^{+82}\right):\\
\;\;\;\;z + \left(x \cdot \log y + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if x < -9.5999999999999998e131 or 4.7e82 < x Initial program 98.7%
Taylor expanded in b around 0 95.6%
*-commutative95.6%
Simplified95.6%
Taylor expanded in t around 0 85.4%
Taylor expanded in x around inf 85.4%
Taylor expanded in a around 0 79.1%
if -9.5999999999999998e131 < x < 4.7e82Initial program 99.9%
Taylor expanded in b around 0 80.5%
*-commutative80.5%
Simplified80.5%
Taylor expanded in t around 0 63.0%
Taylor expanded in x around inf 60.1%
Taylor expanded in z around inf 59.4%
Final simplification66.4%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.55e+144) (not (<= x 3.3e+195))) (+ a (+ (* x (log y)) z)) (+ (* y i) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.55e+144) || !(x <= 3.3e+195)) {
tmp = a + ((x * log(y)) + z);
} else {
tmp = (y * i) + (z + 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 ((x <= (-1.55d+144)) .or. (.not. (x <= 3.3d+195))) then
tmp = a + ((x * log(y)) + z)
else
tmp = (y * i) + (z + 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 ((x <= -1.55e+144) || !(x <= 3.3e+195)) {
tmp = a + ((x * Math.log(y)) + z);
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.55e+144) or not (x <= 3.3e+195): tmp = a + ((x * math.log(y)) + z) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.55e+144) || !(x <= 3.3e+195)) tmp = Float64(a + Float64(Float64(x * log(y)) + z)); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.55e+144) || ~((x <= 3.3e+195))) tmp = a + ((x * log(y)) + z); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.55e+144], N[Not[LessEqual[x, 3.3e+195]], $MachinePrecision]], N[(a + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+144} \lor \neg \left(x \leq 3.3 \cdot 10^{+195}\right):\\
\;\;\;\;a + \left(x \cdot \log y + z\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if x < -1.5500000000000001e144 or 3.3e195 < x Initial program 99.8%
Taylor expanded in b around 0 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in t around 0 91.1%
Taylor expanded in x around inf 91.1%
Taylor expanded in y around 0 75.3%
if -1.5500000000000001e144 < x < 3.3e195Initial program 99.3%
Taylor expanded in b around 0 81.4%
*-commutative81.4%
Simplified81.4%
Taylor expanded in t around 0 64.5%
Taylor expanded in x around inf 62.1%
Taylor expanded in z around inf 59.3%
Final simplification63.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -4.8e+214) (not (<= x 4.6e+233))) (* x (log y)) (+ (* y i) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -4.8e+214) || !(x <= 4.6e+233)) {
tmp = x * log(y);
} else {
tmp = (y * i) + (z + 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 ((x <= (-4.8d+214)) .or. (.not. (x <= 4.6d+233))) then
tmp = x * log(y)
else
tmp = (y * i) + (z + 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 ((x <= -4.8e+214) || !(x <= 4.6e+233)) {
tmp = x * Math.log(y);
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -4.8e+214) or not (x <= 4.6e+233): tmp = x * math.log(y) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4.8e+214) || !(x <= 4.6e+233)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -4.8e+214) || ~((x <= 4.6e+233))) tmp = x * log(y); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4.8e+214], N[Not[LessEqual[x, 4.6e+233]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.8 \cdot 10^{+214} \lor \neg \left(x \leq 4.6 \cdot 10^{+233}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if x < -4.8000000000000002e214 or 4.60000000000000001e233 < x Initial program 99.7%
Taylor expanded in x around inf 79.9%
if -4.8000000000000002e214 < x < 4.60000000000000001e233Initial program 99.4%
Taylor expanded in b around 0 83.6%
*-commutative83.6%
Simplified83.6%
Taylor expanded in t around 0 67.8%
Taylor expanded in x around inf 65.7%
Taylor expanded in z around inf 58.6%
Final simplification61.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= y 1.45e-181) a (if (<= y 3.1e-88) z (if (<= y 4.8e-26) a (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.45e-181) {
tmp = a;
} else if (y <= 3.1e-88) {
tmp = z;
} else if (y <= 4.8e-26) {
tmp = a;
} else {
tmp = y * i;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (y <= 1.45d-181) then
tmp = a
else if (y <= 3.1d-88) then
tmp = z
else if (y <= 4.8d-26) then
tmp = a
else
tmp = y * i
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (y <= 1.45e-181) {
tmp = a;
} else if (y <= 3.1e-88) {
tmp = z;
} else if (y <= 4.8e-26) {
tmp = a;
} else {
tmp = y * i;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if y <= 1.45e-181: tmp = a elif y <= 3.1e-88: tmp = z elif y <= 4.8e-26: tmp = a else: tmp = y * i return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (y <= 1.45e-181) tmp = a; elseif (y <= 3.1e-88) tmp = z; elseif (y <= 4.8e-26) tmp = a; else tmp = Float64(y * i); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (y <= 1.45e-181) tmp = a; elseif (y <= 3.1e-88) tmp = z; elseif (y <= 4.8e-26) tmp = a; else tmp = y * i; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[y, 1.45e-181], a, If[LessEqual[y, 3.1e-88], z, If[LessEqual[y, 4.8e-26], a, N[(y * i), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.45 \cdot 10^{-181}:\\
\;\;\;\;a\\
\mathbf{elif}\;y \leq 3.1 \cdot 10^{-88}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-26}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;y \cdot i\\
\end{array}
\end{array}
if y < 1.4499999999999999e-181 or 3.0999999999999998e-88 < y < 4.8000000000000002e-26Initial program 99.8%
Taylor expanded in a around inf 22.0%
if 1.4499999999999999e-181 < y < 3.0999999999999998e-88Initial program 99.6%
Taylor expanded in z around inf 18.9%
if 4.8000000000000002e-26 < y Initial program 99.2%
Taylor expanded in y around inf 48.7%
*-commutative48.7%
Simplified48.7%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ z a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + 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 = (y * i) + (z + a)
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) + (z + a);
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (z + a)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(z + a)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (z + a); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(z + a\right)
\end{array}
Initial program 99.5%
Taylor expanded in b around 0 85.8%
*-commutative85.8%
Simplified85.8%
Taylor expanded in t around 0 71.0%
Taylor expanded in x around inf 69.1%
Taylor expanded in z around inf 51.9%
Final simplification51.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 3.55e+112) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 3.55e+112) {
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 <= 3.55d+112) 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 <= 3.55e+112) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 3.55e+112: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 3.55e+112) 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 <= 3.55e+112) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 3.55e+112], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 3.55 \cdot 10^{+112}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 3.55e112Initial program 99.4%
Taylor expanded in z around inf 15.2%
if 3.55e112 < a Initial program 99.9%
Taylor expanded in a around inf 45.9%
(FPCore (x y z t a b c i) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
def code(x, y, z, t, a, b, c, i): return a
function code(x, y, z, t, a, b, c, i) return a end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 99.5%
Taylor expanded in a around inf 14.3%
herbie shell --seed 2024103
(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)))