| Alternative 1 | |
|---|---|
| Error | 0.2 |
| Cost | 19648 |
\[\log x - \log \left(\frac{1}{\frac{1}{\log x}}\right)
\]
(FPCore (x) :precision binary64 (- (log x) (log (log x))))
(FPCore (x) :precision binary64 (- (log x) (pow (pow (pow (pow (log (log x)) 3.0) 3.0) 0.3333333333333333) 0.3333333333333333)))
double code(double x) {
return log(x) - log(log(x));
}
double code(double x) {
return log(x) - pow(pow(pow(pow(log(log(x)), 3.0), 3.0), 0.3333333333333333), 0.3333333333333333);
}
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(x) - ((((log(log(x)) ** 3.0d0) ** 3.0d0) ** 0.3333333333333333d0) ** 0.3333333333333333d0)
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(x) - Math.pow(Math.pow(Math.pow(Math.pow(Math.log(Math.log(x)), 3.0), 3.0), 0.3333333333333333), 0.3333333333333333);
}
def code(x): return math.log(x) - math.log(math.log(x))
def code(x): return math.log(x) - math.pow(math.pow(math.pow(math.pow(math.log(math.log(x)), 3.0), 3.0), 0.3333333333333333), 0.3333333333333333)
function code(x) return Float64(log(x) - log(log(x))) end
function code(x) return Float64(log(x) - ((((log(log(x)) ^ 3.0) ^ 3.0) ^ 0.3333333333333333) ^ 0.3333333333333333)) end
function tmp = code(x) tmp = log(x) - log(log(x)); end
function tmp = code(x) tmp = log(x) - ((((log(log(x)) ^ 3.0) ^ 3.0) ^ 0.3333333333333333) ^ 0.3333333333333333); end
code[x_] := N[(N[Log[x], $MachinePrecision] - N[Log[N[Log[x], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_] := N[(N[Log[x], $MachinePrecision] - N[Power[N[Power[N[Power[N[Power[N[Log[N[Log[x], $MachinePrecision]], $MachinePrecision], 3.0], $MachinePrecision], 3.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision], 0.3333333333333333], $MachinePrecision]), $MachinePrecision]
\log x - \log \log x
\log x - {\left({\left({\left({\log \log x}^{3}\right)}^{3}\right)}^{0.3333333333333333}\right)}^{0.3333333333333333}
Results
Initial program 0.3
Applied egg-rr0.4
Applied egg-rr0.4
| Alternative 1 | |
|---|---|
| Error | 0.2 |
| Cost | 19648 |
| Alternative 2 | |
|---|---|
| Error | 0.3 |
| Cost | 19392 |
herbie shell --seed 2023010
(FPCore (x)
:name "Jmat.Real.lambertw, estimator"
:precision binary64
(- (log x) (log (log x))))