Average Error: 4.9 → 0.4
Time: 29.8s
Precision: 64
\[\sin^{-1} \left({\left(\frac{\frac{X}{\sin x}}{Y}\right)}^{\left(-1\right)}\right)\]
\[\begin{array}{l} \mathbf{if}\;Y \le -9.91437618242266465670627701944309269344 \cdot 10^{-12} \lor \neg \left(Y \le 8.246990209150655333914924777216626239351 \cdot 10^{-7}\right):\\ \;\;\;\;\sin^{-1} \left({\left(\frac{X}{Y \cdot \sin x}\right)}^{\left(-1\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{{\left(\frac{1}{Y}\right)}^{\left(-1\right)}}{{\left(\frac{X}{\sin x}\right)}^{1}}\right)\\ \end{array}\]
\sin^{-1} \left({\left(\frac{\frac{X}{\sin x}}{Y}\right)}^{\left(-1\right)}\right)
\begin{array}{l}
\mathbf{if}\;Y \le -9.91437618242266465670627701944309269344 \cdot 10^{-12} \lor \neg \left(Y \le 8.246990209150655333914924777216626239351 \cdot 10^{-7}\right):\\
\;\;\;\;\sin^{-1} \left({\left(\frac{X}{Y \cdot \sin x}\right)}^{\left(-1\right)}\right)\\

\mathbf{else}:\\
\;\;\;\;\sin^{-1} \left(\frac{{\left(\frac{1}{Y}\right)}^{\left(-1\right)}}{{\left(\frac{X}{\sin x}\right)}^{1}}\right)\\

\end{array}
double f(double X, double x, double Y) {
        double r823093 = X;
        double r823094 = x;
        double r823095 = sin(r823094);
        double r823096 = r823093 / r823095;
        double r823097 = Y;
        double r823098 = r823096 / r823097;
        double r823099 = 1.0;
        double r823100 = -r823099;
        double r823101 = pow(r823098, r823100);
        double r823102 = asin(r823101);
        return r823102;
}

double f(double X, double x, double Y) {
        double r823103 = Y;
        double r823104 = -9.914376182422665e-12;
        bool r823105 = r823103 <= r823104;
        double r823106 = 8.246990209150655e-07;
        bool r823107 = r823103 <= r823106;
        double r823108 = !r823107;
        bool r823109 = r823105 || r823108;
        double r823110 = X;
        double r823111 = x;
        double r823112 = sin(r823111);
        double r823113 = r823103 * r823112;
        double r823114 = r823110 / r823113;
        double r823115 = 1.0;
        double r823116 = -r823115;
        double r823117 = pow(r823114, r823116);
        double r823118 = asin(r823117);
        double r823119 = 1.0;
        double r823120 = r823119 / r823103;
        double r823121 = pow(r823120, r823116);
        double r823122 = r823110 / r823112;
        double r823123 = pow(r823122, r823115);
        double r823124 = r823121 / r823123;
        double r823125 = asin(r823124);
        double r823126 = r823109 ? r823118 : r823125;
        return r823126;
}

Error

Bits error versus X

Bits error versus x

Bits error versus Y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if Y < -9.914376182422665e-12 or 8.246990209150655e-07 < Y

    1. Initial program 13.0

      \[\sin^{-1} \left({\left(\frac{\frac{X}{\sin x}}{Y}\right)}^{\left(-1\right)}\right)\]
    2. Using strategy rm
    3. Applied div-inv13.1

      \[\leadsto \sin^{-1} \left({\left(\frac{\color{blue}{X \cdot \frac{1}{\sin x}}}{Y}\right)}^{\left(-1\right)}\right)\]
    4. Applied associate-/l*0.7

      \[\leadsto \sin^{-1} \left({\color{blue}{\left(\frac{X}{\frac{Y}{\frac{1}{\sin x}}}\right)}}^{\left(-1\right)}\right)\]
    5. Simplified0.7

      \[\leadsto \sin^{-1} \left({\left(\frac{X}{\color{blue}{Y \cdot \sin x}}\right)}^{\left(-1\right)}\right)\]

    if -9.914376182422665e-12 < Y < 8.246990209150655e-07

    1. Initial program 0.9

      \[\sin^{-1} \left({\left(\frac{\frac{X}{\sin x}}{Y}\right)}^{\left(-1\right)}\right)\]
    2. Using strategy rm
    3. Applied div-inv1.0

      \[\leadsto \sin^{-1} \left({\color{blue}{\left(\frac{X}{\sin x} \cdot \frac{1}{Y}\right)}}^{\left(-1\right)}\right)\]
    4. Applied unpow-prod-down0.3

      \[\leadsto \sin^{-1} \color{blue}{\left({\left(\frac{X}{\sin x}\right)}^{\left(-1\right)} \cdot {\left(\frac{1}{Y}\right)}^{\left(-1\right)}\right)}\]
    5. Using strategy rm
    6. Applied pow-neg0.3

      \[\leadsto \sin^{-1} \left(\color{blue}{\frac{1}{{\left(\frac{X}{\sin x}\right)}^{1}}} \cdot {\left(\frac{1}{Y}\right)}^{\left(-1\right)}\right)\]
    7. Applied associate-*l/0.2

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{1 \cdot {\left(\frac{1}{Y}\right)}^{\left(-1\right)}}{{\left(\frac{X}{\sin x}\right)}^{1}}\right)}\]
    8. Simplified0.2

      \[\leadsto \sin^{-1} \left(\frac{\color{blue}{{\left(\frac{1}{Y}\right)}^{\left(-1\right)}}}{{\left(\frac{X}{\sin x}\right)}^{1}}\right)\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;Y \le -9.91437618242266465670627701944309269344 \cdot 10^{-12} \lor \neg \left(Y \le 8.246990209150655333914924777216626239351 \cdot 10^{-7}\right):\\ \;\;\;\;\sin^{-1} \left({\left(\frac{X}{Y \cdot \sin x}\right)}^{\left(-1\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{{\left(\frac{1}{Y}\right)}^{\left(-1\right)}}{{\left(\frac{X}{\sin x}\right)}^{1}}\right)\\ \end{array}\]

Reproduce

herbie shell --seed 1 
(FPCore (X x Y)
  :name "asin(pow((X/sin(x))/Y, -1))"
  :precision binary64
  (asin (pow (/ (/ X (sin x)) Y) (- 1))))