?

Average Error: 93.34% → 89.8%
Time: 11.9s
Precision: binary64
Cost: 260416

?

\[0 \leq x \land x \leq 0.5\]
\[\cos^{-1} \left(1 - x\right) \]
\[\begin{array}{l} t_0 := \sin^{-1} \left(1 - x\right)\\ t_1 := {t_0}^{48}\\ t_2 := {t_0}^{12}\\ \frac{\frac{\frac{\frac{\frac{4.484155085839415 \cdot 10^{-44} \cdot {\left({\pi}^{24}\right)}^{6} - {t_2}^{12}}{\mathsf{fma}\left(5.960464477539063 \cdot 10^{-8}, {\pi}^{24}, {t_0}^{24}\right)}}{\mathsf{fma}\left(1.262177448353619 \cdot 10^{-29}, {\pi}^{96}, t_1 \cdot \mathsf{fma}\left(3.552713678800501 \cdot 10^{-15}, {\pi}^{48}, t_1\right)\right)}}{t_2 + {\pi}^{12} \cdot 0.000244140625}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {t_0}^{3}\right) \cdot \left({\pi}^{6} \cdot 0.015625 + {t_0}^{6}\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)} \end{array} \]
(FPCore (x) :precision binary64 (acos (- 1.0 x)))
(FPCore (x)
 :precision binary64
 (let* ((t_0 (asin (- 1.0 x))) (t_1 (pow t_0 48.0)) (t_2 (pow t_0 12.0)))
   (/
    (/
     (/
      (/
       (/
        (- (* 4.484155085839415e-44 (pow (pow PI 24.0) 6.0)) (pow t_2 12.0))
        (fma 5.960464477539063e-8 (pow PI 24.0) (pow t_0 24.0)))
       (fma
        1.262177448353619e-29
        (pow PI 96.0)
        (* t_1 (fma 3.552713678800501e-15 (pow PI 48.0) t_1))))
      (+ t_2 (* (pow PI 12.0) 0.000244140625)))
     (*
      (fma (pow PI 3.0) 0.125 (pow t_0 3.0))
      (+ (* (pow PI 6.0) 0.015625) (pow t_0 6.0))))
    (+ (* (* PI PI) 0.25) (* t_0 (fma PI 0.5 t_0))))))
double code(double x) {
	return acos((1.0 - x));
}
double code(double x) {
	double t_0 = asin((1.0 - x));
	double t_1 = pow(t_0, 48.0);
	double t_2 = pow(t_0, 12.0);
	return ((((((4.484155085839415e-44 * pow(pow(((double) M_PI), 24.0), 6.0)) - pow(t_2, 12.0)) / fma(5.960464477539063e-8, pow(((double) M_PI), 24.0), pow(t_0, 24.0))) / fma(1.262177448353619e-29, pow(((double) M_PI), 96.0), (t_1 * fma(3.552713678800501e-15, pow(((double) M_PI), 48.0), t_1)))) / (t_2 + (pow(((double) M_PI), 12.0) * 0.000244140625))) / (fma(pow(((double) M_PI), 3.0), 0.125, pow(t_0, 3.0)) * ((pow(((double) M_PI), 6.0) * 0.015625) + pow(t_0, 6.0)))) / (((((double) M_PI) * ((double) M_PI)) * 0.25) + (t_0 * fma(((double) M_PI), 0.5, t_0)));
}
function code(x)
	return acos(Float64(1.0 - x))
end
function code(x)
	t_0 = asin(Float64(1.0 - x))
	t_1 = t_0 ^ 48.0
	t_2 = t_0 ^ 12.0
	return Float64(Float64(Float64(Float64(Float64(Float64(Float64(4.484155085839415e-44 * ((pi ^ 24.0) ^ 6.0)) - (t_2 ^ 12.0)) / fma(5.960464477539063e-8, (pi ^ 24.0), (t_0 ^ 24.0))) / fma(1.262177448353619e-29, (pi ^ 96.0), Float64(t_1 * fma(3.552713678800501e-15, (pi ^ 48.0), t_1)))) / Float64(t_2 + Float64((pi ^ 12.0) * 0.000244140625))) / Float64(fma((pi ^ 3.0), 0.125, (t_0 ^ 3.0)) * Float64(Float64((pi ^ 6.0) * 0.015625) + (t_0 ^ 6.0)))) / Float64(Float64(Float64(pi * pi) * 0.25) + Float64(t_0 * fma(pi, 0.5, t_0))))
