Average Error: 12.6 → 12.7
Time: 32.2s
Precision: 64
Internal Precision: 128
\[\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\]
\[\frac{\frac{1}{\sqrt{{\left(\sin ky\right)}^{2} + {\left(\sin kx\right)}^{2}}}}{\frac{1}{\sin ky}} \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.6

    \[\frac{\sin ky}{\sqrt{{\left(\sin kx\right)}^{2} + {\left(\sin ky\right)}^{2}}} \cdot \sin th\]
  2. Using strategy rm
  3. Applied *-un-lft-identity12.6

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

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

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

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

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

Reproduce

herbie shell --seed 2019022 
(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.4s)Debug log

sample395.0ms

Algorithm
intervals
Results
232.0ms92×body1280valid
63.0ms48×body640valid
23.0ms79×body80valid
20.0ms28×body320valid
4.0msbody160valid

simplify14.0ms

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

prune10.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 11.1b

localize77.0ms

Local error

Found 4 expressions with local error:

3.7b
(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))))

rewrite44.0ms

Algorithm
rewrite-expression-head
Rules
44×*-un-lft-identity
25×sqrt-prod
25×add-sqr-sqrt
24×add-cube-cbrt
24×times-frac
16×unpow-prod-down
10×distribute-lft-out
add-exp-log
associate-/r*
add-cbrt-cube
pow1
add-log-exp
sqrt-div
associate-/l*
unpow2
flip-+
associate-/r/
pow-exp
flip3-+
pow-pow
pow-to-exp
div-inv
div-exp
pow1/2
frac-2neg
clear-num
rem-sqrt-square
cbrt-undiv
Counts
4 → 93
Calls
4 calls:
Slowest
20.0ms
(/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))))
16.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
2.0ms
(pow (sin ky) 2)
2.0ms
(pow (sin kx) 2)

series309.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
132.0ms
(/ (sin ky) (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))))
125.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
26.0ms
(pow (sin ky) 2)
25.0ms
(pow (sin kx) 2)

simplify1.3s

Counts
92 → 105
Calls
92 calls:
Slowest
170.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)))))
158.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))
142.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)))))
120.0ms
(sqrt (- (* (pow (sin kx) 2) (pow (sin kx) 2)) (* (pow (sin ky) 2) (pow (sin ky) 2))))
46.0ms
(- (+ (pow kx 2) (* 2/45 (pow kx 6))) (* 1/3 (pow kx 4)))

prune1.8s

Pruning

16 alts after pruning (16 fresh and 0 done)

Merged error: 10.4b

localize17.0ms

Local error

Found 4 expressions with local error:

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

rewrite29.0ms

Algorithm
rewrite-expression-head
Rules
38×*-un-lft-identity
28×associate-/r*
24×times-frac
23×add-sqr-sqrt
22×add-cube-cbrt
20×sqrt-prod
14×unpow-prod-down
add-exp-log
distribute-lft-out
pow1
add-log-exp
add-cbrt-cube
unpow2
div-inv
pow-exp
sqrt-div
pow-pow
rec-exp
pow-to-exp
inv-pow
pow-flip
flip-+
associate-/r/
div-exp
pow1/2
flip3-+
frac-2neg
clear-num
rem-sqrt-square
Counts
4 → 87
Calls
4 calls:
Slowest
14.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
9.0ms
(/ 1 (/ (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))) (sin ky)))
2.0ms
(pow (sin kx) 2)
2.0ms
(pow (sin ky) 2)

series266.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
146.0ms
(/ 1 (/ (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2))) (sin ky)))
89.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
16.0ms
(pow (sin ky) 2)
15.0ms
(pow (sin kx) 2)

simplify689.0ms

Counts
60 → 99
Calls
60 calls:
Slowest
168.0ms
(sqrt (- (* (pow (sin kx) 2) (pow (sin kx) 2)) (* (pow (sin ky) 2) (pow (sin ky) 2))))
156.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))
48.0ms
(- (+ (pow kx 2) (* 2/45 (pow kx 6))) (* 1/3 (pow kx 4)))
40.0ms
(- (+ (* 2/45 (pow ky 6)) (pow ky 2)) (* 1/3 (pow ky 4)))
36.0ms
(sqrt (+ (pow (pow (sin kx) 2) 3) (pow (pow (sin ky) 2) 3)))

prune1.8s

Pruning

19 alts after pruning (19 fresh and 0 done)

Merged error: 10.4b

localize13.0ms

Local error

Found 4 expressions with local error:

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

rewrite16.0ms

