Average Error: 13.1 → 9.3
Time: 37.9s
Precision: 64
Internal Precision: 128
\[\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\]
\[\frac{\sin th}{\frac{\sqrt{\left(\sin kx\right)^2 + \left(\sin ky\right)^2}^*}{\sin ky}}\]

Error

Bits error versus kx

Bits error versus ky

Bits error versus th

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 13.1

    \[\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\]
  2. Simplified11.7

    \[\leadsto \color{blue}{\frac{\sin th \cdot \sin ky}{\sqrt{\left(\sin kx\right)^2 + \left(\sin ky\right)^2}^*}}\]
  3. Using strategy rm
  4. Applied associate-/l*9.3

    \[\leadsto \color{blue}{\frac{\sin th}{\frac{\sqrt{\left(\sin kx\right)^2 + \left(\sin ky\right)^2}^*}{\sin ky}}}\]
  5. Taylor expanded around inf 13.2

    \[\leadsto \frac{\sin th}{\color{blue}{\sqrt{{\left(\sin ky\right)}^{2} + {\left(\sin kx\right)}^{2}} \cdot \frac{1}{\sin ky}}}\]
  6. Simplified9.3

    \[\leadsto \frac{\sin th}{\color{blue}{\frac{\sqrt{\left(\sin kx\right)^2 + \left(\sin ky\right)^2}^*}{\sin ky}}}\]
  7. Final simplification9.3

    \[\leadsto \frac{\sin th}{\frac{\sqrt{\left(\sin kx\right)^2 + \left(\sin ky\right)^2}^*}{\sin ky}}\]

Reproduce

herbie shell --seed 2019010 +o rules:numerics
(FPCore (kx ky th)
  :name "Toniolo and Linder, Equation (3b), real"
  (* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th)))

Details

Time bar (total: 34.6s)Debug log

sample883.0ms

Algorithm
intervals

simplify18.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
17.0ms
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th))

prune41.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 12.2b

localize23.0ms

Local error

Found 3 expressions with local error:

2.7b
(/ (* (sin th) (sin ky)) (hypot (sin kx) (sin ky)))
0.3b
(* (sin th) (sin ky))
0.1b
(hypot (sin kx) (sin ky))

rewrite14.0ms

Algorithm
rewrite-expression-head
Rules
10×add-exp-log
10×add-cbrt-cube
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
pow1
add-log-exp
log1p-expm1-u
associate-*l*
associate-*r*
times-frac
associate-/r*
expm1-log1p-u
sin-mult
cbrt-unprod
prod-exp
div-exp
cbrt-undiv
associate-/l/
associate-/l*
div-inv
*-commutative
pow-prod-down
frac-2neg
clear-num
hypot-udef
Counts
3 → 54
Calls
3 calls:
Slowest
8.0ms
(/ (* (sin th) (sin ky)) (hypot (sin kx) (sin ky)))
4.0ms
(* (sin th) (sin ky))
0.0ms
(hypot (sin kx) (sin ky))

series586.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
339.0ms
(/ (* (sin th) (sin ky)) (hypot (sin kx) (sin ky)))
171.0ms
(hypot (sin kx) (sin ky))
75.0ms
(* (sin th) (sin ky))

simplify1.9s

Counts
33 → 63
Calls
33 calls:
Slowest
621.0ms
(/ (* (* (* (sin th) (sin ky)) (* (sin th) (sin ky))) (* (sin th) (sin ky))) (* (* (hypot (sin kx) (sin ky)) (hypot (sin kx) (sin ky))) (hypot (sin kx) (sin ky))))
511.0ms
(/ (* (* (* (sin th) (sin th)) (sin th)) (* (* (sin ky) (sin ky)) (sin ky))) (* (* (hypot (sin kx) (sin ky)) (hypot (sin kx) (sin ky))) (hypot (sin kx) (sin ky))))
434.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))
82.0ms
(* (* (* (sin th) (sin th)) (sin th)) (* (* (sin ky) (sin ky)) (sin ky)))
37.0ms
(- (log (* (sin th) (sin ky))) (log (hypot (sin kx) (sin ky))))

