
(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 (<= x 5e+48)
(+
(fma (+ x -0.5) (log x) (- 0.91893853320467 x))
(/
(fma
z
(fma (+ y 0.0007936500793651) z -0.0027777777777778)
0.083333333333333)
x))
(-
(+
0.91893853320467
(+
(* 0.083333333333333 (/ 1.0 x))
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
(* (log x) (- x 0.5)))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 5e+48) {
tmp = fma((x + -0.5), log(x), (0.91893853320467 - x)) + (fma(z, fma((y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + (log(x) * (x - 0.5))))) - x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 5e+48) tmp = Float64(fma(Float64(x + -0.5), log(x), Float64(0.91893853320467 - x)) + Float64(fma(z, fma(Float64(y + 0.0007936500793651), z, -0.0027777777777778), 0.083333333333333) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + Float64(log(x) * Float64(x - 0.5))))) - x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 5e+48], N[(N[(N[(x + -0.5), $MachinePrecision] * N[Log[x], $MachinePrecision] + N[(0.91893853320467 - x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(y + 0.0007936500793651), $MachinePrecision] * z + -0.0027777777777778), $MachinePrecision] + 0.083333333333333), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{+48}:\\
\;\;\;\;\mathsf{fma}\left(x + -0.5, \log x, 0.91893853320467 - x\right) + \frac{\mathsf{fma}\left(z, \mathsf{fma}\left(y + 0.0007936500793651, z, -0.0027777777777778\right), 0.083333333333333\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(0.083333333333333 \cdot \frac{1}{x} + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + \log x \cdot \left(x - 0.5\right)\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 4.99999999999999973e48Initial program 99.6%
remove-double-neg99.6%
distribute-frac-neg299.6%
sub-neg99.6%
associate-+l+99.6%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
distribute-frac-neg299.7%
remove-double-neg99.7%
Simplified99.7%
if 4.99999999999999973e48 < x Initial program 84.5%
remove-double-neg84.5%
distribute-frac-neg284.5%
sub-neg84.5%
associate-+l+84.5%
fma-define84.6%
sub-neg84.6%
metadata-eval84.6%
+-commutative84.6%
unsub-neg84.6%
distribute-frac-neg284.6%
remove-double-neg84.6%
Simplified84.6%
Taylor expanded in z around 0 99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (log x) (- x 0.5))))
(if (<= x 5e+48)
(+
(+ 0.91893853320467 (- t_0 x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(-
(+
0.91893853320467
(+
(* 0.083333333333333 (/ 1.0 x))
(+
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x))))
t_0)))
x))))
double code(double x, double y, double z) {
double t_0 = log(x) * (x - 0.5);
double tmp;
if (x <= 5e+48) {
tmp = (0.91893853320467 + (t_0 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + t_0))) - 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) :: t_0
real(8) :: tmp
t_0 = log(x) * (x - 0.5d0)
if (x <= 5d+48) then
tmp = (0.91893853320467d0 + (t_0 - x)) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = (0.91893853320467d0 + ((0.083333333333333d0 * (1.0d0 / x)) + ((z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x)))) + t_0))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = Math.log(x) * (x - 0.5);
double tmp;
if (x <= 5e+48) {
tmp = (0.91893853320467 + (t_0 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + t_0))) - x;
}
return tmp;
}
def code(x, y, z): t_0 = math.log(x) * (x - 0.5) tmp = 0 if x <= 5e+48: tmp = (0.91893853320467 + (t_0 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + t_0))) - x return tmp
function code(x, y, z) t_0 = Float64(log(x) * Float64(x - 0.5)) tmp = 0.0 if (x <= 5e+48) tmp = Float64(Float64(0.91893853320467 + Float64(t_0 - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) + Float64(0.0027777777777778 * Float64(-1.0 / x)))) + t_0))) - x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = log(x) * (x - 0.5); tmp = 0.0; if (x <= 5e+48) tmp = (0.91893853320467 + (t_0 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) + t_0))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 5e+48], N[(N[(0.91893853320467 + N[(t$95$0 - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log x \cdot \left(x - 0.5\right)\\
\mathbf{if}\;x \leq 5 \cdot 10^{+48}:\\
\;\;\;\;\left(0.91893853320467 + \left(t\_0 - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(0.083333333333333 \cdot \frac{1}{x} + \left(z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right) + t\_0\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 4.99999999999999973e48Initial program 99.6%
if 4.99999999999999973e48 < x Initial program 84.5%
remove-double-neg84.5%
distribute-frac-neg284.5%
sub-neg84.5%
associate-+l+84.5%
fma-define84.6%
sub-neg84.6%
metadata-eval84.6%
+-commutative84.6%
unsub-neg84.6%
distribute-frac-neg284.6%
remove-double-neg84.6%
Simplified84.6%
Taylor expanded in z around 0 99.5%
Final simplification99.6%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (log x) (- x 0.5))))
(if (<= x 1.06e+155)
(+
(+ 0.91893853320467 (- t_0 x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+ t_0 (* z (- (* y (/ z x)) (/ 0.0027777777777778 x))))))
x))))
double code(double x, double y, double z) {
double t_0 = log(x) * (x - 0.5);
double tmp;
if (x <= 1.06e+155) {
tmp = (0.91893853320467 + (t_0 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + (t_0 + (z * ((y * (z / x)) - (0.0027777777777778 / x)))))) - 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) :: t_0
real(8) :: tmp
t_0 = log(x) * (x - 0.5d0)
if (x <= 1.06d+155) then
tmp = (0.91893853320467d0 + (t_0 - x)) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + (t_0 + (z * ((y * (z / x)) - (0.0027777777777778d0 / x)))))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = Math.log(x) * (x - 0.5);
double tmp;
if (x <= 1.06e+155) {
tmp = (0.91893853320467 + (t_0 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + (t_0 + (z * ((y * (z / x)) - (0.0027777777777778 / x)))))) - x;
}
return tmp;
}
def code(x, y, z): t_0 = math.log(x) * (x - 0.5) tmp = 0 if x <= 1.06e+155: tmp = (0.91893853320467 + (t_0 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = (0.91893853320467 + ((0.083333333333333 / x) + (t_0 + (z * ((y * (z / x)) - (0.0027777777777778 / x)))))) - x return tmp
function code(x, y, z) t_0 = Float64(log(x) * Float64(x - 0.5)) tmp = 0.0 if (x <= 1.06e+155) tmp = Float64(Float64(0.91893853320467 + Float64(t_0 - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(t_0 + Float64(z * Float64(Float64(y * Float64(z / x)) - Float64(0.0027777777777778 / x)))))) - x); end return tmp end
function tmp_2 = code(x, y, z) t_0 = log(x) * (x - 0.5); tmp = 0.0; if (x <= 1.06e+155) tmp = (0.91893853320467 + (t_0 - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = (0.91893853320467 + ((0.083333333333333 / x) + (t_0 + (z * ((y * (z / x)) - (0.0027777777777778 / x)))))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, 1.06e+155], N[(N[(0.91893853320467 + N[(t$95$0 - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(t$95$0 + N[(z * N[(N[(y * N[(z / x), $MachinePrecision]), $MachinePrecision] - N[(0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \log x \cdot \left(x - 0.5\right)\\
\mathbf{if}\;x \leq 1.06 \cdot 10^{+155}:\\
\;\;\;\;\left(0.91893853320467 + \left(t\_0 - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(t\_0 + z \cdot \left(y \cdot \frac{z}{x} - \frac{0.0027777777777778}{x}\right)\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 1.06000000000000005e155Initial program 98.2%
if 1.06000000000000005e155 < x Initial program 78.7%
remove-double-neg78.7%
distribute-frac-neg278.7%
sub-neg78.7%
associate-+l+78.7%
fma-define78.9%
sub-neg78.9%
metadata-eval78.9%
+-commutative78.9%
unsub-neg78.9%
distribute-frac-neg278.9%
remove-double-neg78.9%
Simplified78.9%
Taylor expanded in z around 0 99.3%
Taylor expanded in y around inf 91.7%
associate-/l*96.1%
Simplified96.1%
Taylor expanded in x around 0 96.1%
Taylor expanded in x around 0 96.1%
Final simplification97.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1.2e+276)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x))
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.2e+276) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = x * (log(x) + -1.0);
}
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 (x <= 1.2d+276) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x)
else
tmp = x * (log(x) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 1.2e+276) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x);
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.2e+276: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x) else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.2e+276) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x)); else tmp = Float64(x * Float64(log(x) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 1.2e+276) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.2e+276], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 1.2 \cdot 10^{+276}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 1.20000000000000001e276Initial program 95.7%
if 1.20000000000000001e276 < x Initial program 55.9%
remove-double-neg55.9%
distribute-frac-neg255.9%
sub-neg55.9%
associate-+l+55.9%
fma-define56.1%
sub-neg56.1%
metadata-eval56.1%
+-commutative56.1%
unsub-neg56.1%
distribute-frac-neg256.1%
remove-double-neg56.1%
Simplified56.1%
Taylor expanded in x around inf 99.4%
sub-neg99.4%
mul-1-neg99.4%
log-rec99.4%
remove-double-neg99.4%
metadata-eval99.4%
Simplified99.4%
Final simplification96.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 0.083333333333333 (/ 1.0 x))))
(if (<= z -4.3e+28)
(+
t_0
(*
z
(-
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(/ 0.0027777777777778 x))))
(if (<= z 1.05e+62)
(- (+ 0.91893853320467 (+ t_0 (* (log x) (- x 0.5)))) x)
(+
t_0
(*
z
(+
(* z (* y (+ (/ 1.0 x) (/ 0.0007936500793651 (* x y)))))
(* 0.0027777777777778 (/ -1.0 x)))))))))
double code(double x, double y, double z) {
double t_0 = 0.083333333333333 * (1.0 / x);
double tmp;
if (z <= -4.3e+28) {
tmp = t_0 + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) - (0.0027777777777778 / x)));
} else if (z <= 1.05e+62) {
tmp = (0.91893853320467 + (t_0 + (log(x) * (x - 0.5)))) - x;
} else {
tmp = t_0 + (z * ((z * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))))) + (0.0027777777777778 * (-1.0 / 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) :: t_0
real(8) :: tmp
t_0 = 0.083333333333333d0 * (1.0d0 / x)
if (z <= (-4.3d+28)) then
tmp = t_0 + (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) - (0.0027777777777778d0 / x)))
else if (z <= 1.05d+62) then
tmp = (0.91893853320467d0 + (t_0 + (log(x) * (x - 0.5d0)))) - x
else
tmp = t_0 + (z * ((z * (y * ((1.0d0 / x) + (0.0007936500793651d0 / (x * y))))) + (0.0027777777777778d0 * ((-1.0d0) / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.083333333333333 * (1.0 / x);
double tmp;
if (z <= -4.3e+28) {
tmp = t_0 + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) - (0.0027777777777778 / x)));
} else if (z <= 1.05e+62) {
tmp = (0.91893853320467 + (t_0 + (Math.log(x) * (x - 0.5)))) - x;
} else {
tmp = t_0 + (z * ((z * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))))) + (0.0027777777777778 * (-1.0 / x))));
}
return tmp;
}
def code(x, y, z): t_0 = 0.083333333333333 * (1.0 / x) tmp = 0 if z <= -4.3e+28: tmp = t_0 + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) - (0.0027777777777778 / x))) elif z <= 1.05e+62: tmp = (0.91893853320467 + (t_0 + (math.log(x) * (x - 0.5)))) - x else: tmp = t_0 + (z * ((z * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))))) + (0.0027777777777778 * (-1.0 / x)))) return tmp
function code(x, y, z) t_0 = Float64(0.083333333333333 * Float64(1.0 / x)) tmp = 0.0 if (z <= -4.3e+28) tmp = Float64(t_0 + Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) - Float64(0.0027777777777778 / x)))); elseif (z <= 1.05e+62) tmp = Float64(Float64(0.91893853320467 + Float64(t_0 + Float64(log(x) * Float64(x - 0.5)))) - x); else tmp = Float64(t_0 + Float64(z * Float64(Float64(z * Float64(y * Float64(Float64(1.0 / x) + Float64(0.0007936500793651 / Float64(x * y))))) + Float64(0.0027777777777778 * Float64(-1.0 / x))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.083333333333333 * (1.0 / x); tmp = 0.0; if (z <= -4.3e+28) tmp = t_0 + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) - (0.0027777777777778 / x))); elseif (z <= 1.05e+62) tmp = (0.91893853320467 + (t_0 + (log(x) * (x - 0.5)))) - x; else tmp = t_0 + (z * ((z * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))))) + (0.0027777777777778 * (-1.0 / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.3e+28], N[(t$95$0 + N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.05e+62], N[(N[(0.91893853320467 + N[(t$95$0 + N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision], N[(t$95$0 + N[(z * N[(N[(z * N[(y * N[(N[(1.0 / x), $MachinePrecision] + N[(0.0007936500793651 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{+28}:\\
\;\;\;\;t\_0 + z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right)\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+62}:\\
\;\;\;\;\left(0.91893853320467 + \left(t\_0 + \log x \cdot \left(x - 0.5\right)\right)\right) - x\\
\mathbf{else}:\\
\;\;\;\;t\_0 + z \cdot \left(z \cdot \left(y \cdot \left(\frac{1}{x} + \frac{0.0007936500793651}{x \cdot y}\right)\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right)\\
\end{array}
\end{array}
if z < -4.29999999999999975e28Initial program 76.0%
remove-double-neg76.0%
distribute-frac-neg276.0%
sub-neg76.0%
associate-+l+76.0%
fma-define76.0%
sub-neg76.0%
metadata-eval76.0%
+-commutative76.0%
unsub-neg76.0%
distribute-frac-neg276.0%
remove-double-neg76.0%
Simplified76.0%
Taylor expanded in x around 0 72.0%
Taylor expanded in z around 0 77.8%
Taylor expanded in x around 0 77.8%
if -4.29999999999999975e28 < z < 1.05e62Initial program 98.8%
remove-double-neg98.8%
distribute-frac-neg298.8%
sub-neg98.8%
associate-+l+98.8%
fma-define98.9%
sub-neg98.9%
metadata-eval98.9%
+-commutative98.9%
unsub-neg98.9%
distribute-frac-neg298.9%
remove-double-neg98.9%
Simplified98.9%
Taylor expanded in z around 0 92.6%
if 1.05e62 < z Initial program 91.2%
remove-double-neg91.2%
distribute-frac-neg291.2%
sub-neg91.2%
associate-+l+91.2%
fma-define91.2%
sub-neg91.2%
metadata-eval91.2%
+-commutative91.2%
unsub-neg91.2%
distribute-frac-neg291.2%
remove-double-neg91.2%
Simplified91.2%
Taylor expanded in x around 0 85.7%
Taylor expanded in z around 0 90.6%
Taylor expanded in y around inf 90.6%
associate-*r/90.6%
metadata-eval90.6%
*-commutative90.6%
Simplified90.6%
Final simplification89.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 0.083333333333333 (/ 1.0 x))))
(if (<= z -1.26e+29)
(+
t_0
(*
z
(-
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(/ 0.0027777777777778 x))))
(if (<= z 2.7e+54)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ 0.083333333333333 x))
(+
t_0
(*
z
(+
(* z (* y (+ (/ 1.0 x) (/ 0.0007936500793651 (* x y)))))
(* 0.0027777777777778 (/ -1.0 x)))))))))
double code(double x, double y, double z) {
double t_0 = 0.083333333333333 * (1.0 / x);
double tmp;
if (z <= -1.26e+29) {
tmp = t_0 + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) - (0.0027777777777778 / x)));
} else if (z <= 2.7e+54) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
} else {
tmp = t_0 + (z * ((z * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))))) + (0.0027777777777778 * (-1.0 / 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) :: t_0
real(8) :: tmp
t_0 = 0.083333333333333d0 * (1.0d0 / x)
if (z <= (-1.26d+29)) then
tmp = t_0 + (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) - (0.0027777777777778d0 / x)))
else if (z <= 2.7d+54) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + (0.083333333333333d0 / x)
else
tmp = t_0 + (z * ((z * (y * ((1.0d0 / x) + (0.0007936500793651d0 / (x * y))))) + (0.0027777777777778d0 * ((-1.0d0) / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = 0.083333333333333 * (1.0 / x);
double tmp;
if (z <= -1.26e+29) {
tmp = t_0 + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) - (0.0027777777777778 / x)));
} else if (z <= 2.7e+54) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x);
} else {
tmp = t_0 + (z * ((z * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))))) + (0.0027777777777778 * (-1.0 / x))));
}
return tmp;
}
def code(x, y, z): t_0 = 0.083333333333333 * (1.0 / x) tmp = 0 if z <= -1.26e+29: tmp = t_0 + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) - (0.0027777777777778 / x))) elif z <= 2.7e+54: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x) else: tmp = t_0 + (z * ((z * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))))) + (0.0027777777777778 * (-1.0 / x)))) return tmp
function code(x, y, z) t_0 = Float64(0.083333333333333 * Float64(1.0 / x)) tmp = 0.0 if (z <= -1.26e+29) tmp = Float64(t_0 + Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) - Float64(0.0027777777777778 / x)))); elseif (z <= 2.7e+54) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(0.083333333333333 / x)); else tmp = Float64(t_0 + Float64(z * Float64(Float64(z * Float64(y * Float64(Float64(1.0 / x) + Float64(0.0007936500793651 / Float64(x * y))))) + Float64(0.0027777777777778 * Float64(-1.0 / x))))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = 0.083333333333333 * (1.0 / x); tmp = 0.0; if (z <= -1.26e+29) tmp = t_0 + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) - (0.0027777777777778 / x))); elseif (z <= 2.7e+54) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + (0.083333333333333 / x); else tmp = t_0 + (z * ((z * (y * ((1.0 / x) + (0.0007936500793651 / (x * y))))) + (0.0027777777777778 * (-1.0 / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.26e+29], N[(t$95$0 + N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e+54], N[(N[(0.91893853320467 + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision] + N[(0.083333333333333 / x), $MachinePrecision]), $MachinePrecision], N[(t$95$0 + N[(z * N[(N[(z * N[(y * N[(N[(1.0 / x), $MachinePrecision] + N[(0.0007936500793651 / N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.0027777777777778 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.083333333333333 \cdot \frac{1}{x}\\
\mathbf{if}\;z \leq -1.26 \cdot 10^{+29}:\\
\;\;\;\;t\_0 + z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right)\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{+54}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333}{x}\\
\mathbf{else}:\\
\;\;\;\;t\_0 + z \cdot \left(z \cdot \left(y \cdot \left(\frac{1}{x} + \frac{0.0007936500793651}{x \cdot y}\right)\right) + 0.0027777777777778 \cdot \frac{-1}{x}\right)\\
\end{array}
\end{array}
if z < -1.26e29Initial program 76.0%
remove-double-neg76.0%
distribute-frac-neg276.0%
sub-neg76.0%
associate-+l+76.0%
fma-define76.0%
sub-neg76.0%
metadata-eval76.0%
+-commutative76.0%
unsub-neg76.0%
distribute-frac-neg276.0%
remove-double-neg76.0%
Simplified76.0%
Taylor expanded in x around 0 72.0%
Taylor expanded in z around 0 77.8%
Taylor expanded in x around 0 77.8%
if -1.26e29 < z < 2.70000000000000011e54Initial program 98.8%
Taylor expanded in z around 0 92.1%
if 2.70000000000000011e54 < z Initial program 91.2%
remove-double-neg91.2%
distribute-frac-neg291.2%
sub-neg91.2%
associate-+l+91.2%
fma-define91.2%
sub-neg91.2%
metadata-eval91.2%
+-commutative91.2%
unsub-neg91.2%
distribute-frac-neg291.2%
remove-double-neg91.2%
Simplified91.2%
Taylor expanded in x around 0 85.7%
Taylor expanded in z around 0 90.6%
Taylor expanded in y around inf 90.6%
associate-*r/90.6%
metadata-eval90.6%
*-commutative90.6%
Simplified90.6%
Final simplification89.2%
(FPCore (x y z)
:precision binary64
(if (<= x 4.8e+94)
(/
(+
0.083333333333333
(* z (- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778)))
x)
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 4.8e+94) {
tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x;
} else {
tmp = x * (log(x) + -1.0);
}
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 (x <= 4.8d+94) then
tmp = (0.083333333333333d0 + (z * (((z * 0.0007936500793651d0) + (z * y)) - 0.0027777777777778d0))) / x
else
tmp = x * (log(x) + (-1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 4.8e+94) {
tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x;
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 4.8e+94: tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 4.8e+94) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778))) / x); else tmp = Float64(x * Float64(log(x) + -1.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 4.8e+94) tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x; else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 4.8e+94], N[(N[(0.083333333333333 + N[(z * N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(x * N[(N[Log[x], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 4.8 \cdot 10^{+94}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 4.79999999999999965e94Initial program 99.1%
remove-double-neg99.1%
distribute-frac-neg299.1%
sub-neg99.1%
associate-+l+99.1%
fma-define99.1%
sub-neg99.1%
metadata-eval99.1%
+-commutative99.1%
unsub-neg99.1%
distribute-frac-neg299.1%
remove-double-neg99.1%
Simplified99.1%
Taylor expanded in x around 0 87.9%
distribute-lft-in87.9%
Applied egg-rr87.9%
if 4.79999999999999965e94 < x Initial program 82.0%
remove-double-neg82.0%
distribute-frac-neg282.0%
sub-neg82.0%
associate-+l+82.0%
fma-define82.1%
sub-neg82.1%
metadata-eval82.1%
+-commutative82.1%
unsub-neg82.1%
distribute-frac-neg282.1%
remove-double-neg82.1%
Simplified82.1%
Taylor expanded in x around inf 77.6%
sub-neg77.6%
mul-1-neg77.6%
log-rec77.6%
remove-double-neg77.6%
metadata-eval77.6%
Simplified77.6%
(FPCore (x y z)
:precision binary64
(if (<= x 5e+48)
(/
(+
0.083333333333333
(* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778)))
x)
(+
(* 0.083333333333333 (/ 1.0 x))
(*
z
(-
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(/ 0.0027777777777778 x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 5e+48) {
tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
} else {
tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) - (0.0027777777777778 / 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 (x <= 5d+48) then
tmp = (0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x
else
tmp = (0.083333333333333d0 * (1.0d0 / x)) + (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) - (0.0027777777777778d0 / x)))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 5e+48) {
tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
} else {
tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) - (0.0027777777777778 / x)));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 5e+48: tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x else: tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) - (0.0027777777777778 / x))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 5e+48) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x); else tmp = Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(z * Float64(Float64(z * Float64(Float64(0.0007936500793651 * Float64(1.0 / x)) + Float64(y / x))) - Float64(0.0027777777777778 / x)))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 5e+48) tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x; else tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) - (0.0027777777777778 / x))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 5e+48], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(z * N[(N[(0.0007936500793651 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(0.0027777777777778 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{+48}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x} + z \cdot \left(z \cdot \left(0.0007936500793651 \cdot \frac{1}{x} + \frac{y}{x}\right) - \frac{0.0027777777777778}{x}\right)\\
\end{array}
\end{array}
if x < 4.99999999999999973e48Initial program 99.6%
remove-double-neg99.6%
distribute-frac-neg299.6%
sub-neg99.6%
associate-+l+99.6%
fma-define99.7%
sub-neg99.7%
metadata-eval99.7%
+-commutative99.7%
unsub-neg99.7%
distribute-frac-neg299.7%
remove-double-neg99.7%
Simplified99.7%
Taylor expanded in x around 0 92.1%
if 4.99999999999999973e48 < x Initial program 84.5%
remove-double-neg84.5%
distribute-frac-neg284.5%
sub-neg84.5%
associate-+l+84.5%
fma-define84.6%
sub-neg84.6%
metadata-eval84.6%
+-commutative84.6%
unsub-neg84.6%
distribute-frac-neg284.6%
remove-double-neg84.6%
Simplified84.6%
Taylor expanded in x around 0 27.3%
Taylor expanded in z around 0 32.1%
Taylor expanded in x around 0 32.1%
Final simplification66.1%
(FPCore (x y z)
:precision binary64
(if (or (<= y -19000.0) (not (<= y 3.4e-17)))
(/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x)
(/
(+ 0.083333333333333 (* z (- (* z 0.0007936500793651) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
double tmp;
if ((y <= -19000.0) || !(y <= 3.4e-17)) {
tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / 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 <= (-19000.0d0)) .or. (.not. (y <= 3.4d-17))) then
tmp = (0.083333333333333d0 + (z * ((z * y) - 0.0027777777777778d0))) / x
else
tmp = (0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -19000.0) || !(y <= 3.4e-17)) {
tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x;
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -19000.0) or not (y <= 3.4e-17): tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x else: tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -19000.0) || !(y <= 3.4e-17)) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x); else tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -19000.0) || ~((y <= 3.4e-17))) tmp = (0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x; else tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -19000.0], N[Not[LessEqual[y, 3.4e-17]], $MachinePrecision]], N[(N[(0.083333333333333 + N[(z * N[(N[(z * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -19000 \lor \neg \left(y \leq 3.4 \cdot 10^{-17}\right):\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if y < -19000 or 3.3999999999999998e-17 < y Initial program 93.2%
remove-double-neg93.2%
distribute-frac-neg293.2%
sub-neg93.2%
associate-+l+93.2%
fma-define93.2%
sub-neg93.2%
metadata-eval93.2%
+-commutative93.2%
unsub-neg93.2%
distribute-frac-neg293.2%
remove-double-neg93.2%
Simplified93.2%
Taylor expanded in x around 0 67.3%
Taylor expanded in y around inf 67.2%
*-commutative67.2%
Simplified67.2%
if -19000 < y < 3.3999999999999998e-17Initial program 93.0%
remove-double-neg93.0%
distribute-frac-neg293.0%
sub-neg93.0%
associate-+l+93.0%
fma-define93.0%
sub-neg93.0%
metadata-eval93.0%
+-commutative93.0%
unsub-neg93.0%
distribute-frac-neg293.0%
remove-double-neg93.0%
Simplified93.0%
Taylor expanded in x around 0 60.5%
Taylor expanded in y around 0 60.5%
*-commutative60.5%
Simplified60.5%
Final simplification63.9%
(FPCore (x y z)
:precision binary64
(if (<= y -7200000.0)
(/ (+ 0.083333333333333 (* z -0.0027777777777778)) x)
(/
(+ 0.083333333333333 (* z (- (* z 0.0007936500793651) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
double tmp;
if (y <= -7200000.0) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / 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 <= (-7200000.0d0)) then
tmp = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
else
tmp = (0.083333333333333d0 + (z * ((z * 0.0007936500793651d0) - 0.0027777777777778d0))) / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -7200000.0) {
tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x;
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -7200000.0: tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x else: tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x return tmp
function code(x, y, z) tmp = 0.0 if (y <= -7200000.0) tmp = Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x); else tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * 0.0007936500793651) - 0.0027777777777778))) / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -7200000.0) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; else tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -7200000.0], N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision], N[(N[(0.083333333333333 + N[(z * N[(N[(z * 0.0007936500793651), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7200000:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if y < -7.2e6Initial program 94.2%
remove-double-neg94.2%
distribute-frac-neg294.2%
sub-neg94.2%
associate-+l+94.2%
fma-define94.4%
sub-neg94.4%
metadata-eval94.4%
+-commutative94.4%
unsub-neg94.4%
distribute-frac-neg294.4%
remove-double-neg94.4%
Simplified94.4%
Taylor expanded in x around 0 75.2%
Taylor expanded in z around 0 31.2%
*-commutative31.2%
Simplified31.2%
if -7.2e6 < y Initial program 92.6%
remove-double-neg92.6%
distribute-frac-neg292.6%
sub-neg92.6%
associate-+l+92.6%
fma-define92.7%
sub-neg92.7%
metadata-eval92.7%
+-commutative92.7%
unsub-neg92.7%
distribute-frac-neg292.7%
remove-double-neg92.7%
Simplified92.7%
Taylor expanded in x around 0 59.7%
Taylor expanded in y around 0 55.1%
*-commutative55.1%
Simplified55.1%
(FPCore (x y z) :precision binary64 (/ (+ 0.083333333333333 (* z (- (+ (* z 0.0007936500793651) (* z y)) 0.0027777777777778))) x))
double code(double x, double y, double z) {
return (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (0.083333333333333d0 + (z * (((z * 0.0007936500793651d0) + (z * y)) - 0.0027777777777778d0))) / x
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x;
}
def code(x, y, z): return (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x
function code(x, y, z) return Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(Float64(z * 0.0007936500793651) + Float64(z * y)) - 0.0027777777777778))) / x) end
function tmp = code(x, y, z) tmp = (0.083333333333333 + (z * (((z * 0.0007936500793651) + (z * y)) - 0.0027777777777778))) / x; end
code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(z * N[(N[(N[(z * 0.0007936500793651), $MachinePrecision] + N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(\left(z \cdot 0.0007936500793651 + z \cdot y\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 93.1%
remove-double-neg93.1%
distribute-frac-neg293.1%
sub-neg93.1%
associate-+l+93.1%
fma-define93.1%
sub-neg93.1%
metadata-eval93.1%
+-commutative93.1%
unsub-neg93.1%
distribute-frac-neg293.1%
remove-double-neg93.1%
Simplified93.1%
Taylor expanded in x around 0 64.0%
distribute-lft-in64.0%
Applied egg-rr64.0%
(FPCore (x y z) :precision binary64 (/ (+ 0.083333333333333 (* z (- (* z (+ y 0.0007936500793651)) 0.0027777777777778))) x))
double code(double x, double y, double z) {
return (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (0.083333333333333d0 + (z * ((z * (y + 0.0007936500793651d0)) - 0.0027777777777778d0))) / x
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x;
}
def code(x, y, z): return (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x
function code(x, y, z) return Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(y + 0.0007936500793651)) - 0.0027777777777778))) / x) end
function tmp = code(x, y, z) tmp = (0.083333333333333 + (z * ((z * (y + 0.0007936500793651)) - 0.0027777777777778))) / x; end
code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(y + 0.0007936500793651), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(y + 0.0007936500793651\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 93.1%
remove-double-neg93.1%
distribute-frac-neg293.1%
sub-neg93.1%
associate-+l+93.1%
fma-define93.1%
sub-neg93.1%
metadata-eval93.1%
+-commutative93.1%
unsub-neg93.1%
distribute-frac-neg293.1%
remove-double-neg93.1%
Simplified93.1%
Taylor expanded in x around 0 64.0%
Final simplification64.0%
(FPCore (x y z) :precision binary64 (+ (* 0.083333333333333 (/ 1.0 x)) (* -0.0027777777777778 (/ z x))))
double code(double x, double y, double z) {
return (0.083333333333333 * (1.0 / x)) + (-0.0027777777777778 * (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 = (0.083333333333333d0 * (1.0d0 / x)) + ((-0.0027777777777778d0) * (z / x))
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 * (1.0 / x)) + (-0.0027777777777778 * (z / x));
}
def code(x, y, z): return (0.083333333333333 * (1.0 / x)) + (-0.0027777777777778 * (z / x))
function code(x, y, z) return Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(-0.0027777777777778 * Float64(z / x))) end
function tmp = code(x, y, z) tmp = (0.083333333333333 * (1.0 / x)) + (-0.0027777777777778 * (z / x)); end
code[x_, y_, z_] := N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.083333333333333 \cdot \frac{1}{x} + -0.0027777777777778 \cdot \frac{z}{x}
\end{array}
Initial program 93.1%
remove-double-neg93.1%
distribute-frac-neg293.1%
sub-neg93.1%
associate-+l+93.1%
fma-define93.1%
sub-neg93.1%
metadata-eval93.1%
+-commutative93.1%
unsub-neg93.1%
distribute-frac-neg293.1%
remove-double-neg93.1%
Simplified93.1%
Taylor expanded in x around 0 64.0%
Taylor expanded in z around 0 34.5%
Final simplification34.5%
(FPCore (x y z) :precision binary64 (/ (+ 0.083333333333333 (* z -0.0027777777777778)) x))
double code(double x, double y, double z) {
return (0.083333333333333 + (z * -0.0027777777777778)) / x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (0.083333333333333d0 + (z * (-0.0027777777777778d0))) / x
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 + (z * -0.0027777777777778)) / x;
}
def code(x, y, z): return (0.083333333333333 + (z * -0.0027777777777778)) / x
function code(x, y, z) return Float64(Float64(0.083333333333333 + Float64(z * -0.0027777777777778)) / x) end
function tmp = code(x, y, z) tmp = (0.083333333333333 + (z * -0.0027777777777778)) / x; end
code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot -0.0027777777777778}{x}
\end{array}
Initial program 93.1%
remove-double-neg93.1%
distribute-frac-neg293.1%
sub-neg93.1%
associate-+l+93.1%
fma-define93.1%
sub-neg93.1%
metadata-eval93.1%
+-commutative93.1%
unsub-neg93.1%
distribute-frac-neg293.1%
remove-double-neg93.1%
Simplified93.1%
Taylor expanded in x around 0 64.0%
Taylor expanded in z around 0 34.2%
*-commutative34.2%
Simplified34.2%
(FPCore (x y z) :precision binary64 (* 0.083333333333333 (/ 1.0 x)))
double code(double x, double y, double z) {
return 0.083333333333333 * (1.0 / x);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 0.083333333333333d0 * (1.0d0 / x)
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 * (1.0 / x);
}
def code(x, y, z): return 0.083333333333333 * (1.0 / x)
function code(x, y, z) return Float64(0.083333333333333 * Float64(1.0 / x)) end
function tmp = code(x, y, z) tmp = 0.083333333333333 * (1.0 / x); end
code[x_, y_, z_] := N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
0.083333333333333 \cdot \frac{1}{x}
\end{array}
Initial program 93.1%
remove-double-neg93.1%
distribute-frac-neg293.1%
sub-neg93.1%
associate-+l+93.1%
fma-define93.1%
sub-neg93.1%
metadata-eval93.1%
+-commutative93.1%
unsub-neg93.1%
distribute-frac-neg293.1%
remove-double-neg93.1%
Simplified93.1%
Taylor expanded in x around 0 64.0%
Taylor expanded in z around 0 29.9%
div-inv30.1%
Applied egg-rr30.1%
(FPCore (x y z) :precision binary64 (/ 0.083333333333333 x))
double code(double x, double y, double z) {
return 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 = 0.083333333333333d0 / x
end function
public static double code(double x, double y, double z) {
return 0.083333333333333 / x;
}
def code(x, y, z): return 0.083333333333333 / x
function code(x, y, z) return Float64(0.083333333333333 / x) end
function tmp = code(x, y, z) tmp = 0.083333333333333 / x; end
code[x_, y_, z_] := N[(0.083333333333333 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333}{x}
\end{array}
Initial program 93.1%
remove-double-neg93.1%
distribute-frac-neg293.1%
sub-neg93.1%
associate-+l+93.1%
fma-define93.1%
sub-neg93.1%
metadata-eval93.1%
+-commutative93.1%
unsub-neg93.1%
distribute-frac-neg293.1%
remove-double-neg93.1%
Simplified93.1%
Taylor expanded in x around 0 64.0%
Taylor expanded in z around 0 29.9%
(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 2024156
(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)))