Average Error: 10.4 → 5.6
Time: 1.2m
Precision: 64
Internal Precision: 384
\[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)\]
\[\begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \le 1.088977128099576 \cdot 10^{+72}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{\sqrt{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}}{\frac{t \cdot \sqrt{2}}{\ell}}\right)\\ \end{array}\]

Error

Bits error versus t

Bits error versus l

Bits error versus Om

Bits error versus Omc

Derivation

  1. Split input into 2 regimes
  2. if (/ t l) < 1.088977128099576e+72

    1. Initial program 6.7

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)\]

    if 1.088977128099576e+72 < (/ t l)

    1. Initial program 24.9

      \[\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)\]
    2. Using strategy rm
    3. Applied sqrt-div24.9

      \[\leadsto \sin^{-1} \color{blue}{\left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)}\]
    4. Taylor expanded around inf 44.2

      \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\color{blue}{\sqrt{2 \cdot e^{2 \cdot \left(\log \left(\frac{1}{\ell}\right) - \log \left(\frac{1}{t}\right)\right)} + 1}}}\right)\]
    5. Applied simplify24.9

      \[\leadsto \color{blue}{\sin^{-1} \left(\frac{\sqrt{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}}{\sqrt{\frac{1}{\frac{\ell}{t}} \cdot \frac{2}{\frac{\ell}{t}} + 1}}\right)}\]
    6. Taylor expanded around 0 1.2

      \[\leadsto \sin^{-1} \left(\frac{\sqrt{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}}{\color{blue}{\frac{t \cdot \sqrt{2}}{\ell}}}\right)\]
  3. Recombined 2 regimes into one program.

Runtime

Time bar (total: 1.2m)Debug logProfile

herbie shell --seed '#(1064397287 3527694221 3797617954 1138343853 2854031332 1153838279)' 
(FPCore (t l Om Omc)
  :name "Toniolo and Linder, Equation (2)"
  (asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))))