Average Error: 10.2 → 10.2
Time: 58.0s
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)\]
\[\sin^{-1} \left(\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{(\left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right) \cdot 2 + 1)_*}}\right)\]

Error

Bits error versus t

Bits error versus l

Bits error versus Om

Bits error versus Omc

Derivation

  1. Initial program 10.2

    \[\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 add-sqr-sqrt10.3

    \[\leadsto \sin^{-1} \left(\sqrt{\frac{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)\]
  4. Applied associate-/r*10.3

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

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

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

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

Reproduce

herbie shell --seed 2019016 +o rules:numerics
(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: 56.7s)Debug log

sample212.0ms

Algorithm
intervals
Results
533×(pre true 80)
276×(body nan 80)
150×(body real 80)
107×(body real 160)

simplify414.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
413.0ms
(asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))))

prune10.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 8.9b

localize38.0ms

Local error

Found 4 expressions with local error:

7.7b
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))
0.8b
(asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))))
0.2b
(/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))
0.2b
(pow (/ Om Omc) 2)

rewrite16.0ms

Algorithm
rewrite-expression-head
Rules
23×add-sqr-sqrt
20×add-cube-cbrt
20×*-un-lft-identity
19×times-frac
15×sqrt-prod
add-exp-log
add-cbrt-cube
pow1
add-log-exp
log1p-expm1-u
associate-/r/
unpow-prod-down
expm1-log1p-u
associate-/l*
div-inv
associate-/r*
associate-/l/
flip-+
flip3-+
rem-sqrt-square
unpow2
flip--
pow-exp
div-exp
div-sub
sqrt-div
pow1/2
flip3--
frac-2neg
pow-pow
clear-num
asin-acos
cbrt-undiv
pow-to-exp
Counts
4 → 89
Calls
4 calls:
Slowest
7.0ms
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))
6.0ms
(/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))
1.0ms
(asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))))
1.0ms
(pow (/ Om Omc) 2)

series213.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
122.0ms
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))
59.0ms
(/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))
21.0ms
(asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))))
10.0ms
(pow (/ Om Omc) 2)

simplify5.6s

Counts
66 → 101
Calls
66 calls:
Slowest
416.0ms
(- (* 1 1) (* (pow (/ Om Omc) 2) (pow (/ Om Omc) 2)))
386.0ms
(- (pow 1 3) (pow (pow (/ Om Omc) 2) 3))
213.0ms
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ (pow 1 3) (pow (* 2 (pow (/ t l) 2)) 3))))
202.0ms
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))
189.0ms
(+ (* 1 1) (- (* (* 2 (pow (/ t l) 2)) (* 2 (pow (/ t l) 2))) (* 1 (* 2 (pow (/ t l) 2)))))

prune1.7s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 8.8b

localize16.0ms

Local error

Found 4 expressions with local error:

7.7b
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))
7.5b
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
7.5b
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
0.8b
(asin (sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))))

rewrite27.0ms

Algorithm
rewrite-expression-head
Rules
287×sqrt-prod
262×times-frac
152×add-sqr-sqrt
133×add-cube-cbrt
133×*-un-lft-identity
19×sqrt-div
14×associate-/r/
flip-+
flip3-+
rem-sqrt-square
div-inv
add-log-exp
log1p-expm1-u
add-exp-log
add-cbrt-cube
pow1
expm1-log1p-u
pow1/2
asin-acos
Counts
4 → 210
Calls
4 calls:
Slowest
13.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))
1.0ms
(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))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))))

series249.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
127.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))
52.0ms
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
50.0ms
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
20.0ms
(asin (sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))))

simplify15.7s

