Average Error: 21.4 → 0.4
Time: 20.6s
Precision: 64
$\frac{\sqrt{{x}^{4}}}{\log x}$
$\frac{\left|{x}^{\left(\frac{4}{2}\right)}\right|}{\log x}$
\frac{\sqrt{{x}^{4}}}{\log x}
\frac{\left|{x}^{\left(\frac{4}{2}\right)}\right|}{\log x}
double f(double x) {
double r1335522 = x;
double r1335523 = 4.0;
double r1335524 = pow(r1335522, r1335523);
double r1335525 = sqrt(r1335524);
double r1335526 = log(r1335522);
double r1335527 = r1335525 / r1335526;
return r1335527;
}


double f(double x) {
double r1335528 = x;
double r1335529 = 4.0;
double r1335530 = 2.0;
double r1335531 = r1335529 / r1335530;
double r1335532 = pow(r1335528, r1335531);
double r1335533 = fabs(r1335532);
double r1335534 = log(r1335528);
double r1335535 = r1335533 / r1335534;
return r1335535;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 21.4

$\frac{\sqrt{{x}^{4}}}{\log x}$
2. Using strategy rm
3. Applied sqr-pow21.3

$\leadsto \frac{\sqrt{\color{blue}{{x}^{\left(\frac{4}{2}\right)} \cdot {x}^{\left(\frac{4}{2}\right)}}}}{\log x}$
4. Applied rem-sqrt-square0.4

$\leadsto \frac{\color{blue}{\left|{x}^{\left(\frac{4}{2}\right)}\right|}}{\log x}$
5. Final simplification0.4

$\leadsto \frac{\left|{x}^{\left(\frac{4}{2}\right)}\right|}{\log x}$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "sqrt(x^4)/log(x)"
:precision binary64
(/ (sqrt (pow x 4)) (log x)))