Average Error: 10.3 → 1.0
Time: 39.5s
Precision: 64
Internal Precision: 128
\[\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 -7.6636007132741 \cdot 10^{+54} \lor \neg \left(\frac{t}{\ell} \le 1.6327068826043366 \cdot 10^{+85}\right):\\ \;\;\;\;\sin^{-1} \left(\left|\sqrt[3]{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}\right| \cdot \left|\frac{\sqrt[3]{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\frac{t \cdot \sqrt{2}}{\ell}}\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{1 + {\left(\frac{t}{\ell}\right)}^{2} \cdot 2}} \cdot \left|\sqrt[3]{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}\right|\right)\\ \end{array}\]

Error

Bits error versus t

Bits error versus l

Bits error versus Om

Bits error versus Omc

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if (/ t l) < -7.6636007132741e+54 or 1.6327068826043366e+85 < (/ t l)

    1. Initial program 24.4

      \[\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 *-un-lft-identity24.4

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{\color{blue}{1 \cdot \left(1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}\right)}}}\right)\]
    4. Applied add-cube-cbrt24.4

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{\color{blue}{\left(\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}\right) \cdot \sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{1 \cdot \left(1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}\right)}}\right)\]
    5. Applied times-frac24.4

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{1} \cdot \frac{\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}}\right)\]
    6. Applied sqrt-prod24.4

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{\frac{\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{1}} \cdot \sqrt{\frac{\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)}\]
    7. Simplified24.4

      \[\leadsto \sin^{-1} \left(\color{blue}{\left|\sqrt[3]{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}\right|} \cdot \sqrt{\frac{\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)\]
    8. Using strategy rm
    9. Applied add-sqr-sqrt24.5

      \[\leadsto \sin^{-1} \left(\left|\sqrt[3]{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}\right| \cdot \sqrt{\frac{\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\color{blue}{\sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}} \cdot \sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}}}\right)\]
    10. Applied add-sqr-sqrt24.5

      \[\leadsto \sin^{-1} \left(\left|\sqrt[3]{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}\right| \cdot \sqrt{\frac{\sqrt[3]{\color{blue}{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}}{\sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}} \cdot \sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}}\right)\]
    11. Applied cbrt-prod24.5

      \[\leadsto \sin^{-1} \left(\left|\sqrt[3]{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}\right| \cdot \sqrt{\frac{\color{blue}{\sqrt[3]{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}} \cdot \sqrt[3]{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}}{\sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}} \cdot \sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}}\right)\]
    12. Applied times-frac24.5

      \[\leadsto \sin^{-1} \left(\left|\sqrt[3]{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}\right| \cdot \sqrt{\color{blue}{\frac{\sqrt[3]{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}} \cdot \frac{\sqrt[3]{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\sqrt{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}}}\right)\]
    13. Applied rem-sqrt-square24.5

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

      \[\leadsto \sin^{-1} \left(\left|\sqrt[3]{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}\right| \cdot \left|\frac{\sqrt[3]{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\color{blue}{\frac{t \cdot \sqrt{2}}{\ell}}}\right|\right)\]

    if -7.6636007132741e+54 < (/ t l) < 1.6327068826043366e+85

    1. Initial program 1.0

      \[\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 *-un-lft-identity1.0

      \[\leadsto \sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{\color{blue}{1 \cdot \left(1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}\right)}}}\right)\]
    4. Applied add-cube-cbrt1.1

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

      \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\frac{\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{1} \cdot \frac{\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}}\right)\]
    6. Applied sqrt-prod1.1

      \[\leadsto \sin^{-1} \color{blue}{\left(\sqrt{\frac{\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}} \cdot \sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{1}} \cdot \sqrt{\frac{\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{1 + 2 \cdot {\left(\frac{t}{\ell}\right)}^{2}}}\right)}\]
    7. Simplified1.1

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \le -7.6636007132741 \cdot 10^{+54} \lor \neg \left(\frac{t}{\ell} \le 1.6327068826043366 \cdot 10^{+85}\right):\\ \;\;\;\;\sin^{-1} \left(\left|\sqrt[3]{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}\right| \cdot \left|\frac{\sqrt[3]{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}}{\frac{t \cdot \sqrt{2}}{\ell}}\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{\sqrt[3]{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{1 + {\left(\frac{t}{\ell}\right)}^{2} \cdot 2}} \cdot \left|\sqrt[3]{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}\right|\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019007 
(FPCore (t l Om Omc)
  :name "Toniolo and Linder, Equation (2)"
  (asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))))

