?

Average Error: 99.1% → 99.1%
Time: 18.0s
Precision: binary64
Cost: 7488.00

?

\[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right) \]
\[\cos^{-1} \left(\frac{1 + \left(1 + \left(-1 - 5 \cdot \left(v \cdot v\right)\right)\right)}{v \cdot v + -1}\right) \]
(FPCore (v)
 :precision binary64
 (acos (/ (- 1.0 (* 5.0 (* v v))) (- (* v v) 1.0))))
(FPCore (v)
 :precision binary64
 (acos (/ (+ 1.0 (+ 1.0 (- -1.0 (* 5.0 (* v v))))) (+ (* v v) -1.0))))
double code(double v) {
	return acos(((1.0 - (5.0 * (v * v))) / ((v * v) - 1.0)));
}
double code(double v) {
	return acos(((1.0 + (1.0 + (-1.0 - (5.0 * (v * v))))) / ((v * v) + -1.0)));
}
real(8) function code(v)
    real(8), intent (in) :: v
    code = acos(((1.0d0 - (5.0d0 * (v * v))) / ((v * v) - 1.0d0)))
end function
real(8) function code(v)
    real(8), intent (in) :: v
    code = acos(((1.0d0 + (1.0d0 + ((-1.0d0) - (5.0d0 * (v * v))))) / ((v * v) + (-1.0d0))))
end function
public static double code(double v) {
	return Math.acos(((1.0 - (5.0 * (v * v))) / ((v * v) - 1.0)));
}
public static double code(double v) {
	return Math.acos(((1.0 + (1.0 + (-1.0 - (5.0 * (v * v))))) / ((v * v) + -1.0)));
}
def code(v):
	return math.acos(((1.0 - (5.0 * (v * v))) / ((v * v) - 1.0)))
def code(v):
	return math.acos(((1.0 + (1.0 + (-1.0 - (5.0 * (v * v))))) / ((v * v) + -1.0)))
function code(v)
	return acos(Float64(Float64(1.0 - Float64(5.0 * Float64(v * v))) / Float64(Float64(v * v) - 1.0)))
end
function code(v)
	return acos(Float64(Float64(1.0 + Float64(1.0 + Float64(-1.0 - Float64(5.0 * Float64(v * v))))) / Float64(Float64(v * v) + -1.0)))
end
function tmp = code(v)
	tmp = acos(((1.0 - (5.0 * (v * v))) / ((v * v) - 1.0)));
end
function tmp = code(v)
	tmp = acos(((1.0 + (1.0 + (-1.0 - (5.0 * (v * v))))) / ((v * v) + -1.0)));
end
code[v_] := N[ArcCos[N[(N[(1.0 - N[(5.0 * N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(v * v), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
code[v_] := N[ArcCos[N[(N[(1.0 + N[(1.0 + N[(-1.0 - N[(5.0 * N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(v * v), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)
\cos^{-1} \left(\frac{1 + \left(1 + \left(-1 - 5 \cdot \left(v \cdot v\right)\right)\right)}{v \cdot v + -1}\right)

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Initial program 99.1

    \[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right) \]
  2. Applied egg-rr99.1

    \[\leadsto \cos^{-1} \left(\frac{1 - \color{blue}{\left(\left(1 + 5 \cdot \left(v \cdot v\right)\right) - 1\right)}}{v \cdot v - 1}\right) \]
    Proof

    [Start]99.1

    \[ \cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right) \]

    expm1-log1p-u [=>]99.1

    \[ \cos^{-1} \left(\frac{1 - \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(5 \cdot \left(v \cdot v\right)\right)\right)}}{v \cdot v - 1}\right) \]

    expm1-udef [=>]99.1

    \[ \cos^{-1} \left(\frac{1 - \color{blue}{\left(e^{\mathsf{log1p}\left(5 \cdot \left(v \cdot v\right)\right)} - 1\right)}}{v \cdot v - 1}\right) \]

    log1p-udef [=>]99.1

    \[ \cos^{-1} \left(\frac{1 - \left(e^{\color{blue}{\log \left(1 + 5 \cdot \left(v \cdot v\right)\right)}} - 1\right)}{v \cdot v - 1}\right) \]

    add-exp-log [<=]99.1

    \[ \cos^{-1} \left(\frac{1 - \left(\color{blue}{\left(1 + 5 \cdot \left(v \cdot v\right)\right)} - 1\right)}{v \cdot v - 1}\right) \]
  3. Final simplification99.1

    \[\leadsto \cos^{-1} \left(\frac{1 + \left(1 + \left(-1 - 5 \cdot \left(v \cdot v\right)\right)\right)}{v \cdot v + -1}\right) \]

Alternatives

Alternative 1
Error99.1%
Cost7232.00
\[\cos^{-1} \left(\frac{1 + \left(v \cdot v\right) \cdot -5}{v \cdot v + -1}\right) \]
Alternative 2
Error98.0%
Cost6848.00
\[\cos^{-1} \left(-1 + v \cdot \left(5 \cdot v\right)\right) \]
Alternative 3
Error97.8%
Cost6464.00
\[\cos^{-1} -1 \]

Error

Reproduce?

herbie shell --seed 2023121 
(FPCore (v)
  :name "Falkner and Boettcher, Appendix B, 1"
  :precision binary64
  (acos (/ (- 1.0 (* 5.0 (* v v))) (- (* v v) 1.0))))