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

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 12.4

    \[\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\]
  2. Taylor expanded around -inf 12.4

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

    \[\leadsto \frac{\sin ky}{\color{blue}{\sqrt{\left(\sin ky\right)^2 + \left(\sin kx\right)^2}^*}} \cdot \sin th\]
  4. Using strategy rm
  5. Applied div-inv8.7

    \[\leadsto \color{blue}{\left(\sin ky \cdot \frac{1}{\sqrt{\left(\sin ky\right)^2 + \left(\sin kx\right)^2}^*}\right)} \cdot \sin th\]
  6. Applied associate-*l*8.8

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

    \[\leadsto \sin ky \cdot \color{blue}{\frac{1 \cdot \sin th}{\sqrt{\left(\sin ky\right)^2 + \left(\sin kx\right)^2}^*}}\]
  9. Simplified8.7

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

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

Reproduce

herbie shell --seed 2019008 +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: 29.6s)Debug log

sample408.0ms

Algorithm
intervals

simplify15.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

15.0ms
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th))

prune39.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 11.2b

localize32.0ms

Local error

Found 4 expressions with local error:

2.4b
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
0.3b
(pow (sin ky) 2)
0.2b
(pow (sin kx) 2)
0.2b
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th))

rewrite36.0ms

Algorithm
rewrite-expression-head
Counts
4 → 108
Calls

4 calls. Slowest were:

21.0ms
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th))
10.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
1.0ms
(pow (sin kx) 2)

series357.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

175.0ms
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th))
129.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
28.0ms
(pow (sin ky) 2)
25.0ms
(pow (sin kx) 2)

simplify2.2s

Counts
77 → 120
Calls

77 calls. Slowest were:

522.0ms
(* (/ (* (* (sin ky) (sin ky)) (sin ky)) (* (* (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))))) (* (* (sin th) (sin th)) (sin th)))
408.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))
185.0ms
(* (* (* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))))) (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))))) (* (* (sin th) (sin th)) (sin th)))

prune2.0s

Pruning

18 alts after pruning (18 fresh and 0 done)

Merged error: 9.2b

localize17.0ms

Local error

Found 3 expressions with local error:

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

rewrite21.0ms

Algorithm
rewrite-expression-head
Counts
3 → 71
Calls

3 calls. Slowest were:

12.0ms
(* (/ (sin ky) (hypot (sin ky) (sin kx))) (sin th))
7.0ms
(/ (sin ky) (hypot (sin ky) (sin kx)))
0.0ms
(hypot (sin ky) (sin kx))

series604.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

265.0ms
(* (/ (sin ky) (hypot (sin ky) (sin kx))) (sin th))
179.0ms
(/ (sin ky) (hypot (sin ky) (sin kx)))
159.0ms
(hypot (sin ky) (sin kx))

simplify1.7s

Counts
55 → 80
Calls

55 calls. Slowest were:

480.0ms
(* (/ (* (* (sin ky) (sin ky)) (sin ky)) (* (* (hypot (sin ky) (sin kx)) (hypot (sin ky) (sin kx))) (hypot (sin ky) (sin kx)))) (* (* (sin th) (sin th)) (sin th)))
321.0ms
(- (+ (* 1/12 (* kx (pow ky 2))) kx) (* 1/6 (pow kx 3)))
236.0ms
(- (+ (* 1/6 (* kx ky)) (* 7/360 (* (pow kx 3) ky))) (* 71/720 (* kx (pow ky 3))))

prune1.2s

Pruning

21 alts after pruning (21 fresh and 0 done)

Merged error: 9.2b

localize17.0ms

Local error

Found 4 expressions with local error:

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

rewrite32.0ms

Algorithm
rewrite-expression-head
Counts
4 → 72
Calls

4 calls. Slowest were:

20.0ms
(* (sin ky) (* (/ 1 (hypot (sin ky) (sin kx))) (sin th)))
9.0ms
(* (/ 1 (hypot (sin ky) (sin kx))) (sin th))
2.0ms
(/ 1 (hypot (sin ky) (sin kx)))

series820.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

277.0ms
(* (sin ky) (* (/ 1 (hypot (sin ky) (sin kx))) (sin th)))
207.0ms
(* (/ 1 (hypot (sin ky) (sin kx))) (sin th))
189.0ms
(/ 1 (hypot (sin ky) (sin kx)))
147.0ms
(hypot (sin ky) (sin kx))

simplify2.4s

Counts
37 → 84
Calls

37 calls. Slowest were:

490.0ms
(* (* (* (sin ky) (sin ky)) (sin ky)) (* (* (* (/ 1 (hypot (sin ky) (sin kx))) (sin th)) (* (/ 1 (hypot (sin ky) (sin kx))) (sin th))) (* (/ 1 (hypot (sin ky) (sin kx))) (sin th))))
339.0ms
(- (+ (* 1/12 (* kx (pow ky 2))) kx) (* 1/6 (pow kx 3)))
271.0ms
(* (* (* (sin ky) (sin ky)) (sin ky)) (* (* (* (/ 1 (hypot (sin ky) (sin kx))) (/ 1 (hypot (sin ky) (sin kx)))) (/ 1 (hypot (sin ky) (sin kx)))) (* (* (sin th) (sin th)) (sin th))))

prune1.2s

Pruning

21 alts after pruning (21 fresh and 0 done)

Merged error: 9.2b

localize6.0ms

Local error

Found 3 expressions with local error:

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

rewrite10.0ms

Algorithm
rewrite-expression-head
Counts
3 → 71
Calls

3 calls. Slowest were:

5.0ms
(* (sin ky) (/ (sin th) (hypot (sin ky) (sin kx))))
3.0ms
(/ (sin th) (hypot (sin ky) (sin kx)))
0.0ms
(hypot (sin ky) (sin kx))

series607.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

256.0ms
(* (sin ky) (/ (sin th) (hypot (sin ky) (sin kx))))
213.0ms
(/ (sin th) (hypot (sin ky) (sin kx)))
138.0ms
(hypot (sin ky) (sin kx))

simplify1.5s

Counts
55 → 80
Calls

55 calls. Slowest were:

470.0ms
(* (* (* (sin ky) (sin ky)) (sin ky)) (/ (* (* (sin th) (sin th)) (sin th)) (* (* (hypot (sin ky) (sin kx)) (hypot (sin ky) (sin kx))) (hypot (sin ky) (sin kx)))))
329.0ms
(- (+ (* 1/12 (* kx (pow ky 2))) kx) (* 1/6 (pow kx 3)))
156.0ms
(* (* (* (sin ky) (sin ky)) (sin ky)) (* (* (/ (sin th) (hypot (sin ky) (sin kx))) (/ (sin th) (hypot (sin ky) (sin kx)))) (/ (sin th) (hypot (sin ky) (sin kx)))))

prune891.0ms

Pruning

21 alts after pruning (20 fresh and 1 done)

Merged error: 9.2b

regimes1.3s

Accuracy

0% (0.2b remaining)

Error of 8.7b against oracle of 8.5b and baseline of 8.7b

bsearch2.0ms

end0.0ms

sample12.2s

Algorithm
intervals