Average Error: 0.0 → 0.0
Time: 2.6s
Precision: binary64
Cost: 13120
$\left(-1000 \leq a \land a \leq 1000\right) \land \left(-1000 \leq b \land b \leq 1000\right)$
${a}^{4} - {b}^{4}$
${a}^{4} - {b}^{4}$
(FPCore (a b) :precision binary64 (- (pow a 4.0) (pow b 4.0)))
(FPCore (a b) :precision binary64 (- (pow a 4.0) (pow b 4.0)))
double code(double a, double b) {
return pow(a, 4.0) - pow(b, 4.0);
}

double code(double a, double b) {
return pow(a, 4.0) - pow(b, 4.0);
}

real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (a ** 4.0d0) - (b ** 4.0d0)
end function

real(8) function code(a, b)
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (a ** 4.0d0) - (b ** 4.0d0)
end function

public static double code(double a, double b) {
return Math.pow(a, 4.0) - Math.pow(b, 4.0);
}

public static double code(double a, double b) {
return Math.pow(a, 4.0) - Math.pow(b, 4.0);
}

def code(a, b):
return math.pow(a, 4.0) - math.pow(b, 4.0)

def code(a, b):
return math.pow(a, 4.0) - math.pow(b, 4.0)

function code(a, b)
return Float64((a ^ 4.0) - (b ^ 4.0))
end

function code(a, b)
return Float64((a ^ 4.0) - (b ^ 4.0))
end

function tmp = code(a, b)
tmp = (a ^ 4.0) - (b ^ 4.0);
end

function tmp = code(a, b)
tmp = (a ^ 4.0) - (b ^ 4.0);
end

code[a_, b_] := N[(N[Power[a, 4.0], $MachinePrecision] - N[Power[b, 4.0],$MachinePrecision]), $MachinePrecision]  code[a_, b_] := N[(N[Power[a, 4.0],$MachinePrecision] - N[Power[b, 4.0], $MachinePrecision]),$MachinePrecision]

{a}^{4} - {b}^{4}

{a}^{4} - {b}^{4}


# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 0.0

${a}^{4} - {b}^{4}$
2. Final simplification0.0

$\leadsto {a}^{4} - {b}^{4}$

# Reproduce

herbie shell --seed 1
(FPCore (a b)
:name "a^4 - b^4"
:precision binary64
:pre (and (and (<= -1000.0 a) (<= a 1000.0)) (and (<= -1000.0 b) (<= b 1000.0)))
(- (pow a 4.0) (pow b 4.0)))