Details

Time bar (total: 38.4s)Debug log

sample231.0ms

Algorithm
intervals

simplify198.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

198.0ms
(asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))))

prune15.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 10.4b

localize36.0ms

Local error

Found 4 expressions with local error:

9.7b
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))
0.3b
(asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))))
0.3b
(pow (/ t l) 2)
0.3b
(pow (/ Om Omc) 2)

rewrite6.0ms

Algorithm
rewrite-expression-head
Counts
4 → 64
Calls

4 calls. Slowest were:

3.0ms
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))
1.0ms
(pow (/ Om Omc) 2)
1.0ms
(pow (/ t l) 2)

series173.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

131.0ms
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))
16.0ms
(pow (/ Om Omc) 2)
14.0ms
(pow (/ t l) 2)
11.0ms
(asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))))

simplify3.1s

Counts
42 → 76
Calls

42 calls. Slowest were:

519.0ms
(asin (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (+ (* 2 (/ (pow t 2) (pow l 2))) 1))))
455.0ms
(asin (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (+ (* 2 (/ (pow t 2) (pow l 2))) 1))))
349.0ms
(asin (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (+ (* 2 (/ (pow t 2) (pow l 2))) 1))))

prune1.3s

Pruning

7 alts after pruning (7 fresh and 0 done)

Merged error: 10.4b

localize46.0ms

Local error

Found 4 expressions with local error:

9.7b
(sqrt (/ (cbrt (- 1 (pow (/ Om Omc) 2))) (+ 1 (* 2 (pow (/ t l) 2)))))
0.3b
(asin (* (fabs (cbrt (- 1 (* (/ Om Omc) (/ Om Omc))))) (sqrt (/ (cbrt (- 1 (pow (/ Om Omc) 2))) (+ 1 (* 2 (pow (/ t l) 2)))))))
0.3b
(pow (/ t l) 2)
0.3b
(* (/ Om Omc) (/ Om Omc))

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
4 → 84
Calls

4 calls. Slowest were:

6.0ms
(sqrt (/ (cbrt (- 1 (pow (/ Om Omc) 2))) (+ 1 (* 2 (pow (/ t l) 2)))))
3.0ms
(* (/ Om Omc) (/ Om Omc))
2.0ms
(pow (/ t l) 2)

series329.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

261.0ms
(sqrt (/ (cbrt (- 1 (pow (/ Om Omc) 2))) (+ 1 (* 2 (pow (/ t l) 2)))))
32.0ms
(asin (* (fabs (cbrt (- 1 (* (/ Om Omc) (/ Om Omc))))) (sqrt (/ (cbrt (- 1 (pow (/ Om Omc) 2))) (+ 1 (* 2 (pow (/ t l) 2)))))))
18.0ms
(pow (/ t l) 2)
18.0ms
(* (/ Om Omc) (/ Om Omc))

simplify3.5s

Counts
61 → 96
Calls

61 calls. Slowest were:

850.0ms
(* (* (* (/ Om Omc) (/ Om Omc)) (/ Om Omc)) (* (* (/ Om Omc) (/ Om Omc)) (/ Om Omc)))
176.0ms
(sqrt (/ (cbrt (- 1 (pow (/ Om Omc) 2))) (- (* 1 1) (* (* 2 (pow (/ t l) 2)) (* 2 (pow (/ t l) 2))))))
153.0ms
(sqrt (/ (cbrt (- 1 (pow (/ Om Omc) 2))) (+ (pow 1 3) (pow (* 2 (pow (/ t l) 2)) 3))))

prune2.1s

Pruning

6 alts after pruning (5 fresh and 1 done)

Merged error: 10.4b

localize39.0ms

Local error

Found 4 expressions with local error:

