Average Error: 0.0 → 0
Time: 13.6s
Precision: 64
$\left(by - ay\right) - \frac{vy}{vx} \cdot \left(bx - by\right)$
$\left(by - ay\right) - \left(\frac{\sqrt[3]{vy}}{vx} \cdot \left(bx - by\right)\right) \cdot \left(\sqrt[3]{vy} \cdot \sqrt[3]{vy}\right)$
\left(by - ay\right) - \frac{vy}{vx} \cdot \left(bx - by\right)
\left(by - ay\right) - \left(\frac{\sqrt[3]{vy}}{vx} \cdot \left(bx - by\right)\right) \cdot \left(\sqrt[3]{vy} \cdot \sqrt[3]{vy}\right)
double f(double by, double ay, double vy, double vx, double bx) {
double r2369685 = by;
double r2369686 = ay;
double r2369687 = r2369685 - r2369686;
double r2369688 = vy;
double r2369689 = vx;
double r2369690 = r2369688 / r2369689;
double r2369691 = bx;
double r2369692 = r2369691 - r2369685;
double r2369693 = r2369690 * r2369692;
double r2369694 = r2369687 - r2369693;
return r2369694;
}


double f(double by, double ay, double vy, double vx, double bx) {
double r2369695 = by;
double r2369696 = ay;
double r2369697 = r2369695 - r2369696;
double r2369698 = vy;
double r2369699 = cbrt(r2369698);
double r2369700 = vx;
double r2369701 = r2369699 / r2369700;
double r2369702 = bx;
double r2369703 = r2369702 - r2369695;
double r2369704 = r2369701 * r2369703;
double r2369705 = r2369699 * r2369699;
double r2369706 = r2369704 * r2369705;
double r2369707 = r2369697 - r2369706;
return r2369707;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

$\left(by - ay\right) - \frac{vy}{vx} \cdot \left(bx - by\right)$
2. Using strategy rm
3. Applied *-un-lft-identity0.0

$\leadsto \left(by - ay\right) - \frac{vy}{\color{blue}{1 \cdot vx}} \cdot \left(bx - by\right)$

$\leadsto \left(by - ay\right) - \frac{\color{blue}{\left(\sqrt[3]{vy} \cdot \sqrt[3]{vy}\right) \cdot \sqrt[3]{vy}}}{1 \cdot vx} \cdot \left(bx - by\right)$
5. Applied times-frac0.0

$\leadsto \left(by - ay\right) - \color{blue}{\left(\frac{\sqrt[3]{vy} \cdot \sqrt[3]{vy}}{1} \cdot \frac{\sqrt[3]{vy}}{vx}\right)} \cdot \left(bx - by\right)$
6. Applied associate-*l*0

$\leadsto \left(by - ay\right) - \color{blue}{\frac{\sqrt[3]{vy} \cdot \sqrt[3]{vy}}{1} \cdot \left(\frac{\sqrt[3]{vy}}{vx} \cdot \left(bx - by\right)\right)}$
7. Final simplification0

$\leadsto \left(by - ay\right) - \left(\frac{\sqrt[3]{vy}}{vx} \cdot \left(bx - by\right)\right) \cdot \left(\sqrt[3]{vy} \cdot \sqrt[3]{vy}\right)$

# Reproduce

herbie shell --seed 1
(FPCore (by ay vy vx bx)
:name "(by - ay) - ((vy/vx) * (bx - by))"
:precision binary32
(- (- by ay) (* (/ vy vx) (- bx by))))