Average Error: 32.2 → 12.3
Time: 1.5m
Precision: 64
Internal Precision: 128
\[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\]
\[\frac{2}{\left(\left(\left(\sin k \cdot \frac{t}{\ell}\right) \cdot (\left(\frac{k}{t}\right) \cdot \left(\frac{k}{t}\right) + 2)_*\right) \cdot \left(\tan k \cdot t\right)\right) \cdot \frac{t}{\ell}}\]

Error

Bits error versus t

Bits error versus l

Bits error versus k

Derivation

  1. Initial program 32.2

    \[\frac{2}{\left(\left(\frac{{t}^{3}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\]
  2. Using strategy rm
  3. Applied cube-mult32.2

    \[\leadsto \frac{2}{\left(\left(\frac{\color{blue}{t \cdot \left(t \cdot t\right)}}{\ell \cdot \ell} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\]
  4. Applied times-frac25.5

    \[\leadsto \frac{2}{\left(\left(\color{blue}{\left(\frac{t}{\ell} \cdot \frac{t \cdot t}{\ell}\right)} \cdot \sin k\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\]
  5. Applied associate-*l*23.6

    \[\leadsto \frac{2}{\left(\color{blue}{\left(\frac{t}{\ell} \cdot \left(\frac{t \cdot t}{\ell} \cdot \sin k\right)\right)} \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\]
  6. Using strategy rm
  7. Applied pow123.6

    \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \left(\frac{t \cdot t}{\ell} \cdot \sin k\right)\right) \cdot \tan k\right) \cdot \color{blue}{{\left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}^{1}}}\]
  8. Applied pow123.6

    \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \left(\frac{t \cdot t}{\ell} \cdot \sin k\right)\right) \cdot \color{blue}{{\left(\tan k\right)}^{1}}\right) \cdot {\left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}^{1}}\]
  9. Applied pow123.6

    \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \color{blue}{{\left(\frac{t \cdot t}{\ell} \cdot \sin k\right)}^{1}}\right) \cdot {\left(\tan k\right)}^{1}\right) \cdot {\left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}^{1}}\]
  10. Applied pow123.6

    \[\leadsto \frac{2}{\left(\left(\color{blue}{{\left(\frac{t}{\ell}\right)}^{1}} \cdot {\left(\frac{t \cdot t}{\ell} \cdot \sin k\right)}^{1}\right) \cdot {\left(\tan k\right)}^{1}\right) \cdot {\left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}^{1}}\]
  11. Applied pow-prod-down23.6

    \[\leadsto \frac{2}{\left(\color{blue}{{\left(\frac{t}{\ell} \cdot \left(\frac{t \cdot t}{\ell} \cdot \sin k\right)\right)}^{1}} \cdot {\left(\tan k\right)}^{1}\right) \cdot {\left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}^{1}}\]
  12. Applied pow-prod-down23.6

    \[\leadsto \frac{2}{\color{blue}{{\left(\left(\frac{t}{\ell} \cdot \left(\frac{t \cdot t}{\ell} \cdot \sin k\right)\right) \cdot \tan k\right)}^{1}} \cdot {\left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}^{1}}\]
  13. Applied pow-prod-down23.6

    \[\leadsto \frac{2}{\color{blue}{{\left(\left(\left(\frac{t}{\ell} \cdot \left(\frac{t \cdot t}{\ell} \cdot \sin k\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)\right)}^{1}}}\]
  14. Simplified17.4

    \[\leadsto \frac{2}{{\color{blue}{\left(\left(\left(\tan k \cdot \frac{t}{\ell}\right) \cdot \left(\frac{t}{\ell} \cdot t\right)\right) \cdot \left(\sin k \cdot (\left(\frac{k}{t}\right) \cdot \left(\frac{k}{t}\right) + 2)_*\right)\right)}}^{1}}\]
  15. Using strategy rm
  16. Applied *-un-lft-identity17.4

    \[\leadsto \frac{2}{\color{blue}{1 \cdot {\left(\left(\left(\tan k \cdot \frac{t}{\ell}\right) \cdot \left(\frac{t}{\ell} \cdot t\right)\right) \cdot \left(\sin k \cdot (\left(\frac{k}{t}\right) \cdot \left(\frac{k}{t}\right) + 2)_*\right)\right)}^{1}}}\]
  17. Applied associate-/r*17.4

    \[\leadsto \color{blue}{\frac{\frac{2}{1}}{{\left(\left(\left(\tan k \cdot \frac{t}{\ell}\right) \cdot \left(\frac{t}{\ell} \cdot t\right)\right) \cdot \left(\sin k \cdot (\left(\frac{k}{t}\right) \cdot \left(\frac{k}{t}\right) + 2)_*\right)\right)}^{1}}}\]
  18. Simplified12.8

    \[\leadsto \frac{\frac{2}{1}}{\color{blue}{\left(\left(\frac{t}{\ell} \cdot \sin k\right) \cdot (\left(\frac{k}{t}\right) \cdot \left(\frac{k}{t}\right) + 2)_*\right) \cdot \left(\left(t \cdot \tan k\right) \cdot \frac{t}{\ell}\right)}}\]
  19. Using strategy rm
  20. Applied associate-*r*12.3

    \[\leadsto \frac{\frac{2}{1}}{\color{blue}{\left(\left(\left(\frac{t}{\ell} \cdot \sin k\right) \cdot (\left(\frac{k}{t}\right) \cdot \left(\frac{k}{t}\right) + 2)_*\right) \cdot \left(t \cdot \tan k\right)\right) \cdot \frac{t}{\ell}}}\]
  21. Final simplification12.3

    \[\leadsto \frac{2}{\left(\left(\left(\sin k \cdot \frac{t}{\ell}\right) \cdot (\left(\frac{k}{t}\right) \cdot \left(\frac{k}{t}\right) + 2)_*\right) \cdot \left(\tan k \cdot t\right)\right) \cdot \frac{t}{\ell}}\]

Reproduce

herbie shell --seed 2019010 +o rules:numerics
(FPCore (t l k)
  :name "Toniolo and Linder, Equation (10+)"
  (/ 2 (* (* (* (/ (pow t 3) (* l l)) (sin k)) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))))

Details

Time bar (total: 1.5m)Debug log

sample434.0ms

Algorithm
intervals

simplify472.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
472.0ms
(/ 2 (* (* (* (/ (pow t 3) (* l l)) (sin k)) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1)))

prune10.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 29.2b

localize54.0ms

Local error

Found 4 expressions with local error:

15.1b
(/ (pow t 3) (* l l))
10.1b
(* (* (* (/ (pow t 3) (* l l)) (sin k)) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
4.3b
(* (/ (pow t 3) (* l l)) (sin k))
3.4b
(* (* (/ (pow t 3) (* l l)) (sin k)) (tan k))

rewrite126.0ms

Algorithm
rewrite-expression-head
Rules
44×add-exp-log
34×add-cbrt-cube
22×prod-exp
20×pow1
16×cbrt-unprod
16×associate-*l/
11×add-cube-cbrt
11×associate-*l*
11×*-un-lft-identity
11×add-sqr-sqrt
10×pow-prod-down
10×times-frac
10×frac-times
associate-*r*
tan-quot
div-exp
associate-*r/
associate-/l*
add-log-exp
log1p-expm1-u
flip-+
flip3-+
cbrt-undiv
pow-to-exp
expm1-log1p-u
*-commutative
unpow3
cube-mult
div-inv
distribute-lft-in
frac-2neg
associate-/r*
clear-num
distribute-rgt-in
Counts
4 → 120
Calls
4 calls:
Slowest
81.0ms
(* (* (* (/ (pow t 3) (* l l)) (sin k)) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
25.0ms
(* (* (/ (pow t 3) (* l l)) (sin k)) (tan k))
11.0ms
(* (/ (pow t 3) (* l l)) (sin k))
6.0ms
(/ (pow t 3) (* l l))

series641.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
364.0ms
(* (* (* (/ (pow t 3) (* l l)) (sin k)) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
167.0ms
(* (* (/ (pow t 3) (* l l)) (sin k)) (tan k))
80.0ms
(* (/ (pow t 3) (* l l)) (sin k))
29.0ms
(/ (pow t 3) (* l l))

simplify16.0s

Counts
98 → 132
Calls
98 calls:
Slowest
1.3s
(* (* l l) (- (+ 1 (pow (/ k t) 2)) 1))
840.0ms
(- (+ 1 (pow (/ k t) 2)) 1)
656.0ms
(* (* (* l l) (cos k)) (- (+ 1 (pow (/ k t) 2)) 1))
638.0ms
(* (* l l) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))
614.0ms
(* (cos k) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))

prune2.2s

Pruning

12 alts after pruning (12 fresh and 0 done)

Merged error: 13.9b

localize22.0ms

Local error

Found 4 expressions with local error:

10.1b
(* (* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
8.6b
(/ (* t t) l)
5.6b
(* (/ (* t t) l) (sin k))
3.4b
(* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k))

rewrite164.0ms

Algorithm
rewrite-expression-head
Rules
44×associate-*l/
34×frac-times
29×add-exp-log
29×add-cbrt-cube
29×pow1
17×cbrt-unprod
17×prod-exp
17×pow-prod-down
16×tan-quot
14×associate-*r/
associate-*r*
flip-+
add-cube-cbrt
flip3-+
*-un-lft-identity
add-sqr-sqrt
associate-*l*
add-log-exp
log1p-expm1-u
expm1-log1p-u
*-commutative
div-inv
associate-/l*
distribute-lft-in
frac-2neg
clear-num
distribute-rgt-in
Counts
4 → 115
Calls
4 calls:
Slowest
111.0ms
(* (* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
43.0ms
(* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k))
5.0ms
(* (/ (* t t) l) (sin k))
2.0ms
(/ (* t t) l)

series681.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
388.0ms
(* (* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
222.0ms
(* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k))
62.0ms
(* (/ (* t t) l) (sin k))
9.0ms
(/ (* t t) l)

simplify23.2s

Counts
100 → 127
Calls
100 calls:
Slowest
1.3s
(* (* l l) (- (+ 1 (pow (/ k t) 2)) 1))
847.0ms
(* (* (* l l) (cos k)) (- (+ 1 (pow (/ k t) 2)) 1))
808.0ms
(- (+ 1 (pow (/ k t) 2)) 1)
714.0ms
(* (* (* (* (* (/ t l) (/ t l)) (/ t l)) (* (* (* (/ (* t t) l) (sin k)) (* (/ (* t t) l) (sin k))) (* (/ (* t t) l) (sin k)))) (* (* (tan k) (tan k)) (tan k))) (* (* (+ (+ 1 (pow (/ k t) 2)) 1) (+ (+ 1 (pow (/ k t) 2)) 1)) (+ (+ 1 (pow (/ k t) 2)) 1)))
663.0ms
(* (cos k) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))

prune2.1s

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 5.7b

localize34.0ms

Local error

Found 4 expressions with local error:

13.0b
(* (* (* (tan k) (/ t l)) (* (/ t l) t)) (* (sin k) (fma (/ k t) (/ k t) 2)))
3.3b
(* (tan k) (/ t l))
1.3b
(* (* (tan k) (/ t l)) (* (/ t l) t))
0.5b
(/ 2 (pow (* (* (* (tan k) (/ t l)) (* (/ t l) t)) (* (sin k) (fma (/ k t) (/ k t) 2))) 1))

rewrite111.0ms

Algorithm
rewrite-expression-head
Rules
32×add-exp-log
32×add-cbrt-cube
32×pow1
26×associate-*l/
19×cbrt-unprod
19×prod-exp
19×pow-prod-down
11×frac-times
10×tan-quot
add-cube-cbrt
associate-*r/
*-un-lft-identity
add-sqr-sqrt
associate-*r*
associate-*l*
add-log-exp
log1p-expm1-u
fma-udef
distribute-lft-in
associate-/r*
expm1-log1p-u
distribute-rgt-in
*-commutative
div-inv
frac-2neg
unpow-prod-down
clear-num
Counts
4 → 105
Calls
4 calls:
Slowest
60.0ms
(* (* (* (tan k) (/ t l)) (* (/ t l) t)) (* (sin k) (fma (/ k t) (/ k t) 2)))
23.0ms
(* (* (tan k) (/ t l)) (* (/ t l) t))
21.0ms
(/ 2 (pow (* (* (* (tan k) (/ t l)) (* (/ t l) t)) (* (sin k) (fma (/ k t) (/ k t) 2))) 1))
4.0ms
(* (tan k) (/ t l))

series1.3s

Counts
4 → 12
Calls
4 calls:
Slowest
788.0ms
(/ 2 (pow (* (* (* (tan k) (/ t l)) (* (/ t l) t)) (* (sin k) (fma (/ k t) (/ k t) 2))) 1))
241.0ms
(* (* (* (tan k) (/ t l)) (* (/ t l) t)) (* (sin k) (fma (/ k t) (/ k t) 2)))
160.0ms
(* (* (tan k) (/ t l)) (* (/ t l) t))
134.0ms
(* (tan k) (/ t l))

simplify12.9s

Counts
75 → 117
Calls
75 calls:
Slowest
809.0ms
(+ (+ (+ (log (tan k)) (log (/ t l))) (log (* (/ t l) t))) (+ (log (sin k)) (log (fma (/ k t) (/ k t) 2))))
603.0ms
(* (* (* (tan k) (/ t l)) (* t t)) (* (sin k) (fma (/ k t) (/ k t) 2)))
596.0ms
(* (* (* (sin k) (/ t l)) (* t t)) (* (sin k) (fma (/ k t) (/ k t) 2)))
556.0ms
(* (* (* (sin k) t) (* (/ t l) t)) (* (sin k) (fma (/ k t) (/ k t) 2)))
492.0ms
(+ (* 1/3 (/ (* t (pow k 3)) l)) (/ (* t k) l))

prune1.9s

Pruning

14 alts after pruning (14 fresh and 0 done)

Merged error: 3.8b

localize36.0ms

Local error

Found 4 expressions with local error:

7.1b
(* (* (* (/ t l) (sin k)) (fma (/ k t) (/ k t) 2)) (* (* t (tan k)) (/ t l)))
3.3b
(* (/ t l) (sin k))
3.0b
(* (* (/ t l) (sin k)) (fma (/ k t) (/ k t) 2))
1.1b
(* (* t (tan k)) (/ t l))

rewrite109.0ms

Algorithm
rewrite-expression-head
Rules
34×add-exp-log
34×add-cbrt-cube
34×pow1
20×cbrt-unprod
20×prod-exp
20×pow-prod-down
15×associate-*l/
12×associate-*r/
11×associate-*r*
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
associate-*l*
tan-quot
frac-times
add-log-exp
log1p-expm1-u
*-commutative
expm1-log1p-u
div-inv
fma-udef
distribute-lft-in
distribute-rgt-in
Counts
4 → 102
Calls
4 calls:
Slowest
64.0ms
(* (* (* (/ t l) (sin k)) (fma (/ k t) (/ k t) 2)) (* (* t (tan k)) (/ t l)))
25.0ms
(* (* (/ t l) (sin k)) (fma (/ k t) (/ k t) 2))
10.0ms
(* (* t (tan k)) (/ t l))
8.0ms
(* (/ t l) (sin k))

series771.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
396.0ms
(* (* (* (/ t l) (sin k)) (fma (/ k t) (/ k t) 2)) (* (* t (tan k)) (/ t l)))
178.0ms
(* (* (/ t l) (sin k)) (fma (/ k t) (/ k t) 2))
126.0ms
(* (* t (tan k)) (/ t l))
71.0ms
(* (/ t l) (sin k))

simplify10.5s

Counts
73 → 114
Calls
73 calls:
Slowest
940.0ms
(* (* (* (* t (tan k)) (* t (tan k))) (* t (tan k))) (* (* (/ t l) (/ t l)) (/ t l)))
514.0ms
(* (* (* t (sin k)) (fma (/ k t) (/ k t) 2)) (* (* t (sin k)) (/ t l)))
465.0ms
(+ (+ (+ (log (/ t l)) (log (sin k))) (log (fma (/ k t) (/ k t) 2))) (+ (log (* t (tan k))) (log (/ t l))))
455.0ms
(* (* (* (* (* (/ t l) (/ t l)) (/ t l)) (* (* (sin k) (sin k)) (sin k))) (* (* (fma (/ k t) (/ k t) 2) (fma (/ k t) (/ k t) 2)) (fma (/ k t) (/ k t) 2))) (* (* (* (* t (tan k)) (* t (tan k))) (* t (tan k))) (* (* (/ t l) (/ t l)) (/ t l))))
442.0ms
(* (* (* (* (* (/ t l) (sin k)) (fma (/ k t) (/ k t) 2)) (* (* (/ t l) (sin k)) (fma (/ k t) (/ k t) 2))) (* (* (/ t l) (sin k)) (fma (/ k t) (/ k t) 2))) (* (* (* (* t (tan k)) (* t (tan k))) (* t (tan k))) (* (* (/ t l) (/ t l)) (/ t l))))

prune1.6s

Pruning

14 alts after pruning (13 fresh and 1 done)

Merged error: 3.8b

regimes525.0ms

Accuracy

0% (5.5b remaining)

Error of 12.3b against oracle of 6.8b and baseline of 12.3b

bsearch4.0ms

end0.0ms

sample14.7s

Algorithm
intervals