Average Error: 0.2 → 0.2
Time: 10.2s
Precision: 64
$\frac{w}{n} + c \cdot \frac{\log m}{n}$
$\frac{w}{n} + c \cdot \frac{\log m}{n}$
\frac{w}{n} + c \cdot \frac{\log m}{n}
\frac{w}{n} + c \cdot \frac{\log m}{n}
double f(double w, double n, double c, double m) {
double r681916 = w;
double r681917 = n;
double r681918 = r681916 / r681917;
double r681919 = c;
double r681920 = m;
double r681921 = log(r681920);
double r681922 = r681921 / r681917;
double r681923 = r681919 * r681922;
double r681924 = r681918 + r681923;
return r681924;
}


double f(double w, double n, double c, double m) {
double r681925 = w;
double r681926 = n;
double r681927 = r681925 / r681926;
double r681928 = c;
double r681929 = m;
double r681930 = log(r681929);
double r681931 = r681930 / r681926;
double r681932 = r681928 * r681931;
double r681933 = r681927 + r681932;
return r681933;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.2

$\frac{w}{n} + c \cdot \frac{\log m}{n}$
2. Final simplification0.2

$\leadsto \frac{w}{n} + c \cdot \frac{\log m}{n}$

# Reproduce

herbie shell --seed 1
(FPCore (w n c m)
:name "w/n + c*(log(m)/n)"
:precision binary64
(+ (/ w n) (* c (/ (log m) n))))