
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
(FPCore (x y z)
:precision binary64
(if (or (<= (+ y 0.0007936500793651) 0.000793650079365)
(not (<= (+ y 0.0007936500793651) 0.0007937)))
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(fma
(* (/ z x) (+ (/ (fma 0.0007936500793651 z -0.0027777777777778) y) z))
y
(/ 0.083333333333333 x)))
(+
(- 0.91893853320467 x)
(fma
(log x)
(+ -0.5 x)
(fma
z
(/ (fma 0.0007936500793651 z -0.0027777777777778) x)
(/ 0.083333333333333 x))))))
double code(double x, double y, double z) {
double tmp;
if (((y + 0.0007936500793651) <= 0.000793650079365) || !((y + 0.0007936500793651) <= 0.0007937)) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + fma(((z / x) * ((fma(0.0007936500793651, z, -0.0027777777777778) / y) + z)), y, (0.083333333333333 / x));
} else {
tmp = (0.91893853320467 - x) + fma(log(x), (-0.5 + x), fma(z, (fma(0.0007936500793651, z, -0.0027777777777778) / x), (0.083333333333333 / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if ((Float64(y + 0.0007936500793651) <= 0.000793650079365) || !(Float64(y + 0.0007936500793651) <= 0.0007937)) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + fma(Float64(Float64(z / x) * Float64(Float64(fma(0.0007936500793651, z, -0.0027777777777778) / y) + z)), y, Float64(0.083333333333333 / x))); else tmp = Float64(Float64(0.91893853320467 - x) + fma(log(x), Float64(-0.5 + x), fma(z, Float64(fma(0.0007936500793651, z, -0.0027777777777778) / x), Float64(0.083333333333333 / x)))); end return tmp end
code[x_, y_, z_] := If[Or[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], 0.000793650079365], N[Not[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], 0.0007937]], $MachinePrecision]], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(z / x), $MachinePrecision] * N[(N[(N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] / y), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision] * y + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 - x), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(-0.5 + x), $MachinePrecision] + N[(z * N[(N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + 0.0007936500793651 \leq 0.000793650079365 \lor \neg \left(y + 0.0007936500793651 \leq 0.0007937\right):\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \mathsf{fma}\left(\frac{z}{x} \cdot \left(\frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{y} + z\right), y, \frac{0.083333333333333}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 - x\right) + \mathsf{fma}\left(\log x, -0.5 + x, \mathsf{fma}\left(z, \frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x}, \frac{0.083333333333333}{x}\right)\right)\\
\end{array}
\end{array}
if (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < 7.93650079365000051e-4 or 7.9370000000000005e-4 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) Initial program 93.3%
Taylor expanded in y around inf
Applied rewrites99.7%
if 7.93650079365000051e-4 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < 7.9370000000000005e-4Initial program 95.1%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6414.9
Applied rewrites14.9%
Taylor expanded in y around 0
sub-negN/A
associate-+r+N/A
+-commutativeN/A
associate-+r+N/A
lower-+.f64N/A
unsub-negN/A
lower--.f64N/A
+-commutativeN/A
associate-+l+N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-rgt-outN/A
Applied rewrites99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (fma (+ 0.0007936500793651 y) z -0.0027777777777778)))
(if (<= x 1e-8)
(/
(fma
(+ (fma (- x 0.5) (log x) (- x)) 0.91893853320467)
x
(fma t_0 z 0.083333333333333))
x)
(fma
(+
(fma
(/ (- (log x)) x)
0.5
(+
(fma (/ t_0 x) (/ z x) (/ 0.91893853320467 x))
(/ 0.083333333333333 (* x x))))
(log x))
x
(- x)))))
double code(double x, double y, double z) {
double t_0 = fma((0.0007936500793651 + y), z, -0.0027777777777778);
double tmp;
if (x <= 1e-8) {
tmp = fma((fma((x - 0.5), log(x), -x) + 0.91893853320467), x, fma(t_0, z, 0.083333333333333)) / x;
} else {
tmp = fma((fma((-log(x) / x), 0.5, (fma((t_0 / x), (z / x), (0.91893853320467 / x)) + (0.083333333333333 / (x * x)))) + log(x)), x, -x);
}
return tmp;
}
function code(x, y, z) t_0 = fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778) tmp = 0.0 if (x <= 1e-8) tmp = Float64(fma(Float64(fma(Float64(x - 0.5), log(x), Float64(-x)) + 0.91893853320467), x, fma(t_0, z, 0.083333333333333)) / x); else tmp = fma(Float64(fma(Float64(Float64(-log(x)) / x), 0.5, Float64(fma(Float64(t_0 / x), Float64(z / x), Float64(0.91893853320467 / x)) + Float64(0.083333333333333 / Float64(x * x)))) + log(x)), x, Float64(-x)); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision]}, If[LessEqual[x, 1e-8], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + (-x)), $MachinePrecision] + 0.91893853320467), $MachinePrecision] * x + N[(t$95$0 * z + 0.083333333333333), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(N[((-N[Log[x], $MachinePrecision]) / x), $MachinePrecision] * 0.5 + N[(N[(N[(t$95$0 / x), $MachinePrecision] * N[(z / x), $MachinePrecision] + N[(0.91893853320467 / x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Log[x], $MachinePrecision]), $MachinePrecision] * x + (-x)), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right)\\
\mathbf{if}\;x \leq 10^{-8}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x - 0.5, \log x, -x\right) + 0.91893853320467, x, \mathsf{fma}\left(t\_0, z, 0.083333333333333\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\frac{-\log x}{x}, 0.5, \mathsf{fma}\left(\frac{t\_0}{x}, \frac{z}{x}, \frac{0.91893853320467}{x}\right) + \frac{0.083333333333333}{x \cdot x}\right) + \log x, x, -x\right)\\
\end{array}
\end{array}
if x < 1e-8Initial program 99.7%
Taylor expanded in x around 0
Applied rewrites99.7%
if 1e-8 < x Initial program 88.5%
Taylor expanded in x around inf
Applied rewrites98.9%
(FPCore (x y z)
:precision binary64
(if (<=
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x))
-1e+144)
(* (* (/ z x) y) z)
(/
(fma (fma z 0.0007936500793651 -0.0027777777777778) z 0.083333333333333)
x)))
double code(double x, double y, double z) {
double tmp;
if ((((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) <= -1e+144) {
tmp = ((z / x) * y) * z;
} else {
tmp = fma(fma(z, 0.0007936500793651, -0.0027777777777778), z, 0.083333333333333) / x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) <= -1e+144) tmp = Float64(Float64(Float64(z / x) * y) * z); else tmp = Float64(fma(fma(z, 0.0007936500793651, -0.0027777777777778), z, 0.083333333333333) / x); end return tmp end
code[x_, y_, z_] := If[LessEqual[N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], -1e+144], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], N[(N[(N[(z * 0.0007936500793651 + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x} \leq -1 \cdot 10^{+144}:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\end{array}
\end{array}
if (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x)) < -1.00000000000000002e144Initial program 88.3%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6491.0
Applied rewrites91.0%
Taylor expanded in y around inf
Applied rewrites94.0%
if -1.00000000000000002e144 < (+.f64 (+.f64 (-.f64 (*.f64 (-.f64 x #s(literal 1/2 binary64)) (log.f64 x)) x) #s(literal 91893853320467/100000000000000 binary64)) (/.f64 (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) x)) Initial program 95.0%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6425.6
Applied rewrites25.6%
Taylor expanded in y around 0
sub-negN/A
associate-+r+N/A
+-commutativeN/A
associate-+r+N/A
lower-+.f64N/A
unsub-negN/A
lower--.f64N/A
+-commutativeN/A
associate-+l+N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-rgt-outN/A
Applied rewrites90.1%
Taylor expanded in x around 0
Applied rewrites54.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)))
(if (<= t_0 -1e+101)
(* (* (/ z x) y) z)
(if (<= t_0 2e-33)
(fma
(- x 0.5)
(log x)
(- (+ (/ 0.083333333333333 x) 0.91893853320467) x))
(/
(fma
(fma (+ 0.0007936500793651 y) z -0.0027777777777778)
z
0.083333333333333)
x)))))
double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double tmp;
if (t_0 <= -1e+101) {
tmp = ((z / x) * y) * z;
} else if (t_0 <= 2e-33) {
tmp = fma((x - 0.5), log(x), (((0.083333333333333 / x) + 0.91893853320467) - x));
} else {
tmp = fma(fma((0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) tmp = 0.0 if (t_0 <= -1e+101) tmp = Float64(Float64(Float64(z / x) * y) * z); elseif (t_0 <= 2e-33) tmp = fma(Float64(x - 0.5), log(x), Float64(Float64(Float64(0.083333333333333 / x) + 0.91893853320467) - x)); else tmp = Float64(fma(fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+101], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$0, 2e-33], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(N[(N[(0.083333333333333 / x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+101}:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-33}:\\
\;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \left(\frac{0.083333333333333}{x} + 0.91893853320467\right) - x\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -9.9999999999999998e100Initial program 89.0%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6485.9
Applied rewrites85.9%
Taylor expanded in y around inf
Applied rewrites88.6%
if -9.9999999999999998e100 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 2.0000000000000001e-33Initial program 99.4%
Taylor expanded in z around 0
associate-+r+N/A
+-commutativeN/A
associate--l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower--.f64N/A
lower-log.f64N/A
lower--.f64N/A
+-commutativeN/A
lower-+.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6499.5
Applied rewrites99.5%
if 2.0000000000000001e-33 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 90.5%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6480.3
Applied rewrites80.3%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)))
(if (<= t_0 -1e+101)
(* (* (/ z x) y) z)
(if (<= t_0 2e-33)
(+ (- x) (fma (log x) (- x 0.5) (/ 0.083333333333333 x)))
(/
(fma
(fma (+ 0.0007936500793651 y) z -0.0027777777777778)
z
0.083333333333333)
x)))))
double code(double x, double y, double z) {
double t_0 = (((y + 0.0007936500793651) * z) - 0.0027777777777778) * z;
double tmp;
if (t_0 <= -1e+101) {
tmp = ((z / x) * y) * z;
} else if (t_0 <= 2e-33) {
tmp = -x + fma(log(x), (x - 0.5), (0.083333333333333 / x));
} else {
tmp = fma(fma((0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) tmp = 0.0 if (t_0 <= -1e+101) tmp = Float64(Float64(Float64(z / x) * y) * z); elseif (t_0 <= 2e-33) tmp = Float64(Float64(-x) + fma(log(x), Float64(x - 0.5), Float64(0.083333333333333 / x))); else tmp = Float64(fma(fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+101], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$0, 2e-33], N[((-x) + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+101}:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-33}:\\
\;\;\;\;\left(-x\right) + \mathsf{fma}\left(\log x, x - 0.5, \frac{0.083333333333333}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\end{array}
\end{array}
if (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < -9.9999999999999998e100Initial program 89.0%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6485.9
Applied rewrites85.9%
Taylor expanded in y around inf
Applied rewrites88.6%
if -9.9999999999999998e100 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) < 2.0000000000000001e-33Initial program 99.4%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f642.4
Applied rewrites2.4%
Taylor expanded in y around 0
sub-negN/A
associate-+r+N/A
+-commutativeN/A
associate-+r+N/A
lower-+.f64N/A
unsub-negN/A
lower--.f64N/A
+-commutativeN/A
associate-+l+N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-rgt-outN/A
Applied rewrites99.4%
Taylor expanded in x around inf
Applied rewrites96.7%
Taylor expanded in z around 0
Applied rewrites96.6%
if 2.0000000000000001e-33 < (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) Initial program 90.5%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6480.3
Applied rewrites80.3%
(FPCore (x y z)
:precision binary64
(if (<= x 5.2e+183)
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x))
(+
(- x)
(fma
(log x)
(+ -0.5 x)
(fma
z
(/ (fma 0.0007936500793651 z -0.0027777777777778) x)
(/ 0.083333333333333 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5.2e+183) {
tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
} else {
tmp = -x + fma(log(x), (-0.5 + x), fma(z, (fma(0.0007936500793651, z, -0.0027777777777778) / x), (0.083333333333333 / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 5.2e+183) tmp = Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)); else tmp = Float64(Float64(-x) + fma(log(x), Float64(-0.5 + x), fma(z, Float64(fma(0.0007936500793651, z, -0.0027777777777778) / x), Float64(0.083333333333333 / x)))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 5.2e+183], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[((-x) + N[(N[Log[x], $MachinePrecision] * N[(-0.5 + x), $MachinePrecision] + N[(z * N[(N[(0.0007936500793651 * z + -0.0027777777777778), $MachinePrecision] / x), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5.2 \cdot 10^{+183}:\\
\;\;\;\;\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(-x\right) + \mathsf{fma}\left(\log x, -0.5 + x, \mathsf{fma}\left(z, \frac{\mathsf{fma}\left(0.0007936500793651, z, -0.0027777777777778\right)}{x}, \frac{0.083333333333333}{x}\right)\right)\\
\end{array}
\end{array}
if x < 5.1999999999999999e183Initial program 97.9%
if 5.1999999999999999e183 < x Initial program 75.0%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6418.6
Applied rewrites18.6%
Taylor expanded in y around 0
sub-negN/A
associate-+r+N/A
+-commutativeN/A
associate-+r+N/A
lower-+.f64N/A
unsub-negN/A
lower--.f64N/A
+-commutativeN/A
associate-+l+N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-rgt-outN/A
Applied rewrites91.2%
Taylor expanded in x around inf
Applied rewrites91.2%
(FPCore (x y z)
:precision binary64
(if (<= x 100000000.0)
(/
(fma
(+ (fma (- x 0.5) (log x) (- x)) 0.91893853320467)
x
(fma
(fma (+ 0.0007936500793651 y) z -0.0027777777777778)
z
0.083333333333333))
x)
(fma
(- x 0.5)
(log x)
(+ (- 0.91893853320467 x) (/ (* (+ 0.0007936500793651 y) (* z z)) x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 100000000.0) {
tmp = fma((fma((x - 0.5), log(x), -x) + 0.91893853320467), x, fma(fma((0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333)) / x;
} else {
tmp = fma((x - 0.5), log(x), ((0.91893853320467 - x) + (((0.0007936500793651 + y) * (z * z)) / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 100000000.0) tmp = Float64(fma(Float64(fma(Float64(x - 0.5), log(x), Float64(-x)) + 0.91893853320467), x, fma(fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333)) / x); else tmp = fma(Float64(x - 0.5), log(x), Float64(Float64(0.91893853320467 - x) + Float64(Float64(Float64(0.0007936500793651 + y) * Float64(z * z)) / x))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 100000000.0], N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + (-x)), $MachinePrecision] + 0.91893853320467), $MachinePrecision] * x + N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(N[(0.91893853320467 - x), $MachinePrecision] + N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 100000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x - 0.5, \log x, -x\right) + 0.91893853320467, x, \mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right), z, 0.083333333333333\right)\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) + \frac{\left(0.0007936500793651 + y\right) \cdot \left(z \cdot z\right)}{x}\right)\\
\end{array}
\end{array}
if x < 1e8Initial program 99.7%
Taylor expanded in x around 0
Applied rewrites99.7%
if 1e8 < x Initial program 87.7%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-fma.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
metadata-evalN/A
inv-powN/A
lower-pow.f6487.7
Applied rewrites87.8%
Taylor expanded in z around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-+.f6487.9
Applied rewrites87.9%
lift-fma.f64N/A
+-commutativeN/A
lift-fma.f64N/A
lift-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lift--.f64N/A
associate-+l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f64N/A
Applied rewrites87.9%
(FPCore (x y z)
:precision binary64
(+
(+ (- (* (- x 0.5) (log x)) x) 0.91893853320467)
(/
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)
x)))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) - x) + 0.91893853320467d0) + ((((((y + 0.0007936500793651d0) * z) - 0.0027777777777778d0) * z) + 0.083333333333333d0) / x)
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x);
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) - x) + 0.91893853320467) + Float64(Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x)) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) - x) + 0.91893853320467) + ((((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) / x); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision] + 0.91893853320467), $MachinePrecision] + N[(N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x - x\right) + 0.91893853320467\right) + \frac{\left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333}{x}
\end{array}
Initial program 94.1%
(FPCore (x y z)
:precision binary64
(if (<= x 1.0)
(/
(fma
(fma (+ 0.0007936500793651 y) z -0.0027777777777778)
z
0.083333333333333)
x)
(fma
(- x 0.5)
(log x)
(+ (- 0.91893853320467 x) (/ (* (+ 0.0007936500793651 y) (* z z)) x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.0) {
tmp = fma(fma((0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x;
} else {
tmp = fma((x - 0.5), log(x), ((0.91893853320467 - x) + (((0.0007936500793651 + y) * (z * z)) / x)));
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.0) tmp = Float64(fma(fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x); else tmp = fma(Float64(x - 0.5), log(x), Float64(Float64(0.91893853320467 - x) + Float64(Float64(Float64(0.0007936500793651 + y) * Float64(z * z)) / x))); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.0], N[(N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(N[(0.91893853320467 - x), $MachinePrecision] + N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z * z), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x - 0.5, \log x, \left(0.91893853320467 - x\right) + \frac{\left(0.0007936500793651 + y\right) \cdot \left(z \cdot z\right)}{x}\right)\\
\end{array}
\end{array}
if x < 1Initial program 99.7%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6498.0
Applied rewrites98.0%
if 1 < x Initial program 88.2%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-fma.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
metadata-evalN/A
inv-powN/A
lower-pow.f6488.1
Applied rewrites88.3%
Taylor expanded in z around inf
lower-*.f64N/A
unpow2N/A
lower-*.f64N/A
lower-+.f6488.1
Applied rewrites88.1%
lift-fma.f64N/A
+-commutativeN/A
lift-fma.f64N/A
lift-fma.f64N/A
mul-1-negN/A
+-commutativeN/A
sub-negN/A
lift--.f64N/A
associate-+l+N/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f64N/A
Applied rewrites88.1%
(FPCore (x y z)
:precision binary64
(if (<= x 2.3e+20)
(/
(fma
(fma (+ 0.0007936500793651 y) z -0.0027777777777778)
z
0.083333333333333)
x)
(* (- (log x) 1.0) x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 2.3e+20) {
tmp = fma(fma((0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x;
} else {
tmp = (log(x) - 1.0) * x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 2.3e+20) tmp = Float64(fma(fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x); else tmp = Float64(Float64(log(x) - 1.0) * x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 2.3e+20], N[(N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[Log[x], $MachinePrecision] - 1.0), $MachinePrecision] * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2.3 \cdot 10^{+20}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\log x - 1\right) \cdot x\\
\end{array}
\end{array}
if x < 2.3e20Initial program 99.7%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6495.6
Applied rewrites95.6%
if 2.3e20 < x Initial program 87.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
div-invN/A
lower-fma.f64N/A
lift-+.f64N/A
lift-*.f64N/A
lower-fma.f64N/A
lift--.f64N/A
sub-negN/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
metadata-evalN/A
inv-powN/A
lower-pow.f6487.1
Applied rewrites87.3%
Taylor expanded in x around inf
*-commutativeN/A
mul-1-negN/A
log-recN/A
remove-double-negN/A
lower-*.f64N/A
lower--.f64N/A
lower-log.f6470.9
Applied rewrites70.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z)
0.083333333333333)))
(if (<= t_0 -1e+101)
(* (* (/ z x) y) z)
(if (<= t_0 1000000.0)
(/
(fma
(fma z 0.0007936500793651 -0.0027777777777778)
z
0.083333333333333)
x)
(* (* (/ z x) (+ 0.0007936500793651 y)) z)))))
double code(double x, double y, double z) {
double t_0 = ((((y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333;
double tmp;
if (t_0 <= -1e+101) {
tmp = ((z / x) * y) * z;
} else if (t_0 <= 1000000.0) {
tmp = fma(fma(z, 0.0007936500793651, -0.0027777777777778), z, 0.083333333333333) / x;
} else {
tmp = ((z / x) * (0.0007936500793651 + y)) * z;
}
return tmp;
}
function code(x, y, z) t_0 = Float64(Float64(Float64(Float64(Float64(y + 0.0007936500793651) * z) - 0.0027777777777778) * z) + 0.083333333333333) tmp = 0.0 if (t_0 <= -1e+101) tmp = Float64(Float64(Float64(z / x) * y) * z); elseif (t_0 <= 1000000.0) tmp = Float64(fma(fma(z, 0.0007936500793651, -0.0027777777777778), z, 0.083333333333333) / x); else tmp = Float64(Float64(Float64(z / x) * Float64(0.0007936500793651 + y)) * z); end return tmp end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[(N[(N[(y + 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision] - 0.0027777777777778), $MachinePrecision] * z), $MachinePrecision] + 0.083333333333333), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+101], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[t$95$0, 1000000.0], N[(N[(N[(z * 0.0007936500793651 + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(\left(y + 0.0007936500793651\right) \cdot z - 0.0027777777777778\right) \cdot z + 0.083333333333333\\
\mathbf{if}\;t\_0 \leq -1 \cdot 10^{+101}:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{elif}\;t\_0 \leq 1000000:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(z, 0.0007936500793651, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right) \cdot z\\
\end{array}
\end{array}
if (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < -9.9999999999999998e100Initial program 89.0%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6485.9
Applied rewrites85.9%
Taylor expanded in y around inf
Applied rewrites88.6%
if -9.9999999999999998e100 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) < 1e6Initial program 99.4%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f642.4
Applied rewrites2.4%
Taylor expanded in y around 0
sub-negN/A
associate-+r+N/A
+-commutativeN/A
associate-+r+N/A
lower-+.f64N/A
unsub-negN/A
lower--.f64N/A
+-commutativeN/A
associate-+l+N/A
sub-negN/A
metadata-evalN/A
distribute-rgt-inN/A
+-commutativeN/A
distribute-rgt-outN/A
Applied rewrites99.4%
Taylor expanded in x around 0
Applied rewrites47.4%
if 1e6 < (+.f64 (*.f64 (-.f64 (*.f64 (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) z) #s(literal 13888888888889/5000000000000000 binary64)) z) #s(literal 83333333333333/1000000000000000 binary64)) Initial program 90.2%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6477.7
Applied rewrites77.7%
Taylor expanded in y around 0
Applied rewrites79.5%
(FPCore (x y z)
:precision binary64
(if (<= (+ y 0.0007936500793651) -200.0)
(* (* (/ z x) y) z)
(if (<= (+ y 0.0007936500793651) 0.001)
(* (* (/ z x) 0.0007936500793651) z)
(* (* z y) (/ z x)))))
double code(double x, double y, double z) {
double tmp;
if ((y + 0.0007936500793651) <= -200.0) {
tmp = ((z / x) * y) * z;
} else if ((y + 0.0007936500793651) <= 0.001) {
tmp = ((z / x) * 0.0007936500793651) * z;
} else {
tmp = (z * y) * (z / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y + 0.0007936500793651d0) <= (-200.0d0)) then
tmp = ((z / x) * y) * z
else if ((y + 0.0007936500793651d0) <= 0.001d0) then
tmp = ((z / x) * 0.0007936500793651d0) * z
else
tmp = (z * y) * (z / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y + 0.0007936500793651) <= -200.0) {
tmp = ((z / x) * y) * z;
} else if ((y + 0.0007936500793651) <= 0.001) {
tmp = ((z / x) * 0.0007936500793651) * z;
} else {
tmp = (z * y) * (z / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y + 0.0007936500793651) <= -200.0: tmp = ((z / x) * y) * z elif (y + 0.0007936500793651) <= 0.001: tmp = ((z / x) * 0.0007936500793651) * z else: tmp = (z * y) * (z / x) return tmp
function code(x, y, z) tmp = 0.0 if (Float64(y + 0.0007936500793651) <= -200.0) tmp = Float64(Float64(Float64(z / x) * y) * z); elseif (Float64(y + 0.0007936500793651) <= 0.001) tmp = Float64(Float64(Float64(z / x) * 0.0007936500793651) * z); else tmp = Float64(Float64(z * y) * Float64(z / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y + 0.0007936500793651) <= -200.0) tmp = ((z / x) * y) * z; elseif ((y + 0.0007936500793651) <= 0.001) tmp = ((z / x) * 0.0007936500793651) * z; else tmp = (z * y) * (z / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], -200.0], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], 0.001], N[(N[(N[(z / x), $MachinePrecision] * 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision], N[(N[(z * y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + 0.0007936500793651 \leq -200:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{elif}\;y + 0.0007936500793651 \leq 0.001:\\
\;\;\;\;\left(\frac{z}{x} \cdot 0.0007936500793651\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot y\right) \cdot \frac{z}{x}\\
\end{array}
\end{array}
if (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < -200Initial program 93.1%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6452.5
Applied rewrites52.5%
Taylor expanded in y around inf
Applied rewrites54.2%
if -200 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < 1e-3Initial program 94.4%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6441.0
Applied rewrites41.0%
Taylor expanded in y around 0
Applied rewrites40.5%
if 1e-3 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) Initial program 94.5%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6453.8
Applied rewrites53.8%
Applied rewrites55.1%
Applied rewrites55.1%
(FPCore (x y z)
:precision binary64
(if (<= (+ y 0.0007936500793651) -200.0)
(* (* (/ z x) y) z)
(if (<= (+ y 0.0007936500793651) 1000.0)
(* (* (/ z x) 0.0007936500793651) z)
(* y (/ (* z z) x)))))
double code(double x, double y, double z) {
double tmp;
if ((y + 0.0007936500793651) <= -200.0) {
tmp = ((z / x) * y) * z;
} else if ((y + 0.0007936500793651) <= 1000.0) {
tmp = ((z / x) * 0.0007936500793651) * z;
} else {
tmp = y * ((z * z) / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y + 0.0007936500793651d0) <= (-200.0d0)) then
tmp = ((z / x) * y) * z
else if ((y + 0.0007936500793651d0) <= 1000.0d0) then
tmp = ((z / x) * 0.0007936500793651d0) * z
else
tmp = y * ((z * z) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y + 0.0007936500793651) <= -200.0) {
tmp = ((z / x) * y) * z;
} else if ((y + 0.0007936500793651) <= 1000.0) {
tmp = ((z / x) * 0.0007936500793651) * z;
} else {
tmp = y * ((z * z) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y + 0.0007936500793651) <= -200.0: tmp = ((z / x) * y) * z elif (y + 0.0007936500793651) <= 1000.0: tmp = ((z / x) * 0.0007936500793651) * z else: tmp = y * ((z * z) / x) return tmp
function code(x, y, z) tmp = 0.0 if (Float64(y + 0.0007936500793651) <= -200.0) tmp = Float64(Float64(Float64(z / x) * y) * z); elseif (Float64(y + 0.0007936500793651) <= 1000.0) tmp = Float64(Float64(Float64(z / x) * 0.0007936500793651) * z); else tmp = Float64(y * Float64(Float64(z * z) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y + 0.0007936500793651) <= -200.0) tmp = ((z / x) * y) * z; elseif ((y + 0.0007936500793651) <= 1000.0) tmp = ((z / x) * 0.0007936500793651) * z; else tmp = y * ((z * z) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], -200.0], N[(N[(N[(z / x), $MachinePrecision] * y), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], 1000.0], N[(N[(N[(z / x), $MachinePrecision] * 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision], N[(y * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + 0.0007936500793651 \leq -200:\\
\;\;\;\;\left(\frac{z}{x} \cdot y\right) \cdot z\\
\mathbf{elif}\;y + 0.0007936500793651 \leq 1000:\\
\;\;\;\;\left(\frac{z}{x} \cdot 0.0007936500793651\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z \cdot z}{x}\\
\end{array}
\end{array}
if (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < -200Initial program 93.1%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6452.5
Applied rewrites52.5%
Taylor expanded in y around inf
Applied rewrites54.2%
if -200 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < 1e3Initial program 94.5%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6440.4
Applied rewrites40.4%
Taylor expanded in y around 0
Applied rewrites39.9%
if 1e3 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) Initial program 94.3%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.2
Applied rewrites55.2%
Applied rewrites56.6%
(FPCore (x y z)
:precision binary64
(if (<= (+ y 0.0007936500793651) -200.0)
(* z (/ (* y z) x))
(if (<= (+ y 0.0007936500793651) 1000.0)
(* (* (/ z x) 0.0007936500793651) z)
(* y (/ (* z z) x)))))
double code(double x, double y, double z) {
double tmp;
if ((y + 0.0007936500793651) <= -200.0) {
tmp = z * ((y * z) / x);
} else if ((y + 0.0007936500793651) <= 1000.0) {
tmp = ((z / x) * 0.0007936500793651) * z;
} else {
tmp = y * ((z * z) / x);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((y + 0.0007936500793651d0) <= (-200.0d0)) then
tmp = z * ((y * z) / x)
else if ((y + 0.0007936500793651d0) <= 1000.0d0) then
tmp = ((z / x) * 0.0007936500793651d0) * z
else
tmp = y * ((z * z) / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y + 0.0007936500793651) <= -200.0) {
tmp = z * ((y * z) / x);
} else if ((y + 0.0007936500793651) <= 1000.0) {
tmp = ((z / x) * 0.0007936500793651) * z;
} else {
tmp = y * ((z * z) / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y + 0.0007936500793651) <= -200.0: tmp = z * ((y * z) / x) elif (y + 0.0007936500793651) <= 1000.0: tmp = ((z / x) * 0.0007936500793651) * z else: tmp = y * ((z * z) / x) return tmp
function code(x, y, z) tmp = 0.0 if (Float64(y + 0.0007936500793651) <= -200.0) tmp = Float64(z * Float64(Float64(y * z) / x)); elseif (Float64(y + 0.0007936500793651) <= 1000.0) tmp = Float64(Float64(Float64(z / x) * 0.0007936500793651) * z); else tmp = Float64(y * Float64(Float64(z * z) / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y + 0.0007936500793651) <= -200.0) tmp = z * ((y * z) / x); elseif ((y + 0.0007936500793651) <= 1000.0) tmp = ((z / x) * 0.0007936500793651) * z; else tmp = y * ((z * z) / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], -200.0], N[(z * N[(N[(y * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(y + 0.0007936500793651), $MachinePrecision], 1000.0], N[(N[(N[(z / x), $MachinePrecision] * 0.0007936500793651), $MachinePrecision] * z), $MachinePrecision], N[(y * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y + 0.0007936500793651 \leq -200:\\
\;\;\;\;z \cdot \frac{y \cdot z}{x}\\
\mathbf{elif}\;y + 0.0007936500793651 \leq 1000:\\
\;\;\;\;\left(\frac{z}{x} \cdot 0.0007936500793651\right) \cdot z\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z \cdot z}{x}\\
\end{array}
\end{array}
if (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < -200Initial program 93.1%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6451.0
Applied rewrites51.0%
Applied rewrites54.1%
if -200 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) < 1e3Initial program 94.5%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6440.4
Applied rewrites40.4%
Taylor expanded in y around 0
Applied rewrites39.9%
if 1e3 < (+.f64 y #s(literal 7936500793651/10000000000000000 binary64)) Initial program 94.3%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6455.2
Applied rewrites55.2%
Applied rewrites56.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1.35e+60)
(/
(fma
(fma (+ 0.0007936500793651 y) z -0.0027777777777778)
z
0.083333333333333)
x)
(* (* (/ z x) (+ 0.0007936500793651 y)) z)))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.35e+60) {
tmp = fma(fma((0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x;
} else {
tmp = ((z / x) * (0.0007936500793651 + y)) * z;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.35e+60) tmp = Float64(fma(fma(Float64(0.0007936500793651 + y), z, -0.0027777777777778), z, 0.083333333333333) / x); else tmp = Float64(Float64(Float64(z / x) * Float64(0.0007936500793651 + y)) * z); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.35e+60], N[(N[(N[(N[(0.0007936500793651 + y), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] * z + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(z / x), $MachinePrecision] * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.35 \cdot 10^{+60}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(0.0007936500793651 + y, z, -0.0027777777777778\right), z, 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(\frac{z}{x} \cdot \left(0.0007936500793651 + y\right)\right) \cdot z\\
\end{array}
\end{array}
if x < 1.35e60Initial program 99.7%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
*-commutativeN/A
lower-fma.f64N/A
sub-negN/A
metadata-evalN/A
*-commutativeN/A
lower-fma.f64N/A
lower-+.f6486.5
Applied rewrites86.5%
if 1.35e60 < x Initial program 84.3%
Taylor expanded in z around inf
*-commutativeN/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
lower-*.f64N/A
*-commutativeN/A
lower-*.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f64N/A
associate-*r/N/A
metadata-evalN/A
lower-/.f6433.6
Applied rewrites33.6%
Taylor expanded in y around 0
Applied rewrites33.6%
(FPCore (x y z) :precision binary64 (* y (/ (* z z) x)))
double code(double x, double y, double z) {
return y * ((z * z) / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = y * ((z * z) / x)
end function
public static double code(double x, double y, double z) {
return y * ((z * z) / x);
}
def code(x, y, z): return y * ((z * z) / x)
function code(x, y, z) return Float64(y * Float64(Float64(z * z) / x)) end
function tmp = code(x, y, z) tmp = y * ((z * z) / x); end
code[x_, y_, z_] := N[(y * N[(N[(z * z), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \frac{z \cdot z}{x}
\end{array}
Initial program 94.1%
Taylor expanded in y around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
unpow2N/A
lower-*.f6433.7
Applied rewrites33.7%
Applied rewrites35.6%
(FPCore (x y z) :precision binary64 (+ (+ (+ (* (- x 0.5) (log x)) (- 0.91893853320467 x)) (/ 0.083333333333333 x)) (* (/ z x) (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))))
double code(double x, double y, double z) {
return ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x - 0.5d0) * log(x)) + (0.91893853320467d0 - x)) + (0.083333333333333d0 / x)) + ((z / x) * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))
end function
public static double code(double x, double y, double z) {
return ((((x - 0.5) * Math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778));
}
def code(x, y, z): return ((((x - 0.5) * math.log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x - 0.5) * log(x)) + Float64(0.91893853320467 - x)) + Float64(0.083333333333333 / x)) + Float64(Float64(z / x) * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) end
function tmp = code(x, y, z) tmp = ((((x - 0.5) * log(x)) + (0.91893853320467 - x)) + (0.083333333333333 / x)) + ((z / x) * ((z * (y + 0.0007936500793651)) - 0.0027777777777778)); end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x - 0.5), $MachinePrecision] * N[Log[x], $MachinePrecision]), $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z / x), $MachinePrecision] * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(x - 0.5\right) \cdot \log x + \left(0.91893853320467 - x\right)\right) + \frac{0.083333333333333}{x}\right) + \frac{z}{x} \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)
\end{array}
herbie shell --seed 2024324
(FPCore (x y z)
:name "Numeric.SpecFunctions:$slogFactorial from math-functions-0.1.5.2, B"
:precision binary64
:alt
(! :herbie-platform default (+ (+ (+ (* (- x 1/2) (log x)) (- 91893853320467/100000000000000 x)) (/ 83333333333333/1000000000000000 x)) (* (/ z x) (- (* z (+ y 7936500793651/10000000000000000)) 13888888888889/5000000000000000))))
(+ (+ (- (* (- x 0.5) (log x)) x) 0.91893853320467) (/ (+ (* (- (* (+ y 0.0007936500793651) z) 0.0027777777777778) z) 0.083333333333333) x)))