Average Error: 32.3 → 8.1
Time: 1.6m
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.290411516351064 \cdot 10^{+112} \lor \neg \left(t \le 5.061112953565688 \cdot 10^{+115}\right):\\ \;\;\;\;\frac{2}{\left(\frac{t}{\ell} \cdot \left(\left((\left(\frac{k}{t}\right) \cdot \left(\frac{k}{t}\right) + 2)_* \cdot \sin k\right) \cdot t\right)\right) \cdot \left(\frac{t}{\ell} \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(k \cdot k + t \cdot \left(2 \cdot t\right)\right) \cdot \frac{\sin k}{\ell}\right) \cdot \left(\frac{t}{\ell} \cdot \tan k\right)}\\ \end{array}\]

Error

Bits error versus t

Bits error versus l

Bits error versus k

Derivation

  1. Split input into 2 regimes
  2. if t < -1.290411516351064e+112 or 5.061112953565688e+115 < t

    1. Initial program 23.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-mult23.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-frac16.1

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

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

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

      \[\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}}\]
    9. Applied pow-prod-down15.4

      \[\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}}}\]
    10. Simplified6.5

      \[\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}}\]
    11. Using strategy rm
    12. Applied associate-*l*6.5

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

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

    if -1.290411516351064e+112 < t < 5.061112953565688e+115

    1. Initial program 38.8

      \[\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-mult38.8

      \[\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-frac31.9

      \[\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*29.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 pow129.5

      \[\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 pow129.5

      \[\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}}\]
    9. Applied pow-prod-down29.5

      \[\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}}}\]
    10. Simplified25.7

      \[\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}}\]
    11. Using strategy rm
    12. Applied associate-*l*22.1

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le -1.290411516351064 \cdot 10^{+112} \lor \neg \left(t \le 5.061112953565688 \cdot 10^{+115}\right):\\ \;\;\;\;\frac{2}{\left(\frac{t}{\ell} \cdot \left(\left((\left(\frac{k}{t}\right) \cdot \left(\frac{k}{t}\right) + 2)_* \cdot \sin k\right) \cdot t\right)\right) \cdot \left(\frac{t}{\ell} \cdot \tan k\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{2}{\left(\left(k \cdot k + t \cdot \left(2 \cdot t\right)\right) \cdot \frac{\sin k}{\ell}\right) \cdot \left(\frac{t}{\ell} \cdot \tan k\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2019022 +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

sample666.0ms

Algorithm
intervals
Results
479.0ms63×body1280valid
65.0ms46×body640valid
60.0ms204×body80valid
38.0ms35×body320valid
8.0ms11×body160valid

simplify136.0ms

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

prune20.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 32.4b

localize41.0ms

Local error

Found 4 expressions with local error:

17.3b
(/ (pow t 3) (* l l))
12.2b
(* (* (* (/ (pow t 3) (* l l)) (sin k)) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
4.1b
(* (/ (pow t 3) (* l l)) (sin k))
3.9b
(* (* (/ (pow t 3) (* l l)) (sin k)) (tan k))

rewrite72.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
50.0ms
(* (* (* (/ (pow t 3) (* l l)) (sin k)) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
12.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))

series658.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
356.0ms
(* (* (* (/ (pow t 3) (* l l)) (sin k)) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
185.0ms
(* (* (/ (pow t 3) (* l l)) (sin k)) (tan k))
95.0ms
(* (/ (pow t 3) (* l l)) (sin k))
22.0ms
(/ (pow t 3) (* l l))

simplify15.1s

Counts
98 → 132
Calls
98 calls:
Slowest
1.2s
(* (* l l) (- (+ 1 (pow (/ k t) 2)) 1))
785.0ms
(- (+ 1 (pow (/ k t) 2)) 1)
701.0ms
(* (* (* l l) (cos k)) (- (+ 1 (pow (/ k t) 2)) 1))
599.0ms
(* (* l l) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))
574.0ms
(* (cos k) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))

prune2.1s

Pruning

14 alts after pruning (14 fresh and 0 done)

Merged error: 13.2b

localize39.0ms

Local error

Found 4 expressions with local error:

12.2b
(* (* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
7.2b
(/ (* t t) l)
6.8b
(* (/ (* t t) l) (sin k))
3.9b
(* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k))

rewrite148.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
96.0ms
(* (* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
41.0ms
(* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k))
7.0ms
(* (/ (* t t) l) (sin k))
2.0ms
(/ (* t t) l)

series630.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
345.0ms
(* (* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k)) (+ (+ 1 (pow (/ k t) 2)) 1))
184.0ms
(* (* (/ t l) (* (/ (* t t) l) (sin k))) (tan k))
84.0ms
(* (/ (* t t) l) (sin k))
17.0ms
(/ (* t t) l)

simplify20.9s

Counts
100 → 127
Calls
100 calls:
Slowest
1.2s
(* (* l l) (- (+ 1 (pow (/ k t) 2)) 1))
760.0ms
(- (+ 1 (pow (/ k t) 2)) 1)
699.0ms
(* (* (* (* (* (/ t l) (* (/ (* t t) l) (sin k))) (* (/ t l) (* (/ (* t t) l) (sin k)))) (* (/ t l) (* (/ (* 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)))
687.0ms
(* (* (* l l) (cos k)) (- (+ 1 (pow (/ k t) 2)) 1))
599.0ms
(* (* l l) (+ (* (+ 1 (pow (/ k t) 2)) (+ 1 (pow (/ k t) 2))) (- (* 1 1) (* (+ 1 (pow (/ k t) 2)) 1))))

prune2.0s

Pruning

11 alts after pruning (11 fresh and 0 done)

Merged error: 7.0b

localize27.0ms

Local error

Found 4 expressions with local error:

15.6b
(* (* (* (tan k) (/ t l)) (* (/ t l) t)) (* (sin k) (fma (/ k t) (/ k t) 2)))
4.0b
(* (tan k) (/ t l))
1.8b
(* (* (tan k) (/ t l)) (* (/ t l) t))
0.3b
(* (sin k) (fma (/ k t) (/ k t) 2))

rewrite81.0ms

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

series516.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
245.0ms
(* (* (* (tan k) (/ t l)) (* (/ t l) t)) (* (sin k) (fma (/ k t) (/ k t) 2)))
144.0ms
(* (* (tan k) (/ t l)) (* (/ t l) t))
86.0ms
(* (tan k) (/ t l))
40.0ms
(* (sin k) (fma (/ k t) (/ k t) 2))

simplify12.6s

Counts
81 → 122
Calls
81 calls:
Slowest
634.0ms
(* (* (* (tan k) (/ t l)) (* t t)) (* (sin k) (fma (/ k t) (/ k t) 2)))
625.0ms
(* (* (* (sin k) t) (* (/ t l) t)) (* (sin k) (fma (/ k t) (/ k t) 2)))
554.0ms
(+ (+ (log (* (tan k) (/ t l))) (log (* (/ t l) t))) (log (* (sin k) (fma (/ k t) (/ k t) 2))))
516.0ms
(* (* (* (sin k) (/ t l)) (* t t)) (* (sin k) (fma (/ k t) (/ k t) 2)))
469.0ms
(* (* (* (tan k) (/ t l)) (* (/ t l) t)) (* (sin k) 2))

prune1.9s

Pruning

12 alts after pruning (12 fresh and 0 done)

Merged error: 5.9b

localize17.0ms

Local error

Found 4 expressions with local error:

16.6b
(* (* (/ t l) t) (* (sin k) (fma (/ k t) (/ k t) 2)))
4.0b
(* (tan k) (/ t l))
2.9b
(* (* (tan k) (/ t l)) (* (* (/ t l) t) (* (sin k) (fma (/ k t) (/ k t) 2))))
0.3b
(* (sin k) (fma (/ k t) (/ k t) 2))

rewrite67.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
17×distribute-lft-in
17×distribute-rgt-in
16×associate-*l/
14×fma-udef
associate-*r*
add-cube-cbrt
associate-*l*
*-un-lft-identity
add-sqr-sqrt
tan-quot
frac-times
add-log-exp
log1p-expm1-u
*-commutative
associate-*r/
expm1-log1p-u
div-inv
Counts
4 → 112
Calls
4 calls:
Slowest
46.0ms
(* (* (tan k) (/ t l)) (* (* (/ t l) t) (* (sin k) (fma (/ k t) (/ k t) 2))))
13.0ms
(* (* (/ t l) t) (* (sin k) (fma (/ k t) (/ k t) 2)))
4.0ms
(* (sin k) (fma (/ k t) (/ k t) 2))
3.0ms
(* (tan k) (/ t l))

series540.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
202.0ms
(* (* (tan k) (/ t l)) (* (* (/ t l) t) (* (sin k) (fma (/ k t) (/ k t) 2))))
172.0ms
(* (* (/ t l) t) (* (sin k) (fma (/ k t) (/ k t) 2)))
123.0ms
(* (tan k) (/ t l))
44.0ms
(* (sin k) (fma (/ k t) (/ k t) 2))

simplify15.0s

Counts
84 → 124
Calls
84 calls:
Slowest
698.0ms
(* (* (* (* (tan k) (/ t l)) (* (tan k) (/ t l))) (* (tan k) (/ t l))) (* (* (* (* (/ t l) t) (* (sin k) (fma (/ k t) (/ k t) 2))) (* (* (/ t l) t) (* (sin k) (fma (/ k t) (/ k t) 2)))) (* (* (/ t l) t) (* (sin k) (fma (/ k t) (/ k t) 2)))))
593.0ms
(* (* (tan k) (/ t l)) (* (* (sin k) 2) (* (/ t l) t)))
533.0ms
(* (* (* 2 (sin k)) (* (/ t l) t)) (* (tan k) (/ t l)))
523.0ms
(* (* (tan k) (/ t l)) (* (* 2 (sin k)) (* (/ t l) t)))
512.0ms
(* (* (* (/ t l) t) (* (sin k) 2)) (* (tan k) (/ t l)))

prune1.8s

Pruning

10 alts after pruning (10 fresh and 0 done)

Merged error: 4.3b

regimes439.0ms

Accuracy

71.7% (1.7b remaining)

Error of 8.1b against oracle of 6.5b and baseline of 12.3b

bsearch523.0ms

end0.0ms

sample15.5s

Algorithm
intervals
Results
6.3s2022×body1280valid
3.9s1755×body640valid
3.4s5954×body80valid
1.2s852×body320valid
351.0ms394×body160valid