?

Average Error: 0.2 → 0.2
Time: 7.8s
Precision: binary64
Cost: 19328

?

\[\frac{1}{{\cos x}^{2}} \]
\[\sqrt{{\cos x}^{-4}} \]
(FPCore (x) :precision binary64 (/ 1.0 (pow (cos x) 2.0)))
(FPCore (x) :precision binary64 (sqrt (pow (cos x) -4.0)))
double code(double x) {
	return 1.0 / pow(cos(x), 2.0);
}
double code(double x) {
	return sqrt(pow(cos(x), -4.0));
}
real(8) function code(x)
    real(8), intent (in) :: x
    code = 1.0d0 / (cos(x) ** 2.0d0)
end function
real(8) function code(x)
    real(8), intent (in) :: x
    code = sqrt((cos(x) ** (-4.0d0)))
end function
public static double code(double x) {
	return 1.0 / Math.pow(Math.cos(x), 2.0);
}
public static double code(double x) {
	return Math.sqrt(Math.pow(Math.cos(x), -4.0));
}
def code(x):
	return 1.0 / math.pow(math.cos(x), 2.0)
def code(x):
	return math.sqrt(math.pow(math.cos(x), -4.0))
function code(x)
	return Float64(1.0 / (cos(x) ^ 2.0))
end
function code(x)
	return sqrt((cos(x) ^ -4.0))
end
function tmp = code(x)
	tmp = 1.0 / (cos(x) ^ 2.0);
end
function tmp = code(x)
	tmp = sqrt((cos(x) ^ -4.0));
end
code[x_] := N[(1.0 / N[Power[N[Cos[x], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]
code[x_] := N[Sqrt[N[Power[N[Cos[x], $MachinePrecision], -4.0], $MachinePrecision]], $MachinePrecision]
\frac{1}{{\cos x}^{2}}
\sqrt{{\cos x}^{-4}}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 0.2

    \[\frac{1}{{\cos x}^{2}} \]
  2. Applied egg-rr0.2

    \[\leadsto \color{blue}{\sqrt{{\cos x}^{-4}}} \]
  3. Final simplification0.2

    \[\leadsto \sqrt{{\cos x}^{-4}} \]

Alternatives

Alternative 1
Error0.2
Cost12928
\[{\cos x}^{-2} \]
Alternative 2
Error0.5
Cost6848
\[\frac{2}{\cos \left(x \cdot 2\right) + 1} \]
Alternative 3
Error25.6
Cost64
\[1 \]

Error

Reproduce?

herbie shell --seed 1 
(FPCore (x)
  :name "1 / pow(cos(x), 2)"
  :precision binary64
  (/ 1.0 (pow (cos x) 2.0)))