Algorithm
rewrite-expression-head
Rules
24×times-frac
23×*-un-lft-identity
20×add-sqr-sqrt
19×add-cube-cbrt
14×add-exp-log
13×div-inv
12×sqrt-div
11×associate-/r/
unpow-prod-down
associate-/l*
flip-+
add-cbrt-cube
flip3-+
pow1
sqrt-prod
add-log-exp
div-exp
associate-/r*
rec-exp
unpow2
distribute-lft-out
pow-exp
pow-pow
pow-to-exp
associate-/l/
pow1/2
frac-2neg
clear-num
rem-sqrt-square
cbrt-undiv
Counts
4 → 95
Calls
4 calls:
Slowest
8.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
5.0ms
(/ (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (/ 1 (sin ky)))
1.0ms
(pow (sin ky) 2)
1.0ms
(pow (sin kx) 2)

series271.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
151.0ms
(/ (/ 1 (sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))) (/ 1 (sin ky)))
85.0ms
(sqrt (+ (pow (sin kx) 2) (pow (sin ky) 2)))
19.0ms
(pow (sin kx) 2)
16.0ms
(pow (sin ky) 2)

simplify4.4s

Counts
92 → 107
Calls
92 calls:
Slowest
1.2s
(/ (* (* (/ 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))))) (* (* (/ 1 (sin ky)) (/ 1 (sin ky))) (/ 1 (sin ky))))
197.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))))) (/ 1 (sin ky)))
175.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))))) (cbrt (/ 1 (sin ky))))
167.0ms
(/ (/ 1 (sqrt (- (* (pow (sin kx) 2) (pow (sin kx) 2)) (* (pow (sin ky) 2) (pow (sin ky) 2))))) (* (cbrt (/ 1 (sin ky))) (cbrt (/ 1 (sin ky)))))
153.0ms
(/ (/ 1 (sqrt (- (* (pow (sin kx) 2) (pow (sin kx) 2)) (* (pow (sin ky) 2) (pow (sin ky) 2))))) 1)

prune1.8s

Pruning

21 alts after pruning (20 fresh and 1 done)

Merged error: 10.4b

localize42.0ms

Local error

Found 4 expressions with local error:

16.3b
(cbrt (pow (sin kx) 2))
16.3b
(cbrt (pow (sin kx) 2))
16.3b
(cbrt (pow (sin kx) 2))
3.7b
(sqrt (+ (* (* (cbrt (pow (sin kx) 2)) (cbrt (pow (sin kx) 2))) (cbrt (pow (sin kx) 2))) (pow (sin ky) 2)))

rewrite48.0ms

Algorithm
rewrite-expression-head
Rules
21×cbrt-prod
12×add-sqr-sqrt
11×add-cube-cbrt
11×*-un-lft-identity
unpow-prod-down
add-log-exp
add-exp-log
add-cbrt-cube
pow1
unpow2
sqrt-prod
pow1/3
sqrt-div
flip-+
pow1/2
flip3-+
rem-sqrt-square
Counts
4 → 59
Calls
4 calls:
Slowest
43.0ms
(sqrt (+ (* (* (cbrt (pow (sin kx) 2)) (cbrt (pow (sin kx) 2))) (cbrt (pow (sin kx) 2))) (pow (sin ky) 2)))
2.0ms
(cbrt (pow (sin kx) 2))
1.0ms
(cbrt (pow (sin kx) 2))
1.0ms
(cbrt (pow (sin kx) 2))

series587.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
191.0ms
(cbrt (pow (sin kx) 2))
169.0ms
(cbrt (pow (sin kx) 2))
150.0ms
(cbrt (pow (sin kx) 2))
78.0ms
(sqrt (+ (* (* (cbrt (pow (sin kx) 2)) (cbrt (pow (sin kx) 2))) (cbrt (pow (sin kx) 2))) (pow (sin ky) 2)))

simplify758.0ms

Counts
39 → 71
Calls
39 calls:
Slowest
220.0ms
(sqrt (- (* (* (* (cbrt (pow (sin kx) 2)) (cbrt (pow (sin kx) 2))) (cbrt (pow (sin kx) 2))) (* (* (cbrt (pow (sin kx) 2)) (cbrt (pow (sin kx) 2))) (cbrt (pow (sin kx) 2)))) (* (pow (sin ky) 2) (pow (sin ky) 2))))
162.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))
70.0ms
(sqrt (+ (pow (* (* (cbrt (pow (sin kx) 2)) (cbrt (pow (sin kx) 2))) (cbrt (pow (sin kx) 2))) 3) (pow (pow (sin ky) 2) 3)))
63.0ms
(- (+ (* 1/405 (pow (pow kx 14) 1/3)) (pow kx 2/3)) (* 1/9 (pow (pow kx 8) 1/3)))
57.0ms
(- (+ (* 1/405 (pow (pow kx 14) 1/3)) (pow kx 2/3)) (* 1/9 (pow (pow kx 8) 1/3)))

prune1.3s

Pruning

20 alts after pruning (18 fresh and 2 done)

Merged error: 10.4b

regimes1.3s

Accuracy

0% (1.2b remaining)

Error of 12.7b against oracle of 11.5b and baseline of 12.7b

bsearch2.0ms

end0.0ms

sample12.1s

Algorithm
intervals
Results
7.2s2733×body1280valid
2.5s1845×body640valid
1.2s778×body320valid
874.0ms2323×body80valid
209.0ms321×body160valid