
(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 18 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 4e-89)
(*
(+
0.083333333333333
(fma z (* z (+ 0.0007936500793651 y)) (* z -0.0027777777777778)))
(/ 1.0 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 <= 4e-89) {
tmp = (0.083333333333333 + fma(z, (z * (0.0007936500793651 + y)), (z * -0.0027777777777778))) * (1.0 / 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 <= 4e-89) tmp = Float64(Float64(0.083333333333333 + fma(z, Float64(z * Float64(0.0007936500793651 + y)), Float64(z * -0.0027777777777778))) * Float64(1.0 / 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, 4e-89], N[(N[(0.083333333333333 + N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / 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 4 \cdot 10^{-89}:\\
\;\;\;\;\left(0.083333333333333 + \mathsf{fma}\left(z, z \cdot \left(0.0007936500793651 + y\right), z \cdot -0.0027777777777778\right)\right) \cdot \frac{1}{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.00000000000000015e-89Initial program 99.8%
remove-double-neg99.8%
distribute-frac-neg299.8%
sub-neg99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
unsub-neg99.8%
distribute-frac-neg299.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
add-cube-cbrt99.7%
pow399.7%
Applied egg-rr99.7%
rem-cube-cbrt99.8%
sub-neg99.8%
metadata-eval99.8%
distribute-rgt-in99.8%
*-commutative99.8%
Applied egg-rr99.8%
div-inv99.8%
*-commutative99.8%
fma-define99.9%
Applied egg-rr99.9%
if 4.00000000000000015e-89 < x Initial program 88.8%
remove-double-neg88.8%
distribute-frac-neg288.8%
sub-neg88.8%
associate-+l+88.8%
fma-define88.9%
sub-neg88.9%
metadata-eval88.9%
+-commutative88.9%
unsub-neg88.9%
distribute-frac-neg288.9%
remove-double-neg88.9%
Simplified88.9%
Taylor expanded in z around 0 99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x 8e-24)
(*
(+
0.083333333333333
(fma z (* z (+ 0.0007936500793651 y)) (* z -0.0027777777777778)))
(/ 1.0 x))
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+
(* (log x) (- x 0.5))
(* z (* (/ z x) (* y (+ 1.0 (* 0.0007936500793651 (/ 1.0 y)))))))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 8e-24) {
tmp = (0.083333333333333 + fma(z, (z * (0.0007936500793651 + y)), (z * -0.0027777777777778))) * (1.0 / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((log(x) * (x - 0.5)) + (z * ((z / x) * (y * (1.0 + (0.0007936500793651 * (1.0 / y))))))))) - x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 8e-24) tmp = Float64(Float64(0.083333333333333 + fma(z, Float64(z * Float64(0.0007936500793651 + y)), Float64(z * -0.0027777777777778))) * Float64(1.0 / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(log(x) * Float64(x - 0.5)) + Float64(z * Float64(Float64(z / x) * Float64(y * Float64(1.0 + Float64(0.0007936500793651 * Float64(1.0 / y))))))))) - x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 8e-24], N[(N[(0.083333333333333 + N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(z / x), $MachinePrecision] * N[(y * N[(1.0 + N[(0.0007936500793651 * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8 \cdot 10^{-24}:\\
\;\;\;\;\left(0.083333333333333 + \mathsf{fma}\left(z, z \cdot \left(0.0007936500793651 + y\right), z \cdot -0.0027777777777778\right)\right) \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(\log x \cdot \left(x - 0.5\right) + z \cdot \left(\frac{z}{x} \cdot \left(y \cdot \left(1 + 0.0007936500793651 \cdot \frac{1}{y}\right)\right)\right)\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 7.99999999999999939e-24Initial program 99.7%
remove-double-neg99.7%
distribute-frac-neg299.7%
sub-neg99.7%
associate-+l+99.7%
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 99.7%
add-cube-cbrt99.6%
pow399.7%
Applied egg-rr99.7%
rem-cube-cbrt99.7%
sub-neg99.7%
metadata-eval99.7%
distribute-rgt-in99.7%
*-commutative99.7%
Applied egg-rr99.7%
div-inv99.8%
*-commutative99.8%
fma-define99.8%
Applied egg-rr99.8%
if 7.99999999999999939e-24 < x Initial program 86.3%
remove-double-neg86.3%
distribute-frac-neg286.3%
sub-neg86.3%
associate-+l+86.3%
fma-define86.4%
sub-neg86.4%
metadata-eval86.4%
+-commutative86.4%
unsub-neg86.4%
distribute-frac-neg286.4%
remove-double-neg86.4%
Simplified86.4%
Taylor expanded in y around 0 74.5%
Taylor expanded in z around inf 89.1%
*-commutative89.1%
associate-*r/89.1%
metadata-eval89.1%
unpow289.1%
associate-*r*99.6%
*-commutative99.6%
distribute-rgt-in98.8%
associate-*l/98.8%
associate-*r/98.8%
associate-*l/98.8%
associate-/l*98.8%
distribute-rgt-out99.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in y around inf 99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x 5e-59)
(*
(+
0.083333333333333
(fma z (* z (+ 0.0007936500793651 y)) (* z -0.0027777777777778)))
(/ 1.0 x))
(-
(+
0.91893853320467
(+
(* 0.083333333333333 (/ 1.0 x))
(+ (* (log x) (- x 0.5)) (* z (* (+ 0.0007936500793651 y) (/ z x))))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 5e-59) {
tmp = (0.083333333333333 + fma(z, (z * (0.0007936500793651 + y)), (z * -0.0027777777777778))) * (1.0 / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 * (1.0 / x)) + ((log(x) * (x - 0.5)) + (z * ((0.0007936500793651 + y) * (z / x)))))) - x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 5e-59) tmp = Float64(Float64(0.083333333333333 + fma(z, Float64(z * Float64(0.0007936500793651 + y)), Float64(z * -0.0027777777777778))) * Float64(1.0 / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(Float64(log(x) * Float64(x - 0.5)) + Float64(z * Float64(Float64(0.0007936500793651 + y) * Float64(z / x)))))) - x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 5e-59], N[(N[(0.083333333333333 + N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 5 \cdot 10^{-59}:\\
\;\;\;\;\left(0.083333333333333 + \mathsf{fma}\left(z, z \cdot \left(0.0007936500793651 + y\right), z \cdot -0.0027777777777778\right)\right) \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(0.083333333333333 \cdot \frac{1}{x} + \left(\log x \cdot \left(x - 0.5\right) + z \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right)\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 5.0000000000000001e-59Initial program 99.8%
remove-double-neg99.8%
distribute-frac-neg299.8%
sub-neg99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
unsub-neg99.8%
distribute-frac-neg299.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
add-cube-cbrt99.7%
pow399.7%
Applied egg-rr99.7%
rem-cube-cbrt99.8%
sub-neg99.8%
metadata-eval99.8%
distribute-rgt-in99.8%
*-commutative99.8%
Applied egg-rr99.8%
div-inv99.8%
*-commutative99.8%
fma-define99.8%
Applied egg-rr99.8%
if 5.0000000000000001e-59 < x Initial program 87.9%
remove-double-neg87.9%
distribute-frac-neg287.9%
sub-neg87.9%
associate-+l+87.9%
fma-define87.9%
sub-neg87.9%
metadata-eval87.9%
+-commutative87.9%
unsub-neg87.9%
distribute-frac-neg287.9%
remove-double-neg87.9%
Simplified87.9%
Taylor expanded in y around 0 76.2%
Taylor expanded in z around inf 90.4%
*-commutative90.4%
associate-*r/90.4%
metadata-eval90.4%
unpow290.4%
associate-*r*99.6%
*-commutative99.6%
distribute-rgt-in98.9%
associate-*l/98.9%
associate-*r/98.9%
associate-*l/98.9%
associate-/l*98.9%
distribute-rgt-out99.6%
Simplified99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x 2e-49)
(*
(+
0.083333333333333
(fma z (* z (+ 0.0007936500793651 y)) (* z -0.0027777777777778)))
(/ 1.0 x))
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+ (* (log x) (- x 0.5)) (* z (* (+ 0.0007936500793651 y) (/ z x))))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 2e-49) {
tmp = (0.083333333333333 + fma(z, (z * (0.0007936500793651 + y)), (z * -0.0027777777777778))) * (1.0 / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((log(x) * (x - 0.5)) + (z * ((0.0007936500793651 + y) * (z / x)))))) - x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 2e-49) tmp = Float64(Float64(0.083333333333333 + fma(z, Float64(z * Float64(0.0007936500793651 + y)), Float64(z * -0.0027777777777778))) * Float64(1.0 / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(log(x) * Float64(x - 0.5)) + Float64(z * Float64(Float64(0.0007936500793651 + y) * Float64(z / x)))))) - x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 2e-49], N[(N[(0.083333333333333 + N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(N[Log[x], $MachinePrecision] * N[(x - 0.5), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 2 \cdot 10^{-49}:\\
\;\;\;\;\left(0.083333333333333 + \mathsf{fma}\left(z, z \cdot \left(0.0007936500793651 + y\right), z \cdot -0.0027777777777778\right)\right) \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(\log x \cdot \left(x - 0.5\right) + z \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right)\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 1.99999999999999987e-49Initial program 99.8%
remove-double-neg99.8%
distribute-frac-neg299.8%
sub-neg99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
unsub-neg99.8%
distribute-frac-neg299.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
add-cube-cbrt99.7%
pow399.7%
Applied egg-rr99.7%
rem-cube-cbrt99.8%
sub-neg99.8%
metadata-eval99.8%
distribute-rgt-in99.8%
*-commutative99.8%
Applied egg-rr99.8%
div-inv99.8%
*-commutative99.8%
fma-define99.8%
Applied egg-rr99.8%
if 1.99999999999999987e-49 < x Initial program 87.6%
remove-double-neg87.6%
distribute-frac-neg287.6%
sub-neg87.6%
associate-+l+87.6%
fma-define87.7%
sub-neg87.7%
metadata-eval87.7%
+-commutative87.7%
unsub-neg87.7%
distribute-frac-neg287.7%
remove-double-neg87.7%
Simplified87.7%
Taylor expanded in y around 0 75.7%
Taylor expanded in z around inf 90.2%
*-commutative90.2%
associate-*r/90.2%
metadata-eval90.2%
unpow290.2%
associate-*r*99.6%
*-commutative99.6%
distribute-rgt-in98.9%
associate-*l/98.9%
associate-*r/98.9%
associate-*l/98.9%
associate-/l*98.9%
distribute-rgt-out99.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x 175000000000.0)
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x))
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+ (* z (* (+ 0.0007936500793651 y) (/ z x))) (* x (log x)))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 175000000000.0) {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((0.0007936500793651 + y) * (z / x))) + (x * log(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) :: tmp
if (x <= 175000000000.0d0) then
tmp = (0.91893853320467d0 + ((log(x) * (x - 0.5d0)) - x)) + ((0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x)
else
tmp = (0.91893853320467d0 + ((0.083333333333333d0 / x) + ((z * ((0.0007936500793651d0 + y) * (z / x))) + (x * log(x))))) - x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 175000000000.0) {
tmp = (0.91893853320467 + ((Math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((0.0007936500793651 + y) * (z / x))) + (x * Math.log(x))))) - x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 175000000000.0: tmp = (0.91893853320467 + ((math.log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x) else: tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((0.0007936500793651 + y) * (z / x))) + (x * math.log(x))))) - x return tmp
function code(x, y, z) tmp = 0.0 if (x <= 175000000000.0) tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(0.0007936500793651 + y) * Float64(z / x))) + Float64(x * log(x))))) - x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 175000000000.0) tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x); else tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((0.0007936500793651 + y) * (z / x))) + (x * log(x))))) - x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 175000000000.0], 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[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 175000000000:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right) + x \cdot \log x\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 1.75e11Initial program 99.8%
if 1.75e11 < x Initial program 84.9%
remove-double-neg84.9%
distribute-frac-neg284.9%
sub-neg84.9%
associate-+l+84.9%
fma-define85.0%
sub-neg85.0%
metadata-eval85.0%
+-commutative85.0%
unsub-neg85.0%
distribute-frac-neg285.0%
remove-double-neg85.0%
Simplified85.0%
Taylor expanded in y around 0 74.5%
Taylor expanded in z around inf 88.0%
*-commutative88.0%
associate-*r/88.0%
metadata-eval88.0%
unpow288.0%
associate-*r*99.6%
*-commutative99.6%
distribute-rgt-in99.6%
associate-*l/99.6%
associate-*r/99.6%
associate-*l/99.5%
associate-/l*99.5%
distribute-rgt-out99.5%
Simplified99.5%
Taylor expanded in x around 0 99.5%
Taylor expanded in x around inf 99.5%
Final simplification99.7%
(FPCore (x y z)
:precision binary64
(if (<= x 3e-49)
(*
(+
0.083333333333333
(fma z (* z (+ 0.0007936500793651 y)) (* z -0.0027777777777778)))
(/ 1.0 x))
(-
(+
0.91893853320467
(+
(/ 0.083333333333333 x)
(+ (* z (* (+ 0.0007936500793651 y) (/ z x))) (* x (log x)))))
x)))
double code(double x, double y, double z) {
double tmp;
if (x <= 3e-49) {
tmp = (0.083333333333333 + fma(z, (z * (0.0007936500793651 + y)), (z * -0.0027777777777778))) * (1.0 / x);
} else {
tmp = (0.91893853320467 + ((0.083333333333333 / x) + ((z * ((0.0007936500793651 + y) * (z / x))) + (x * log(x))))) - x;
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 3e-49) tmp = Float64(Float64(0.083333333333333 + fma(z, Float64(z * Float64(0.0007936500793651 + y)), Float64(z * -0.0027777777777778))) * Float64(1.0 / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(0.083333333333333 / x) + Float64(Float64(z * Float64(Float64(0.0007936500793651 + y) * Float64(z / x))) + Float64(x * log(x))))) - x); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 3e-49], N[(N[(0.083333333333333 + N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], N[(N[(0.91893853320467 + N[(N[(0.083333333333333 / x), $MachinePrecision] + N[(N[(z * N[(N[(0.0007936500793651 + y), $MachinePrecision] * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * N[Log[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 3 \cdot 10^{-49}:\\
\;\;\;\;\left(0.083333333333333 + \mathsf{fma}\left(z, z \cdot \left(0.0007936500793651 + y\right), z \cdot -0.0027777777777778\right)\right) \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\frac{0.083333333333333}{x} + \left(z \cdot \left(\left(0.0007936500793651 + y\right) \cdot \frac{z}{x}\right) + x \cdot \log x\right)\right)\right) - x\\
\end{array}
\end{array}
if x < 3e-49Initial program 99.8%
remove-double-neg99.8%
distribute-frac-neg299.8%
sub-neg99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
unsub-neg99.8%
distribute-frac-neg299.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
add-cube-cbrt99.7%
pow399.7%
Applied egg-rr99.7%
rem-cube-cbrt99.8%
sub-neg99.8%
metadata-eval99.8%
distribute-rgt-in99.8%
*-commutative99.8%
Applied egg-rr99.8%
div-inv99.8%
*-commutative99.8%
fma-define99.8%
Applied egg-rr99.8%
if 3e-49 < x Initial program 87.6%
remove-double-neg87.6%
distribute-frac-neg287.6%
sub-neg87.6%
associate-+l+87.6%
fma-define87.7%
sub-neg87.7%
metadata-eval87.7%
+-commutative87.7%
unsub-neg87.7%
distribute-frac-neg287.7%
remove-double-neg87.7%
Simplified87.7%
Taylor expanded in y around 0 75.7%
Taylor expanded in z around inf 90.2%
*-commutative90.2%
associate-*r/90.2%
metadata-eval90.2%
unpow290.2%
associate-*r*99.6%
*-commutative99.6%
distribute-rgt-in98.9%
associate-*l/98.9%
associate-*r/98.9%
associate-*l/98.9%
associate-/l*98.9%
distribute-rgt-out99.6%
Simplified99.6%
Taylor expanded in x around 0 99.6%
Taylor expanded in x around inf 98.8%
Final simplification99.2%
(FPCore (x y z)
:precision binary64
(if (<= x 65000000.0)
(*
(+
0.083333333333333
(fma z (* z (+ 0.0007936500793651 y)) (* z -0.0027777777777778)))
(/ 1.0 x))
(+
(+ 0.91893853320467 (- (* (log x) (- x 0.5)) x))
(/ (+ 0.083333333333333 (* z (- (* z y) 0.0027777777777778))) x))))
double code(double x, double y, double z) {
double tmp;
if (x <= 65000000.0) {
tmp = (0.083333333333333 + fma(z, (z * (0.0007936500793651 + y)), (z * -0.0027777777777778))) * (1.0 / x);
} else {
tmp = (0.91893853320467 + ((log(x) * (x - 0.5)) - x)) + ((0.083333333333333 + (z * ((z * y) - 0.0027777777777778))) / x);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 65000000.0) tmp = Float64(Float64(0.083333333333333 + fma(z, Float64(z * Float64(0.0007936500793651 + y)), Float64(z * -0.0027777777777778))) * Float64(1.0 / x)); else tmp = Float64(Float64(0.91893853320467 + Float64(Float64(log(x) * Float64(x - 0.5)) - x)) + Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * y) - 0.0027777777777778))) / x)); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 65000000.0], N[(N[(0.083333333333333 + N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / x), $MachinePrecision]), $MachinePrecision], 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 * y), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 65000000:\\
\;\;\;\;\left(0.083333333333333 + \mathsf{fma}\left(z, z \cdot \left(0.0007936500793651 + y\right), z \cdot -0.0027777777777778\right)\right) \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(0.91893853320467 + \left(\log x \cdot \left(x - 0.5\right) - x\right)\right) + \frac{0.083333333333333 + z \cdot \left(z \cdot y - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if x < 6.5e7Initial program 99.8%
remove-double-neg99.8%
distribute-frac-neg299.8%
sub-neg99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
unsub-neg99.8%
distribute-frac-neg299.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 99.0%
add-cube-cbrt98.8%
pow398.9%
Applied egg-rr98.9%
rem-cube-cbrt99.0%
sub-neg99.0%
metadata-eval99.0%
distribute-rgt-in99.0%
*-commutative99.0%
Applied egg-rr99.0%
div-inv99.0%
*-commutative99.0%
fma-define99.1%
Applied egg-rr99.1%
if 6.5e7 < x Initial program 85.0%
Taylor expanded in y around inf 82.9%
*-commutative82.9%
Simplified82.9%
Final simplification91.4%
(FPCore (x y z)
:precision binary64
(if (<= x 1.9e+91)
(*
(+
0.083333333333333
(fma z (* z (+ 0.0007936500793651 y)) (* z -0.0027777777777778)))
(/ 1.0 x))
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.9e+91) {
tmp = (0.083333333333333 + fma(z, (z * (0.0007936500793651 + y)), (z * -0.0027777777777778))) * (1.0 / x);
} else {
tmp = x * (log(x) + -1.0);
}
return tmp;
}
function code(x, y, z) tmp = 0.0 if (x <= 1.9e+91) tmp = Float64(Float64(0.083333333333333 + fma(z, Float64(z * Float64(0.0007936500793651 + y)), Float64(z * -0.0027777777777778))) * Float64(1.0 / x)); else tmp = Float64(x * Float64(log(x) + -1.0)); end return tmp end
code[x_, y_, z_] := If[LessEqual[x, 1.9e+91], N[(N[(0.083333333333333 + N[(z * N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] + N[(z * -0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / 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.9 \cdot 10^{+91}:\\
\;\;\;\;\left(0.083333333333333 + \mathsf{fma}\left(z, z \cdot \left(0.0007936500793651 + y\right), z \cdot -0.0027777777777778\right)\right) \cdot \frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 1.8999999999999999e91Initial program 98.7%
remove-double-neg98.7%
distribute-frac-neg298.7%
sub-neg98.7%
associate-+l+98.7%
fma-define98.7%
sub-neg98.7%
metadata-eval98.7%
+-commutative98.7%
unsub-neg98.7%
distribute-frac-neg298.7%
remove-double-neg98.7%
Simplified98.7%
Taylor expanded in x around 0 92.1%
add-cube-cbrt91.9%
pow391.9%
Applied egg-rr91.9%
rem-cube-cbrt92.1%
sub-neg92.1%
metadata-eval92.1%
distribute-rgt-in92.1%
*-commutative92.1%
Applied egg-rr92.1%
div-inv92.1%
*-commutative92.1%
fma-define92.1%
Applied egg-rr92.1%
if 1.8999999999999999e91 < x Initial program 82.7%
remove-double-neg82.7%
distribute-frac-neg282.7%
sub-neg82.7%
associate-+l+82.7%
fma-define82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
unsub-neg82.8%
distribute-frac-neg282.8%
remove-double-neg82.8%
Simplified82.8%
Taylor expanded in x around inf 81.6%
sub-neg81.6%
mul-1-neg81.6%
log-rec81.6%
remove-double-neg81.6%
metadata-eval81.6%
Simplified81.6%
(FPCore (x y z)
:precision binary64
(if (<= x 1.3e+95)
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
(* x (+ (log x) -1.0))))
double code(double x, double y, double z) {
double tmp;
if (x <= 1.3e+95) {
tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + 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 <= 1.3d+95) then
tmp = (0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + 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 <= 1.3e+95) {
tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x;
} else {
tmp = x * (Math.log(x) + -1.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 1.3e+95: tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x else: tmp = x * (math.log(x) + -1.0) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 1.3e+95) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + 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 <= 1.3e+95) tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x; else tmp = x * (log(x) + -1.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 1.3e+95], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + 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 1.3 \cdot 10^{+95}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x + -1\right)\\
\end{array}
\end{array}
if x < 1.29999999999999995e95Initial program 98.7%
remove-double-neg98.7%
distribute-frac-neg298.7%
sub-neg98.7%
associate-+l+98.7%
fma-define98.7%
sub-neg98.7%
metadata-eval98.7%
+-commutative98.7%
unsub-neg98.7%
distribute-frac-neg298.7%
remove-double-neg98.7%
Simplified98.7%
Taylor expanded in x around 0 92.1%
if 1.29999999999999995e95 < x Initial program 82.7%
remove-double-neg82.7%
distribute-frac-neg282.7%
sub-neg82.7%
associate-+l+82.7%
fma-define82.8%
sub-neg82.8%
metadata-eval82.8%
+-commutative82.8%
unsub-neg82.8%
distribute-frac-neg282.8%
remove-double-neg82.8%
Simplified82.8%
Taylor expanded in x around inf 81.6%
sub-neg81.6%
mul-1-neg81.6%
log-rec81.6%
remove-double-neg81.6%
metadata-eval81.6%
Simplified81.6%
(FPCore (x y z)
:precision binary64
(if (<= x 8e-85)
(/
(+
0.083333333333333
(* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778)))
x)
(+
(* 0.083333333333333 (/ 1.0 x))
(*
z
(+
(* z (+ (* 0.0007936500793651 (/ 1.0 x)) (/ y x)))
(* 0.0027777777777778 (/ -1.0 x)))))))
double code(double x, double y, double z) {
double tmp;
if (x <= 8e-85) {
tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x;
} else {
tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (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) :: tmp
if (x <= 8d-85) then
tmp = (0.083333333333333d0 + (z * ((z * (0.0007936500793651d0 + y)) - 0.0027777777777778d0))) / x
else
tmp = (0.083333333333333d0 * (1.0d0 / x)) + (z * ((z * ((0.0007936500793651d0 * (1.0d0 / x)) + (y / x))) + (0.0027777777777778d0 * ((-1.0d0) / x))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= 8e-85) {
tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x;
} else {
tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x))));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= 8e-85: tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x else: tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))) return tmp
function code(x, y, z) tmp = 0.0 if (x <= 8e-85) tmp = Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 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 * Float64(-1.0 / x))))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= 8e-85) tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x; else tmp = (0.083333333333333 * (1.0 / x)) + (z * ((z * ((0.0007936500793651 * (1.0 / x)) + (y / x))) + (0.0027777777777778 * (-1.0 / x)))); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, 8e-85], N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $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 * N[(-1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 8 \cdot 10^{-85}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\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) + 0.0027777777777778 \cdot \frac{-1}{x}\right)\\
\end{array}
\end{array}
if x < 7.9999999999999998e-85Initial program 99.8%
remove-double-neg99.8%
distribute-frac-neg299.8%
sub-neg99.8%
associate-+l+99.8%
fma-define99.8%
sub-neg99.8%
metadata-eval99.8%
+-commutative99.8%
unsub-neg99.8%
distribute-frac-neg299.8%
remove-double-neg99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
if 7.9999999999999998e-85 < x Initial program 88.7%
remove-double-neg88.7%
distribute-frac-neg288.7%
sub-neg88.7%
associate-+l+88.7%
fma-define88.7%
sub-neg88.7%
metadata-eval88.7%
+-commutative88.7%
unsub-neg88.7%
distribute-frac-neg288.7%
remove-double-neg88.7%
Simplified88.7%
Taylor expanded in x around 0 43.0%
add-cube-cbrt42.9%
pow342.9%
Applied egg-rr42.9%
Taylor expanded in z around 0 46.9%
Final simplification66.5%
(FPCore (x y z)
:precision binary64
(if (or (<= y -1150.0) (not (<= y 7.2e-15)))
(/ (+ 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 <= -1150.0) || !(y <= 7.2e-15)) {
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 <= (-1150.0d0)) .or. (.not. (y <= 7.2d-15))) 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 <= -1150.0) || !(y <= 7.2e-15)) {
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 <= -1150.0) or not (y <= 7.2e-15): 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 <= -1150.0) || !(y <= 7.2e-15)) 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 <= -1150.0) || ~((y <= 7.2e-15))) 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, -1150.0], N[Not[LessEqual[y, 7.2e-15]], $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 -1150 \lor \neg \left(y \leq 7.2 \cdot 10^{-15}\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 < -1150 or 7.2000000000000002e-15 < y Initial program 92.9%
remove-double-neg92.9%
distribute-frac-neg292.9%
sub-neg92.9%
associate-+l+92.9%
fma-define92.9%
sub-neg92.9%
metadata-eval92.9%
+-commutative92.9%
unsub-neg92.9%
distribute-frac-neg292.9%
remove-double-neg92.9%
Simplified92.9%
Taylor expanded in x around 0 62.3%
Taylor expanded in y around inf 62.3%
*-commutative62.3%
Simplified62.3%
if -1150 < y < 7.2000000000000002e-15Initial program 92.7%
remove-double-neg92.7%
distribute-frac-neg292.7%
sub-neg92.7%
associate-+l+92.7%
fma-define92.8%
sub-neg92.8%
metadata-eval92.8%
+-commutative92.8%
unsub-neg92.8%
distribute-frac-neg292.8%
remove-double-neg92.8%
Simplified92.8%
Taylor expanded in x around 0 65.8%
Taylor expanded in y around 0 65.3%
*-commutative65.3%
Simplified65.3%
Final simplification63.8%
(FPCore (x y z)
:precision binary64
(if (<= y -1350.0)
(+ (* 0.083333333333333 (/ 1.0 x)) (* -0.0027777777777778 (/ z x)))
(/
(+ 0.083333333333333 (* z (- (* z 0.0007936500793651) 0.0027777777777778)))
x)))
double code(double x, double y, double z) {
double tmp;
if (y <= -1350.0) {
tmp = (0.083333333333333 * (1.0 / x)) + (-0.0027777777777778 * (z / 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 <= (-1350.0d0)) then
tmp = (0.083333333333333d0 * (1.0d0 / x)) + ((-0.0027777777777778d0) * (z / 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 <= -1350.0) {
tmp = (0.083333333333333 * (1.0 / x)) + (-0.0027777777777778 * (z / x));
} else {
tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1350.0: tmp = (0.083333333333333 * (1.0 / x)) + (-0.0027777777777778 * (z / x)) else: tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1350.0) tmp = Float64(Float64(0.083333333333333 * Float64(1.0 / x)) + Float64(-0.0027777777777778 * Float64(z / 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 <= -1350.0) tmp = (0.083333333333333 * (1.0 / x)) + (-0.0027777777777778 * (z / x)); else tmp = (0.083333333333333 + (z * ((z * 0.0007936500793651) - 0.0027777777777778))) / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1350.0], N[(N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision] + N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision]), $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 -1350:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x} + -0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333 + z \cdot \left(z \cdot 0.0007936500793651 - 0.0027777777777778\right)}{x}\\
\end{array}
\end{array}
if y < -1350Initial program 91.2%
remove-double-neg91.2%
distribute-frac-neg291.2%
sub-neg91.2%
associate-+l+91.2%
fma-define91.3%
sub-neg91.3%
metadata-eval91.3%
+-commutative91.3%
unsub-neg91.3%
distribute-frac-neg291.3%
remove-double-neg91.3%
Simplified91.3%
Taylor expanded in x around 0 69.1%
Taylor expanded in z around 0 26.8%
*-commutative26.8%
Simplified26.8%
Taylor expanded in z around 0 26.8%
if -1350 < y Initial program 93.4%
remove-double-neg93.4%
distribute-frac-neg293.4%
sub-neg93.4%
associate-+l+93.4%
fma-define93.4%
sub-neg93.4%
metadata-eval93.4%
+-commutative93.4%
unsub-neg93.4%
distribute-frac-neg293.4%
remove-double-neg93.4%
Simplified93.4%
Taylor expanded in x around 0 62.3%
Taylor expanded in y around 0 58.9%
*-commutative58.9%
Simplified58.9%
Final simplification50.5%
(FPCore (x y z) :precision binary64 (/ (+ 0.083333333333333 (* z (- (* z (+ 0.0007936500793651 y)) 0.0027777777777778))) x))
double code(double x, double y, double z) {
return (0.083333333333333 + (z * ((z * (0.0007936500793651 + 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 + y)) - 0.0027777777777778d0))) / x
end function
public static double code(double x, double y, double z) {
return (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x;
}
def code(x, y, z): return (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x
function code(x, y, z) return Float64(Float64(0.083333333333333 + Float64(z * Float64(Float64(z * Float64(0.0007936500793651 + y)) - 0.0027777777777778))) / x) end
function tmp = code(x, y, z) tmp = (0.083333333333333 + (z * ((z * (0.0007936500793651 + y)) - 0.0027777777777778))) / x; end
code[x_, y_, z_] := N[(N[(0.083333333333333 + N[(z * N[(N[(z * N[(0.0007936500793651 + y), $MachinePrecision]), $MachinePrecision] - 0.0027777777777778), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.083333333333333 + z \cdot \left(z \cdot \left(0.0007936500793651 + y\right) - 0.0027777777777778\right)}{x}
\end{array}
Initial program 92.8%
remove-double-neg92.8%
distribute-frac-neg292.8%
sub-neg92.8%
associate-+l+92.8%
fma-define92.8%
sub-neg92.8%
metadata-eval92.8%
+-commutative92.8%
unsub-neg92.8%
distribute-frac-neg292.8%
remove-double-neg92.8%
Simplified92.8%
Taylor expanded in x around 0 64.1%
(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 92.8%
remove-double-neg92.8%
distribute-frac-neg292.8%
sub-neg92.8%
associate-+l+92.8%
fma-define92.8%
sub-neg92.8%
metadata-eval92.8%
+-commutative92.8%
unsub-neg92.8%
distribute-frac-neg292.8%
remove-double-neg92.8%
Simplified92.8%
Taylor expanded in x around 0 64.1%
Taylor expanded in z around 0 31.2%
*-commutative31.2%
Simplified31.2%
Taylor expanded in z around 0 31.2%
Final simplification31.2%
(FPCore (x y z) :precision binary64 (if (<= z -55000000000.0) (* -0.0027777777777778 (/ z x)) (* 0.083333333333333 (/ 1.0 x))))
double code(double x, double y, double z) {
double tmp;
if (z <= -55000000000.0) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 0.083333333333333 * (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) :: tmp
if (z <= (-55000000000.0d0)) then
tmp = (-0.0027777777777778d0) * (z / x)
else
tmp = 0.083333333333333d0 * (1.0d0 / x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -55000000000.0) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 0.083333333333333 * (1.0 / x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -55000000000.0: tmp = -0.0027777777777778 * (z / x) else: tmp = 0.083333333333333 * (1.0 / x) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -55000000000.0) tmp = Float64(-0.0027777777777778 * Float64(z / x)); else tmp = Float64(0.083333333333333 * Float64(1.0 / x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -55000000000.0) tmp = -0.0027777777777778 * (z / x); else tmp = 0.083333333333333 * (1.0 / x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -55000000000.0], N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 * N[(1.0 / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -55000000000:\\
\;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;0.083333333333333 \cdot \frac{1}{x}\\
\end{array}
\end{array}
if z < -5.5e10Initial program 78.8%
remove-double-neg78.8%
distribute-frac-neg278.8%
sub-neg78.8%
associate-+l+78.8%
fma-define78.7%
sub-neg78.7%
metadata-eval78.7%
+-commutative78.7%
unsub-neg78.7%
distribute-frac-neg278.7%
remove-double-neg78.7%
Simplified78.7%
Taylor expanded in x around 0 67.8%
Taylor expanded in z around 0 17.6%
*-commutative17.6%
Simplified17.6%
Taylor expanded in z around inf 17.6%
if -5.5e10 < z Initial program 97.3%
remove-double-neg97.3%
distribute-frac-neg297.3%
sub-neg97.3%
associate-+l+97.3%
fma-define97.4%
sub-neg97.4%
metadata-eval97.4%
+-commutative97.4%
unsub-neg97.4%
distribute-frac-neg297.4%
remove-double-neg97.4%
Simplified97.4%
Taylor expanded in x around 0 62.9%
Taylor expanded in z around 0 35.5%
*-commutative35.5%
Simplified35.5%
Taylor expanded in z around 0 33.8%
div-inv33.9%
*-commutative33.9%
Applied egg-rr33.9%
Final simplification29.9%
(FPCore (x y z) :precision binary64 (if (<= z -55000000000.0) (* -0.0027777777777778 (/ z x)) (/ 0.083333333333333 x)))
double code(double x, double y, double z) {
double tmp;
if (z <= -55000000000.0) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 0.083333333333333 / 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 (z <= (-55000000000.0d0)) then
tmp = (-0.0027777777777778d0) * (z / x)
else
tmp = 0.083333333333333d0 / x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -55000000000.0) {
tmp = -0.0027777777777778 * (z / x);
} else {
tmp = 0.083333333333333 / x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -55000000000.0: tmp = -0.0027777777777778 * (z / x) else: tmp = 0.083333333333333 / x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -55000000000.0) tmp = Float64(-0.0027777777777778 * Float64(z / x)); else tmp = Float64(0.083333333333333 / x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -55000000000.0) tmp = -0.0027777777777778 * (z / x); else tmp = 0.083333333333333 / x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -55000000000.0], N[(-0.0027777777777778 * N[(z / x), $MachinePrecision]), $MachinePrecision], N[(0.083333333333333 / x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -55000000000:\\
\;\;\;\;-0.0027777777777778 \cdot \frac{z}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{0.083333333333333}{x}\\
\end{array}
\end{array}
if z < -5.5e10Initial program 78.8%
remove-double-neg78.8%
distribute-frac-neg278.8%
sub-neg78.8%
associate-+l+78.8%
fma-define78.7%
sub-neg78.7%
metadata-eval78.7%
+-commutative78.7%
unsub-neg78.7%
distribute-frac-neg278.7%
remove-double-neg78.7%
Simplified78.7%
Taylor expanded in x around 0 67.8%
Taylor expanded in z around 0 17.6%
*-commutative17.6%
Simplified17.6%
Taylor expanded in z around inf 17.6%
if -5.5e10 < z Initial program 97.3%
remove-double-neg97.3%
distribute-frac-neg297.3%
sub-neg97.3%
associate-+l+97.3%
fma-define97.4%
sub-neg97.4%
metadata-eval97.4%
+-commutative97.4%
unsub-neg97.4%
distribute-frac-neg297.4%
remove-double-neg97.4%
Simplified97.4%
Taylor expanded in x around 0 62.9%
Taylor expanded in z around 0 35.5%
*-commutative35.5%
Simplified35.5%
Taylor expanded in z around 0 33.8%
(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 92.8%
remove-double-neg92.8%
distribute-frac-neg292.8%
sub-neg92.8%
associate-+l+92.8%
fma-define92.8%
sub-neg92.8%
metadata-eval92.8%
+-commutative92.8%
unsub-neg92.8%
distribute-frac-neg292.8%
remove-double-neg92.8%
Simplified92.8%
Taylor expanded in x around 0 64.1%
Taylor expanded in z around 0 31.2%
*-commutative31.2%
Simplified31.2%
(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 92.8%
remove-double-neg92.8%
distribute-frac-neg292.8%
sub-neg92.8%
associate-+l+92.8%
fma-define92.8%
sub-neg92.8%
metadata-eval92.8%
+-commutative92.8%
unsub-neg92.8%
distribute-frac-neg292.8%
remove-double-neg92.8%
Simplified92.8%
Taylor expanded in x around 0 64.1%
Taylor expanded in z around 0 31.2%
*-commutative31.2%
Simplified31.2%
Taylor expanded in z around 0 26.3%
(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 2024172
(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)))