Counts
182 → 222
Calls
182 calls:
Slowest
338.0ms
(sqrt (* (cbrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))) (cbrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))))
300.0ms
(sqrt (sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))))
288.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))
244.0ms
(sqrt (/ (/ (* (cbrt (- 1 (pow (/ Om Omc) 2))) (cbrt (- 1 (pow (/ Om Omc) 2)))) 1) (* (cbrt (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (cbrt (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))))
230.0ms
(sqrt (/ (* (cbrt (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))) (cbrt (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))) (sqrt 1)))

prune3.9s

Pruning

7 alts after pruning (6 fresh and 1 done)

Merged error: 8.8b

localize18.0ms

Local error

Found 4 expressions with local error:

7.7b
(sqrt (/ (- 1 (* (/ Om Omc) (/ Om Omc))) (fma (* (/ t l) (/ t l)) 2 1)))
0.8b
(asin (sqrt (/ (- 1 (* (/ Om Omc) (/ Om Omc))) (fma (* (/ t l) (/ t l)) 2 1))))
0.2b
(/ (- 1 (* (/ Om Omc) (/ Om Omc))) (fma (* (/ t l) (/ t l)) 2 1))
0.2b
(* (/ Om Omc) (/ Om Omc))

rewrite11.0ms

Algorithm
rewrite-expression-head
Rules
24×add-sqr-sqrt
21×add-cube-cbrt
21×*-un-lft-identity
19×times-frac
13×sqrt-prod
pow1
add-exp-log
add-cbrt-cube
add-log-exp
div-inv
log1p-expm1-u
associate-*l*
associate-*r*
expm1-log1p-u
associate-/l*
associate-/r*
associate-/l/
rem-sqrt-square
flip--
cbrt-unprod
pow-prod-up
*-commutative
associate-*r/
prod-exp
associate-*l/
pow-prod-down
div-exp
div-sub
sqrt-div
pow1/2
flip3--
pow-plus
frac-2neg
clear-num
asin-acos
cbrt-undiv
frac-times
pow2
Counts
4 → 95
Calls
4 calls:
Slowest
4.0ms
(/ (- 1 (* (/ Om Omc) (/ Om Omc))) (fma (* (/ t l) (/ t l)) 2 1))
3.0ms
(* (/ Om Omc) (/ Om Omc))
2.0ms
(sqrt (/ (- 1 (* (/ Om Omc) (/ Om Omc))) (fma (* (/ t l) (/ t l)) 2 1)))
1.0ms
(asin (sqrt (/ (- 1 (* (/ Om Omc) (/ Om Omc))) (fma (* (/ t l) (/ t l)) 2 1))))

series163.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
87.0ms
(sqrt (/ (- 1 (* (/ Om Omc) (/ Om Omc))) (fma (* (/ t l) (/ t l)) 2 1)))
51.0ms
(/ (- 1 (* (/ Om Omc) (/ Om Omc))) (fma (* (/ t l) (/ t l)) 2 1))
14.0ms
(* (/ Om Omc) (/ Om Omc))
9.0ms
(asin (sqrt (/ (- 1 (* (/ Om Omc) (/ Om Omc))) (fma (* (/ t l) (/ t l)) 2 1))))

simplify6.5s

Counts
71 → 107
Calls
71 calls:
Slowest
801.0ms
(* (* (* (/ Om Omc) (/ Om Omc)) (/ Om Omc)) (* (* (/ Om Omc) (/ Om Omc)) (/ Om Omc)))
466.0ms
(asin (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (fma (/ (pow t 2) (pow l 2)) 2 1))))
403.0ms
(- (* 1 1) (* (* (/ Om Omc) (/ Om Omc)) (* (/ Om Omc) (/ Om Omc))))
399.0ms
(asin (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (fma (/ (pow t 2) (pow l 2)) 2 1))))
391.0ms
(asin (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (fma (/ (pow t 2) (pow l 2)) 2 1))))

prune1.6s

Pruning

7 alts after pruning (5 fresh and 2 done)

Merged error: 8.8b

localize16.0ms

Local error

Found 4 expressions with local error:

10.2b
(sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
10.2b
(sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
7.7b
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (* (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))))
7.5b
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))

rewrite17.0ms

Algorithm
rewrite-expression-head
Rules
69×sqrt-prod
47×times-frac
37×sqrt-div
34×add-sqr-sqrt
23×add-cube-cbrt
23×*-un-lft-identity
10×flip-+
10×associate-/r/
10×flip3-+
rem-sqrt-square
add-log-exp
log1p-expm1-u
add-exp-log
pow1/2
add-cbrt-cube
pow1
frac-times
expm1-log1p-u
div-inv
associate-*r/
associate-*l/
Counts
4 → 107
Calls
4 calls:
Slowest
9.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (* (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))))
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))))

series402.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
150.0ms
(sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
114.0ms
(sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))
105.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (* (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))))
33.0ms
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))

simplify9.7s

Counts
79 → 119
Calls
79 calls:
Slowest
408.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (* (sqrt (sqrt (+ (pow 1 3) (pow (* 2 (pow (/ t l) 2)) 3)))) (sqrt (sqrt (- (* 1 1) (* (* 2 (pow (/ t l) 2)) (* 2 (pow (/ t l) 2)))))))))
359.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (* (sqrt (sqrt (- (* 1 1) (* (* 2 (pow (/ t l) 2)) (* 2 (pow (/ t l) 2)))))) (sqrt (sqrt (+ (pow 1 3) (pow (* 2 (pow (/ t l) 2)) 3)))))))
354.0ms
(exp (* 1/4 (- (+ (log 2) (* 2 (log (/ -1 l)))) (* 2 (log (/ -1 t))))))
345.0ms
(exp (* 1/4 (- (+ (log 2) (* 2 (log (/ -1 l)))) (* 2 (log (/ -1 t))))))
284.0ms
(exp (* 1/4 (- (+ (log 2) (* 2 (log (/ 1 l)))) (* 2 (log (/ 1 t))))))

prune2.4s

Pruning

7 alts after pruning (4 fresh and 3 done)

Merged error: 8.8b

regimes1.5s

Accuracy

0% (0.1b remaining)

Error of 10.2b against oracle of 10.2b and baseline of 10.2b

bsearch2.0ms

end0.0ms

sample6.1s

Algorithm
intervals
Results
15933×(pre true 80)
7931×(body nan 80)
4166×(body real 80)
3836×(body real 160)