
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b c i) :precision binary64 (+ (+ (+ (+ (+ (* x (log y)) z) t) a) (* (- b 0.5) (log c))) (* y i)))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i);
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
code = (((((x * log(y)) + z) + t) + a) + ((b - 0.5d0) * log(c))) + (y * i)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return (((((x * Math.log(y)) + z) + t) + a) + ((b - 0.5) * Math.log(c))) + (y * i);
}
def code(x, y, z, t, a, b, c, i): return (((((x * math.log(y)) + z) + t) + a) + ((b - 0.5) * math.log(c))) + (y * i)
function code(x, y, z, t, a, b, c, i) return Float64(Float64(Float64(Float64(Float64(Float64(x * log(y)) + z) + t) + a) + Float64(Float64(b - 0.5) * log(c))) + Float64(y * i)) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = (((((x * log(y)) + z) + t) + a) + ((b - 0.5) * log(c))) + (y * i); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(N[(N[(N[(N[(N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision] + t), $MachinePrecision] + a), $MachinePrecision] + N[(N[(b - 0.5), $MachinePrecision] * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * i), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x \cdot \log y + z\right) + t\right) + a\right) + \left(b - 0.5\right) \cdot \log c\right) + y \cdot i
\end{array}
(FPCore (x y z t a b c i) :precision binary64 (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%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.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%
(FPCore (x y z t a b c i)
:precision binary64
(let* ((t_1 (* (log c) (- b 0.5))))
(if (<= t_1 -1e+200)
(+ (* y i) (+ z (* b (log c))))
(if (<= t_1 2e+104)
(+ (* y i) (+ a (+ z (* x (log y)))))
(+ (* 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 = log(c) * (b - 0.5);
double tmp;
if (t_1 <= -1e+200) {
tmp = (y * i) + (z + (b * log(c)));
} else if (t_1 <= 2e+104) {
tmp = (y * i) + (a + (z + (x * log(y))));
} 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 = log(c) * (b - 0.5d0)
if (t_1 <= (-1d+200)) then
tmp = (y * i) + (z + (b * log(c)))
else if (t_1 <= 2d+104) then
tmp = (y * i) + (a + (z + (x * log(y))))
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 = Math.log(c) * (b - 0.5);
double tmp;
if (t_1 <= -1e+200) {
tmp = (y * i) + (z + (b * Math.log(c)));
} else if (t_1 <= 2e+104) {
tmp = (y * i) + (a + (z + (x * Math.log(y))));
} else {
tmp = (y * i) + (a + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): t_1 = math.log(c) * (b - 0.5) tmp = 0 if t_1 <= -1e+200: tmp = (y * i) + (z + (b * math.log(c))) elif t_1 <= 2e+104: tmp = (y * i) + (a + (z + (x * math.log(y)))) else: tmp = (y * i) + (a + t_1) return tmp
function code(x, y, z, t, a, b, c, i) t_1 = Float64(log(c) * Float64(b - 0.5)) tmp = 0.0 if (t_1 <= -1e+200) tmp = Float64(Float64(y * i) + Float64(z + Float64(b * log(c)))); elseif (t_1 <= 2e+104) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); 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 = log(c) * (b - 0.5); tmp = 0.0; if (t_1 <= -1e+200) tmp = (y * i) + (z + (b * log(c))); elseif (t_1 <= 2e+104) tmp = (y * i) + (a + (z + (x * log(y)))); 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[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+200], N[(N[(y * i), $MachinePrecision] + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+104], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \log c \cdot \left(b - 0.5\right)\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+200}:\\
\;\;\;\;y \cdot i + \left(z + b \cdot \log c\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + t\_1\right)\\
\end{array}
\end{array}
if (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < -9.9999999999999997e199Initial program 99.7%
Taylor expanded in x around 0 91.4%
Taylor expanded in z around inf 68.6%
associate-+r+68.6%
sub-neg68.6%
metadata-eval68.6%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in b around inf 68.6%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in z around 0 90.6%
if -9.9999999999999997e199 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) < 2e104Initial program 99.9%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 96.7%
*-commutative96.7%
Simplified96.7%
Taylor expanded in t around 0 81.1%
Taylor expanded in b around 0 78.1%
if 2e104 < (*.f64 (-.f64 b #s(literal 1/2 binary64)) (log.f64 c)) Initial program 99.7%
Taylor expanded in a around inf 77.7%
Final simplification79.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.15e+161) (not (<= x 1.6e+158))) (+ (* y i) (+ a (+ z (* 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.15e+161) || !(x <= 1.6e+158)) {
tmp = (y * i) + (a + (z + (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.15e+161) || !(x <= 1.6e+158)) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + 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.15e+161], N[Not[LessEqual[x, 1.6e+158]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + 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.15 \cdot 10^{+161} \lor \neg \left(x \leq 1.6 \cdot 10^{+158}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + 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.15e161 or 1.59999999999999997e158 < x Initial program 99.7%
add-cbrt-cube99.5%
pow399.5%
Applied egg-rr99.5%
Taylor expanded in b around inf 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t around 0 91.6%
Taylor expanded in b around 0 83.5%
if -1.15e161 < x < 1.59999999999999997e158Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.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.5%
Final simplification94.2%
(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 (+ 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 + (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 + (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 + (z + (x * Math.log(y)))) + (b * Math.log(c)));
}
def code(x, y, z, t, a, b, c, i): return (y * i) + ((a + (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(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 + (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[(z + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot i + \left(\left(a + \left(z + x \cdot \log y\right)\right) + b \cdot \log c\right)
\end{array}
Initial program 99.9%
add-cbrt-cube99.8%
pow399.8%
Applied egg-rr99.8%
Taylor expanded in b around inf 97.4%
*-commutative97.4%
Simplified97.4%
Taylor expanded in t around 0 84.3%
Final simplification84.3%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.3e+160) (not (<= x 1.45e+155))) (+ (* y i) (+ a (+ z (* 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 <= -2.3e+160) || !(x <= 1.45e+155)) {
tmp = (y * i) + (a + (z + (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 <= (-2.3d+160)) .or. (.not. (x <= 1.45d+155))) then
tmp = (y * i) + (a + (z + (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 <= -2.3e+160) || !(x <= 1.45e+155)) {
tmp = (y * i) + (a + (z + (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 <= -2.3e+160) or not (x <= 1.45e+155): tmp = (y * i) + (a + (z + (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 <= -2.3e+160) || !(x <= 1.45e+155)) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + 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 <= -2.3e+160) || ~((x <= 1.45e+155))) tmp = (y * i) + (a + (z + (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, -2.3e+160], N[Not[LessEqual[x, 1.45e+155]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + 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 -2.3 \cdot 10^{+160} \lor \neg \left(x \leq 1.45 \cdot 10^{+155}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + 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 < -2.29999999999999987e160 or 1.45e155 < x Initial program 99.7%
add-cbrt-cube99.5%
pow399.5%
Applied egg-rr99.5%
Taylor expanded in b around inf 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t around 0 91.6%
Taylor expanded in b around 0 83.5%
if -2.29999999999999987e160 < x < 1.45e155Initial program 99.9%
Taylor expanded in x around 0 97.4%
Final simplification94.2%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -1.45e+160) (not (<= x 1e+157))) (+ (* y i) (+ a (+ z (* x (log y))))) (+ (* 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 <= -1.45e+160) || !(x <= 1e+157)) {
tmp = (y * i) + (a + (z + (x * log(y))));
} 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 <= (-1.45d+160)) .or. (.not. (x <= 1d+157))) then
tmp = (y * i) + (a + (z + (x * log(y))))
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 <= -1.45e+160) || !(x <= 1e+157)) {
tmp = (y * i) + (a + (z + (x * Math.log(y))));
} 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 <= -1.45e+160) or not (x <= 1e+157): tmp = (y * i) + (a + (z + (x * math.log(y)))) 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 <= -1.45e+160) || !(x <= 1e+157)) tmp = Float64(Float64(y * i) + Float64(a + Float64(z + Float64(x * log(y))))); 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 <= -1.45e+160) || ~((x <= 1e+157))) tmp = (y * i) + (a + (z + (x * log(y)))); 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, -1.45e+160], N[Not[LessEqual[x, 1e+157]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(a + N[(z + 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[(z + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{+160} \lor \neg \left(x \leq 10^{+157}\right):\\
\;\;\;\;y \cdot i + \left(a + \left(z + x \cdot \log y\right)\right)\\
\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 < -1.45e160 or 9.99999999999999983e156 < x Initial program 99.7%
add-cbrt-cube99.5%
pow399.5%
Applied egg-rr99.5%
Taylor expanded in b around inf 99.5%
*-commutative99.5%
Simplified99.5%
Taylor expanded in t around 0 91.6%
Taylor expanded in b around 0 83.5%
if -1.45e160 < x < 9.99999999999999983e156Initial program 99.9%
Taylor expanded in z around inf 82.6%
Final simplification82.8%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= b -2.25e+179) (not (<= b 1.4e+199))) (+ (* y i) (* b (log c))) (+ a (+ z (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((b <= -2.25e+179) || !(b <= 1.4e+199)) {
tmp = (y * i) + (b * log(c));
} else {
tmp = a + (z + (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 ((b <= (-2.25d+179)) .or. (.not. (b <= 1.4d+199))) then
tmp = (y * i) + (b * log(c))
else
tmp = a + (z + (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 ((b <= -2.25e+179) || !(b <= 1.4e+199)) {
tmp = (y * i) + (b * Math.log(c));
} else {
tmp = a + (z + (y * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (b <= -2.25e+179) or not (b <= 1.4e+199): tmp = (y * i) + (b * math.log(c)) else: tmp = a + (z + (y * i)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((b <= -2.25e+179) || !(b <= 1.4e+199)) tmp = Float64(Float64(y * i) + Float64(b * log(c))); else tmp = Float64(a + Float64(z + Float64(y * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((b <= -2.25e+179) || ~((b <= 1.4e+199))) tmp = (y * i) + (b * log(c)); else tmp = a + (z + (y * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[b, -2.25e+179], N[Not[LessEqual[b, 1.4e+199]], $MachinePrecision]], N[(N[(y * i), $MachinePrecision] + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.25 \cdot 10^{+179} \lor \neg \left(b \leq 1.4 \cdot 10^{+199}\right):\\
\;\;\;\;y \cdot i + b \cdot \log c\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + y \cdot i\right)\\
\end{array}
\end{array}
if b < -2.2500000000000001e179 or 1.40000000000000005e199 < b Initial program 99.7%
Taylor expanded in x around 0 95.7%
Taylor expanded in b around inf 83.0%
*-commutative83.0%
Simplified83.0%
if -2.2500000000000001e179 < b < 1.40000000000000005e199Initial program 99.9%
Taylor expanded in x around 0 83.0%
Taylor expanded in z around inf 63.0%
associate-+r+63.0%
sub-neg63.0%
metadata-eval63.0%
associate-/l*63.0%
Simplified63.0%
Taylor expanded in a around inf 49.5%
Taylor expanded in z around 0 59.5%
*-commutative59.5%
Simplified59.5%
Final simplification64.1%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -5.7e+162) (not (<= x 9e+214))) (+ a (+ t (* x (log y)))) (+ a (+ z (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5.7e+162) || !(x <= 9e+214)) {
tmp = a + (t + (x * log(y)));
} else {
tmp = a + (z + (y * i));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-5.7d+162)) .or. (.not. (x <= 9d+214))) then
tmp = a + (t + (x * log(y)))
else
tmp = a + (z + (y * i))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -5.7e+162) || !(x <= 9e+214)) {
tmp = a + (t + (x * Math.log(y)));
} else {
tmp = a + (z + (y * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -5.7e+162) or not (x <= 9e+214): tmp = a + (t + (x * math.log(y))) else: tmp = a + (z + (y * i)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -5.7e+162) || !(x <= 9e+214)) tmp = Float64(a + Float64(t + Float64(x * log(y)))); else tmp = Float64(a + Float64(z + Float64(y * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -5.7e+162) || ~((x <= 9e+214))) tmp = a + (t + (x * log(y))); else tmp = a + (z + (y * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -5.7e+162], N[Not[LessEqual[x, 9e+214]], $MachinePrecision]], N[(a + N[(t + N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5.7 \cdot 10^{+162} \lor \neg \left(x \leq 9 \cdot 10^{+214}\right):\\
\;\;\;\;a + \left(t + x \cdot \log y\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + y \cdot i\right)\\
\end{array}
\end{array}
if x < -5.69999999999999997e162 or 8.99999999999999935e214 < x Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.7%
Taylor expanded in a around inf 58.0%
+-commutative58.0%
associate-/l*58.0%
sub-neg58.0%
metadata-eval58.0%
associate-/l*58.0%
+-commutative58.0%
associate-/l*57.7%
Simplified57.7%
Taylor expanded in x around inf 48.6%
Taylor expanded in a around 0 79.7%
if -5.69999999999999997e162 < x < 8.99999999999999935e214Initial program 99.9%
Taylor expanded in x around 0 96.1%
Taylor expanded in z around inf 70.6%
associate-+r+70.6%
sub-neg70.6%
metadata-eval70.6%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in a around inf 51.0%
Taylor expanded in z around 0 60.0%
*-commutative60.0%
Simplified60.0%
Final simplification63.5%
(FPCore (x y z t a b c i) :precision binary64 (if (<= z -8.8e+83) (+ a (+ z (* y i))) (+ (* y i) (+ a (* (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 (z <= -8.8e+83) {
tmp = a + (z + (y * i));
} else {
tmp = (y * i) + (a + (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 (z <= (-8.8d+83)) then
tmp = a + (z + (y * i))
else
tmp = (y * i) + (a + (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 (z <= -8.8e+83) {
tmp = a + (z + (y * i));
} else {
tmp = (y * i) + (a + (Math.log(c) * (b - 0.5)));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if z <= -8.8e+83: tmp = a + (z + (y * i)) else: tmp = (y * i) + (a + (math.log(c) * (b - 0.5))) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (z <= -8.8e+83) tmp = Float64(a + Float64(z + Float64(y * i))); else tmp = Float64(Float64(y * i) + Float64(a + 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 (z <= -8.8e+83) tmp = a + (z + (y * i)); else tmp = (y * i) + (a + (log(c) * (b - 0.5))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[z, -8.8e+83], N[(a + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * i), $MachinePrecision] + N[(a + N[(N[Log[c], $MachinePrecision] * N[(b - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8.8 \cdot 10^{+83}:\\
\;\;\;\;a + \left(z + y \cdot i\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot i + \left(a + \log c \cdot \left(b - 0.5\right)\right)\\
\end{array}
\end{array}
if z < -8.79999999999999995e83Initial program 99.9%
Taylor expanded in x around 0 88.6%
Taylor expanded in z around inf 88.4%
associate-+r+88.4%
sub-neg88.4%
metadata-eval88.4%
associate-/l*88.5%
Simplified88.5%
Taylor expanded in a around inf 65.6%
Taylor expanded in z around 0 65.7%
*-commutative65.7%
Simplified65.7%
if -8.79999999999999995e83 < z Initial program 99.8%
Taylor expanded in a around inf 62.6%
Final simplification63.2%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 9e+155) (+ (* y i) (+ z (* b (log c)))) (+ a (+ z (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 9e+155) {
tmp = (y * i) + (z + (b * log(c)));
} else {
tmp = a + (z + (y * i));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 9d+155) then
tmp = (y * i) + (z + (b * log(c)))
else
tmp = a + (z + (y * i))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 9e+155) {
tmp = (y * i) + (z + (b * Math.log(c)));
} else {
tmp = a + (z + (y * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 9e+155: tmp = (y * i) + (z + (b * math.log(c))) else: tmp = a + (z + (y * i)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 9e+155) tmp = Float64(Float64(y * i) + Float64(z + Float64(b * log(c)))); else tmp = Float64(a + Float64(z + Float64(y * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 9e+155) tmp = (y * i) + (z + (b * log(c))); else tmp = a + (z + (y * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 9e+155], N[(N[(y * i), $MachinePrecision] + N[(z + N[(b * N[Log[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 9 \cdot 10^{+155}:\\
\;\;\;\;y \cdot i + \left(z + b \cdot \log c\right)\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + y \cdot i\right)\\
\end{array}
\end{array}
if a < 8.99999999999999947e155Initial program 99.8%
Taylor expanded in x around 0 84.6%
Taylor expanded in z around inf 62.3%
associate-+r+62.3%
sub-neg62.3%
metadata-eval62.3%
associate-/l*62.3%
Simplified62.3%
Taylor expanded in b around inf 49.1%
associate-/l*49.1%
Simplified49.1%
Taylor expanded in z around 0 57.4%
if 8.99999999999999947e155 < a Initial program 99.9%
Taylor expanded in x around 0 91.3%
Taylor expanded in z around inf 63.6%
associate-+r+63.6%
sub-neg63.6%
metadata-eval63.6%
associate-/l*63.6%
Simplified63.6%
Taylor expanded in a around inf 56.8%
Taylor expanded in z around 0 81.6%
*-commutative81.6%
Simplified81.6%
Final simplification60.6%
(FPCore (x y z t a b c i) :precision binary64 (if (or (<= x -2.25e+225) (not (<= x 5.2e+221))) (* x (log y)) (+ a (+ z (* y i)))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.25e+225) || !(x <= 5.2e+221)) {
tmp = x * log(y);
} else {
tmp = a + (z + (y * i));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if ((x <= (-2.25d+225)) .or. (.not. (x <= 5.2d+221))) then
tmp = x * log(y)
else
tmp = a + (z + (y * i))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if ((x <= -2.25e+225) || !(x <= 5.2e+221)) {
tmp = x * Math.log(y);
} else {
tmp = a + (z + (y * i));
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if (x <= -2.25e+225) or not (x <= 5.2e+221): tmp = x * math.log(y) else: tmp = a + (z + (y * i)) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if ((x <= -2.25e+225) || !(x <= 5.2e+221)) tmp = Float64(x * log(y)); else tmp = Float64(a + Float64(z + Float64(y * i))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if ((x <= -2.25e+225) || ~((x <= 5.2e+221))) tmp = x * log(y); else tmp = a + (z + (y * i)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[Or[LessEqual[x, -2.25e+225], N[Not[LessEqual[x, 5.2e+221]], $MachinePrecision]], N[(x * N[Log[y], $MachinePrecision]), $MachinePrecision], N[(a + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.25 \cdot 10^{+225} \lor \neg \left(x \leq 5.2 \cdot 10^{+221}\right):\\
\;\;\;\;x \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;a + \left(z + y \cdot i\right)\\
\end{array}
\end{array}
if x < -2.24999999999999988e225 or 5.20000000000000008e221 < x Initial program 99.6%
associate-+l+99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+r+99.6%
+-commutative99.6%
+-commutative99.6%
associate-+l+99.6%
associate-+l+99.6%
+-commutative99.6%
fma-define99.6%
+-commutative99.6%
fma-define99.6%
sub-neg99.6%
metadata-eval99.6%
+-commutative99.6%
Simplified99.7%
Taylor expanded in a around inf 55.0%
+-commutative55.0%
associate-/l*55.0%
sub-neg55.0%
metadata-eval55.0%
associate-/l*55.0%
+-commutative55.0%
associate-/l*54.7%
Simplified54.7%
Taylor expanded in x around inf 48.0%
Taylor expanded in x around inf 73.7%
if -2.24999999999999988e225 < x < 5.20000000000000008e221Initial program 99.9%
Taylor expanded in x around 0 94.5%
Taylor expanded in z around inf 69.2%
associate-+r+69.2%
sub-neg69.2%
metadata-eval69.2%
associate-/l*69.2%
Simplified69.2%
Taylor expanded in a around inf 49.3%
Taylor expanded in z around 0 57.7%
*-commutative57.7%
Simplified57.7%
Final simplification59.9%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 8.5e+145) (+ z (* y i)) (+ a (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 8.5e+145) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b, c, i)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8), intent (in) :: c
real(8), intent (in) :: i
real(8) :: tmp
if (a <= 8.5d+145) then
tmp = z + (y * i)
else
tmp = a + (y * i)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c, double i) {
double tmp;
if (a <= 8.5e+145) {
tmp = z + (y * i);
} else {
tmp = a + (y * i);
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 8.5e+145: tmp = z + (y * i) else: tmp = a + (y * i) return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 8.5e+145) tmp = Float64(z + Float64(y * i)); else tmp = Float64(a + Float64(y * i)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b, c, i) tmp = 0.0; if (a <= 8.5e+145) tmp = z + (y * i); else tmp = a + (y * i); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 8.5e+145], N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision], N[(a + N[(y * i), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 8.5 \cdot 10^{+145}:\\
\;\;\;\;z + y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a + y \cdot i\\
\end{array}
\end{array}
if a < 8.49999999999999977e145Initial program 99.9%
Taylor expanded in x around 0 84.9%
Taylor expanded in z around inf 39.2%
if 8.49999999999999977e145 < a Initial program 99.9%
Taylor expanded in x around 0 89.2%
Taylor expanded in a around inf 72.6%
(FPCore (x y z t a b c i) :precision binary64 (if (<= a 6.2e+104) (* 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 <= 6.2e+104) {
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 <= 6.2d+104) 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 <= 6.2e+104) {
tmp = y * i;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b, c, i): tmp = 0 if a <= 6.2e+104: tmp = y * i else: tmp = a return tmp
function code(x, y, z, t, a, b, c, i) tmp = 0.0 if (a <= 6.2e+104) 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 <= 6.2e+104) tmp = y * i; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_, c_, i_] := If[LessEqual[a, 6.2e+104], N[(y * i), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq 6.2 \cdot 10^{+104}:\\
\;\;\;\;y \cdot i\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < 6.20000000000000033e104Initial program 99.9%
associate-+l+99.9%
+-commutative99.9%
associate-+l+99.9%
associate-+r+99.9%
+-commutative99.9%
+-commutative99.9%
associate-+l+99.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 y around inf 25.2%
*-commutative25.2%
Simplified25.2%
if 6.20000000000000033e104 < a Initial program 99.8%
Taylor expanded in x around 0 82.5%
Taylor expanded in a around inf 58.5%
Taylor expanded in a around inf 45.0%
(FPCore (x y z t a b c i) :precision binary64 (+ a (+ z (* y i))))
double code(double x, double y, double z, double t, double a, double b, double c, double i) {
return a + (z + (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 + (z + (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 + (z + (y * i));
}
def code(x, y, z, t, a, b, c, i): return a + (z + (y * i))
function code(x, y, z, t, a, b, c, i) return Float64(a + Float64(z + Float64(y * i))) end
function tmp = code(x, y, z, t, a, b, c, i) tmp = a + (z + (y * i)); end
code[x_, y_, z_, t_, a_, b_, c_, i_] := N[(a + N[(z + N[(y * i), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
a + \left(z + y \cdot i\right)
\end{array}
Initial program 99.9%
Taylor expanded in x around 0 85.5%
Taylor expanded in z around inf 62.5%
associate-+r+62.5%
sub-neg62.5%
metadata-eval62.5%
associate-/l*62.5%
Simplified62.5%
Taylor expanded in a around inf 44.3%
Taylor expanded in z around 0 52.3%
*-commutative52.3%
Simplified52.3%
(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 x around 0 85.5%
Taylor expanded in a around inf 39.0%
(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 x around 0 85.5%
Taylor expanded in a around inf 39.0%
Taylor expanded in a around inf 17.1%
herbie shell --seed 2024137
(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)))