Average Error: 0.0 → 0.1
Time: 9.2s
Precision: 64
$a + 1 \cdot \left(b + \frac{1}{c + \frac{1}{d + \frac{1}{e}}}\right)$
$a + 1 \cdot \left(b + \frac{1}{c + \frac{\frac{1}{\sqrt[3]{d + \frac{1}{e}} \cdot \sqrt[3]{d + \frac{1}{e}}}}{\sqrt[3]{d + \frac{1}{e}}}}\right)$
a + 1 \cdot \left(b + \frac{1}{c + \frac{1}{d + \frac{1}{e}}}\right)
a + 1 \cdot \left(b + \frac{1}{c + \frac{\frac{1}{\sqrt[3]{d + \frac{1}{e}} \cdot \sqrt[3]{d + \frac{1}{e}}}}{\sqrt[3]{d + \frac{1}{e}}}}\right)
double f(double a, double b, double c, double d, double e) {
double r3497026 = a;
double r3497027 = 1.0;
double r3497028 = b;
double r3497029 = c;
double r3497030 = d;
double r3497031 = e;
double r3497032 = r3497027 / r3497031;
double r3497033 = r3497030 + r3497032;
double r3497034 = r3497027 / r3497033;
double r3497035 = r3497029 + r3497034;
double r3497036 = r3497027 / r3497035;
double r3497037 = r3497028 + r3497036;
double r3497038 = r3497027 * r3497037;
double r3497039 = r3497026 + r3497038;
return r3497039;
}


double f(double a, double b, double c, double d, double e) {
double r3497040 = a;
double r3497041 = 1.0;
double r3497042 = b;
double r3497043 = c;
double r3497044 = d;
double r3497045 = e;
double r3497046 = r3497041 / r3497045;
double r3497047 = r3497044 + r3497046;
double r3497048 = cbrt(r3497047);
double r3497049 = r3497048 * r3497048;
double r3497050 = r3497041 / r3497049;
double r3497051 = r3497050 / r3497048;
double r3497052 = r3497043 + r3497051;
double r3497053 = r3497041 / r3497052;
double r3497054 = r3497042 + r3497053;
double r3497055 = r3497041 * r3497054;
double r3497056 = r3497040 + r3497055;
return r3497056;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$a + 1 \cdot \left(b + \frac{1}{c + \frac{1}{d + \frac{1}{e}}}\right)$
2. Using strategy rm

$\leadsto a + 1 \cdot \left(b + \frac{1}{c + \frac{1}{\color{blue}{\left(\sqrt[3]{d + \frac{1}{e}} \cdot \sqrt[3]{d + \frac{1}{e}}\right) \cdot \sqrt[3]{d + \frac{1}{e}}}}}\right)$
4. Applied associate-/r*0.1

$\leadsto a + 1 \cdot \left(b + \frac{1}{c + \color{blue}{\frac{\frac{1}{\sqrt[3]{d + \frac{1}{e}} \cdot \sqrt[3]{d + \frac{1}{e}}}}{\sqrt[3]{d + \frac{1}{e}}}}}\right)$
5. Final simplification0.1

$\leadsto a + 1 \cdot \left(b + \frac{1}{c + \frac{\frac{1}{\sqrt[3]{d + \frac{1}{e}} \cdot \sqrt[3]{d + \frac{1}{e}}}}{\sqrt[3]{d + \frac{1}{e}}}}\right)$

# Reproduce

herbie shell --seed 1
(FPCore (a b c d e)
:name "a+1(b+1/(c+1/(d+1/e)))"
:precision binary64
(+ a (* 1 (+ b (/ 1 (+ c (/ 1 (+ d (/ 1 e)))))))))