9.6b
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
0.6b
(/ (cbrt (sqrt (- 1 (pow (/ Om Omc) 2)))) (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
0.3b
(asin (* (fabs (cbrt (- 1 (* (/ Om Omc) (/ Om Omc))))) (fabs (/ (cbrt (sqrt (- 1 (pow (/ Om Omc) 2)))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))))
0.3b
(pow (/ t l) 2)

rewrite20.0ms

Algorithm
rewrite-expression-head
Counts
4 → 122
Calls

4 calls. Slowest were:

15.0ms
(/ (cbrt (sqrt (- 1 (pow (/ Om Omc) 2)))) (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
1.0ms
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
1.0ms
(asin (* (fabs (cbrt (- 1 (* (/ Om Omc) (/ Om Omc))))) (fabs (/ (cbrt (sqrt (- 1 (pow (/ Om Omc) 2)))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))))

series294.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

229.0ms
(/ (cbrt (sqrt (- 1 (pow (/ Om Omc) 2)))) (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
36.0ms
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
18.0ms
(asin (* (fabs (cbrt (- 1 (* (/ Om Omc) (/ Om Omc))))) (fabs (/ (cbrt (sqrt (- 1 (pow (/ Om Omc) 2)))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))))
10.0ms
(pow (/ t l) 2)

simplify12.1s

Counts
152 → 134
Calls

152 calls. Slowest were:

455.0ms
(cbrt (sqrt (- (* 1 1) (* (pow (/ Om Omc) 2) (pow (/ Om Omc) 2)))))
278.0ms
(cbrt (sqrt (- (pow 1 3) (pow (pow (/ Om Omc) 2) 3))))
199.0ms
(/ (sqrt (- 1 (pow (/ Om Omc) 2))) (* (* (sqrt (+ 1 (* 2 (pow (/ t l) 2)))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))

prune3.2s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 0.9b

localize36.0ms

Local error

Found 4 expressions with local error:

9.7b
(sqrt (/ 1 (+ (/ 2 (* (/ l t) (/ l t))) 1)))
0.5b
(/ 2 (* (/ l t) (/ l t)))
0.3b
(asin (* (fabs (cbrt (- 1 (* (/ Om Omc) (/ Om Omc))))) (fabs (* (pow (- 1 (* (/ Om Omc) (/ Om Omc))) 1/6) (sqrt (/ 1 (+ (/ 2 (* (/ l t) (/ l t))) 1)))))))
0.3b
(* (/ Om Omc) (/ Om Omc))

rewrite6.0ms

Algorithm
rewrite-expression-head
Counts
4 → 63
Calls

4 calls. Slowest were:

3.0ms
(* (/ Om Omc) (/ Om Omc))
1.0ms
(sqrt (/ 1 (+ (/ 2 (* (/ l t) (/ l t))) 1)))
1.0ms
(asin (* (fabs (cbrt (- 1 (* (/ Om Omc) (/ Om Omc))))) (fabs (* (pow (- 1 (* (/ Om Omc) (/ Om Omc))) 1/6) (sqrt (/ 1 (+ (/ 2 (* (/ l t) (/ l t))) 1)))))))

series126.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

39.0ms
(/ 2 (* (/ l t) (/ l t)))
35.0ms
(sqrt (/ 1 (+ (/ 2 (* (/ l t) (/ l t))) 1)))
32.0ms
(asin (* (fabs (cbrt (- 1 (* (/ Om Omc) (/ Om Omc))))) (fabs (* (pow (- 1 (* (/ Om Omc) (/ Om Omc))) 1/6) (sqrt (/ 1 (+ (/ 2 (* (/ l t) (/ l t))) 1)))))))
19.0ms
(* (/ Om Omc) (/ Om Omc))

simplify2.2s

Counts
37 → 75
Calls

37 calls. Slowest were:

885.0ms
(* (* (* (/ Om Omc) (/ Om Omc)) (/ Om Omc)) (* (* (/ Om Omc) (/ Om Omc)) (/ Om Omc)))
253.0ms
(sqrt (/ 1 (+ (pow (/ 2 (* (/ l t) (/ l t))) 3) (pow 1 3))))
155.0ms
(asin (* (fabs (* (pow (- 1 (/ (pow Om 2) (pow Omc 2))) 1/6) (sqrt (/ 1 (+ (* 2 (/ (pow t 2) (pow l 2))) 1))))) (fabs (pow (- 1 (/ (pow Om 2) (pow Omc 2))) 1/3))))

prune1.6s

Pruning

5 alts after pruning (4 fresh and 1 done)

Merged error: 0.9b

regimes2.0s

Accuracy

98.7% (0.1b remaining)

Error of 1.0b against oracle of 0.9b and baseline of 10.4b

bsearch13.0ms

end0.0ms

sample5.8s

Algorithm
intervals