Average Error: 38.3 → 32.0
Time: 26.9s
Precision: 64
$\frac{\frac{m1}{n1} - \frac{m2}{n2}}{\sqrt{\frac{{s1}^{2}}{n1} + \frac{{s2}^{2}}{n2}}}$
$\frac{\frac{m1}{n1} - \frac{m2}{n2}}{\sqrt{\frac{{s1}^{\left(\frac{2}{2}\right)}}{\frac{n1}{{s1}^{\left(\frac{2}{2}\right)}}} + \frac{{s2}^{\left(\frac{2}{2}\right)}}{\sqrt[3]{n2} \cdot \sqrt[3]{n2}} \cdot \frac{{s2}^{\left(\frac{2}{2}\right)}}{\sqrt[3]{n2}}}}$
\frac{\frac{m1}{n1} - \frac{m2}{n2}}{\sqrt{\frac{{s1}^{2}}{n1} + \frac{{s2}^{2}}{n2}}}
\frac{\frac{m1}{n1} - \frac{m2}{n2}}{\sqrt{\frac{{s1}^{\left(\frac{2}{2}\right)}}{\frac{n1}{{s1}^{\left(\frac{2}{2}\right)}}} + \frac{{s2}^{\left(\frac{2}{2}\right)}}{\sqrt[3]{n2} \cdot \sqrt[3]{n2}} \cdot \frac{{s2}^{\left(\frac{2}{2}\right)}}{\sqrt[3]{n2}}}}
double f(double m1, double n1, double m2, double n2, double s1, double s2) {
double r3402532 = m1;
double r3402533 = n1;
double r3402534 = r3402532 / r3402533;
double r3402535 = m2;
double r3402536 = n2;
double r3402537 = r3402535 / r3402536;
double r3402538 = r3402534 - r3402537;
double r3402539 = s1;
double r3402540 = 2.0;
double r3402541 = pow(r3402539, r3402540);
double r3402542 = r3402541 / r3402533;
double r3402543 = s2;
double r3402544 = pow(r3402543, r3402540);
double r3402545 = r3402544 / r3402536;
double r3402546 = r3402542 + r3402545;
double r3402547 = sqrt(r3402546);
double r3402548 = r3402538 / r3402547;
return r3402548;
}


double f(double m1, double n1, double m2, double n2, double s1, double s2) {
double r3402549 = m1;
double r3402550 = n1;
double r3402551 = r3402549 / r3402550;
double r3402552 = m2;
double r3402553 = n2;
double r3402554 = r3402552 / r3402553;
double r3402555 = r3402551 - r3402554;
double r3402556 = s1;
double r3402557 = 2.0;
double r3402558 = 2.0;
double r3402559 = r3402557 / r3402558;
double r3402560 = pow(r3402556, r3402559);
double r3402561 = r3402550 / r3402560;
double r3402562 = r3402560 / r3402561;
double r3402563 = s2;
double r3402564 = pow(r3402563, r3402559);
double r3402565 = cbrt(r3402553);
double r3402566 = r3402565 * r3402565;
double r3402567 = r3402564 / r3402566;
double r3402568 = r3402564 / r3402565;
double r3402569 = r3402567 * r3402568;
double r3402570 = r3402562 + r3402569;
double r3402571 = sqrt(r3402570);
double r3402572 = r3402555 / r3402571;
return r3402572;
}



# Try it out

Your Program's Arguments

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 38.3

$\frac{\frac{m1}{n1} - \frac{m2}{n2}}{\sqrt{\frac{{s1}^{2}}{n1} + \frac{{s2}^{2}}{n2}}}$
2. Using strategy rm
3. Applied sqr-pow38.3

$\leadsto \frac{\frac{m1}{n1} - \frac{m2}{n2}}{\sqrt{\frac{\color{blue}{{s1}^{\left(\frac{2}{2}\right)} \cdot {s1}^{\left(\frac{2}{2}\right)}}}{n1} + \frac{{s2}^{2}}{n2}}}$
4. Applied associate-/l*35.2

$\leadsto \frac{\frac{m1}{n1} - \frac{m2}{n2}}{\sqrt{\color{blue}{\frac{{s1}^{\left(\frac{2}{2}\right)}}{\frac{n1}{{s1}^{\left(\frac{2}{2}\right)}}}} + \frac{{s2}^{2}}{n2}}}$
5. Using strategy rm
6. Applied add-cube-cbrt35.3

$\leadsto \frac{\frac{m1}{n1} - \frac{m2}{n2}}{\sqrt{\frac{{s1}^{\left(\frac{2}{2}\right)}}{\frac{n1}{{s1}^{\left(\frac{2}{2}\right)}}} + \frac{{s2}^{2}}{\color{blue}{\left(\sqrt[3]{n2} \cdot \sqrt[3]{n2}\right) \cdot \sqrt[3]{n2}}}}}$
7. Applied sqr-pow35.3

$\leadsto \frac{\frac{m1}{n1} - \frac{m2}{n2}}{\sqrt{\frac{{s1}^{\left(\frac{2}{2}\right)}}{\frac{n1}{{s1}^{\left(\frac{2}{2}\right)}}} + \frac{\color{blue}{{s2}^{\left(\frac{2}{2}\right)} \cdot {s2}^{\left(\frac{2}{2}\right)}}}{\left(\sqrt[3]{n2} \cdot \sqrt[3]{n2}\right) \cdot \sqrt[3]{n2}}}}$
8. Applied times-frac32.0

$\leadsto \frac{\frac{m1}{n1} - \frac{m2}{n2}}{\sqrt{\frac{{s1}^{\left(\frac{2}{2}\right)}}{\frac{n1}{{s1}^{\left(\frac{2}{2}\right)}}} + \color{blue}{\frac{{s2}^{\left(\frac{2}{2}\right)}}{\sqrt[3]{n2} \cdot \sqrt[3]{n2}} \cdot \frac{{s2}^{\left(\frac{2}{2}\right)}}{\sqrt[3]{n2}}}}}$
9. Final simplification32.0

$\leadsto \frac{\frac{m1}{n1} - \frac{m2}{n2}}{\sqrt{\frac{{s1}^{\left(\frac{2}{2}\right)}}{\frac{n1}{{s1}^{\left(\frac{2}{2}\right)}}} + \frac{{s2}^{\left(\frac{2}{2}\right)}}{\sqrt[3]{n2} \cdot \sqrt[3]{n2}} \cdot \frac{{s2}^{\left(\frac{2}{2}\right)}}{\sqrt[3]{n2}}}}$

# Reproduce

herbie shell --seed 1
(FPCore (m1 n1 m2 n2 s1 s2)
:name "(m1/n1 - m2/n2) / sqrt( pow(s1, 2)/n1 + pow(s2, 2)/n2)"
:precision binary64
(/ (- (/ m1 n1) (/ m2 n2)) (sqrt (+ (/ (pow s1 2) n1) (/ (pow s2 2) n2)))))