Average Error: 12.2 → 12.3
Time: 39.2s
Precision: 64
Internal Precision: 128
\[\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\]
\[\left(\frac{1}{\sqrt{{\left(\sin ky\right)}^{2} + {\left(\sin kx\right)}^{2}}} \cdot \sin ky\right) \cdot \sin th\]

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.2

    \[\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\]
  2. Using strategy rm
  3. Applied div-inv12.3

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

    \[\leadsto \color{blue}{\sin ky \cdot \left(\frac{1}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\right)}\]
  5. Using strategy rm
  6. Applied associate-*r*12.3

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

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

Reproduce

herbie shell --seed 2018362 
(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: 18.7s)Debug log

start506.0ms

Algorithm
intervals

setup49.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 12.9b

localize407.0ms

Local error

Found 4 expressions with local error:

3.9b
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
0.2b
(pow (sin ky) 2)
0.2b
(pow (sin kx) 2)
0.1b
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th))

rewrite40.0ms

Algorithm
rewrite-expression-head
Counts
4 → 91
Calls

4 calls. Slowest were:

24.0ms
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th))
9.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
1.0ms
(pow (sin ky) 2)

series303.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

158.0ms
(* (/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th))
111.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
17.0ms
(pow (sin kx) 2)
16.0ms
(pow (sin ky) 2)

simplify2.0s

Counts
68 → 103
Calls

68 calls. Slowest were:

589.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)))
226.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))
166.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)))

prune1.7s

Pruning

20 alts after pruning (20 fresh and 0 done)

Merged error: 11.8b

localize11.0ms

Local error

Found 4 expressions with local error:

3.9b
(sqrt (+ (pow (sin ky) 2) (pow (sin kx) 2)))
0.2b
(pow (sin ky) 2)
0.2b
(pow (sin kx) 2)
0.1b
(* (/ (sin ky) (sqrt (+ (pow (sin ky) 2) (pow (sin kx) 2)))) (sin th))

rewrite46.0ms

Algorithm
rewrite-expression-head
Counts
4 → 91
Calls

4 calls. Slowest were:

27.0ms
(* (/ (sin ky) (sqrt (+ (pow (sin ky) 2) (pow (sin kx) 2)))) (sin th))
13.0ms
(sqrt (+ (pow (sin ky) 2) (pow (sin kx) 2)))
2.0ms
(pow (sin ky) 2)

series314.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

151.0ms
(* (/ (sin ky) (sqrt (+ (pow (sin ky) 2) (pow (sin kx) 2)))) (sin th))
116.0ms
(sqrt (+ (pow (sin ky) 2) (pow (sin kx) 2)))
24.0ms
(pow (sin ky) 2)
22.0ms
(pow (sin kx) 2)

simplify1.9s

Counts
68 → 103
Calls

68 calls. Slowest were:

563.0ms
(* (/ (* (* (sin ky) (sin ky)) (sin ky)) (* (* (sqrt (+ (pow (sin ky) 2) (pow (sin kx) 2))) (sqrt (+ (pow (sin ky) 2) (pow (sin kx) 2)))) (sqrt (+ (pow (sin ky) 2) (pow (sin kx) 2))))) (* (* (sin th) (sin th)) (sin th)))
167.0ms
(- (+ (* 1/12 (* kx (pow ky 2))) kx) (* 1/6 (pow kx 3)))
164.0ms
(* (* (* (/ (sin ky) (sqrt (+ (pow (sin ky) 2) (pow (sin kx) 2)))) (/ (sin ky) (sqrt (+ (pow (sin ky) 2) (pow (sin kx) 2))))) (/ (sin ky) (sqrt (+ (pow (sin ky) 2) (pow (sin kx) 2))))) (* (* (sin th) (sin th)) (sin th)))

prune1.8s

Pruning

21 alts after pruning (20 fresh and 1 done)

Merged error: 11.3b

localize19.0ms

Local error

Found 4 expressions with local error:

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

rewrite50.0ms

Algorithm
rewrite-expression-head
Counts
4 → 72
Calls

4 calls. Slowest were:

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

series522.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

212.0ms
(* (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th))
170.0ms
(* (sin ky) (* (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th)))
114.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
26.0ms
(pow (sin ky) 2)

simplify2.5s

Counts
48 → 84
Calls

48 calls. Slowest were:

488.0ms
(* (* (* (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))))) (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))))) (* (* (sin th) (sin th)) (sin th)))
424.0ms
(* (* (* (sin ky) (sin ky)) (sin ky)) (* (* (* (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th)) (* (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th))) (* (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (sin th))))
310.0ms
(* (* (* (sin ky) (sin ky)) (sin ky)) (* (* (* (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))))) (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))))) (* (* (sin th) (sin th)) (sin th))))

prune1.7s

Pruning

22 alts after pruning (22 fresh and 0 done)

Merged error: 11.3b

localize13.0ms

Local error

Found 4 expressions with local error:

3.9b
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
0.3b
(* (sin ky) (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))))
0.2b
(pow (sin ky) 2)
0.2b
(pow (sin kx) 2)

rewrite20.0ms

Algorithm
rewrite-expression-head
Counts
4 → 67
Calls

4 calls. Slowest were:

13.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
5.0ms
(* (sin ky) (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))))
1.0ms
(pow (sin kx) 2)

series239.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

121.0ms
(* (sin ky) (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))))
88.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
15.0ms
(pow (sin kx) 2)
15.0ms
(pow (sin ky) 2)

simplify1.3s

Counts
44 → 79
Calls

44 calls. Slowest were:

314.0ms
(* (* (* (sin ky) (sin ky)) (sin ky)) (* (* (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))))) (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))))))
189.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))
169.0ms
(sqrt (+ (* (pow (sin kx) 2) (pow (sin kx) 2)) (- (* (pow (sin ky) 2) (pow (sin ky) 2)) (* (pow (sin kx) 2) (pow (sin ky) 2)))))

prune1.5s

Pruning

24 alts after pruning (23 fresh and 1 done)

Merged error: 11.3b

regimes1.7s

Accuracy

0% (1.9b remaining)

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

bsearch5.0ms