prune943.0ms

Pruning

16 alts after pruning (16 fresh and 0 done)

Merged error: 10.9b

localize11.0ms

Local error

Found 3 expressions with local error:

0.2b
(/ (sin th) (/ (hypot (sin kx) (sin ky)) (sin ky)))
0.1b
(/ (hypot (sin kx) (sin ky)) (sin ky))
0.1b
(hypot (sin kx) (sin ky))

rewrite21.0ms

Algorithm
rewrite-expression-head
Rules
84×times-frac
53×add-cube-cbrt
53×*-un-lft-identity
53×add-sqr-sqrt
16×associate-/r*
10×add-exp-log
10×add-cbrt-cube
associate-/l*
div-inv
div-exp
cbrt-undiv
add-log-exp
log1p-expm1-u
pow1
expm1-log1p-u
frac-2neg
clear-num
associate-/r/
hypot-udef
Counts
3 → 111
Calls
3 calls:
Slowest
10.0ms
(/ (sin th) (/ (hypot (sin kx) (sin ky)) (sin ky)))
8.0ms
(/ (hypot (sin kx) (sin ky)) (sin ky))
0.0ms
(hypot (sin kx) (sin ky))

series591.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
265.0ms
(/ (sin th) (/ (hypot (sin kx) (sin ky)) (sin ky)))
201.0ms
(/ (hypot (sin kx) (sin ky)) (sin ky))
125.0ms
(hypot (sin kx) (sin ky))

simplify4.3s

Counts
132 → 120
Calls
132 calls:
Slowest
424.0ms
(/ (* (* (sin th) (sin th)) (sin th)) (/ (* (* (hypot (sin kx) (sin ky)) (hypot (sin kx) (sin ky))) (hypot (sin kx) (sin ky))) (* (* (sin ky) (sin ky)) (sin ky))))
375.0ms
(/ (* (cbrt (sin th)) (cbrt (sin th))) (/ (* (cbrt (hypot (sin kx) (sin ky))) (cbrt (hypot (sin kx) (sin ky)))) (* (cbrt (sin ky)) (cbrt (sin ky)))))
350.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))
330.0ms
(/ (* (cbrt (sin th)) (cbrt (sin th))) (/ 1 (* (cbrt (sin ky)) (cbrt (sin ky)))))
293.0ms
(/ (* (cbrt (sin th)) (cbrt (sin th))) (/ (* (cbrt (hypot (sin kx) (sin ky))) (cbrt (hypot (sin kx) (sin ky)))) 1))

prune1.7s

Pruning

23 alts after pruning (23 fresh and 0 done)

Merged error: 10.8b

localize1.0ms

Local error

Found 3 expressions with local error:

0.2b
(/ (sin th) (/ (hypot (sin kx) (sin ky)) (sin ky)))
0.1b
(/ (hypot (sin kx) (sin ky)) (sin ky))
0.1b
(hypot (sin kx) (sin ky))

rewrite10.0ms

Algorithm
rewrite-expression-head
Rules
84×times-frac
53×add-cube-cbrt
53×*-un-lft-identity
53×add-sqr-sqrt
16×associate-/r*
10×add-exp-log
10×add-cbrt-cube
associate-/l*
div-inv
div-exp
cbrt-undiv
add-log-exp
log1p-expm1-u
pow1
expm1-log1p-u
frac-2neg
clear-num
associate-/r/
hypot-udef
Counts
3 → 111
Calls
3 calls:
Slowest
5.0ms
(/ (sin th) (/ (hypot (sin kx) (sin ky)) (sin ky)))
3.0ms
(/ (hypot (sin kx) (sin ky)) (sin ky))
0.0ms
(hypot (sin kx) (sin ky))

series566.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
225.0ms
(/ (sin th) (/ (hypot (sin kx) (sin ky)) (sin ky)))
196.0ms
(/ (hypot (sin kx) (sin ky)) (sin ky))
145.0ms
(hypot (sin kx) (sin ky))

