
(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}
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ a (+ t (+ (* x (log y)) z))) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return ((a + (t + ((x * log(y)) + z))) + ((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 = ((a + (t + ((x * log(y)) + z))) + ((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 ((a + (t + ((x * Math.log(y)) + z))) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return ((a + (t + ((x * math.log(y)) + z))) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = ((a + (t + ((x * log(y)) + z))) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Initial program 99.9%
Final simplification99.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 2.25e+126) (+ (* y i) (+ t (+ z (+ (* x (log y)) (* b (log c)))))) (+ (* y i) (+ a (+ (+ z t) (* (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 (a <= 2.25e+126) {
tmp = (y * i) + (t + (z + ((x * log(y)) + (b * log(c)))));
} else {
tmp = (y * i) + (a + ((z + t) + (log(c) * (b + -0.5))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 2.25d+126) then
tmp = (y * i) + (t + (z + ((x * log(y)) + (b * log(c)))))
else
tmp = (y * i) + (a + ((z + t) + (log(c) * (b + (-0.5d0)))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 2.25e+126) {
tmp = (y * i) + (t + (z + ((x * Math.log(y)) + (b * Math.log(c)))));
} else {
tmp = (y * i) + (a + ((z + t) + (Math.log(c) * (b + -0.5))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 2.25e+126: tmp = (y * i) + (t + (z + ((x * math.log(y)) + (b * math.log(c))))) else: tmp = (y * i) + (a + ((z + t) + (math.log(c) * (b + -0.5)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 2.25e+126) tmp = Float64(Float64(y * i) + Float64(t + Float64(z + Float64(Float64(x * log(y)) + Float64(b * log(c)))))); else tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(z + t) + Float64(log(c) * Float64(b + -0.5))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 2.25e+126) tmp = (y * i) + (t + (z + ((x * log(y)) + (b * log(c))))); else tmp = (y * i) + (a + ((z + t) + (log(c) * (b + -0.5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 2.25e+126], N[(N[(y * i), $MachinePrecision] + N[(t + N[(z + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 2.25 \cdot 10^{+126}:\\
\;\;\;\;y \cdot i + \left(t + \left(z + \left(x \cdot \log y + b \cdot \log c\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(\left(z + t\right) + \log c \cdot \left(b + -0.5\right)\right)\right)\\
\end{array}
\end{array}
if a < 2.24999999999999987e126Initial program 99.9%
Taylor expanded in b around inf 96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in a around 0 83.1%
if 2.24999999999999987e126 < a Initial program 100.0%
Taylor expanded in x around 0 94.3%
associate-+r+94.3%
sub-neg94.3%
metadata-eval94.3%
+-commutative94.3%
Simplified94.3%
Final simplification85.0%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ (+ a (+ t (+ (* x (log y)) z))) (* 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 + ((x * log(y)) + z))) + (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 + ((x * log(y)) + z))) + (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 + ((x * Math.log(y)) + z))) + (b * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (t + ((x * math.log(y)) + z))) + (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(Float64(x * log(y)) + z))) + Float64(b * log(c)))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + ((a + (t + ((x * log(y)) + z))) + (b * log(c))); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.9%
Taylor expanded in b around inf 97.4%
*-commutative97.4%
Simplified97.4%
Final simplification97.4%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (- b 0.5) (log c))))
(if (<= (- b 0.5) -1e+194)
(+ (* y i) (+ z t_1))
(if (<= (- b 0.5) 2e+149)
(+ (+ a (+ t (+ (* x (log y)) z))) (* y i))
(+ (* 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 = (b - 0.5) * log(c);
double tmp;
if ((b - 0.5) <= -1e+194) {
tmp = (y * i) + (z + t_1);
} else if ((b - 0.5) <= 2e+149) {
tmp = (a + (t + ((x * log(y)) + z))) + (y * i);
} 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) :: tmp
t_1 = (b - 0.5d0) * log(c)
if ((b - 0.5d0) <= (-1d+194)) then
tmp = (y * i) + (z + t_1)
else if ((b - 0.5d0) <= 2d+149) then
tmp = (a + (t + ((x * log(y)) + z))) + (y * i)
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 = (b - 0.5) * Math.log(c);
double tmp;
if ((b - 0.5) <= -1e+194) {
tmp = (y * i) + (z + t_1);
} else if ((b - 0.5) <= 2e+149) {
tmp = (a + (t + ((x * Math.log(y)) + z))) + (y * i);
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = (b - 0.5) * math.log(c) tmp = 0 if (b - 0.5) <= -1e+194: tmp = (y * i) + (z + t_1) elif (b - 0.5) <= 2e+149: tmp = (a + (t + ((x * math.log(y)) + z))) + (y * i) else: tmp = (y * i) + (a + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(Float64(b - 0.5) * log(c)) tmp = 0.0 if (Float64(b - 0.5) <= -1e+194) tmp = Float64(Float64(y * i) + Float64(z + t_1)); elseif (Float64(b - 0.5) <= 2e+149) tmp = Float64(Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))) + Float64(y * i)); 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 = (b - 0.5) * log(c); tmp = 0.0; if ((b - 0.5) <= -1e+194) tmp = (y * i) + (z + t_1); elseif ((b - 0.5) <= 2e+149) tmp = (a + (t + ((x * log(y)) + z))) + (y * i); 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[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(b - 0.5), $MachinePrecision], -1e+194], N[(N[(y * i), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(b - 0.5), $MachinePrecision], 2e+149], N[(N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(b - 0.5\right) \cdot \log c\\
\mathbf{if}\;b - 0.5 \leq -1 \cdot 10^{+194}:\\
\;\;\;\;y \cdot i + \left(z + t_1\right)\\
\mathbf{elif}\;b - 0.5 \leq 2 \cdot 10^{+149}:\\
\;\;\;\;\left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t_1\right)\\
\end{array}
\end{array}
if (-.f64 b 1/2) < -9.99999999999999945e193Initial program 99.9%
Taylor expanded in x around 0 99.9%
associate-+r+99.9%
sub-neg99.9%
metadata-eval99.9%
+-commutative99.9%
Simplified99.9%
Taylor expanded in t around 0 96.0%
associate-+r+96.0%
sub-neg96.0%
metadata-eval96.0%
+-commutative96.0%
Simplified96.0%
Taylor expanded in a around 0 72.2%
if -9.99999999999999945e193 < (-.f64 b 1/2) < 2.0000000000000001e149Initial program 99.9%
Taylor expanded in b around inf 96.9%
*-commutative96.9%
Simplified96.9%
Taylor expanded in b around 0 93.7%
if 2.0000000000000001e149 < (-.f64 b 1/2) Initial program 99.7%
Taylor expanded in x around 0 91.5%
associate-+r+91.5%
sub-neg91.5%
metadata-eval91.5%
+-commutative91.5%
Simplified91.5%
Taylor expanded in t around 0 88.3%
associate-+r+88.3%
sub-neg88.3%
metadata-eval88.3%
+-commutative88.3%
Simplified88.3%
Taylor expanded in z around 0 82.1%
Final simplification90.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= z -8.5e+165) (and (not (<= z -2.35e+142)) (<= z -2.9e+87))) (+ (* y i) (+ z a)) (+ (* y i) (+ a (* (- b 0.5) (log c))))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z <= -8.5e+165) || (!(z <= -2.35e+142) && (z <= -2.9e+87))) {
tmp = (y * i) + (z + a);
} else {
tmp = (y * i) + (a + ((b - 0.5) * log(c)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((z <= (-8.5d+165)) .or. (.not. (z <= (-2.35d+142))) .and. (z <= (-2.9d+87))) then
tmp = (y * i) + (z + a)
else
tmp = (y * i) + (a + ((b - 0.5d0) * log(c)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((z <= -8.5e+165) || (!(z <= -2.35e+142) && (z <= -2.9e+87))) {
tmp = (y * i) + (z + a);
} else {
tmp = (y * i) + (a + ((b - 0.5) * Math.log(c)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (z <= -8.5e+165) or (not (z <= -2.35e+142) and (z <= -2.9e+87)): tmp = (y * i) + (z + a) else: tmp = (y * i) + (a + ((b - 0.5) * math.log(c))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((z <= -8.5e+165) || (!(z <= -2.35e+142) && (z <= -2.9e+87))) tmp = Float64(Float64(y * i) + Float64(z + a)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(b - 0.5) * log(c)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((z <= -8.5e+165) || (~((z <= -2.35e+142)) && (z <= -2.9e+87))) tmp = (y * i) + (z + a); else tmp = (y * i) + (a + ((b - 0.5) * log(c))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[z, -8.5e+165], And[N[Not[LessEqual[z, -2.35e+142]], $MachinePrecision], LessEqual[z, -2.9e+87]]], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.5 \cdot 10^{+165} \lor \neg \left(z \leq -2.35 \cdot 10^{+142}\right) \land z \leq -2.9 \cdot 10^{+87}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(b - 0.5\right) \cdot \log c\right)\\
\end{array}
\end{array}
if z < -8.5000000000000001e165 or -2.35e142 < z < -2.8999999999999998e87Initial program 99.9%
Taylor expanded in x around 0 92.6%
associate-+r+92.6%
sub-neg92.6%
metadata-eval92.6%
+-commutative92.6%
Simplified92.6%
Taylor expanded in z around inf 73.0%
if -8.5000000000000001e165 < z < -2.35e142 or -2.8999999999999998e87 < z Initial program 99.9%
Taylor expanded in x around 0 84.7%
associate-+r+84.7%
sub-neg84.7%
metadata-eval84.7%
+-commutative84.7%
Simplified84.7%
Taylor expanded in t around 0 72.4%
associate-+r+72.4%
sub-neg72.4%
metadata-eval72.4%
+-commutative72.4%
Simplified72.4%
Taylor expanded in z around 0 61.9%
Final simplification63.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1e+81) (not (<= x 5.1e+33))) (+ (+ a (+ t (+ (* x (log y)) z))) (* y i)) (+ (* y i) (+ a (+ (+ z t) (* (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 <= -1e+81) || !(x <= 5.1e+33)) {
tmp = (a + (t + ((x * log(y)) + z))) + (y * i);
} else {
tmp = (y * i) + (a + ((z + t) + (log(c) * (b + -0.5))));
}
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 <= (-1d+81)) .or. (.not. (x <= 5.1d+33))) then
tmp = (a + (t + ((x * log(y)) + z))) + (y * i)
else
tmp = (y * i) + (a + ((z + t) + (log(c) * (b + (-0.5d0)))))
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 <= -1e+81) || !(x <= 5.1e+33)) {
tmp = (a + (t + ((x * Math.log(y)) + z))) + (y * i);
} else {
tmp = (y * i) + (a + ((z + t) + (Math.log(c) * (b + -0.5))));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1e+81) or not (x <= 5.1e+33): tmp = (a + (t + ((x * math.log(y)) + z))) + (y * i) else: tmp = (y * i) + (a + ((z + t) + (math.log(c) * (b + -0.5)))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1e+81) || !(x <= 5.1e+33)) tmp = Float64(Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(a + Float64(Float64(z + t) + Float64(log(c) * Float64(b + -0.5))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1e+81) || ~((x <= 5.1e+33))) tmp = (a + (t + ((x * log(y)) + z))) + (y * i); else tmp = (y * i) + (a + ((z + t) + (log(c) * (b + -0.5)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1e+81], N[Not[LessEqual[x, 5.1e+33]], $MachinePrecision]], N[(N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[(z + t), $MachinePrecision] + N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+81} \lor \neg \left(x \leq 5.1 \cdot 10^{+33}\right):\\
\;\;\;\;\left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \left(\left(z + t\right) + \log c \cdot \left(b + -0.5\right)\right)\right)\\
\end{array}
\end{array}
if x < -9.99999999999999921e80 or 5.0999999999999999e33 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 89.5%
if -9.99999999999999921e80 < x < 5.0999999999999999e33Initial program 99.9%
Taylor expanded in x around 0 99.3%
associate-+r+99.3%
sub-neg99.3%
metadata-eval99.3%
+-commutative99.3%
Simplified99.3%
Final simplification95.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5e+72) (not (<= x 6.2e+34))) (+ (+ a (+ t (+ (* x (log y)) z))) (* y i)) (+ (* y i) (+ (* (log c) (+ b -0.5)) (+ z a)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5e+72) || !(x <= 6.2e+34)) {
tmp = (a + (t + ((x * log(y)) + z))) + (y * i);
} else {
tmp = (y * i) + ((log(c) * (b + -0.5)) + (z + a));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-5d+72)) .or. (.not. (x <= 6.2d+34))) then
tmp = (a + (t + ((x * log(y)) + z))) + (y * i)
else
tmp = (y * i) + ((log(c) * (b + (-0.5d0))) + (z + a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5e+72) || !(x <= 6.2e+34)) {
tmp = (a + (t + ((x * Math.log(y)) + z))) + (y * i);
} else {
tmp = (y * i) + ((Math.log(c) * (b + -0.5)) + (z + a));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -5e+72) or not (x <= 6.2e+34): tmp = (a + (t + ((x * math.log(y)) + z))) + (y * i) else: tmp = (y * i) + ((math.log(c) * (b + -0.5)) + (z + a)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -5e+72) || !(x <= 6.2e+34)) tmp = Float64(Float64(a + Float64(t + Float64(Float64(x * log(y)) + z))) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(Float64(log(c) * Float64(b + -0.5)) + Float64(z + a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -5e+72) || ~((x <= 6.2e+34))) tmp = (a + (t + ((x * log(y)) + z))) + (y * i); else tmp = (y * i) + ((log(c) * (b + -0.5)) + (z + a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5e+72], N[Not[LessEqual[x, 6.2e+34]], $MachinePrecision]], N[(N[(a + N[(t + N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(N[(N[Log[c], $MachinePrecision] * N[(b + -0.5), $MachinePrecision]), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+72} \lor \neg \left(x \leq 6.2 \cdot 10^{+34}\right):\\
\;\;\;\;\left(a + \left(t + \left(x \cdot \log y + z\right)\right)\right) + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(\log c \cdot \left(b + -0.5\right) + \left(z + a\right)\right)\\
\end{array}
\end{array}
if x < -4.99999999999999992e72 or 6.19999999999999955e34 < x Initial program 99.8%
Taylor expanded in b around inf 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in b around 0 89.5%
if -4.99999999999999992e72 < x < 6.19999999999999955e34Initial program 99.9%
Taylor expanded in x around 0 99.3%
associate-+r+99.3%
sub-neg99.3%
metadata-eval99.3%
+-commutative99.3%
Simplified99.3%
Taylor expanded in t around 0 86.5%
associate-+r+86.5%
sub-neg86.5%
metadata-eval86.5%
+-commutative86.5%
Simplified86.5%
Final simplification87.7%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.8e+220) (not (<= x 3.1e+218))) (+ (* x (log y)) (* y i)) (+ (* y i) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.8e+220) || !(x <= 3.1e+218)) {
tmp = (x * log(y)) + (y * i);
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-1.8d+220)) .or. (.not. (x <= 3.1d+218))) then
tmp = (x * log(y)) + (y * i)
else
tmp = (y * i) + (z + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -1.8e+220) || !(x <= 3.1e+218)) {
tmp = (x * Math.log(y)) + (y * i);
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -1.8e+220) or not (x <= 3.1e+218): tmp = (x * math.log(y)) + (y * i) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -1.8e+220) || !(x <= 3.1e+218)) tmp = Float64(Float64(x * log(y)) + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -1.8e+220) || ~((x <= 3.1e+218))) tmp = (x * log(y)) + (y * i); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -1.8e+220], N[Not[LessEqual[x, 3.1e+218]], $MachinePrecision]], N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.8 \cdot 10^{+220} \lor \neg \left(x \leq 3.1 \cdot 10^{+218}\right):\\
\;\;\;\;x \cdot \log y + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if x < -1.80000000000000009e220 or 3.1000000000000002e218 < x Initial program 99.6%
flip--86.9%
associate-*l/86.9%
fma-neg86.9%
metadata-eval86.9%
metadata-eval86.9%
Applied egg-rr86.9%
Taylor expanded in x around inf 75.3%
if -1.80000000000000009e220 < x < 3.1000000000000002e218Initial program 99.9%
Taylor expanded in x around 0 94.1%
associate-+r+94.1%
sub-neg94.1%
metadata-eval94.1%
+-commutative94.1%
Simplified94.1%
Taylor expanded in z around inf 65.5%
Final simplification66.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -2.6e+230) (not (<= b 8.2e+167))) (+ (* y i) (* b (log c))) (+ (* y i) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -2.6e+230) || !(b <= 8.2e+167)) {
tmp = (y * i) + (b * log(c));
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((b <= (-2.6d+230)) .or. (.not. (b <= 8.2d+167))) then
tmp = (y * i) + (b * log(c))
else
tmp = (y * i) + (z + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -2.6e+230) || !(b <= 8.2e+167)) {
tmp = (y * i) + (b * Math.log(c));
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -2.6e+230) or not (b <= 8.2e+167): tmp = (y * i) + (b * math.log(c)) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -2.6e+230) || !(b <= 8.2e+167)) tmp = Float64(Float64(y * i) + Float64(b * log(c))); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -2.6e+230) || ~((b <= 8.2e+167))) tmp = (y * i) + (b * log(c)); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -2.6e+230], N[Not[LessEqual[b, 8.2e+167]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.6 \cdot 10^{+230} \lor \neg \left(b \leq 8.2 \cdot 10^{+167}\right):\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if b < -2.5999999999999999e230 or 8.2e167 < b Initial program 99.7%
Taylor expanded in x around 0 93.6%
associate-+r+93.6%
sub-neg93.6%
metadata-eval93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in t around 0 89.4%
associate-+r+89.4%
sub-neg89.4%
metadata-eval89.4%
+-commutative89.4%
Simplified89.4%
Taylor expanded in b around inf 80.2%
*-commutative80.2%
Simplified80.2%
if -2.5999999999999999e230 < b < 8.2e167Initial program 99.9%
Taylor expanded in x around 0 84.5%
associate-+r+84.5%
sub-neg84.5%
metadata-eval84.5%
+-commutative84.5%
Simplified84.5%
Taylor expanded in z around inf 65.2%
Final simplification67.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 1.75e+74) (+ (* y i) (+ z (* (- b 0.5) (log c)))) (+ (* y i) (+ z a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.75e+74) {
tmp = (y * i) + (z + ((b - 0.5) * log(c)));
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 1.75d+74) then
tmp = (y * i) + (z + ((b - 0.5d0) * log(c)))
else
tmp = (y * i) + (z + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 1.75e+74) {
tmp = (y * i) + (z + ((b - 0.5) * Math.log(c)));
} else {
tmp = (y * i) + (z + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 1.75e+74: tmp = (y * i) + (z + ((b - 0.5) * math.log(c))) else: tmp = (y * i) + (z + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 1.75e+74) tmp = Float64(Float64(y * i) + Float64(z + Float64(Float64(b - 0.5) * log(c)))); else tmp = Float64(Float64(y * i) + Float64(z + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 1.75e+74) tmp = (y * i) + (z + ((b - 0.5) * log(c))); else tmp = (y * i) + (z + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 1.75e+74], N[(N[(y * i), $MachinePrecision] + N[(z + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 1.75 \cdot 10^{+74}:\\
\;\;\;\;y \cdot i + \left(z + \left(b - 0.5\right) \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(z + a\right)\\
\end{array}
\end{array}
if a < 1.75000000000000007e74Initial program 99.9%
Taylor expanded in x around 0 83.8%
associate-+r+83.8%
sub-neg83.8%
metadata-eval83.8%
+-commutative83.8%
Simplified83.8%
Taylor expanded in t around 0 70.8%
associate-+r+70.8%
sub-neg70.8%
metadata-eval70.8%
+-commutative70.8%
Simplified70.8%
Taylor expanded in a around 0 58.4%
if 1.75000000000000007e74 < a Initial program 100.0%
Taylor expanded in x around 0 94.2%
associate-+r+94.2%
sub-neg94.2%
metadata-eval94.2%
+-commutative94.2%
Simplified94.2%
Taylor expanded in z around inf 83.2%
Final simplification63.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.2e+158) (+ z (* y i)) (+ (* y i) (+ t a))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.2e+158) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (t + a);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-2.2d+158)) then
tmp = z + (y * i)
else
tmp = (y * i) + (t + a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.2e+158) {
tmp = z + (y * i);
} else {
tmp = (y * i) + (t + a);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.2e+158: tmp = z + (y * i) else: tmp = (y * i) + (t + a) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.2e+158) tmp = Float64(z + Float64(y * i)); else tmp = Float64(Float64(y * i) + Float64(t + a)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2.2e+158) tmp = z + (y * i); else tmp = (y * i) + (t + a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.2e+158], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(t + a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.2 \cdot 10^{+158}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(t + a\right)\\
\end{array}
\end{array}
if z < -2.2000000000000001e158Initial program 99.9%
Taylor expanded in z around inf 54.2%
if -2.2000000000000001e158 < z Initial program 99.9%
Taylor expanded in x around 0 84.8%
associate-+r+84.8%
sub-neg84.8%
metadata-eval84.8%
+-commutative84.8%
Simplified84.8%
Taylor expanded in t around inf 58.9%
Final simplification58.3%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -2.05e+158) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.05e+158) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (z <= (-2.05d+158)) then
tmp = z + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (z <= -2.05e+158) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -2.05e+158: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -2.05e+158) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (z <= -2.05e+158) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -2.05e+158], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.05 \cdot 10^{+158}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if z < -2.05000000000000002e158Initial program 99.9%
Taylor expanded in z around inf 54.2%
if -2.05000000000000002e158 < z Initial program 99.9%
Taylor expanded in a around inf 47.1%
Final simplification48.1%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 4.2e+157) (* y i) a))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4.2e+157) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 4.2d+157) then
tmp = y * i
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 4.2e+157) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 4.2e+157: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 4.2e+157) tmp = Float64(y * i); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 4.2e+157) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 4.2e+157], N[(y * i), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 4.2 \cdot 10^{+157}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 4.2e157Initial program 99.9%
Taylor expanded in a around inf 39.2%
Taylor expanded in a around 0 26.5%
if 4.2e157 < a Initial program 100.0%
Taylor expanded in a around inf 75.1%
Taylor expanded in a around inf 69.7%
Final simplification32.6%
(FPCore (x y z t a b c i) :precision binary64 (+ (* y i) (+ z a)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + a);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (y * i) + (z + a)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (y * i) + (z + a);
}
def code(x, y, z, t, a, b, c, i): return (y * i) + (z + a)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(y * i) + Float64(z + a)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (y * i) + (z + a); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(y * i), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(z + a\right)
\end{array}
Initial program 99.9%
Taylor expanded in x around 0 85.9%
associate-+r+85.9%
sub-neg85.9%
metadata-eval85.9%
+-commutative85.9%
Simplified85.9%
Taylor expanded in z around inf 59.6%
Final simplification59.6%
(FPCore (x y z t a b c i) :precision binary64 (+ a (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (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 + (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 + (y * i);
}
def code(x, y, z, t, a, b, c, i): return a + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + y \cdot i
\end{array}
Initial program 99.9%
Taylor expanded in a around inf 44.2%
Final simplification44.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 44.2%
Taylor expanded in a around inf 22.3%
Final simplification22.3%
herbie shell --seed 2024018
(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)))