
(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 20 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%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y)))
(t_2 (* b (log c)))
(t_3 (+ (* y i) (+ t_1 t_2)))
(t_4 (+ a (+ z t))))
(if (<= x -1.45e+230)
t_3
(if (<= x 1.12e+114)
(+ (* y i) (+ (* (log c) (- b 0.5)) t_4))
(if (<= x 2.25e+160)
t_3
(if (<= x 1.8e+243)
(+ (* y i) (+ t_2 t_4))
(+ (* y i) (+ a t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * log(y);
double t_2 = b * log(c);
double t_3 = (y * i) + (t_1 + t_2);
double t_4 = a + (z + t);
double tmp;
if (x <= -1.45e+230) {
tmp = t_3;
} else if (x <= 1.12e+114) {
tmp = (y * i) + ((log(c) * (b - 0.5)) + t_4);
} else if (x <= 2.25e+160) {
tmp = t_3;
} else if (x <= 1.8e+243) {
tmp = (y * i) + (t_2 + t_4);
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = x * log(y)
t_2 = b * log(c)
t_3 = (y * i) + (t_1 + t_2)
t_4 = a + (z + t)
if (x <= (-1.45d+230)) then
tmp = t_3
else if (x <= 1.12d+114) then
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + t_4)
else if (x <= 2.25d+160) then
tmp = t_3
else if (x <= 1.8d+243) then
tmp = (y * i) + (t_2 + t_4)
else
tmp = (y * i) + (a + t_1)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double t_2 = b * Math.log(c);
double t_3 = (y * i) + (t_1 + t_2);
double t_4 = a + (z + t);
double tmp;
if (x <= -1.45e+230) {
tmp = t_3;
} else if (x <= 1.12e+114) {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + t_4);
} else if (x <= 2.25e+160) {
tmp = t_3;
} else if (x <= 1.8e+243) {
tmp = (y * i) + (t_2 + t_4);
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) t_2 = b * math.log(c) t_3 = (y * i) + (t_1 + t_2) t_4 = a + (z + t) tmp = 0 if x <= -1.45e+230: tmp = t_3 elif x <= 1.12e+114: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + t_4) elif x <= 2.25e+160: tmp = t_3 elif x <= 1.8e+243: tmp = (y * i) + (t_2 + t_4) else: tmp = (y * i) + (a + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(b * log(c)) t_3 = Float64(Float64(y * i) + Float64(t_1 + t_2)) t_4 = Float64(a + Float64(z + t)) tmp = 0.0 if (x <= -1.45e+230) tmp = t_3; elseif (x <= 1.12e+114) tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + t_4)); elseif (x <= 2.25e+160) tmp = t_3; elseif (x <= 1.8e+243) tmp = Float64(Float64(y * i) + Float64(t_2 + t_4)); else tmp = Float64(Float64(y * i) + Float64(a + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); t_2 = b * log(c); t_3 = (y * i) + (t_1 + t_2); t_4 = a + (z + t); tmp = 0.0; if (x <= -1.45e+230) tmp = t_3; elseif (x <= 1.12e+114) tmp = (y * i) + ((log(c) * (b - 0.5)) + t_4); elseif (x <= 2.25e+160) tmp = t_3; elseif (x <= 1.8e+243) tmp = (y * i) + (t_2 + t_4); else tmp = (y * i) + (a + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.45e+230], t$95$3, If[LessEqual[x, 1.12e+114], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.25e+160], t$95$3, If[LessEqual[x, 1.8e+243], N[(N[(y * i), $MachinePrecision] + N[(t$95$2 + t$95$4), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := b \cdot \log c\\
t_3 := y \cdot i + \left(t\_1 + t\_2\right)\\
t_4 := a + \left(z + t\right)\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{+230}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 1.12 \cdot 10^{+114}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + t\_4\right)\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{+160}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{+243}:\\
\;\;\;\;y \cdot i + \left(t\_2 + t\_4\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\end{array}
\end{array}
if x < -1.45e230 or 1.11999999999999999e114 < x < 2.2499999999999999e160Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 95.5%
Taylor expanded in a around 0 95.7%
if -1.45e230 < x < 1.11999999999999999e114Initial program 99.9%
Taylor expanded in x around 0 97.5%
if 2.2499999999999999e160 < x < 1.7999999999999998e243Initial program 99.8%
Taylor expanded in x around 0 89.9%
Taylor expanded in b around inf 89.9%
*-commutative99.8%
Simplified89.9%
if 1.7999999999999998e243 < x Initial program 99.6%
Taylor expanded in b around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around inf 90.7%
Taylor expanded in b around 0 90.7%
Final simplification96.5%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))) (t_2 (* x (log y))))
(if (<= x -1.2e+199)
(+ (* y i) (+ (* b (log c)) (+ a t_2)))
(if (<= x 2.9e+103)
(fma y i (+ a (+ t (+ z t_1))))
(+ a (+ t (+ z (+ t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = log(c) * (b - 0.5);
double t_2 = x * log(y);
double tmp;
if (x <= -1.2e+199) {
tmp = (y * i) + ((b * log(c)) + (a + t_2));
} else if (x <= 2.9e+103) {
tmp = fma(y, i, (a + (t + (z + t_1))));
} else {
tmp = a + (t + (z + (t_2 + t_1)));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) t_2 = Float64(x * log(y)) tmp = 0.0 if (x <= -1.2e+199) tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + t_2))); elseif (x <= 2.9e+103) tmp = fma(y, i, Float64(a + Float64(t + Float64(z + t_1)))); else tmp = Float64(a + Float64(t + Float64(z + Float64(t_2 + t_1)))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.2e+199], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2.9e+103], N[(y * i + N[(a + N[(t + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(t + N[(z + N[(t$95$2 + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
t_2 := x \cdot \log y\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{+199}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + t\_2\right)\right)\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{+103}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(t + \left(z + \left(t\_2 + t\_1\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.20000000000000007e199Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 94.8%
if -1.20000000000000007e199 < x < 2.8999999999999998e103Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 97.9%
if 2.8999999999999998e103 < x Initial program 99.7%
Taylor expanded in y around 0 90.5%
Final simplification96.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.15e+200) (not (<= x 3.9e+104))) (+ (* y i) (+ (* b (log c)) (+ a (* x (log y))))) (+ (* 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) {
double tmp;
if ((x <= -1.15e+200) || !(x <= 3.9e+104)) {
tmp = (y * i) + ((b * log(c)) + (a + (x * log(y))));
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + (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.15d+200)) .or. (.not. (x <= 3.9d+104))) then
tmp = (y * i) + ((b * log(c)) + (a + (x * log(y))))
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + (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.15e+200) || !(x <= 3.9e+104)) {
tmp = (y * i) + ((b * Math.log(c)) + (a + (x * Math.log(y))));
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.15e+200) or not (x <= 3.9e+104): tmp = (y * i) + ((b * math.log(c)) + (a + (x * math.log(y)))) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.15e+200) || !(x <= 3.9e+104)) tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(x * log(y))))); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + 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.15e+200) || ~((x <= 3.9e+104))) tmp = (y * i) + ((b * log(c)) + (a + (x * log(y)))); else tmp = (y * i) + ((log(c) * (b - 0.5)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.15e+200], N[Not[LessEqual[x, 3.9e+104]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{+200} \lor \neg \left(x \leq 3.9 \cdot 10^{+104}\right):\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.15000000000000002e200 or 3.90000000000000017e104 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 84.9%
if -1.15000000000000002e200 < x < 3.90000000000000017e104Initial program 99.9%
Taylor expanded in x around 0 97.9%
Final simplification94.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.3e+199) (not (<= x 1.36e+105))) (+ (* y i) (+ (* b (log c)) (+ a (* x (log y))))) (fma y i (+ a (+ t (+ z (* (log c) (- b 0.5))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.3e+199) || !(x <= 1.36e+105)) {
tmp = (y * i) + ((b * log(c)) + (a + (x * log(y))));
} else {
tmp = fma(y, i, (a + (t + (z + (log(c) * (b - 0.5))))));
}
return tmp;
}
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.3e+199) || !(x <= 1.36e+105)) tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + Float64(a + Float64(x * log(y))))); else tmp = fma(y, i, Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5)))))); end return tmp end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.3e+199], N[Not[LessEqual[x, 1.36e+105]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * i + N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.3 \cdot 10^{+199} \lor \neg \left(x \leq 1.36 \cdot 10^{+105}\right):\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, i, a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\right)\\
\end{array}
\end{array}
if x < -1.3000000000000001e199 or 1.3599999999999999e105 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 84.9%
if -1.3000000000000001e199 < x < 1.3599999999999999e105Initial program 99.9%
associate-+l+99.9%
associate-+l+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+r+99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
+-commutative99.9%
fma-define99.9%
+-commutative99.9%
fma-define99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 97.9%
Final simplification94.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* x (log y))) (t_2 (* (log c) (- b 0.5))))
(if (<= x -1.42e+230)
(+ (* y i) (+ t_1 (* b (log c))))
(if (<= x 1.6e+113)
(+ (* y i) (+ t_2 (+ a (+ z t))))
(+ t (+ z (+ t_1 t_2)))))))
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 t_2 = log(c) * (b - 0.5);
double tmp;
if (x <= -1.42e+230) {
tmp = (y * i) + (t_1 + (b * log(c)));
} else if (x <= 1.6e+113) {
tmp = (y * i) + (t_2 + (a + (z + t)));
} else {
tmp = t + (z + (t_1 + t_2));
}
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) :: t_2
real(8) :: tmp
t_1 = x * log(y)
t_2 = log(c) * (b - 0.5d0)
if (x <= (-1.42d+230)) then
tmp = (y * i) + (t_1 + (b * log(c)))
else if (x <= 1.6d+113) then
tmp = (y * i) + (t_2 + (a + (z + t)))
else
tmp = t + (z + (t_1 + t_2))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = x * Math.log(y);
double t_2 = Math.log(c) * (b - 0.5);
double tmp;
if (x <= -1.42e+230) {
tmp = (y * i) + (t_1 + (b * Math.log(c)));
} else if (x <= 1.6e+113) {
tmp = (y * i) + (t_2 + (a + (z + t)));
} else {
tmp = t + (z + (t_1 + t_2));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = x * math.log(y) t_2 = math.log(c) * (b - 0.5) tmp = 0 if x <= -1.42e+230: tmp = (y * i) + (t_1 + (b * math.log(c))) elif x <= 1.6e+113: tmp = (y * i) + (t_2 + (a + (z + t))) else: tmp = t + (z + (t_1 + t_2)) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(x * log(y)) t_2 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if (x <= -1.42e+230) tmp = Float64(Float64(y * i) + Float64(t_1 + Float64(b * log(c)))); elseif (x <= 1.6e+113) tmp = Float64(Float64(y * i) + Float64(t_2 + Float64(a + Float64(z + t)))); else tmp = Float64(t + Float64(z + Float64(t_1 + t_2))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = x * log(y); t_2 = log(c) * (b - 0.5); tmp = 0.0; if (x <= -1.42e+230) tmp = (y * i) + (t_1 + (b * log(c))); elseif (x <= 1.6e+113) tmp = (y * i) + (t_2 + (a + (z + t))); else tmp = t + (z + (t_1 + t_2)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.42e+230], N[(N[(y * i), $MachinePrecision] + N[(t$95$1 + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.6e+113], N[(N[(y * i), $MachinePrecision] + N[(t$95$2 + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t + N[(z + N[(t$95$1 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \log y\\
t_2 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;x \leq -1.42 \cdot 10^{+230}:\\
\;\;\;\;y \cdot i + \left(t\_1 + b \cdot \log c\right)\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+113}:\\
\;\;\;\;y \cdot i + \left(t\_2 + \left(a + \left(z + t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t + \left(z + \left(t\_1 + t\_2\right)\right)\\
\end{array}
\end{array}
if x < -1.41999999999999991e230Initial program 99.6%
Taylor expanded in b around inf 99.6%
*-commutative99.6%
Simplified99.6%
Taylor expanded in x around inf 99.6%
Taylor expanded in a around 0 99.6%
if -1.41999999999999991e230 < x < 1.5999999999999999e113Initial program 99.9%
Taylor expanded in x around 0 97.5%
if 1.5999999999999999e113 < x Initial program 99.7%
Taylor expanded in y around 0 89.8%
associate-+r+89.8%
associate-+r+89.8%
+-commutative89.8%
+-commutative89.8%
+-commutative89.8%
sub-neg89.8%
metadata-eval89.8%
associate-+l+89.8%
associate-+r+89.8%
+-commutative89.8%
fma-define89.8%
associate-+l+89.8%
associate-+r+89.8%
+-commutative89.8%
fma-define89.8%
+-commutative89.8%
+-commutative89.8%
Simplified89.8%
Taylor expanded in a around 0 83.0%
Final simplification95.3%
(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 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* b (log c)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (b * 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) + ((a + (t + (z + (x * log(y))))) + (b * 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) + ((a + (t + (z + (x * Math.log(y))))) + (b * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (b * math.log(c)))
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(b * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (b * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.9%
Taylor expanded in b around inf 98.9%
*-commutative98.9%
Simplified98.9%
Final simplification98.9%
(FPCore (x y z t a b c i)
:precision binary64
(if (or (<= x -4.6e+203)
(and (not (<= x 1.36e+105))
(or (<= x 2.3e+194) (not (<= x 1.35e+243)))))
(+ (* y i) (+ a (* x (log y))))
(+ (* y i) (+ (* b (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 <= -4.6e+203) || (!(x <= 1.36e+105) && ((x <= 2.3e+194) || !(x <= 1.35e+243)))) {
tmp = (y * i) + (a + (x * log(y)));
} else {
tmp = (y * i) + ((b * 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 <= (-4.6d+203)) .or. (.not. (x <= 1.36d+105)) .and. (x <= 2.3d+194) .or. (.not. (x <= 1.35d+243))) then
tmp = (y * i) + (a + (x * log(y)))
else
tmp = (y * i) + ((b * 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 <= -4.6e+203) || (!(x <= 1.36e+105) && ((x <= 2.3e+194) || !(x <= 1.35e+243)))) {
tmp = (y * i) + (a + (x * Math.log(y)));
} else {
tmp = (y * i) + ((b * Math.log(c)) + (a + (z + t)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -4.6e+203) or (not (x <= 1.36e+105) and ((x <= 2.3e+194) or not (x <= 1.35e+243))): tmp = (y * i) + (a + (x * math.log(y))) else: tmp = (y * i) + ((b * math.log(c)) + (a + (z + t))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -4.6e+203) || (!(x <= 1.36e+105) && ((x <= 2.3e+194) || !(x <= 1.35e+243)))) tmp = Float64(Float64(y * i) + Float64(a + Float64(x * log(y)))); else tmp = Float64(Float64(y * i) + Float64(Float64(b * 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 <= -4.6e+203) || (~((x <= 1.36e+105)) && ((x <= 2.3e+194) || ~((x <= 1.35e+243))))) tmp = (y * i) + (a + (x * log(y))); else tmp = (y * i) + ((b * log(c)) + (a + (z + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -4.6e+203], And[N[Not[LessEqual[x, 1.36e+105]], $MachinePrecision], Or[LessEqual[x, 2.3e+194], N[Not[LessEqual[x, 1.35e+243]], $MachinePrecision]]]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.6 \cdot 10^{+203} \lor \neg \left(x \leq 1.36 \cdot 10^{+105}\right) \land \left(x \leq 2.3 \cdot 10^{+194} \lor \neg \left(x \leq 1.35 \cdot 10^{+243}\right)\right):\\
\;\;\;\;y \cdot i + \left(a + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + \left(a + \left(z + t\right)\right)\right)\\
\end{array}
\end{array}
if x < -4.5999999999999998e203 or 1.3599999999999999e105 < x < 2.30000000000000005e194 or 1.3500000000000001e243 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 88.4%
Taylor expanded in b around 0 83.8%
if -4.5999999999999998e203 < x < 1.3599999999999999e105 or 2.30000000000000005e194 < x < 1.3500000000000001e243Initial program 99.9%
Taylor expanded in x around 0 98.0%
Taylor expanded in b around inf 96.8%
*-commutative98.7%
Simplified96.8%
Final simplification94.1%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* y i) (+ a (* x (log y))))) (t_2 (+ a (+ z t))))
(if (<= x -1.7e+205)
t_1
(if (<= x 1.35e+105)
(+ (* y i) (+ (* (log c) (- b 0.5)) t_2))
(if (or (<= x 2.25e+195) (not (<= x 1.55e+243)))
t_1
(+ (* y i) (+ (* b (log c)) t_2)))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (y * i) + (a + (x * log(y)));
double t_2 = a + (z + t);
double tmp;
if (x <= -1.7e+205) {
tmp = t_1;
} else if (x <= 1.35e+105) {
tmp = (y * i) + ((log(c) * (b - 0.5)) + t_2);
} else if ((x <= 2.25e+195) || !(x <= 1.55e+243)) {
tmp = t_1;
} else {
tmp = (y * i) + ((b * log(c)) + t_2);
}
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) :: t_2
real(8) :: tmp
t_1 = (y * i) + (a + (x * log(y)))
t_2 = a + (z + t)
if (x <= (-1.7d+205)) then
tmp = t_1
else if (x <= 1.35d+105) then
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + t_2)
else if ((x <= 2.25d+195) .or. (.not. (x <= 1.55d+243))) then
tmp = t_1
else
tmp = (y * i) + ((b * log(c)) + t_2)
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) + (a + (x * Math.log(y)));
double t_2 = a + (z + t);
double tmp;
if (x <= -1.7e+205) {
tmp = t_1;
} else if (x <= 1.35e+105) {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + t_2);
} else if ((x <= 2.25e+195) || !(x <= 1.55e+243)) {
tmp = t_1;
} else {
tmp = (y * i) + ((b * Math.log(c)) + t_2);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (y * i) + (a + (x * math.log(y))) t_2 = a + (z + t) tmp = 0 if x <= -1.7e+205: tmp = t_1 elif x <= 1.35e+105: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + t_2) elif (x <= 2.25e+195) or not (x <= 1.55e+243): tmp = t_1 else: tmp = (y * i) + ((b * math.log(c)) + t_2) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(y * i) + Float64(a + Float64(x * log(y)))) t_2 = Float64(a + Float64(z + t)) tmp = 0.0 if (x <= -1.7e+205) tmp = t_1; elseif (x <= 1.35e+105) tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + t_2)); elseif ((x <= 2.25e+195) || !(x <= 1.55e+243)) tmp = t_1; else tmp = Float64(Float64(y * i) + Float64(Float64(b * log(c)) + t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = (y * i) + (a + (x * log(y))); t_2 = a + (z + t); tmp = 0.0; if (x <= -1.7e+205) tmp = t_1; elseif (x <= 1.35e+105) tmp = (y * i) + ((log(c) * (b - 0.5)) + t_2); elseif ((x <= 2.25e+195) || ~((x <= 1.55e+243))) tmp = t_1; else tmp = (y * i) + ((b * log(c)) + t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(y * i), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.7e+205], t$95$1, If[LessEqual[x, 1.35e+105], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, 2.25e+195], N[Not[LessEqual[x, 1.55e+243]], $MachinePrecision]], t$95$1, N[(N[(y * i), $MachinePrecision] + N[(N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot i + \left(a + x \cdot \log y\right)\\
t_2 := a + \left(z + t\right)\\
\mathbf{if}\;x \leq -1.7 \cdot 10^{+205}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.35 \cdot 10^{+105}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + t\_2\right)\\
\mathbf{elif}\;x \leq 2.25 \cdot 10^{+195} \lor \neg \left(x \leq 1.55 \cdot 10^{+243}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(b \cdot \log c + t\_2\right)\\
\end{array}
\end{array}
if x < -1.7e205 or 1.35000000000000008e105 < x < 2.25000000000000005e195 or 1.55e243 < x Initial program 99.7%
Taylor expanded in b around inf 99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in x around inf 88.4%
Taylor expanded in b around 0 83.8%
if -1.7e205 < x < 1.35000000000000008e105Initial program 99.9%
Taylor expanded in x around 0 97.9%
if 2.25000000000000005e195 < x < 1.55e243Initial program 99.8%
Taylor expanded in x around 0 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Final simplification95.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -1e+136)
(+ (* y i) (+ t (+ z (* (log c) (- b 0.5)))))
(if (<= z -3.1e+81)
(+ (* y i) (+ (+ a (+ z t)) (* -0.5 (log c))))
(if (or (<= z -2000000.0) (not (<= z 4.4e-290)))
(+ (* y i) (+ a (* b (log c))))
(+ (* y i) (+ a (* x (log y))))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -1e+136) {
tmp = (y * i) + (t + (z + (log(c) * (b - 0.5))));
} else if (z <= -3.1e+81) {
tmp = (y * i) + ((a + (z + t)) + (-0.5 * log(c)));
} else if ((z <= -2000000.0) || !(z <= 4.4e-290)) {
tmp = (y * i) + (a + (b * log(c)));
} else {
tmp = (y * i) + (a + (x * log(y)));
}
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 <= (-1d+136)) then
tmp = (y * i) + (t + (z + (log(c) * (b - 0.5d0))))
else if (z <= (-3.1d+81)) then
tmp = (y * i) + ((a + (z + t)) + ((-0.5d0) * log(c)))
else if ((z <= (-2000000.0d0)) .or. (.not. (z <= 4.4d-290))) then
tmp = (y * i) + (a + (b * log(c)))
else
tmp = (y * i) + (a + (x * log(y)))
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 <= -1e+136) {
tmp = (y * i) + (t + (z + (Math.log(c) * (b - 0.5))));
} else if (z <= -3.1e+81) {
tmp = (y * i) + ((a + (z + t)) + (-0.5 * Math.log(c)));
} else if ((z <= -2000000.0) || !(z <= 4.4e-290)) {
tmp = (y * i) + (a + (b * Math.log(c)));
} else {
tmp = (y * i) + (a + (x * Math.log(y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -1e+136: tmp = (y * i) + (t + (z + (math.log(c) * (b - 0.5)))) elif z <= -3.1e+81: tmp = (y * i) + ((a + (z + t)) + (-0.5 * math.log(c))) elif (z <= -2000000.0) or not (z <= 4.4e-290): tmp = (y * i) + (a + (b * math.log(c))) else: tmp = (y * i) + (a + (x * math.log(y))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -1e+136) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))); elseif (z <= -3.1e+81) tmp = Float64(Float64(y * i) + Float64(Float64(a + Float64(z + t)) + Float64(-0.5 * log(c)))); elseif ((z <= -2000000.0) || !(z <= 4.4e-290)) tmp = Float64(Float64(y * i) + Float64(a + Float64(b * log(c)))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(x * log(y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -1e+136) tmp = (y * i) + (t + (z + (log(c) * (b - 0.5)))); elseif (z <= -3.1e+81) tmp = (y * i) + ((a + (z + t)) + (-0.5 * log(c))); elseif ((z <= -2000000.0) || ~((z <= 4.4e-290))) tmp = (y * i) + (a + (b * log(c))); else tmp = (y * i) + (a + (x * log(y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -1e+136], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.1e+81], N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -2000000.0], N[Not[LessEqual[z, 4.4e-290]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{+136}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{elif}\;z \leq -3.1 \cdot 10^{+81}:\\
\;\;\;\;y \cdot i + \left(\left(a + \left(z + t\right)\right) + -0.5 \cdot \log c\right)\\
\mathbf{elif}\;z \leq -2000000 \lor \neg \left(z \leq 4.4 \cdot 10^{-290}\right):\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + x \cdot \log y\right)\\
\end{array}
\end{array}
if z < -1.00000000000000006e136Initial program 99.9%
Taylor expanded in x around 0 91.7%
Taylor expanded in a around 0 85.8%
if -1.00000000000000006e136 < z < -3.1e81Initial program 100.0%
Taylor expanded in x around 0 93.5%
Taylor expanded in b around 0 87.8%
if -3.1e81 < z < -2e6 or 4.4000000000000002e-290 < z Initial program 99.9%
Taylor expanded in b around inf 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around inf 69.3%
Taylor expanded in x around 0 52.3%
if -2e6 < z < 4.4000000000000002e-290Initial program 99.8%
Taylor expanded in b around inf 96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in x around inf 83.8%
Taylor expanded in b around 0 69.6%
Final simplification64.8%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (* y i))))
(if (<= z -7.2e+182)
z
(if (<= z -8.2e+160)
t_1
(if (<= z -2.7e+82)
z
(if (<= z -7200000.0) (+ (* y i) (* b (log c))) t_1))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (y * i);
double tmp;
if (z <= -7.2e+182) {
tmp = z;
} else if (z <= -8.2e+160) {
tmp = t_1;
} else if (z <= -2.7e+82) {
tmp = z;
} else if (z <= -7200000.0) {
tmp = (y * i) + (b * log(c));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = a + (y * i)
if (z <= (-7.2d+182)) then
tmp = z
else if (z <= (-8.2d+160)) then
tmp = t_1
else if (z <= (-2.7d+82)) then
tmp = z
else if (z <= (-7200000.0d0)) then
tmp = (y * i) + (b * log(c))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (y * i);
double tmp;
if (z <= -7.2e+182) {
tmp = z;
} else if (z <= -8.2e+160) {
tmp = t_1;
} else if (z <= -2.7e+82) {
tmp = z;
} else if (z <= -7200000.0) {
tmp = (y * i) + (b * Math.log(c));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = a + (y * i) tmp = 0 if z <= -7.2e+182: tmp = z elif z <= -8.2e+160: tmp = t_1 elif z <= -2.7e+82: tmp = z elif z <= -7200000.0: tmp = (y * i) + (b * math.log(c)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(y * i)) tmp = 0.0 if (z <= -7.2e+182) tmp = z; elseif (z <= -8.2e+160) tmp = t_1; elseif (z <= -2.7e+82) tmp = z; elseif (z <= -7200000.0) tmp = Float64(Float64(y * i) + Float64(b * log(c))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) t_1 = a + (y * i); tmp = 0.0; if (z <= -7.2e+182) tmp = z; elseif (z <= -8.2e+160) tmp = t_1; elseif (z <= -2.7e+82) tmp = z; elseif (z <= -7200000.0) tmp = (y * i) + (b * log(c)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.2e+182], z, If[LessEqual[z, -8.2e+160], t$95$1, If[LessEqual[z, -2.7e+82], z, If[LessEqual[z, -7200000.0], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + y \cdot i\\
\mathbf{if}\;z \leq -7.2 \cdot 10^{+182}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -8.2 \cdot 10^{+160}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -2.7 \cdot 10^{+82}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -7200000:\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -7.2e182 or -8.19999999999999996e160 < z < -2.6999999999999999e82Initial program 99.9%
Taylor expanded in x around 0 94.8%
Taylor expanded in z around inf 47.5%
if -7.2e182 < z < -8.19999999999999996e160 or -7.2e6 < z Initial program 99.9%
Taylor expanded in b around inf 98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in x around inf 72.7%
Taylor expanded in a around inf 44.6%
if -2.6999999999999999e82 < z < -7.2e6Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 94.0%
Taylor expanded in b around inf 38.1%
Final simplification44.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= y 1e+80) (and (not (<= y 3.8e+127)) (<= y 9e+145))) (+ a (+ t (+ z (* (log c) (- b 0.5))))) (+ (* y i) (+ a (* x (log y))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((y <= 1e+80) || (!(y <= 3.8e+127) && (y <= 9e+145))) {
tmp = a + (t + (z + (log(c) * (b - 0.5))));
} else {
tmp = (y * i) + (a + (x * log(y)));
}
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 <= 1d+80) .or. (.not. (y <= 3.8d+127)) .and. (y <= 9d+145)) then
tmp = a + (t + (z + (log(c) * (b - 0.5d0))))
else
tmp = (y * i) + (a + (x * log(y)))
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 <= 1e+80) || (!(y <= 3.8e+127) && (y <= 9e+145))) {
tmp = a + (t + (z + (Math.log(c) * (b - 0.5))));
} else {
tmp = (y * i) + (a + (x * Math.log(y)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (y <= 1e+80) or (not (y <= 3.8e+127) and (y <= 9e+145)): tmp = a + (t + (z + (math.log(c) * (b - 0.5)))) else: tmp = (y * i) + (a + (x * math.log(y))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((y <= 1e+80) || (!(y <= 3.8e+127) && (y <= 9e+145))) tmp = Float64(a + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(x * log(y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((y <= 1e+80) || (~((y <= 3.8e+127)) && (y <= 9e+145))) tmp = a + (t + (z + (log(c) * (b - 0.5)))); else tmp = (y * i) + (a + (x * log(y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[y, 1e+80], And[N[Not[LessEqual[y, 3.8e+127]], $MachinePrecision], LessEqual[y, 9e+145]]], N[(a + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 10^{+80} \lor \neg \left(y \leq 3.8 \cdot 10^{+127}\right) \land y \leq 9 \cdot 10^{+145}:\\
\;\;\;\;a + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + x \cdot \log y\right)\\
\end{array}
\end{array}
if y < 1e80 or 3.7999999999999998e127 < y < 8.9999999999999996e145Initial program 99.8%
Taylor expanded in x around 0 83.5%
Taylor expanded in y around 0 77.1%
if 1e80 < y < 3.7999999999999998e127 or 8.9999999999999996e145 < y Initial program 100.0%
Taylor expanded in b around inf 100.0%
*-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 84.0%
Taylor expanded in b around 0 80.5%
Final simplification78.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -3.8e+120) (not (<= x 1.75e+97))) (+ (* y i) (+ a (* x (log y)))) (+ (* 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 ((x <= -3.8e+120) || !(x <= 1.75e+97)) {
tmp = (y * i) + (a + (x * log(y)));
} 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 ((x <= (-3.8d+120)) .or. (.not. (x <= 1.75d+97))) then
tmp = (y * i) + (a + (x * log(y)))
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 ((x <= -3.8e+120) || !(x <= 1.75e+97)) {
tmp = (y * i) + (a + (x * Math.log(y)));
} else {
tmp = (y * i) + (a + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -3.8e+120) or not (x <= 1.75e+97): tmp = (y * i) + (a + (x * math.log(y))) 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 ((x <= -3.8e+120) || !(x <= 1.75e+97)) tmp = Float64(Float64(y * i) + Float64(a + Float64(x * log(y)))); 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 ((x <= -3.8e+120) || ~((x <= 1.75e+97))) tmp = (y * i) + (a + (x * log(y))); else tmp = (y * i) + (a + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -3.8e+120], N[Not[LessEqual[x, 1.75e+97]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(x * N[Log[y], $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}\;x \leq -3.8 \cdot 10^{+120} \lor \neg \left(x \leq 1.75 \cdot 10^{+97}\right):\\
\;\;\;\;y \cdot i + \left(a + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\end{array}
\end{array}
if x < -3.7999999999999998e120 or 1.75e97 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 81.0%
Taylor expanded in b around 0 73.9%
if -3.7999999999999998e120 < x < 1.75e97Initial program 99.9%
Taylor expanded in b around inf 98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in x around inf 62.3%
Taylor expanded in x around 0 61.3%
Final simplification65.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -7e+132)
(+ (* y i) (+ t (+ z (* (log c) (- b 0.5)))))
(if (<= z 3.5e-292)
(+ (* y i) (+ a (* x (log y))))
(+ (* 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 (z <= -7e+132) {
tmp = (y * i) + (t + (z + (log(c) * (b - 0.5))));
} else if (z <= 3.5e-292) {
tmp = (y * i) + (a + (x * log(y)));
} 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 (z <= (-7d+132)) then
tmp = (y * i) + (t + (z + (log(c) * (b - 0.5d0))))
else if (z <= 3.5d-292) then
tmp = (y * i) + (a + (x * log(y)))
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 (z <= -7e+132) {
tmp = (y * i) + (t + (z + (Math.log(c) * (b - 0.5))));
} else if (z <= 3.5e-292) {
tmp = (y * i) + (a + (x * Math.log(y)));
} else {
tmp = (y * i) + (a + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -7e+132: tmp = (y * i) + (t + (z + (math.log(c) * (b - 0.5)))) elif z <= 3.5e-292: tmp = (y * i) + (a + (x * math.log(y))) 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 (z <= -7e+132) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(log(c) * Float64(b - 0.5))))); elseif (z <= 3.5e-292) tmp = Float64(Float64(y * i) + Float64(a + Float64(x * log(y)))); 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 (z <= -7e+132) tmp = (y * i) + (t + (z + (log(c) * (b - 0.5)))); elseif (z <= 3.5e-292) tmp = (y * i) + (a + (x * log(y))); else tmp = (y * i) + (a + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -7e+132], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.5e-292], N[(N[(y * i), $MachinePrecision] + N[(a + N[(x * N[Log[y], $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}\;z \leq -7 \cdot 10^{+132}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + \log c \cdot \left(b - 0.5\right)\right)\right)\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-292}:\\
\;\;\;\;y \cdot i + \left(a + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\end{array}
\end{array}
if z < -7.00000000000000041e132Initial program 99.9%
Taylor expanded in x around 0 92.0%
Taylor expanded in a around 0 86.4%
if -7.00000000000000041e132 < z < 3.5e-292Initial program 99.8%
Taylor expanded in b around inf 97.8%
*-commutative97.8%
Simplified97.8%
Taylor expanded in x around inf 80.2%
Taylor expanded in b around 0 66.5%
if 3.5e-292 < z Initial program 99.9%
Taylor expanded in b around inf 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in x around inf 65.9%
Taylor expanded in x around 0 49.6%
Final simplification62.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= t -2e-44) z (+ (* 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 (t <= -2e-44) {
tmp = z;
} 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 (t <= (-2d-44)) then
tmp = z
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 (t <= -2e-44) {
tmp = z;
} else {
tmp = (y * i) + (a + (b * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if t <= -2e-44: tmp = z 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 (t <= -2e-44) tmp = z; 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 (t <= -2e-44) tmp = z; else tmp = (y * i) + (a + (b * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[t, -2e-44], z, N[(N[(y * i), $MachinePrecision] + N[(a + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-44}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + b \cdot \log c\right)\\
\end{array}
\end{array}
if t < -1.99999999999999991e-44Initial program 99.8%
Taylor expanded in x around 0 83.8%
Taylor expanded in z around inf 21.1%
if -1.99999999999999991e-44 < t Initial program 99.9%
Taylor expanded in b around inf 98.8%
*-commutative98.8%
Simplified98.8%
Taylor expanded in x around inf 72.1%
Taylor expanded in x around 0 57.4%
Final simplification48.0%
(FPCore (x y z t a b c i)
:precision binary64
(if (<= z -2.3e+82)
z
(if (or (<= z -1.35e-11) (and (not (<= z -4.2e-35)) (<= z -1.35e-148)))
(* y i)
a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.3e+82) {
tmp = z;
} else if ((z <= -1.35e-11) || (!(z <= -4.2e-35) && (z <= -1.35e-148))) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-2.3d+82)) then
tmp = z
else if ((z <= (-1.35d-11)) .or. (.not. (z <= (-4.2d-35))) .and. (z <= (-1.35d-148))) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.3e+82) {
tmp = z;
} else if ((z <= -1.35e-11) || (!(z <= -4.2e-35) && (z <= -1.35e-148))) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.3e+82: tmp = z elif (z <= -1.35e-11) or (not (z <= -4.2e-35) and (z <= -1.35e-148)): tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.3e+82) tmp = z; elseif ((z <= -1.35e-11) || (!(z <= -4.2e-35) && (z <= -1.35e-148))) tmp = Float64(y * i); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2.3e+82) tmp = z; elseif ((z <= -1.35e-11) || (~((z <= -4.2e-35)) && (z <= -1.35e-148))) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.3e+82], z, If[Or[LessEqual[z, -1.35e-11], And[N[Not[LessEqual[z, -4.2e-35]], $MachinePrecision], LessEqual[z, -1.35e-148]]], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+82}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq -1.35 \cdot 10^{-11} \lor \neg \left(z \leq -4.2 \cdot 10^{-35}\right) \land z \leq -1.35 \cdot 10^{-148}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -2.29999999999999988e82Initial program 99.9%
Taylor expanded in x around 0 91.9%
Taylor expanded in z around inf 45.4%
if -2.29999999999999988e82 < z < -1.35000000000000002e-11 or -4.2e-35 < z < -1.34999999999999994e-148Initial program 99.8%
Taylor expanded in y around inf 27.4%
*-commutative27.4%
Simplified27.4%
if -1.35000000000000002e-11 < z < -4.2e-35 or -1.34999999999999994e-148 < z Initial program 99.9%
Taylor expanded in a around inf 20.3%
Final simplification27.5%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= z -7.2e+182) (and (not (<= z -9e+160)) (<= z -2.7e+82))) 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 <= -7.2e+182) || (!(z <= -9e+160) && (z <= -2.7e+82))) {
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 <= (-7.2d+182)) .or. (.not. (z <= (-9d+160))) .and. (z <= (-2.7d+82))) 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 <= -7.2e+182) || (!(z <= -9e+160) && (z <= -2.7e+82))) {
tmp = z;
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (z <= -7.2e+182) or (not (z <= -9e+160) and (z <= -2.7e+82)): tmp = z else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((z <= -7.2e+182) || (!(z <= -9e+160) && (z <= -2.7e+82))) 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 <= -7.2e+182) || (~((z <= -9e+160)) && (z <= -2.7e+82))) tmp = z; else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[z, -7.2e+182], And[N[Not[LessEqual[z, -9e+160]], $MachinePrecision], LessEqual[z, -2.7e+82]]], z, N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{+182} \lor \neg \left(z \leq -9 \cdot 10^{+160}\right) \land z \leq -2.7 \cdot 10^{+82}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -7.2e182 or -8.99999999999999959e160 < z < -2.6999999999999999e82Initial program 99.9%
Taylor expanded in x around 0 94.8%
Taylor expanded in z around inf 47.5%
if -7.2e182 < z < -8.99999999999999959e160 or -2.6999999999999999e82 < z Initial program 99.9%
Taylor expanded in b around inf 98.7%
*-commutative98.7%
Simplified98.7%
Taylor expanded in x around inf 74.5%
Taylor expanded in a around inf 45.4%
Final simplification45.8%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.7e+82) z a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.7e+82) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-2.7d+82)) then
tmp = z
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.7e+82) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.7e+82: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.7e+82) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2.7e+82) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.7e+82], z, a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+82}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if z < -2.6999999999999999e82Initial program 99.9%
Taylor expanded in x around 0 91.9%
Taylor expanded in z around inf 45.4%
if -2.6999999999999999e82 < z Initial program 99.9%
Taylor expanded in a around inf 20.5%
Final simplification26.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%
Taylor expanded in a around inf 17.5%
Final simplification17.5%
herbie shell --seed 2024067
(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)))