| Alternative 1 | |
|---|---|
| Error | 0.3 |
| Cost | 19392 |
\[\log x - \log \log x
\]
(FPCore (x) :precision binary64 (- (log x) (log (log x))))
(FPCore (x) :precision binary64 (- (- (log (/ 1.0 x))) (log (log x))))
double code(double x) {
return log(x) - log(log(x));
}
double code(double x) {
return -log((1.0 / x)) - log(log(x));
}
real(8) function code(x)
real(8), intent (in) :: x
code = log(x) - log(log(x))
end function
real(8) function code(x)
real(8), intent (in) :: x
code = -log((1.0d0 / x)) - log(log(x))
end function
public static double code(double x) {
return Math.log(x) - Math.log(Math.log(x));
}
public static double code(double x) {
return -Math.log((1.0 / x)) - Math.log(Math.log(x));
}
def code(x): return math.log(x) - math.log(math.log(x))
def code(x): return -math.log((1.0 / x)) - math.log(math.log(x))
function code(x) return Float64(log(x) - log(log(x))) end
function code(x) return Float64(Float64(-log(Float64(1.0 / x))) - log(log(x))) end
function tmp = code(x) tmp = log(x) - log(log(x)); end
function tmp = code(x) tmp = -log((1.0 / x)) - log(log(x)); end
code[x_] := N[(N[Log[x], $MachinePrecision] - N[Log[N[Log[x], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_] := N[((-N[Log[N[(1.0 / x), $MachinePrecision]], $MachinePrecision]) - N[Log[N[Log[x], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\log x - \log \log x
\left(-\log \left(\frac{1}{x}\right)\right) - \log \log x
Results
Initial program 0.3
Taylor expanded in x around inf 0.3
Taylor expanded in x around 0 0.3
Applied egg-rr0.3
Simplified0.3
[Start]0.3 | \[ \left(-\log \left(\frac{1}{x}\right)\right) + \left(-\log \log x\right)
\] |
|---|---|
rational.json-simplify-1 [<=]0.3 | \[ \color{blue}{\left(-\log \log x\right) + \left(-\log \left(\frac{1}{x}\right)\right)}
\] |
rational.json-simplify-41 [<=]0.3 | \[ \color{blue}{\left(-\log \left(\frac{1}{x}\right)\right) - \log \log x}
\] |
Final simplification0.3
| Alternative 1 | |
|---|---|
| Error | 0.3 |
| Cost | 19392 |
herbie shell --seed 2023053
(FPCore (x)
:name "Jmat.Real.lambertw, estimator"
:precision binary64
(- (log x) (log (log x))))