simplify4.4s

Counts
132 → 120
Calls
132 calls:
Slowest
420.0ms
(/ (* (* (sin th) (sin th)) (sin th)) (/ (* (* (hypot (sin kx) (sin ky)) (hypot (sin kx) (sin ky))) (hypot (sin kx) (sin ky))) (* (* (sin ky) (sin ky)) (sin ky))))
408.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))
389.0ms
(/ (* (cbrt (sin th)) (cbrt (sin th))) (/ (* (cbrt (hypot (sin kx) (sin ky))) (cbrt (hypot (sin kx) (sin ky)))) (* (cbrt (sin ky)) (cbrt (sin ky)))))
367.0ms
(/ (* (cbrt (sin th)) (cbrt (sin th))) (/ 1 (* (cbrt (sin ky)) (cbrt (sin ky)))))
331.0ms
(/ (* (cbrt (sin th)) (cbrt (sin th))) (/ (* (cbrt (hypot (sin kx) (sin ky))) (cbrt (hypot (sin kx) (sin ky)))) 1))

prune1.7s

Pruning

23 alts after pruning (22 fresh and 1 done)

Merged error: 10.8b

localize5.0ms

Local error

Found 3 expressions with local error:

0.3b
(* (/ (sin th) (hypot (sin kx) (sin ky))) (sin ky))
0.2b
(/ (sin th) (hypot (sin kx) (sin ky)))
0.1b
(hypot (sin kx) (sin ky))

rewrite11.0ms

Algorithm
rewrite-expression-head
Rules
19×add-cube-cbrt
19×*-un-lft-identity
19×add-sqr-sqrt
18×times-frac
13×associate-*l*
10×add-exp-log
10×add-cbrt-cube
pow1
add-log-exp
associate-/l*
log1p-expm1-u
associate-*r*
associate-/r*
expm1-log1p-u
div-inv
cbrt-unprod
prod-exp
div-exp
cbrt-undiv
*-commutative
associate-*l/
pow-prod-down
frac-2neg
clear-num
hypot-udef
Counts
3 → 71
Calls
3 calls:
Slowest
6.0ms
(* (/ (sin th) (hypot (sin kx) (sin ky))) (sin ky))
3.0ms
(/ (sin th) (hypot (sin kx) (sin ky)))
0.0ms
(hypot (sin kx) (sin ky))

series607.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
251.0ms
(/ (sin th) (hypot (sin kx) (sin ky)))
220.0ms
(* (/ (sin th) (hypot (sin kx) (sin ky))) (sin ky))
137.0ms
(hypot (sin kx) (sin ky))

simplify1.6s

Counts
55 → 80
Calls
55 calls:
Slowest
487.0ms
(* (/ (* (* (sin th) (sin th)) (sin th)) (* (* (hypot (sin kx) (sin ky)) (hypot (sin kx) (sin ky))) (hypot (sin kx) (sin ky)))) (* (* (sin ky) (sin ky)) (sin ky)))
368.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))
177.0ms
(/ (* (* (sin th) (sin th)) (sin th)) (* (* (hypot (sin kx) (sin ky)) (hypot (sin kx) (sin ky))) (hypot (sin kx) (sin ky))))
146.0ms
(* (* (* (/ (sin th) (hypot (sin kx) (sin ky))) (/ (sin th) (hypot (sin kx) (sin ky)))) (/ (sin th) (hypot (sin kx) (sin ky)))) (* (* (sin ky) (sin ky)) (sin ky)))
65.0ms
(+ (- (log (sin th)) (log (hypot (sin kx) (sin ky)))) (log (sin ky)))

prune915.0ms

Pruning

24 alts after pruning (22 fresh and 2 done)

Merged error: 10.8b

regimes1.1s

Accuracy

0% (0.1b remaining)

Error of 9.3b against oracle of 9.2b and baseline of 9.3b

bsearch1.0ms

end0.0ms

sample12.7s

Algorithm
intervals