Average Error: 10.2 → 10.2
Time: 1.9m
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(\left|\sqrt{\frac{1 - \frac{Om}{Omc} \cdot \frac{Om}{Omc}}{1 + \left(\frac{t}{\ell} \cdot \frac{t}{\ell}\right) \cdot 2}}\right|\right)\]

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. 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. Using strategy rm
  6. Applied add-sqr-sqrt10.3

    \[\leadsto \sin^{-1} \left(\sqrt{\color{blue}{\sqrt{\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}}}} \cdot \sqrt{\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)\]
  7. Applied rem-sqrt-square10.3

    \[\leadsto \sin^{-1} \color{blue}{\left(\left|\sqrt{\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|\right)}\]
  8. Simplified10.2

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

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

Reproduce

herbie shell --seed 2019016 
(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.8m)Debug log

sample217.0ms

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

simplify586.0ms

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

prune9.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 8.9b

localize61.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)

rewrite14.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
associate-/r/
unpow-prod-down
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 → 81
Calls
4 calls:
Slowest
6.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
(pow (/ Om Omc) 2)
1.0ms
(asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))))

series191.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
105.0ms
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2)))))
60.0ms
(/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))
15.0ms
(pow (/ Om Omc) 2)
11.0ms
(asin (sqrt (/ (- 1 (pow (/ Om Omc) 2)) (+ 1 (* 2 (pow (/ t l) 2))))))

simplify6.4s

Counts
66 → 93
Calls
66 calls:
Slowest
467.0ms
(asin (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (+ (* 2 (/ (pow t 2) (pow l 2))) 1))))
417.0ms
(- (* 1 1) (* (pow (/ Om Omc) 2) (pow (/ Om Omc) 2)))
352.0ms
(asin (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (+ (* 2 (/ (pow t 2) (pow l 2))) 1))))
348.0ms
(asin (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (+ (* 2 (/ (pow t 2) (pow l 2))) 1))))
347.0ms
(- (pow 1 3) (pow (pow (/ Om Omc) 2) 3))

prune1.5s

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)))))))

rewrite24.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
add-exp-log
add-cbrt-cube
pow1
pow1/2
asin-acos
Counts
4 → 202
Calls
4 calls:
Slowest
11.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)))))))

series266.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
161.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))
53.0ms
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
40.0ms
(sqrt (+ 1 (* 2 (pow (/ t l) 2))))
13.0ms
(asin (sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))))

simplify21.6s

Counts
182 → 214
Calls
182 calls:
Slowest
465.0ms
(asin (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (+ (* 2 (/ (pow t 2) (pow l 2))) 1))))
442.0ms
(asin (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (+ (* 2 (/ (pow t 2) (pow l 2))) 1))))
421.0ms
(asin (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (+ (* 2 (/ (pow t 2) (pow l 2))) 1))))
339.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))))))))
325.0ms
(sqrt (sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (+ 1 (* 2 (pow (/ t l) 2))))) (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))))

prune5.1s

Pruning

6 alts after pruning (6 fresh and 0 done)

Merged error: 8.8b

localize43.0ms

Local error

Found 4 expressions with local error:

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

rewrite26.0ms

Algorithm
rewrite-expression-head
Rules
24×add-sqr-sqrt
21×add-cube-cbrt
21×*-un-lft-identity
19×times-frac
15×sqrt-prod
pow1
add-exp-log
add-cbrt-cube
add-log-exp
div-inv
associate-/r/
associate-*l*
associate-*r*
associate-/l*
associate-/r*
associate-/l/
flip-+
flip3-+
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 → 91
Calls
4 calls:
Slowest
12.0ms
(* (/ Om Omc) (/ Om Omc))
8.0ms
(/ (- 1 (* (/ Om Omc) (/ Om Omc))) (+ 1 (* 2 (* (/ t l) (/ t l)))))
4.0ms
(sqrt (/ (- 1 (* (/ Om Omc) (/ Om Omc))) (+ 1 (* 2 (* (/ t l) (/ t l))))))
1.0ms
(asin (fabs (sqrt (/ (- 1 (* (/ Om Omc) (/ Om Omc))) (+ 1 (* 2 (* (/ t l) (/ t l))))))))

