Average Error: 32.2 → 8.7
Time: 1.9m
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)}\]
\[\begin{array}{l} \mathbf{if}\;t \le -1.6066141068466116 \cdot 10^{+43} \lor \neg \left(t \le 4.6649947452809014 \cdot 10^{-09}\right):\\ \;\;\;\;\left(\frac{\ell}{t} \cdot \cos k\right) \cdot \frac{2}{\left(\left(\left(\sin k \cdot t\right) \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot \left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{t} \cdot \frac{2}{\left(\frac{2 \cdot t}{\frac{\ell}{t}} + \frac{k \cdot k}{\ell}\right) \cdot \frac{\sin k}{\frac{\cos k}{\sin k}}}\\ \end{array}\]

Error

Bits error versus t

Bits error versus l

Bits error versus k

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if t < -1.6066141068466116e+43 or 4.6649947452809014e-09 < t

    1. Initial program 23.0

      \[\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-mult23.0

      \[\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-frac16.4

      \[\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*14.5

      \[\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 associate-/l*8.0

      \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \left(\color{blue}{\frac{t}{\frac{\ell}{t}}} \cdot \sin k\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\]
    8. Using strategy rm
    9. Applied tan-quot8.0

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

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

      \[\leadsto \frac{2}{\left(\color{blue}{\frac{\frac{t}{\ell} \cdot \left(t \cdot \sin k\right)}{\frac{\ell}{t}}} \cdot \frac{\sin k}{\cos k}\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\]
    12. Applied frac-times3.0

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

      \[\leadsto \frac{2}{\color{blue}{\frac{\left(\left(\frac{t}{\ell} \cdot \left(t \cdot \sin k\right)\right) \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}{\frac{\ell}{t} \cdot \cos k}}}\]
    14. Applied associate-/r/2.5

      \[\leadsto \color{blue}{\frac{2}{\left(\left(\frac{t}{\ell} \cdot \left(t \cdot \sin k\right)\right) \cdot \sin k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \cdot \left(\frac{\ell}{t} \cdot \cos k\right)}\]

    if -1.6066141068466116e+43 < t < 4.6649947452809014e-09

    1. Initial program 46.0

      \[\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-mult46.0

      \[\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-frac39.0

      \[\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*37.1

      \[\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 associate-/l*31.9

      \[\leadsto \frac{2}{\left(\left(\frac{t}{\ell} \cdot \left(\color{blue}{\frac{t}{\frac{\ell}{t}}} \cdot \sin k\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)}\]
    8. Using strategy rm
    9. Applied associate-*l/32.4

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

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

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

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

      \[\leadsto \color{blue}{\frac{2}{\left(\left(\frac{t}{\ell} \cdot \left(t \cdot \sin k\right)\right) \cdot \tan k\right) \cdot \left(\left(1 + {\left(\frac{k}{t}\right)}^{2}\right) + 1\right)} \cdot \frac{\ell}{t}}\]
    14. Taylor expanded around -inf 20.0

      \[\leadsto \frac{2}{\color{blue}{\frac{{\left(\sin k\right)}^{2} \cdot {k}^{2}}{\cos k \cdot \ell} + 2 \cdot \frac{{t}^{2} \cdot {\left(\sin k\right)}^{2}}{\ell \cdot \cos k}}} \cdot \frac{\ell}{t}\]
    15. Simplified17.8

      \[\leadsto \frac{2}{\color{blue}{\left(\frac{2 \cdot t}{\frac{\ell}{t}} + \frac{k \cdot k}{\ell}\right) \cdot \frac{\sin k}{\frac{\cos k}{\sin k}}}} \cdot \frac{\ell}{t}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification8.7

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.6066141068466116 \cdot 10^{+43} \lor \neg \left(t \le 4.6649947452809014 \cdot 10^{-09}\right):\\ \;\;\;\;\left(\frac{\ell}{t} \cdot \cos k\right) \cdot \frac{2}{\left(\left(\left(\sin k \cdot t\right) \cdot \frac{t}{\ell}\right) \cdot \sin k\right) \cdot \left(1 + \left({\left(\frac{k}{t}\right)}^{2} + 1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell}{t} \cdot \frac{2}{\left(\frac{2 \cdot t}{\frac{\ell}{t}} + \frac{k \cdot k}{\ell}\right) \cdot \frac{\sin k}{\frac{\cos k}{\sin k}}}\\ \end{array}\]

Reproduce

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

sample530.0ms

Algorithm
intervals

simplify107.0ms

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

prune15.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 29.2b

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

rewrite71.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
flip-+
flip3-+
cbrt-undiv
pow-to-exp
*-commutative
unpow3
cube-mult
div-inv
distribute-lft-in
frac-2neg
associate-/r*
clear-num
distribute-rgt-in
Counts
4 → 112
Calls
4 calls:
Slowest
36.0ms
(* (* (* (/ (pow t 3) (* l l)) (sin k)) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
23.0ms
(* (* (/ (pow t 3) (* l l)) (sin k)) (tan k))
5.0ms
(* (/ (pow t 3) (* l l)) (sin k))
3.0ms
(/ (pow t 3) (* l l))

series649.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
330.0ms
(* (* (* (/ (pow t 3) (* l l)) (sin k)) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
197.0ms
(* (* (/ (pow t 3) (* l l)) (sin k)) (tan k))
91.0ms
(* (/ (pow t 3) (* l l)) (sin k))
31.0ms
(/ (pow t 3) (* l l))

simplify15.2s

Counts
98 → 124
Calls
98 calls:
Slowest
757.0ms
(* (* l l) (- (+ 1 (pow (/ k t) 2)) 1))
662.0ms
(- (+ 1 (pow (/ k t) 2)) 1)
628.0ms
(* (cos k) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))
599.0ms
(* (* (* (pow t 3) (sin k)) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
598.0ms
(* (cos k) (- (+ 1 (pow (/ k t) 2)) 1))

prune2.3s

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 14.4b

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

rewrite195.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
*-commutative
div-inv
associate-/l*
distribute-lft-in
frac-2neg
clear-num
distribute-rgt-in
Counts
4 → 107
Calls
4 calls:
Slowest
129.0ms
(* (* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
48.0ms
(* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k))
9.0ms
(* (/ (* t t) l) (sin k))
5.0ms
(/ (* t t) l)

series647.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
394.0ms
(* (* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
178.0ms
(* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k))
65.0ms
(* (/ (* t t) l) (sin k))
10.0ms
(/ (* t t) l)

simplify21.1s

Counts
100 → 119
Calls
100 calls:
Slowest
881.0ms
(* l (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))
730.0ms
(* (* l (cos k)) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))
706.0ms
(* (* l l) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))
679.0ms
(* (cos k) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))
669.0ms
(- (+ 1 (pow (/ k t) 2)) 1)

prune2.0s

Pruning

14 alts after pruning (14 fresh and 0 done)

Merged error: 6.4b

localize42.0ms

Local error

Found 4 expressions with local error:

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

rewrite121.0ms

Algorithm
rewrite-expression-head
Rules
78×associate-*l/
63×frac-times
29×add-exp-log
29×add-cbrt-cube
29×pow1
28×tan-quot
25×associate-*r/
24×associate-/r/
17×cbrt-unprod
17×prod-exp
17×pow-prod-down
16×flip-+
16×flip3-+
associate-*r*
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
associate-*l*
add-log-exp
*-commutative
div-inv
distribute-lft-in
frac-2neg
associate-/r*
clear-num
distribute-rgt-in
Counts
4 → 131
Calls
4 calls:
Slowest
60.0ms
(* (* (* (/ t l) (* (/ t (/ l t)) (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
29.0ms
(/ 2 (* (* (* (/ t l) (* (/ t (/ l t)) (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1)))
24.0ms
(* (* (/ t l) (* (/ t (/ l t)) (sin k))) (tan k))
3.0ms
(* (/ t (/ l t)) (sin k))

series882.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
337.0ms
(* (* (* (/ t l) (* (/ t (/ l t)) (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
283.0ms
(/ 2 (* (* (* (/ t l) (* (/ t (/ l t)) (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1)))
192.0ms
(* (* (/ t l) (* (/ t (/ l t)) (sin k))) (tan k))
71.0ms
(* (/ t (/ l t)) (sin k))

simplify27.6s

Counts
123 → 143
Calls
123 calls:
Slowest
1.0s
(* (/ l t) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))
757.0ms
(* (/ l t) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))
742.0ms
(* (/ l t) (- (+ 1 (pow (/ k t) 2)) 1))
697.0ms
(* (* (* t (* t (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
675.0ms
(* (cos k) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))

prune2.4s

Pruning

16 alts after pruning (16 fresh and 0 done)

Merged error: 4.2b

localize29.0ms

Local error

Found 4 expressions with local error:

7.8b
(* (* (* (/ t l) (* t (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
3.6b
(* (/ 2 (* (* (* (/ t l) (* t (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))) (/ l t))
2.5b
(* (* (/ t l) (* t (sin k))) (tan k))
1.1b
(* (/ t l) (* t (sin k)))

rewrite110.0ms

Algorithm
rewrite-expression-head
Rules
29×associate-*l/
22×add-exp-log
22×add-cbrt-cube
22×pow1
21×associate-*l*
20×frac-times
14×tan-quot
12×associate-*r/
11×cbrt-unprod
11×associate-/r/
11×prod-exp
11×pow-prod-down
11×associate-*r*
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
flip-+
flip3-+
add-log-exp
*-commutative
div-inv
distribute-lft-in
distribute-rgt-in
Counts
4 → 105
Calls
4 calls:
Slowest
47.0ms
(* (* (* (/ t l) (* t (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
27.0ms
(* (/ 2 (* (* (* (/ t l) (* t (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))) (/ l t))
23.0ms
(* (* (/ t l) (* t (sin k))) (tan k))
10.0ms
(* (/ t l) (* t (sin k)))

series929.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
413.0ms
(* (* (* (/ t l) (* t (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
217.0ms
(* (/ 2 (* (* (* (/ t l) (* t (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))) (/ l t))
202.0ms
(* (* (/ t l) (* t (sin k))) (tan k))
97.0ms
(* (/ t l) (* t (sin k)))

simplify16.6s

Counts
88 → 117
Calls
88 calls:
Slowest
1.1s
(* (cos k) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))
748.0ms
(* (* (* t (* t (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
655.0ms
(* (* l (cos k)) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))
639.0ms
(- (+ 1 (pow (/ k t) 2)) 1)
611.0ms
(* (* (* (/ t l) (/ t l)) (/ t l)) (* (* (* t (sin k)) (* t (sin k))) (* t (sin k))))

prune1.7s

Pruning

15 alts after pruning (15 fresh and 0 done)

Merged error: 3.2b

regimes541.0ms

Accuracy

65.6% (2.6b remaining)

Error of 8.7b against oracle of 6.1b and baseline of 13.7b

bsearch881.0ms

end0.0ms

sample15.3s

Algorithm
intervals