end
code[x_] := N[ArcCos[N[(1.0 - x), $MachinePrecision]], $MachinePrecision]
code[x_] := Block[{t$95$0 = N[ArcSin[N[(1.0 - x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[t$95$0, 48.0], $MachinePrecision]}, Block[{t$95$2 = N[Power[t$95$0, 12.0], $MachinePrecision]}, N[(N[(N[(N[(N[(N[(N[(4.484155085839415e-44 * N[Power[N[Power[Pi, 24.0], $MachinePrecision], 6.0], $MachinePrecision]), $MachinePrecision] - N[Power[t$95$2, 12.0], $MachinePrecision]), $MachinePrecision] / N[(5.960464477539063e-8 * N[Power[Pi, 24.0], $MachinePrecision] + N[Power[t$95$0, 24.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.262177448353619e-29 * N[Power[Pi, 96.0], $MachinePrecision] + N[(t$95$1 * N[(3.552713678800501e-15 * N[Power[Pi, 48.0], $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$2 + N[(N[Power[Pi, 12.0], $MachinePrecision] * 0.000244140625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Power[Pi, 3.0], $MachinePrecision] * 0.125 + N[Power[t$95$0, 3.0], $MachinePrecision]), $MachinePrecision] * N[(N[(N[Power[Pi, 6.0], $MachinePrecision] * 0.015625), $MachinePrecision] + N[Power[t$95$0, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(Pi * Pi), $MachinePrecision] * 0.25), $MachinePrecision] + N[(t$95$0 * N[(Pi * 0.5 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\cos^{-1} \left(1 - x\right)
\begin{array}{l}
t_0 := \sin^{-1} \left(1 - x\right)\\
t_1 := {t_0}^{48}\\
t_2 := {t_0}^{12}\\
\frac{\frac{\frac{\frac{\frac{4.484155085839415 \cdot 10^{-44} \cdot {\left({\pi}^{24}\right)}^{6} - {t_2}^{12}}{\mathsf{fma}\left(5.960464477539063 \cdot 10^{-8}, {\pi}^{24}, {t_0}^{24}\right)}}{\mathsf{fma}\left(1.262177448353619 \cdot 10^{-29}, {\pi}^{96}, t_1 \cdot \mathsf{fma}\left(3.552713678800501 \cdot 10^{-15}, {\pi}^{48}, t_1\right)\right)}}{t_2 + {\pi}^{12} \cdot 0.000244140625}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {t_0}^{3}\right) \cdot \left({\pi}^{6} \cdot 0.015625 + {t_0}^{6}\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)}
\end{array}

Error?

Target

Original93.34%
Target0.02%
Herbie89.8%
\[2 \cdot \sin^{-1} \left(\sqrt{\frac{x}{2}}\right) \]

Derivation?

  1. Initial program 93.34

    \[\cos^{-1} \left(1 - x\right) \]
  2. Applied egg-rr93.34

    \[\leadsto \color{blue}{\frac{{\left(\pi \cdot 0.5\right)}^{3} - {\sin^{-1} \left(1 - x\right)}^{3}}{\left(\pi \cdot 0.5\right) \cdot \left(\pi \cdot 0.5\right) + \left(\sin^{-1} \left(1 - x\right) \cdot \sin^{-1} \left(1 - x\right) + \left(\pi \cdot 0.5\right) \cdot \sin^{-1} \left(1 - x\right)\right)}} \]
  3. Simplified93.34

    \[\leadsto \color{blue}{\frac{{\pi}^{3} \cdot 0.125 - {\sin^{-1} \left(1 - x\right)}^{3}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)}} \]
    Proof

    [Start]93.34

    \[ \frac{{\left(\pi \cdot 0.5\right)}^{3} - {\sin^{-1} \left(1 - x\right)}^{3}}{\left(\pi \cdot 0.5\right) \cdot \left(\pi \cdot 0.5\right) + \left(\sin^{-1} \left(1 - x\right) \cdot \sin^{-1} \left(1 - x\right) + \left(\pi \cdot 0.5\right) \cdot \sin^{-1} \left(1 - x\right)\right)} \]

    cube-prod [=>]93.34

    \[ \frac{\color{blue}{{\pi}^{3} \cdot {0.5}^{3}} - {\sin^{-1} \left(1 - x\right)}^{3}}{\left(\pi \cdot 0.5\right) \cdot \left(\pi \cdot 0.5\right) + \left(\sin^{-1} \left(1 - x\right) \cdot \sin^{-1} \left(1 - x\right) + \left(\pi \cdot 0.5\right) \cdot \sin^{-1} \left(1 - x\right)\right)} \]

    metadata-eval [=>]93.34

    \[ \frac{{\pi}^{3} \cdot \color{blue}{0.125} - {\sin^{-1} \left(1 - x\right)}^{3}}{\left(\pi \cdot 0.5\right) \cdot \left(\pi \cdot 0.5\right) + \left(\sin^{-1} \left(1 - x\right) \cdot \sin^{-1} \left(1 - x\right) + \left(\pi \cdot 0.5\right) \cdot \sin^{-1} \left(1 - x\right)\right)} \]

    swap-sqr [=>]93.34

    \[ \frac{{\pi}^{3} \cdot 0.125 - {\sin^{-1} \left(1 - x\right)}^{3}}{\color{blue}{\left(\pi \cdot \pi\right) \cdot \left(0.5 \cdot 0.5\right)} + \left(\sin^{-1} \left(1 - x\right) \cdot \sin^{-1} \left(1 - x\right) + \left(\pi \cdot 0.5\right) \cdot \sin^{-1} \left(1 - x\right)\right)} \]

    metadata-eval [=>]93.34

    \[ \frac{{\pi}^{3} \cdot 0.125 - {\sin^{-1} \left(1 - x\right)}^{3}}{\left(\pi \cdot \pi\right) \cdot \color{blue}{0.25} + \left(\sin^{-1} \left(1 - x\right) \cdot \sin^{-1} \left(1 - x\right) + \left(\pi \cdot 0.5\right) \cdot \sin^{-1} \left(1 - x\right)\right)} \]

    distribute-rgt-out [=>]93.34

    \[ \frac{{\pi}^{3} \cdot 0.125 - {\sin^{-1} \left(1 - x\right)}^{3}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \color{blue}{\sin^{-1} \left(1 - x\right) \cdot \left(\sin^{-1} \left(1 - x\right) + \pi \cdot 0.5\right)}} \]

    +-commutative [<=]93.34

    \[ \frac{{\pi}^{3} \cdot 0.125 - {\sin^{-1} \left(1 - x\right)}^{3}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \color{blue}{\left(\pi \cdot 0.5 + \sin^{-1} \left(1 - x\right)\right)}} \]

    fma-def [=>]93.34

    \[ \frac{{\pi}^{3} \cdot 0.125 - {\sin^{-1} \left(1 - x\right)}^{3}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \color{blue}{\mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)}} \]
  4. Applied egg-rr93.34

    \[\leadsto \frac{\color{blue}{\frac{\left({\pi}^{6} \cdot 0.015625\right) \cdot \left({\pi}^{6} \cdot 0.015625\right) - {\sin^{-1} \left(1 - x\right)}^{6} \cdot {\sin^{-1} \left(1 - x\right)}^{6}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \left({\sin^{-1} \left(1 - x\right)}^{6} + {\pi}^{6} \cdot 0.015625\right)}}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]
  5. Simplified89.8

    \[\leadsto \frac{\color{blue}{\frac{\left({\pi}^{6} \cdot {\pi}^{6}\right) \cdot 0.000244140625 - {\sin^{-1} \left(1 - x\right)}^{12}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \left({\pi}^{6} \cdot 0.015625 + {\sin^{-1} \left(1 - x\right)}^{6}\right)}}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]
    Proof

    [Start]93.34

    \[ \frac{\frac{\left({\pi}^{6} \cdot 0.015625\right) \cdot \left({\pi}^{6} \cdot 0.015625\right) - {\sin^{-1} \left(1 - x\right)}^{6} \cdot {\sin^{-1} \left(1 - x\right)}^{6}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \left({\sin^{-1} \left(1 - x\right)}^{6} + {\pi}^{6} \cdot 0.015625\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]

    swap-sqr [=>]93.34

    \[ \frac{\frac{\color{blue}{\left({\pi}^{6} \cdot {\pi}^{6}\right) \cdot \left(0.015625 \cdot 0.015625\right)} - {\sin^{-1} \left(1 - x\right)}^{6} \cdot {\sin^{-1} \left(1 - x\right)}^{6}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \left({\sin^{-1} \left(1 - x\right)}^{6} + {\pi}^{6} \cdot 0.015625\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]

    metadata-eval [=>]93.34

    \[ \frac{\frac{\left({\pi}^{6} \cdot {\pi}^{6}\right) \cdot \color{blue}{0.000244140625} - {\sin^{-1} \left(1 - x\right)}^{6} \cdot {\sin^{-1} \left(1 - x\right)}^{6}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \left({\sin^{-1} \left(1 - x\right)}^{6} + {\pi}^{6} \cdot 0.015625\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]

    pow-sqr [=>]89.8

    \[ \frac{\frac{\left({\pi}^{6} \cdot {\pi}^{6}\right) \cdot 0.000244140625 - \color{blue}{{\sin^{-1} \left(1 - x\right)}^{\left(2 \cdot 6\right)}}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \left({\sin^{-1} \left(1 - x\right)}^{6} + {\pi}^{6} \cdot 0.015625\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]

    metadata-eval [=>]89.8

    \[ \frac{\frac{\left({\pi}^{6} \cdot {\pi}^{6}\right) \cdot 0.000244140625 - {\sin^{-1} \left(1 - x\right)}^{\color{blue}{12}}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \left({\sin^{-1} \left(1 - x\right)}^{6} + {\pi}^{6} \cdot 0.015625\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]

    +-commutative [=>]89.8

    \[ \frac{\frac{\left({\pi}^{6} \cdot {\pi}^{6}\right) \cdot 0.000244140625 - {\sin^{-1} \left(1 - x\right)}^{12}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \color{blue}{\left({\pi}^{6} \cdot 0.015625 + {\sin^{-1} \left(1 - x\right)}^{6}\right)}}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]
  6. Applied egg-rr89.8

    \[\leadsto \frac{\frac{\color{blue}{\frac{5.960464477539063 \cdot 10^{-8} \cdot {\pi}^{24} - \left(-{\sin^{-1} \left(1 - x\right)}^{12}\right) \cdot \left(-{\sin^{-1} \left(1 - x\right)}^{12}\right)}{{\pi}^{12} \cdot 0.000244140625 - \left(-{\sin^{-1} \left(1 - x\right)}^{12}\right)}}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \left({\pi}^{6} \cdot 0.015625 + {\sin^{-1} \left(1 - x\right)}^{6}\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]
  7. Applied egg-rr93.34

    \[\leadsto \frac{\frac{\frac{\color{blue}{\frac{\left({\left(3.552713678800501 \cdot 10^{-15} \cdot {\pi}^{48}\right)}^{3} - {\left({\left({\sin^{-1} \left(1 - x\right)}^{24}\right)}^{2}\right)}^{3}\right) \cdot \frac{1}{\mathsf{fma}\left(5.960464477539063 \cdot 10^{-8}, {\pi}^{24}, {\sin^{-1} \left(1 - x\right)}^{24}\right)}}{\left(3.552713678800501 \cdot 10^{-15} \cdot {\pi}^{48}\right) \cdot \left(3.552713678800501 \cdot 10^{-15} \cdot {\pi}^{48}\right) + \left({\left({\sin^{-1} \left(1 - x\right)}^{24}\right)}^{2} \cdot {\left({\sin^{-1} \left(1 - x\right)}^{24}\right)}^{2} + \left(3.552713678800501 \cdot 10^{-15} \cdot {\pi}^{48}\right) \cdot {\left({\sin^{-1} \left(1 - x\right)}^{24}\right)}^{2}\right)}}}{{\pi}^{12} \cdot 0.000244140625 - \left(-{\sin^{-1} \left(1 - x\right)}^{12}\right)}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \left({\pi}^{6} \cdot 0.015625 + {\sin^{-1} \left(1 - x\right)}^{6}\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]
  8. Simplified89.8

    \[\leadsto \frac{\frac{\frac{\color{blue}{\frac{\frac{4.484155085839415 \cdot 10^{-44} \cdot {\left({\pi}^{24}\right)}^{6} - {\left({\sin^{-1} \left(1 - x\right)}^{12}\right)}^{12}}{\mathsf{fma}\left(5.960464477539063 \cdot 10^{-8}, {\pi}^{24}, {\sin^{-1} \left(1 - x\right)}^{24}\right)}}{\mathsf{fma}\left(1.262177448353619 \cdot 10^{-29}, {\pi}^{96}, {\sin^{-1} \left(1 - x\right)}^{48} \cdot \mathsf{fma}\left(3.552713678800501 \cdot 10^{-15}, {\pi}^{48}, {\sin^{-1} \left(1 - x\right)}^{48}\right)\right)}}}{{\pi}^{12} \cdot 0.000244140625 - \left(-{\sin^{-1} \left(1 - x\right)}^{12}\right)}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \left({\pi}^{6} \cdot 0.015625 + {\sin^{-1} \left(1 - x\right)}^{6}\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]
    Proof

    [Start]93.34

    \[ \frac{\frac{\frac{\frac{\left({\left(3.552713678800501 \cdot 10^{-15} \cdot {\pi}^{48}\right)}^{3} - {\left({\left({\sin^{-1} \left(1 - x\right)}^{24}\right)}^{2}\right)}^{3}\right) \cdot \frac{1}{\mathsf{fma}\left(5.960464477539063 \cdot 10^{-8}, {\pi}^{24}, {\sin^{-1} \left(1 - x\right)}^{24}\right)}}{\left(3.552713678800501 \cdot 10^{-15} \cdot {\pi}^{48}\right) \cdot \left(3.552713678800501 \cdot 10^{-15} \cdot {\pi}^{48}\right) + \left({\left({\sin^{-1} \left(1 - x\right)}^{24}\right)}^{2} \cdot {\left({\sin^{-1} \left(1 - x\right)}^{24}\right)}^{2} + \left(3.552713678800501 \cdot 10^{-15} \cdot {\pi}^{48}\right) \cdot {\left({\sin^{-1} \left(1 - x\right)}^{24}\right)}^{2}\right)}}{{\pi}^{12} \cdot 0.000244140625 - \left(-{\sin^{-1} \left(1 - x\right)}^{12}\right)}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \left({\pi}^{6} \cdot 0.015625 + {\sin^{-1} \left(1 - x\right)}^{6}\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]
  9. Final simplification89.8

    \[\leadsto \frac{\frac{\frac{\frac{\frac{4.484155085839415 \cdot 10^{-44} \cdot {\left({\pi}^{24}\right)}^{6} - {\left({\sin^{-1} \left(1 - x\right)}^{12}\right)}^{12}}{\mathsf{fma}\left(5.960464477539063 \cdot 10^{-8}, {\pi}^{24}, {\sin^{-1} \left(1 - x\right)}^{24}\right)}}{\mathsf{fma}\left(1.262177448353619 \cdot 10^{-29}, {\pi}^{96}, {\sin^{-1} \left(1 - x\right)}^{48} \cdot \mathsf{fma}\left(3.552713678800501 \cdot 10^{-15}, {\pi}^{48}, {\sin^{-1} \left(1 - x\right)}^{48}\right)\right)}}{{\sin^{-1} \left(1 - x\right)}^{12} + {\pi}^{12} \cdot 0.000244140625}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {\sin^{-1} \left(1 - x\right)}^{3}\right) \cdot \left({\pi}^{6} \cdot 0.015625 + {\sin^{-1} \left(1 - x\right)}^{6}\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + \sin^{-1} \left(1 - x\right) \cdot \mathsf{fma}\left(\pi, 0.5, \sin^{-1} \left(1 - x\right)\right)} \]

Alternatives

Alternative 1
Error89.8%
Cost163264
\[\begin{array}{l} t_0 := \sin^{-1} \left(1 - x\right)\\ t_1 := {t_0}^{12}\\ \frac{\frac{\frac{{\pi}^{24} \cdot 5.960464477539063 \cdot 10^{-8} - t_1 \cdot t_1}{t_1 + {\pi}^{12} \cdot 0.000244140625}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {t_0}^{3}\right) \cdot \left({\pi}^{6} \cdot 0.015625 + {t_0}^{6}\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)} \end{array} \]
Alternative 2
Error89.8%
Cost136896
\[\begin{array}{l} t_0 := \sin^{-1} \left(1 - x\right)\\ \frac{\frac{0.000244140625 \cdot \left({\pi}^{6} \cdot {\pi}^{6}\right) - {t_0}^{12}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {t_0}^{3}\right) \cdot \left({\pi}^{6} \cdot 0.015625 + {t_0}^{6}\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)} \end{array} \]
Alternative 3
Error89.82%
Cost78144
\[\begin{array}{l} t_0 := \sin^{-1} \left(1 - x\right)\\ \frac{{\pi}^{3} \cdot 0.125 - \mathsf{expm1}\left(\mathsf{log1p}\left({t_0}^{3}\right)\right)}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)} \end{array} \]
Alternative 4
Error89.84%
Cost71808
\[\begin{array}{l} t_0 := \sin^{-1} \left(1 - x\right)\\ \frac{0.125 \cdot e^{3 \cdot \log \pi} - {t_0}^{3}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)} \end{array} \]
Alternative 5
Error89.84%
Cost38848
\[\log \left(e^{\pi \cdot 0.5 - {\left(\sqrt{\sin^{-1} \left(1 - x\right)}\right)}^{2}}\right) \]
Alternative 6
Error89.84%
Cost32704
\[\begin{array}{l} t_0 := \sqrt{2 + \cos^{-1} \left(1 - x\right)}\\ \mathsf{fma}\left(t_0, t_0, -2\right) \end{array} \]
Alternative 7
Error90.78%
Cost19844
\[\begin{array}{l} t_0 := \cos^{-1} \left(1 - x\right) + -1\\ \mathbf{if}\;x \leq 5.5 \cdot 10^{-17}:\\ \;\;\;\;1 + \left|t_0\right|\\ \mathbf{else}:\\ \;\;\;\;1 + {\left(\sqrt[3]{t_0}\right)}^{3}\\ \end{array} \]
Alternative 8
Error90.78%
Cost19652
\[\begin{array}{l} t_0 := \cos^{-1} \left(1 - x\right) + -1\\ \mathbf{if}\;x \leq 5.5 \cdot 10^{-17}:\\ \;\;\;\;1 + \left|t_0\right|\\ \mathbf{else}:\\ \;\;\;\;e^{\mathsf{log1p}\left(t_0\right)}\\ \end{array} \]
Alternative 9
Error90.78%
Cost19524
\[\begin{array}{l} t_0 := \cos^{-1} \left(1 - x\right)\\ \mathbf{if}\;x \leq 5.5 \cdot 10^{-17}:\\ \;\;\;\;1 + \left|t_0 + -1\right|\\ \mathbf{else}:\\ \;\;\;\;e^{\log t_0}\\ \end{array} \]
Alternative 10
Error90.78%
Cost13380
\[\begin{array}{l} t_0 := \cos^{-1} \left(1 - x\right)\\ \mathbf{if}\;x \leq 5.5 \cdot 10^{-17}:\\ \;\;\;\;1 + \left|t_0 + -1\right|\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 11
Error93.34%
Cost6592
\[\cos^{-1} \left(1 - x\right) \]

Error

Reproduce?

herbie shell --seed 2023115 
(FPCore (x)
  :name "bug323 (missed optimization)"
  :precision binary64
  :pre (and (<= 0.0 x) (<= x 0.5))

  :herbie-target
  (* 2.0 (asin (sqrt (/ x 2.0))))

  (acos (- 1.0 x)))