?

Average Error: 0.3 → 0.0
Time: 6.6s
Precision: binary64
Cost: 13248

?

\[\left(\left(0 \leq x \land x \leq 10\right) \land \left(0 \leq a \land a \leq 1\right)\right) \land \left(0 \leq y \land y \leq 10\right)\]
\[{x}^{a} \cdot {y}^{\left(1 - a\right)} \]
\[{x}^{a} \cdot \frac{y}{{y}^{a}} \]
(FPCore (x a y) :precision binary64 (* (pow x a) (pow y (- 1.0 a))))
(FPCore (x a y) :precision binary64 (* (pow x a) (/ y (pow y a))))
double code(double x, double a, double y) {
	return pow(x, a) * pow(y, (1.0 - a));
}
double code(double x, double a, double y) {
	return pow(x, a) * (y / pow(y, a));
}
real(8) function code(x, a, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: a
    real(8), intent (in) :: y
    code = (x ** a) * (y ** (1.0d0 - a))
end function
real(8) function code(x, a, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: a
    real(8), intent (in) :: y
    code = (x ** a) * (y / (y ** a))
end function
public static double code(double x, double a, double y) {
	return Math.pow(x, a) * Math.pow(y, (1.0 - a));
}
public static double code(double x, double a, double y) {
	return Math.pow(x, a) * (y / Math.pow(y, a));
}
def code(x, a, y):
	return math.pow(x, a) * math.pow(y, (1.0 - a))
def code(x, a, y):
	return math.pow(x, a) * (y / math.pow(y, a))
function code(x, a, y)
	return Float64((x ^ a) * (y ^ Float64(1.0 - a)))
end
function code(x, a, y)
	return Float64((x ^ a) * Float64(y / (y ^ a)))
end
function tmp = code(x, a, y)
	tmp = (x ^ a) * (y ^ (1.0 - a));
end
function tmp = code(x, a, y)
	tmp = (x ^ a) * (y / (y ^ a));
end
code[x_, a_, y_] := N[(N[Power[x, a], $MachinePrecision] * N[Power[y, N[(1.0 - a), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
code[x_, a_, y_] := N[(N[Power[x, a], $MachinePrecision] * N[(y / N[Power[y, a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
{x}^{a} \cdot {y}^{\left(1 - a\right)}
{x}^{a} \cdot \frac{y}{{y}^{a}}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.3

    \[{x}^{a} \cdot {y}^{\left(1 - a\right)} \]
  2. Applied egg-rr58.4

    \[\leadsto {x}^{a} \cdot \color{blue}{\left(e^{\mathsf{log1p}\left(\frac{y}{{y}^{a}}\right)} - 1\right)} \]
  3. Simplified0.0

    \[\leadsto {x}^{a} \cdot \color{blue}{\frac{y}{{y}^{a}}} \]
    Proof

    [Start]58.4

    \[ {x}^{a} \cdot \left(e^{\mathsf{log1p}\left(\frac{y}{{y}^{a}}\right)} - 1\right) \]

    expm1-def [=>]0.0

    \[ {x}^{a} \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{{y}^{a}}\right)\right)} \]

    expm1-log1p [=>]0.0

    \[ {x}^{a} \cdot \color{blue}{\frac{y}{{y}^{a}}} \]
  4. Final simplification0.0

    \[\leadsto {x}^{a} \cdot \frac{y}{{y}^{a}} \]

Alternatives

Alternative 1
Error1.6
Cost64
\[y \]

Error

Reproduce?

herbie shell --seed 1 
(FPCore (x a y)
  :name "x ^(a) * y ^ (1-a)"
  :precision binary64
  :pre (and (and (and (<= 0.0 x) (<= x 10.0)) (and (<= 0.0 a) (<= a 1.0))) (and (<= 0.0 y) (<= y 10.0)))
  (* (pow x a) (pow y (- 1.0 a))))