Average Error: 0.3 → 0.3
Time: 21.0s
Precision: 64
• ## could not determine a ground truth for program body (more)

1. p = -5.01434520362583e+93
2. t = 1.827992882694036e+254
3. n = -1.2889559787202116e+185
${p}^{t} \cdot {n}^{\left(1 - t\right)}$
${p}^{t} \cdot {n}^{\left(1 - t\right)}$
{p}^{t} \cdot {n}^{\left(1 - t\right)}
{p}^{t} \cdot {n}^{\left(1 - t\right)}
double f(double p, double t, double n) {
double r3584690 = p;
double r3584691 = t;
double r3584692 = pow(r3584690, r3584691);
double r3584693 = n;
double r3584694 = 1.0;
double r3584695 = r3584694 - r3584691;
double r3584696 = pow(r3584693, r3584695);
double r3584697 = r3584692 * r3584696;
return r3584697;
}


double f(double p, double t, double n) {
double r3584698 = p;
double r3584699 = t;
double r3584700 = pow(r3584698, r3584699);
double r3584701 = n;
double r3584702 = 1.0;
double r3584703 = r3584702 - r3584699;
double r3584704 = pow(r3584701, r3584703);
double r3584705 = r3584700 * r3584704;
return r3584705;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.3

${p}^{t} \cdot {n}^{\left(1 - t\right)}$
2. Using strategy rm
3. Applied pow-sub20.7

$\leadsto {p}^{t} \cdot \color{blue}{\frac{{n}^{1}}{{n}^{t}}}$
4. Using strategy rm
5. Applied pow-div0.3

$\leadsto {p}^{t} \cdot \color{blue}{{n}^{\left(1 - t\right)}}$
6. Final simplification0.3

$\leadsto {p}^{t} \cdot {n}^{\left(1 - t\right)}$

# Reproduce

herbie shell --seed 1
(FPCore (p t n)
:name "p^t*n^(1-t)"
:precision binary64
(* (pow p t) (pow n (- 1 t))))