Average Error: 10.8 → 6.0
Time: 1.1m
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 1.3887045418649217 \cdot 10^{+143}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{2 \cdot {\left(\frac{t}{\ell}\right)}^{2} + 1}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\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

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) < 1.3887045418649217e+143

    1. Initial program 6.8

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

    if 1.3887045418649217e+143 < (/ t l)

    1. Initial program 33.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 sqrt-div33.0

      \[\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 1.9

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t}{\ell} \le 1.3887045418649217 \cdot 10^{+143}:\\ \;\;\;\;\sin^{-1} \left(\sqrt{\frac{1 - {\left(\frac{Om}{Omc}\right)}^{2}}{2 \cdot {\left(\frac{t}{\ell}\right)}^{2} + 1}}\right)\\ \mathbf{else}:\\ \;\;\;\;\sin^{-1} \left(\frac{\sqrt{1 - {\left(\frac{Om}{Omc}\right)}^{2}}}{\frac{t \cdot \sqrt{2}}{\ell}}\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019004 
(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: 1.1m)Debug log

sample214.0ms

Algorithm
intervals

simplify203.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune18.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 12.2b

localize60.0ms

Local error

Found 4 expressions with local error:

11.1b
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))
0.5b
(asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))))
0.4b
(/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))
0.2b
(pow (/ t l) 2)

rewrite31.0ms

Algorithm
rewrite-expression-head
Counts
4 → 81
Calls

4 calls. Slowest were:

20.0ms
(/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))
7.0ms
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))
2.0ms
(pow (/ t l) 2)

series211.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

112.0ms
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))
70.0ms
(/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))
19.0ms
(asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))))
10.0ms
(pow (/ t l) 2)

simplify6.7s

Counts
66 → 93
Calls

66 calls. Slowest were:

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

prune1.5s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 12.2b

localize25.0ms

Local error

Found 4 expressions with local error:

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

rewrite15.0ms

Algorithm
rewrite-expression-head
Counts
4 → 102
Calls

4 calls. Slowest were:

10.0ms
(/ (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 (/ (sqrt (- 1 (pow (/ Om Omc) 2))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))

series180.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

119.0ms
(/ (sqrt (- 1 (pow (/ Om Omc) 2))) (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
34.0ms
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
16.0ms
(pow (/ t l) 2)
12.0ms
(asin (/ (sqrt (- 1 (pow (/ Om Omc) 2))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))

simplify10.5s

Counts
114 → 114
Calls

114 calls. Slowest were:

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

prune1.8s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 7.1b

localize12.0ms

Local error

Found 4 expressions with local error:

11.5b
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
11.5b
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
4.9b
(sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
4.9b
(sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
4 → 64
Calls

4 calls. Slowest were:

1.0ms
(sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
1.0ms
(sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
1.0ms
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))

series369.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

152.0ms
(sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
126.0ms
(sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
48.0ms
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
43.0ms
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))

simplify3.0s

Counts
44 → 76
Calls

44 calls. Slowest were:

231.0ms
(exp (* 1/4 (- (+ (log 2) (* 2 (log (/ -1 l)))) (* 2 (log (/ -1 t))))))
229.0ms
(exp (* 1/4 (- (+ (log 2) (* 2 (log (/ -1 l)))) (* 2 (log (/ -1 t))))))
201.0ms
(exp (* 1/4 (- (+ (log 2) (* 2 (log (/ 1 l)))) (* 2 (log (/ 1 t))))))

prune1.5s

Pruning

7 alts after pruning (5 fresh and 2 done)

Merged error: 7.1b

localize20.0ms

Local error

Found 4 expressions with local error:

14.8b
(cbrt (+ 1 (* 2 (pow (/ t l) 2))))
14.8b
(cbrt (+ 1 (* 2 (pow (/ t l) 2))))
14.8b
(cbrt (+ 1 (* 2 (pow (/ t l) 2))))
11.1b
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (* (cbrt (+ 1 (* 2 (pow (/ t l) 2)))) (cbrt (+ 1 (* 2 (pow (/ t l) 2)))))) (cbrt (+ 1 (* 2 (pow (/ t l) 2))))))

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
4 → 149
Calls

4 calls. Slowest were:

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

series533.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

147.0ms
(cbrt (+ 1 (* 2 (pow (/ t l) 2))))
138.0ms
(cbrt (+ 1 (* 2 (pow (/ t l) 2))))
130.0ms
(cbrt (+ 1 (* 2 (pow (/ t l) 2))))
117.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (* (cbrt (+ 1 (* 2 (pow (/ t l) 2)))) (cbrt (+ 1 (* 2 (pow (/ t l) 2)))))) (cbrt (+ 1 (* 2 (pow (/ t l) 2))))))

simplify26.1s

Counts
129 → 161
Calls

129 calls. Slowest were:

647.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (* (cbrt (- (* 1 1) (* (* 2 (pow (/ t l) 2)) (* 2 (pow (/ t l) 2))))) (cbrt (+ 1 (* 2 (pow (/ t l) 2)))))) (cbrt (* (cbrt (+ 1 (* 2 (pow (/ t l) 2)))) (cbrt (+ 1 (* 2 (pow (/ t l) 2))))))))
464.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (* (cbrt (- (* 1 1) (* (* 2 (pow (/ t l) 2)) (* 2 (pow (/ t l) 2))))) (cbrt (+ (pow 1 3) (pow (* 2 (pow (/ t l) 2)) 3))))) (cbrt (* (cbrt (+ 1 (* 2 (pow (/ t l) 2)))) (cbrt (+ 1 (* 2 (pow (/ t l) 2))))))))
464.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (* (cbrt (+ (pow 1 3) (pow (* 2 (pow (/ t l) 2)) 3))) (cbrt (- (* 1 1) (* (* 2 (pow (/ t l) 2)) (* 2 (pow (/ t l) 2))))))) (sqrt (cbrt (+ 1 (* 2 (pow (/ t l) 2)))))))

prune3.5s

Pruning

7 alts after pruning (4 fresh and 3 done)

Merged error: 7.1b

regimes1.7s

Accuracy

98.7% (0.1b remaining)

Error of 6.0b against oracle of 6.0b and baseline of 10.8b

bsearch7.0ms

end0.0ms

sample5.7s

Algorithm
intervals