?

Average Error: 0.3 → 0.3
Time: 6.1s
Precision: binary64
Cost: 6656

?

$\left(0 \leq scale \land scale \leq 100\right) \land \left(0 \leq \alpha \land \alpha \leq 1\right)$
$\frac{scale}{\log \left(\frac{1}{\alpha}\right)}$
$\frac{scale}{-\log \alpha}$
(FPCore (scale alpha) :precision binary64 (/ scale (log (/ 1.0 alpha))))
(FPCore (scale alpha) :precision binary64 (/ scale (- (log alpha))))
double code(double scale, double alpha) {
return scale / log((1.0 / alpha));
}

double code(double scale, double alpha) {
return scale / -log(alpha);
}

real(8) function code(scale, alpha)
real(8), intent (in) :: scale
real(8), intent (in) :: alpha
code = scale / log((1.0d0 / alpha))
end function

real(8) function code(scale, alpha)
real(8), intent (in) :: scale
real(8), intent (in) :: alpha
code = scale / -log(alpha)
end function

public static double code(double scale, double alpha) {
return scale / Math.log((1.0 / alpha));
}

public static double code(double scale, double alpha) {
return scale / -Math.log(alpha);
}

def code(scale, alpha):
return scale / math.log((1.0 / alpha))

def code(scale, alpha):
return scale / -math.log(alpha)

function code(scale, alpha)
return Float64(scale / log(Float64(1.0 / alpha)))
end

function code(scale, alpha)
return Float64(scale / Float64(-log(alpha)))
end

function tmp = code(scale, alpha)
tmp = scale / log((1.0 / alpha));
end

function tmp = code(scale, alpha)
tmp = scale / -log(alpha);
end

code[scale_, alpha_] := N[(scale / N[Log[N[(1.0 / alpha), $MachinePrecision]],$MachinePrecision]), $MachinePrecision]  code[scale_, alpha_] := N[(scale / (-N[Log[alpha],$MachinePrecision])), \$MachinePrecision]

\frac{scale}{\log \left(\frac{1}{\alpha}\right)}

\frac{scale}{-\log \alpha}


Try it out?

Results

 In Out
Enter valid numbers for all inputs

Derivation?

1. Initial program 0.3

$\frac{scale}{\log \left(\frac{1}{\alpha}\right)}$
2. Simplified0.3

$\leadsto \color{blue}{\frac{scale}{-\log \alpha}}$
Proof
[Start]0.3 $\frac{scale}{\log \left(\frac{1}{\alpha}\right)}$ $\frac{scale}{\color{blue}{-\log \alpha}}$
3. Final simplification0.3

$\leadsto \frac{scale}{-\log \alpha}$

Alternatives

Alternative 1
Error61.4
Cost6592
$\frac{scale}{\log \alpha}$

Reproduce?

herbie shell --seed 1
(FPCore (scale alpha)
:name "scale / log(1 / alpha)"
:precision binary64
:pre (and (and (<= 0.0 scale) (<= scale 100.0)) (and (<= 0.0 alpha) (<= alpha 1.0)))
(/ scale (log (/ 1.0 alpha))))