
(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 16 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}
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (+ (fma x (log y) z) (+ t a)) (+ (* (+ b -0.5) (log c)) (* y i))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (fma(x, log(y), z) + (t + a)) + (((b + -0.5) * log(c)) + (y * i));
}
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(fma(x, log(y), z) + Float64(t + a)) + Float64(Float64(Float64(b + -0.5) * log(c)) + Float64(y * i))) end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(x * N[Log[y], $MachinePrecision] + z), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(b + -0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\left(\mathsf{fma}\left(x, \log y, z\right) + \left(t + a\right)\right) + \left(\left(b + -0.5\right) \cdot \log c + y \cdot i\right)
\end{array}
Initial program 99.5%
associate-+l+99.5%
associate-+l+99.5%
fma-def99.5%
sub-neg99.5%
metadata-eval99.5%
Simplified99.5%
Final simplification99.5%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ z (* x (log y))))) (* (log c) (- b 0.5)))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5)));
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5d0)))
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + ((a + (t + (z + (x * Math.log(y))))) + (Math.log(c) * (b - 0.5)));
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + (z + (x * math.log(y))))) + (math.log(c) * (b - 0.5)))
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(Float64(a + Float64(t + Float64(z + Float64(x * log(y))))) + Float64(log(c) * Float64(b - 0.5)))) end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = (y * i) + ((a + (t + (z + (x * log(y))))) + (log(c) * (b - 0.5)));
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
y \cdot i + \left(\left(a + \left(t + \left(z + x \cdot \log y\right)\right)\right) + \log c \cdot \left(b - 0.5\right)\right)
\end{array}
Initial program 99.5%
Final simplification99.5%
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ a (+ z t))))
(if (or (<= x -2e+129) (not (<= x 9.6e+100)))
(+ (* y i) (+ (* x (log y)) t_1))
(+ (* y i) (+ (* (log c) (- b 0.5)) t_1)))))assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (z + t);
double tmp;
if ((x <= -2e+129) || !(x <= 9.6e+100)) {
tmp = (y * i) + ((x * log(y)) + t_1);
} else {
tmp = (y * i) + ((log(c) * (b - 0.5)) + t_1);
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: t_1
real(8) :: tmp
t_1 = a + (z + t)
if ((x <= (-2d+129)) .or. (.not. (x <= 9.6d+100))) then
tmp = (y * i) + ((x * log(y)) + t_1)
else
tmp = (y * i) + ((log(c) * (b - 0.5d0)) + t_1)
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = a + (z + t);
double tmp;
if ((x <= -2e+129) || !(x <= 9.6e+100)) {
tmp = (y * i) + ((x * Math.log(y)) + t_1);
} else {
tmp = (y * i) + ((Math.log(c) * (b - 0.5)) + t_1);
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): t_1 = a + (z + t) tmp = 0 if (x <= -2e+129) or not (x <= 9.6e+100): tmp = (y * i) + ((x * math.log(y)) + t_1) else: tmp = (y * i) + ((math.log(c) * (b - 0.5)) + t_1) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(a + Float64(z + t)) tmp = 0.0 if ((x <= -2e+129) || !(x <= 9.6e+100)) tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + t_1)); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b - 0.5)) + t_1)); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = a + (z + t);
tmp = 0.0;
if ((x <= -2e+129) || ~((x <= 9.6e+100)))
tmp = (y * i) + ((x * log(y)) + t_1);
else
tmp = (y * i) + ((log(c) * (b - 0.5)) + t_1);
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -2e+129], N[Not[LessEqual[x, 9.6e+100]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := a + \left(z + t\right)\\
\mathbf{if}\;x \leq -2 \cdot 10^{+129} \lor \neg \left(x \leq 9.6 \cdot 10^{+100}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b - 0.5\right) + t_1\right)\\
\end{array}
\end{array}
if x < -2e129 or 9.60000000000000046e100 < x Initial program 98.7%
sub-neg46.4%
metadata-eval46.4%
add-cube-cbrt46.4%
pow346.4%
*-commutative46.4%
Applied egg-rr98.7%
Taylor expanded in b around inf 92.9%
if -2e129 < x < 9.60000000000000046e100Initial program 99.9%
Taylor expanded in x around 0 99.9%
Final simplification97.2%
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ (* x (log y)) (+ t (+ z (* y i))))))
(if (<= a 5.8e-124)
t_1
(if (<= a 1.15e-86)
(+ a (+ z (* (log c) (- b 0.5))))
(if (<= a 1.1e+124) t_1 (+ (* y i) (+ z a)))))))assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = (x * log(y)) + (t + (z + (y * i)));
double tmp;
if (a <= 5.8e-124) {
tmp = t_1;
} else if (a <= 1.15e-86) {
tmp = a + (z + (log(c) * (b - 0.5)));
} else if (a <= 1.1e+124) {
tmp = t_1;
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
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 = (x * log(y)) + (t + (z + (y * i)))
if (a <= 5.8d-124) then
tmp = t_1
else if (a <= 1.15d-86) then
tmp = a + (z + (log(c) * (b - 0.5d0)))
else if (a <= 1.1d+124) then
tmp = t_1
else
tmp = (y * i) + (z + a)
end if
code = tmp
end function
assert z < t && t < a;
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)) + (t + (z + (y * i)));
double tmp;
if (a <= 5.8e-124) {
tmp = t_1;
} else if (a <= 1.15e-86) {
tmp = a + (z + (Math.log(c) * (b - 0.5)));
} else if (a <= 1.1e+124) {
tmp = t_1;
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): t_1 = (x * math.log(y)) + (t + (z + (y * i))) tmp = 0 if a <= 5.8e-124: tmp = t_1 elif a <= 1.15e-86: tmp = a + (z + (math.log(c) * (b - 0.5))) elif a <= 1.1e+124: tmp = t_1 else: tmp = (y * i) + (z + a) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(x * log(y)) + Float64(t + Float64(z + Float64(y * i)))) tmp = 0.0 if (a <= 5.8e-124) tmp = t_1; elseif (a <= 1.15e-86) tmp = Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5)))); elseif (a <= 1.1e+124) tmp = t_1; else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = (x * log(y)) + (t + (z + (y * i)));
tmp = 0.0;
if (a <= 5.8e-124)
tmp = t_1;
elseif (a <= 1.15e-86)
tmp = a + (z + (log(c) * (b - 0.5)));
elseif (a <= 1.1e+124)
tmp = t_1;
else
tmp = (y * i) + (z + a);
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(t + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, 5.8e-124], t$95$1, If[LessEqual[a, 1.15e-86], N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.1e+124], t$95$1, N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := x \cdot \log y + \left(t + \left(z + y \cdot i\right)\right)\\
\mathbf{if}\;a \leq 5.8 \cdot 10^{-124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 1.15 \cdot 10^{-86}:\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{elif}\;a \leq 1.1 \cdot 10^{+124}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if a < 5.8000000000000004e-124 or 1.14999999999999998e-86 < a < 1.1e124Initial program 99.3%
sub-neg76.7%
metadata-eval76.7%
add-cube-cbrt76.6%
pow376.6%
*-commutative76.6%
Applied egg-rr99.2%
Taylor expanded in b around inf 88.3%
Taylor expanded in a around 0 82.2%
if 5.8000000000000004e-124 < a < 1.14999999999999998e-86Initial program 100.0%
+-commutative100.0%
fma-def100.0%
+-commutative100.0%
fma-def100.0%
sub-neg100.0%
metadata-eval100.0%
associate-+l+100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in t around 0 84.2%
+-commutative84.2%
+-commutative84.2%
associate-+l+84.2%
*-commutative84.2%
fma-def84.2%
sub-neg84.2%
metadata-eval84.2%
fma-def84.2%
Simplified84.2%
Taylor expanded in x around 0 81.7%
Taylor expanded in i around 0 32.7%
if 1.1e124 < a Initial program 100.0%
Taylor expanded in x around 0 88.2%
sub-neg88.2%
metadata-eval88.2%
add-cube-cbrt88.1%
pow388.1%
*-commutative88.1%
Applied egg-rr88.1%
Taylor expanded in b around inf 81.2%
+-commutative81.2%
associate-+r+81.2%
Simplified81.2%
Taylor expanded in t around 0 67.2%
Final simplification78.6%
NOTE: z, t, and a should be sorted in increasing order before calling this function.
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (+ z (* y i))))
(if (or (<= x -1.02e+177) (not (<= x 2.05e+103)))
(+ (* x (log y)) (+ t t_1))
(+ a (+ (* (log c) (- b 0.5)) t_1)))))assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = z + (y * i);
double tmp;
if ((x <= -1.02e+177) || !(x <= 2.05e+103)) {
tmp = (x * log(y)) + (t + t_1);
} else {
tmp = a + ((log(c) * (b - 0.5)) + t_1);
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
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 = z + (y * i)
if ((x <= (-1.02d+177)) .or. (.not. (x <= 2.05d+103))) then
tmp = (x * log(y)) + (t + t_1)
else
tmp = a + ((log(c) * (b - 0.5d0)) + t_1)
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double t_1 = z + (y * i);
double tmp;
if ((x <= -1.02e+177) || !(x <= 2.05e+103)) {
tmp = (x * Math.log(y)) + (t + t_1);
} else {
tmp = a + ((Math.log(c) * (b - 0.5)) + t_1);
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): t_1 = z + (y * i) tmp = 0 if (x <= -1.02e+177) or not (x <= 2.05e+103): tmp = (x * math.log(y)) + (t + t_1) else: tmp = a + ((math.log(c) * (b - 0.5)) + t_1) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) t_1 = Float64(z + Float64(y * i)) tmp = 0.0 if ((x <= -1.02e+177) || !(x <= 2.05e+103)) tmp = Float64(Float64(x * log(y)) + Float64(t + t_1)); else tmp = Float64(a + Float64(Float64(log(c) * Float64(b - 0.5)) + t_1)); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
t_1 = z + (y * i);
tmp = 0.0;
if ((x <= -1.02e+177) || ~((x <= 2.05e+103)))
tmp = (x * log(y)) + (t + t_1);
else
tmp = a + ((log(c) * (b - 0.5)) + t_1);
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_, c_, i_] := Block[{t$95$1 = N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[x, -1.02e+177], N[Not[LessEqual[x, 2.05e+103]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(t + t$95$1), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
t_1 := z + y \cdot i\\
\mathbf{if}\;x \leq -1.02 \cdot 10^{+177} \lor \neg \left(x \leq 2.05 \cdot 10^{+103}\right):\\
\;\;\;\;x \cdot \log y + \left(t + t_1\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(\log c \cdot \left(b - 0.5\right) + t_1\right)\\
\end{array}
\end{array}
if x < -1.02e177 or 2.0500000000000001e103 < x Initial program 98.6%
sub-neg42.3%
metadata-eval42.3%
add-cube-cbrt42.3%
pow342.3%
*-commutative42.3%
Applied egg-rr98.5%
Taylor expanded in b around inf 95.0%
Taylor expanded in a around 0 89.7%
if -1.02e177 < x < 2.0500000000000001e103Initial program 99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in t around 0 76.6%
+-commutative76.6%
+-commutative76.6%
associate-+l+76.6%
*-commutative76.6%
fma-def76.6%
sub-neg76.6%
metadata-eval76.6%
fma-def76.6%
Simplified76.6%
Taylor expanded in x around 0 74.4%
Final simplification79.5%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -6.4e+130) (not (<= x 1.06e+102))) (+ (* y i) (+ (* x (log y)) (+ a (+ z t)))) (+ a (+ (* (log c) (- b 0.5)) (+ z (* y i))))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -6.4e+130) || !(x <= 1.06e+102)) {
tmp = (y * i) + ((x * log(y)) + (a + (z + t)));
} else {
tmp = a + ((log(c) * (b - 0.5)) + (z + (y * i)));
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
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 <= (-6.4d+130)) .or. (.not. (x <= 1.06d+102))) then
tmp = (y * i) + ((x * log(y)) + (a + (z + t)))
else
tmp = a + ((log(c) * (b - 0.5d0)) + (z + (y * i)))
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -6.4e+130) || !(x <= 1.06e+102)) {
tmp = (y * i) + ((x * Math.log(y)) + (a + (z + t)));
} else {
tmp = a + ((Math.log(c) * (b - 0.5)) + (z + (y * i)));
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -6.4e+130) or not (x <= 1.06e+102): tmp = (y * i) + ((x * math.log(y)) + (a + (z + t))) else: tmp = a + ((math.log(c) * (b - 0.5)) + (z + (y * i))) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -6.4e+130) || !(x <= 1.06e+102)) tmp = Float64(Float64(y * i) + Float64(Float64(x * log(y)) + Float64(a + Float64(z + t)))); else tmp = Float64(a + Float64(Float64(log(c) * Float64(b - 0.5)) + Float64(z + Float64(y * i)))); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((x <= -6.4e+130) || ~((x <= 1.06e+102)))
tmp = (y * i) + ((x * log(y)) + (a + (z + t)));
else
tmp = a + ((log(c) * (b - 0.5)) + (z + (y * i)));
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -6.4e+130], N[Not[LessEqual[x, 1.06e+102]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision] + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+130} \lor \neg \left(x \leq 1.06 \cdot 10^{+102}\right):\\
\;\;\;\;y \cdot i + \left(x \cdot \log y + \left(a + \left(z + t\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(\log c \cdot \left(b - 0.5\right) + \left(z + y \cdot i\right)\right)\\
\end{array}
\end{array}
if x < -6.4e130 or 1.06000000000000001e102 < x Initial program 98.7%
sub-neg46.4%
metadata-eval46.4%
add-cube-cbrt46.4%
pow346.4%
*-commutative46.4%
Applied egg-rr98.7%
Taylor expanded in b around inf 92.9%
if -6.4e130 < x < 1.06000000000000001e102Initial program 99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.9%
sub-neg99.9%
metadata-eval99.9%
associate-+l+99.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in t around 0 75.2%
+-commutative75.2%
+-commutative75.2%
associate-+l+75.2%
*-commutative75.2%
fma-def75.2%
sub-neg75.2%
metadata-eval75.2%
fma-def75.2%
Simplified75.2%
Taylor expanded in x around 0 75.2%
Final simplification82.1%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= i -1.55e+53) (not (<= i 1.6e-34))) (+ (* y i) (+ z a)) (+ (* x (log y)) (+ a (+ z t)))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -1.55e+53) || !(i <= 1.6e-34)) {
tmp = (y * i) + (z + a);
} else {
tmp = (x * log(y)) + (a + (z + t));
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((i <= (-1.55d+53)) .or. (.not. (i <= 1.6d-34))) then
tmp = (y * i) + (z + a)
else
tmp = (x * log(y)) + (a + (z + t))
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((i <= -1.55e+53) || !(i <= 1.6e-34)) {
tmp = (y * i) + (z + a);
} else {
tmp = (x * Math.log(y)) + (a + (z + t));
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (i <= -1.55e+53) or not (i <= 1.6e-34): tmp = (y * i) + (z + a) else: tmp = (x * math.log(y)) + (a + (z + t)) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((i <= -1.55e+53) || !(i <= 1.6e-34)) tmp = Float64(Float64(y * i) + Float64(z + a)); else tmp = Float64(Float64(x * log(y)) + Float64(a + Float64(z + t))); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((i <= -1.55e+53) || ~((i <= 1.6e-34)))
tmp = (y * i) + (z + a);
else
tmp = (x * log(y)) + (a + (z + t));
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[i, -1.55e+53], N[Not[LessEqual[i, 1.6e-34]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.55 \cdot 10^{+53} \lor \neg \left(i \leq 1.6 \cdot 10^{-34}\right):\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \log y + \left(a + \left(z + t\right)\right)\\
\end{array}
\end{array}
if i < -1.5500000000000001e53 or 1.60000000000000001e-34 < i Initial program 99.0%
Taylor expanded in x around 0 87.3%
sub-neg87.3%
metadata-eval87.3%
add-cube-cbrt87.3%
pow387.3%
*-commutative87.3%
Applied egg-rr87.3%
Taylor expanded in b around inf 78.2%
+-commutative78.2%
associate-+r+78.2%
Simplified78.2%
Taylor expanded in t around 0 65.0%
if -1.5500000000000001e53 < i < 1.60000000000000001e-34Initial program 99.9%
sub-neg71.7%
metadata-eval71.7%
add-cube-cbrt71.6%
pow371.5%
*-commutative71.5%
Applied egg-rr99.7%
Taylor expanded in b around inf 87.6%
Taylor expanded in y around 0 84.1%
Final simplification75.1%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= i -9e-57) (+ (* y i) (+ t (+ z a))) (if (<= i 215.0) (+ a (+ z (* (log c) (- b 0.5)))) (+ (* y i) (+ z a)))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (i <= -9e-57) {
tmp = (y * i) + (t + (z + a));
} else if (i <= 215.0) {
tmp = a + (z + (log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (i <= (-9d-57)) then
tmp = (y * i) + (t + (z + a))
else if (i <= 215.0d0) then
tmp = a + (z + (log(c) * (b - 0.5d0)))
else
tmp = (y * i) + (z + a)
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (i <= -9e-57) {
tmp = (y * i) + (t + (z + a));
} else if (i <= 215.0) {
tmp = a + (z + (Math.log(c) * (b - 0.5)));
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if i <= -9e-57: tmp = (y * i) + (t + (z + a)) elif i <= 215.0: tmp = a + (z + (math.log(c) * (b - 0.5))) else: tmp = (y * i) + (z + a) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (i <= -9e-57) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + a))); elseif (i <= 215.0) tmp = Float64(a + Float64(z + Float64(log(c) * Float64(b - 0.5)))); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (i <= -9e-57)
tmp = (y * i) + (t + (z + a));
elseif (i <= 215.0)
tmp = a + (z + (log(c) * (b - 0.5)));
else
tmp = (y * i) + (z + a);
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[i, -9e-57], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[i, 215.0], N[(a + N[(z + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;i \leq -9 \cdot 10^{-57}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\
\mathbf{elif}\;i \leq 215:\\
\;\;\;\;a + \left(z + \log c \cdot \left(b - 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if i < -8.99999999999999945e-57Initial program 99.9%
Taylor expanded in x around 0 84.4%
sub-neg84.4%
metadata-eval84.4%
add-cube-cbrt84.4%
pow384.4%
*-commutative84.4%
Applied egg-rr84.4%
Taylor expanded in b around inf 83.1%
+-commutative83.1%
associate-+r+83.1%
Simplified83.1%
if -8.99999999999999945e-57 < i < 215Initial program 99.9%
+-commutative99.9%
fma-def99.9%
+-commutative99.9%
fma-def99.8%
sub-neg99.8%
metadata-eval99.8%
associate-+l+99.8%
fma-def99.8%
Simplified99.8%
Taylor expanded in t around 0 77.7%
+-commutative77.7%
+-commutative77.7%
associate-+l+77.7%
*-commutative77.7%
fma-def77.7%
sub-neg77.7%
metadata-eval77.7%
fma-def77.7%
Simplified77.7%
Taylor expanded in x around 0 51.8%
Taylor expanded in i around 0 49.7%
if 215 < i Initial program 97.9%
Taylor expanded in x around 0 86.3%
sub-neg86.3%
metadata-eval86.3%
add-cube-cbrt86.3%
pow386.3%
*-commutative86.3%
Applied egg-rr86.3%
Taylor expanded in b around inf 72.8%
+-commutative72.8%
associate-+r+72.8%
Simplified72.8%
Taylor expanded in t around 0 61.2%
Final simplification61.9%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -9.8e+243) (not (<= x 2e+153))) (* x (log y)) (+ (* y i) (+ t (+ z a)))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -9.8e+243) || !(x <= 2e+153)) {
tmp = x * log(y);
} else {
tmp = (y * i) + (t + (z + a));
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
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.8d+243)) .or. (.not. (x <= 2d+153))) then
tmp = x * log(y)
else
tmp = (y * i) + (t + (z + a))
end if
code = tmp
end function
assert z < t && t < a;
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.8e+243) || !(x <= 2e+153)) {
tmp = x * Math.log(y);
} else {
tmp = (y * i) + (t + (z + a));
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -9.8e+243) or not (x <= 2e+153): tmp = x * math.log(y) else: tmp = (y * i) + (t + (z + a)) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -9.8e+243) || !(x <= 2e+153)) tmp = Float64(x * log(y)); else tmp = Float64(Float64(y * i) + Float64(t + Float64(z + a))); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if ((x <= -9.8e+243) || ~((x <= 2e+153)))
tmp = x * log(y);
else
tmp = (y * i) + (t + (z + a));
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -9.8e+243], N[Not[LessEqual[x, 2e+153]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.8 \cdot 10^{+243} \lor \neg \left(x \leq 2 \cdot 10^{+153}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\
\end{array}
\end{array}
if x < -9.79999999999999967e243 or 2e153 < x Initial program 97.9%
+-commutative97.9%
fma-def97.9%
+-commutative97.9%
fma-def97.9%
sub-neg97.9%
metadata-eval97.9%
associate-+l+97.9%
fma-def97.9%
Simplified97.9%
Taylor expanded in t around 0 96.1%
+-commutative96.1%
+-commutative96.1%
associate-+l+96.1%
*-commutative96.1%
fma-def96.1%
sub-neg96.1%
metadata-eval96.1%
fma-def96.1%
Simplified96.1%
Taylor expanded in x around inf 65.2%
if -9.79999999999999967e243 < x < 2e153Initial program 99.9%
Taylor expanded in x around 0 93.6%
sub-neg93.6%
metadata-eval93.6%
add-cube-cbrt93.5%
pow393.5%
*-commutative93.5%
Applied egg-rr93.5%
Taylor expanded in b around inf 80.2%
+-commutative80.2%
associate-+r+80.2%
Simplified80.2%
Final simplification76.7%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= b -3e+229) (* b (log c)) (+ (* y i) (+ t (+ z a)))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (b <= -3e+229) {
tmp = b * log(c);
} else {
tmp = (y * i) + (t + (z + a));
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
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 <= (-3d+229)) then
tmp = b * log(c)
else
tmp = (y * i) + (t + (z + a))
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (b <= -3e+229) {
tmp = b * Math.log(c);
} else {
tmp = (y * i) + (t + (z + a));
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if b <= -3e+229: tmp = b * math.log(c) else: tmp = (y * i) + (t + (z + a)) return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (b <= -3e+229) tmp = Float64(b * log(c)); else tmp = Float64(Float64(y * i) + Float64(t + Float64(z + a))); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (b <= -3e+229)
tmp = b * log(c);
else
tmp = (y * i) + (t + (z + a));
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[b, -3e+229], N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3 \cdot 10^{+229}:\\
\;\;\;\;b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + a\right)\right)\\
\end{array}
\end{array}
if b < -2.99999999999999998e229Initial program 99.3%
Taylor expanded in b around inf 58.8%
if -2.99999999999999998e229 < b Initial program 99.5%
Taylor expanded in x around 0 79.2%
sub-neg79.2%
metadata-eval79.2%
add-cube-cbrt79.1%
pow379.1%
*-commutative79.1%
Applied egg-rr79.1%
Taylor expanded in b around inf 70.9%
+-commutative70.9%
associate-+r+70.9%
Simplified70.9%
Final simplification70.4%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= i -1.6e+122) (* y i) (if (<= i 2.9e+102) (+ a (+ z t)) (* y i))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (i <= -1.6e+122) {
tmp = y * i;
} else if (i <= 2.9e+102) {
tmp = a + (z + t);
} else {
tmp = y * i;
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (i <= (-1.6d+122)) then
tmp = y * i
else if (i <= 2.9d+102) then
tmp = a + (z + t)
else
tmp = y * i
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (i <= -1.6e+122) {
tmp = y * i;
} else if (i <= 2.9e+102) {
tmp = a + (z + t);
} else {
tmp = y * i;
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if i <= -1.6e+122: tmp = y * i elif i <= 2.9e+102: tmp = a + (z + t) else: tmp = y * i return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (i <= -1.6e+122) tmp = Float64(y * i); elseif (i <= 2.9e+102) tmp = Float64(a + Float64(z + t)); else tmp = Float64(y * i); end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (i <= -1.6e+122)
tmp = y * i;
elseif (i <= 2.9e+102)
tmp = a + (z + t);
else
tmp = y * i;
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[i, -1.6e+122], N[(y * i), $MachinePrecision], If[LessEqual[i, 2.9e+102], N[(a + N[(z + t), $MachinePrecision]), $MachinePrecision], N[(y * i), $MachinePrecision]]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;i \leq -1.6 \cdot 10^{+122}:\\
\;\;\;\;y \cdot i\\
\mathbf{elif}\;i \leq 2.9 \cdot 10^{+102}:\\
\;\;\;\;a + \left(z + t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i\\
\end{array}
\end{array}
if i < -1.60000000000000006e122 or 2.9000000000000002e102 < i Initial program 99.9%
Taylor expanded in y around inf 60.6%
*-commutative60.6%
Simplified60.6%
if -1.60000000000000006e122 < i < 2.9000000000000002e102Initial program 99.3%
Taylor expanded in x around 0 75.7%
sub-neg75.7%
metadata-eval75.7%
add-cube-cbrt75.6%
pow375.6%
*-commutative75.6%
Applied egg-rr75.6%
Taylor expanded in b around inf 62.8%
+-commutative62.8%
associate-+r+62.8%
Simplified62.8%
Taylor expanded in y around 0 54.7%
+-commutative54.7%
Simplified54.7%
Final simplification56.4%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ t (+ z a))))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (t + (z + a));
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
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) + (t + (z + a))
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (t + (z + a));
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): return (y * i) + (t + (z + a))
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(t + Float64(z + a))) end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = (y * i) + (t + (z + a));
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
y \cdot i + \left(t + \left(z + a\right)\right)
\end{array}
Initial program 99.5%
Taylor expanded in x around 0 79.0%
sub-neg79.0%
metadata-eval79.0%
add-cube-cbrt78.9%
pow378.9%
*-commutative78.9%
Applied egg-rr78.9%
Taylor expanded in b around inf 68.3%
+-commutative68.3%
associate-+r+68.3%
Simplified68.3%
Final simplification68.3%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 4.5e-110) z (if (<= a 2.5e+193) (* y i) a)))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4.5e-110) {
tmp = z;
} else if (a <= 2.5e+193) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 4.5d-110) then
tmp = z
else if (a <= 2.5d+193) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4.5e-110) {
tmp = z;
} else if (a <= 2.5e+193) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 4.5e-110: tmp = z elif a <= 2.5e+193: tmp = y * i else: tmp = a return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 4.5e-110) tmp = z; elseif (a <= 2.5e+193) tmp = Float64(y * i); else tmp = a; end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 4.5e-110)
tmp = z;
elseif (a <= 2.5e+193)
tmp = y * i;
else
tmp = a;
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 4.5e-110], z, If[LessEqual[a, 2.5e+193], N[(y * i), $MachinePrecision], a]]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.5 \cdot 10^{-110}:\\
\;\;\;\;z\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+193}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 4.5000000000000001e-110Initial program 99.2%
Taylor expanded in z around inf 19.8%
if 4.5000000000000001e-110 < a < 2.49999999999999986e193Initial program 99.8%
Taylor expanded in y around inf 27.5%
*-commutative27.5%
Simplified27.5%
if 2.49999999999999986e193 < a Initial program 99.9%
Taylor expanded in a around inf 40.9%
Final simplification23.7%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ z a)))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + a);
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
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
assert z < t && t < a;
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);
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): return (y * i) + (z + a)
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(z + a)) end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = (y * i) + (z + a);
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
y \cdot i + \left(z + a\right)
\end{array}
Initial program 99.5%
Taylor expanded in x around 0 79.0%
sub-neg79.0%
metadata-eval79.0%
add-cube-cbrt78.9%
pow378.9%
*-commutative78.9%
Applied egg-rr78.9%
Taylor expanded in b around inf 68.3%
+-commutative68.3%
associate-+r+68.3%
Simplified68.3%
Taylor expanded in t around 0 51.6%
Final simplification51.6%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.35e+168) z a))
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.35e+168) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 1.35d+168) then
tmp = z
else
tmp = a
end if
code = tmp
end function
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.35e+168) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.35e+168: tmp = z else: tmp = a return tmp
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.35e+168) tmp = z; else tmp = a; end return tmp end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp_2 = code(x, y, z, t, a, b, c, i)
tmp = 0.0;
if (a <= 1.35e+168)
tmp = z;
else
tmp = a;
end
tmp_2 = tmp;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.35e+168], z, a]
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.35 \cdot 10^{+168}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 1.35000000000000008e168Initial program 99.4%
Taylor expanded in z around inf 20.4%
if 1.35000000000000008e168 < a Initial program 100.0%
Taylor expanded in a around inf 36.7%
Final simplification22.6%
NOTE: z, t, and a should be sorted in increasing order before calling this function. (FPCore (x y z t a b c i) :precision binary64 a)
assert(z < t && t < a);
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
NOTE: z, t, and a should be sorted in increasing order before calling this function.
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
assert z < t && t < a;
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a;
}
[z, t, a] = sort([z, t, a]) def code(x, y, z, t, a, b, c, i): return a
z, t, a = sort([z, t, a]) function code(x, y, z, t, a, b, c, i) return a end
z, t, a = num2cell(sort([z, t, a])){:}
function tmp = code(x, y, z, t, a, b, c, i)
tmp = a;
end
NOTE: z, t, and a should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_, c_, i_] := a
\begin{array}{l}
[z, t, a] = \mathsf{sort}([z, t, a])\\
\\
a
\end{array}
Initial program 99.5%
Taylor expanded in a around inf 11.8%
Final simplification11.8%
herbie shell --seed 2023238
(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)))