series270.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
152.0ms
(sqrt (/ (- 1 (* (/ Om Omc) (/ Om Omc))) (+ 1 (* 2 (* (/ t l) (/ t l))))))
71.0ms
(/ (- 1 (* (/ Om Omc) (/ Om Omc))) (+ 1 (* 2 (* (/ t l) (/ t l)))))
24.0ms
(asin (fabs (sqrt (/ (- 1 (* (/ Om Omc) (/ Om Omc))) (+ 1 (* 2 (* (/ t l) (/ t l))))))))
23.0ms
(* (/ Om Omc) (/ Om Omc))

simplify10.0s

Counts
75 → 103
Calls
75 calls:
Slowest
833.0ms
(* (* (* (/ Om Omc) (/ Om Omc)) (/ Om Omc)) (* (* (/ Om Omc) (/ Om Omc)) (/ Om Omc)))
501.0ms
(sqrt (/ (- 1 (* (/ Om Omc) (/ Om Omc))) (+ (pow 1 3) (pow (* 2 (* (/ t l) (/ t l))) 3))))
498.0ms
(asin (fabs (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (+ (* 2 (/ (pow t 2) (pow l 2))) 1)))))
492.0ms
(asin (fabs (sqrt (/ (- 1 (/ (pow Om 2) (pow Omc 2))) (+ (* 2 (/ (pow t 2) (pow l 2))) 1)))))
467.0ms
(+ (* 1 1) (- (* (* 2 (* (/ t l) (/ t l))) (* 2 (* (/ t l) (/ t l)))) (* 1 (* 2 (* (/ t l) (/ t l))))))

prune1.8s

Pruning

6 alts after pruning (5 fresh and 1 done)

Merged error: 8.8b

localize42.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)))))
9.5b
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))) (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))))
9.4b
(sqrt (/ 1 (sqrt (+ 1 (/ 2 (* (/ l t) (/ l t)))))))

rewrite22.0ms

Algorithm
rewrite-expression-head
Rules
890×sqrt-prod
561×times-frac
319×add-sqr-sqrt
280×add-cube-cbrt
280×*-un-lft-identity
52×sqrt-div
22×associate-/r/
18×rem-sqrt-square
13×flip-+
13×flip3-+
11×div-inv
add-log-exp
add-exp-log
pow1/2
add-cbrt-cube
pow1
Counts
4 → 377
Calls
4 calls:
Slowest
8.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 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 (/ 1 (sqrt (+ 1 (/ 2 (* (/ l t) (/ l t)))))))
1.0ms
(sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))

series588.0ms

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

simplify43.4s

Counts
357 → 389
Calls
357 calls:
Slowest
417.0ms
(sqrt (/ (/ (* (cbrt (- 1 (pow (/ Om Omc) 2))) (cbrt (- 1 (pow (/ Om Omc) 2)))) 1) (sqrt (sqrt 1))))
338.0ms
(sqrt (/ 1 (sqrt (+ (pow 1 3) (pow (/ 2 (* (/ l t) (/ l t))) 3)))))
318.0ms
(sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))) (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))))
311.0ms
(sqrt (sqrt (/ (/ (- 1 (pow (/ Om Omc) 2)) (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))) (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2))))))))
301.0ms
(sqrt (/ (- 1 (pow (/ Om Omc) 2)) (* (cbrt (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))) (cbrt (sqrt (sqrt (+ 1 (* 2 (pow (/ t l) 2)))))))))

prune11.9s

Pruning

6 alts after pruning (4 fresh and 2 done)

Merged error: 8.8b

regimes626.0ms

Accuracy

0% (0.1b remaining)

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

bsearch5.0ms

end0.0ms

sample5.4s

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