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

    \[\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 *-un-lft-identity11.1

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

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

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

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

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

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

Reproduce

herbie shell --seed 2019007 +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.8s)Debug log

sample416.0ms

Algorithm
intervals

simplify24.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune36.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 10.5b

localize46.0ms

Local error

Found 3 expressions with local error:

2.6b
(/ (* (sin th) (sin ky)) (hypot (sin kx) (sin ky)))
0.2b
(* (sin th) (sin ky))
0.0b
(hypot (sin kx) (sin ky))

rewrite27.0ms

Algorithm
rewrite-expression-head
Counts
3 → 54
Calls

3 calls. Slowest were:

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

series585.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

367.0ms
(/ (* (sin th) (sin ky)) (hypot (sin kx) (sin ky)))
141.0ms
(hypot (sin kx) (sin ky))
76.0ms
(* (sin th) (sin ky))

simplify1.8s

Counts
33 → 63
Calls

33 calls. Slowest were:

592.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))))
489.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))))
386.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))

prune837.0ms

Pruning

18 alts after pruning (18 fresh and 0 done)

Merged error: 9.6b

localize5.0ms

Local error

Found 3 expressions with local error:

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

rewrite10.0ms

Algorithm
rewrite-expression-head
Counts
3 → 71
Calls

3 calls. Slowest were:

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

series606.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

288.0ms
(* (sin th) (/ (sin ky) (hypot (sin kx) (sin ky))))
191.0ms
(/ (sin ky) (hypot (sin kx) (sin ky)))
127.0ms
(hypot (sin kx) (sin ky))

simplify1.6s

Counts
55 → 80
Calls

55 calls. Slowest were:

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)))))
275.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))
213.0ms
(- (+ (* 1/6 (* kx ky)) (* 7/360 (* (pow kx 3) ky))) (* 71/720 (* kx (pow ky 3))))

prune1.1s

Pruning

23 alts after pruning (23 fresh and 0 done)

Merged error: 9.6b

localize8.0ms

Local error

Found 3 expressions with local error:

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

rewrite10.0ms

Algorithm
rewrite-expression-head
Counts
3 → 71
Calls

3 calls. Slowest were:

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

series591.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

276.0ms
(* (sin th) (/ (sin ky) (hypot (sin ky) (sin kx))))
189.0ms
(/ (sin ky) (hypot (sin ky) (sin kx)))
126.0ms
(hypot (sin ky) (sin kx))

simplify1.6s

Counts
55 → 80
Calls

55 calls. Slowest were:

452.0ms
(* (* (* (sin th) (sin th)) (sin th)) (/ (* (* (sin ky) (sin ky)) (sin ky)) (* (* (hypot (sin ky) (sin kx)) (hypot (sin ky) (sin kx))) (hypot (sin ky) (sin kx)))))
367.0ms
(- (+ (* 1/12 (* kx (pow ky 2))) kx) (* 1/6 (pow kx 3)))
166.0ms
(/ (* (* (sin ky) (sin ky)) (sin ky)) (* (* (hypot (sin ky) (sin kx)) (hypot (sin ky) (sin kx))) (hypot (sin ky) (sin kx))))

prune1.1s

Pruning

23 alts after pruning (22 fresh and 1 done)

Merged error: 9.6b

localize23.0ms

Local error

Found 4 expressions with local error:

0.4b
(cbrt (/ (sin ky) (hypot (sin ky) (sin kx))))
0.4b
(cbrt (/ (sin ky) (hypot (sin ky) (sin kx))))
0.4b
(cbrt (/ (sin ky) (hypot (sin ky) (sin kx))))
0.3b
(* (cbrt (/ (sin ky) (hypot (sin ky) (sin kx)))) (cbrt (/ (sin ky) (hypot (sin ky) (sin kx)))))

rewrite12.0ms

Algorithm
rewrite-expression-head
Counts
4 → 125
Calls

4 calls. Slowest were:

6.0ms
(* (cbrt (/ (sin ky) (hypot (sin ky) (sin kx)))) (cbrt (/ (sin ky) (hypot (sin ky) (sin kx)))))
2.0ms
(cbrt (/ (sin ky) (hypot (sin ky) (sin kx))))
1.0ms
(cbrt (/ (sin ky) (hypot (sin ky) (sin kx))))

series1.1s

Counts
4 → 12
Calls

4 calls. Slowest were:

297.0ms
(* (cbrt (/ (sin ky) (hypot (sin ky) (sin kx)))) (cbrt (/ (sin ky) (hypot (sin ky) (sin kx)))))
274.0ms
(cbrt (/ (sin ky) (hypot (sin ky) (sin kx))))
264.0ms
(cbrt (/ (sin ky) (hypot (sin ky) (sin kx))))
232.0ms
(cbrt (/ (sin ky) (hypot (sin ky) (sin kx))))

simplify2.1s

Counts
98 → 137
Calls

98 calls. Slowest were:

437.0ms
(- (+ (exp (* 1/3 (- (log ky) (log kx)))) (* 1/18 (* (pow kx 2) (exp (* 1/3 (- (log ky) (log kx))))))) (* 13/108 (* (pow ky 2) (exp (* 1/3 (- (log ky) (log kx)))))))
414.0ms
(- (+ (exp (* 1/3 (- (log ky) (log kx)))) (* 1/18 (* (pow kx 2) (exp (* 1/3 (- (log ky) (log kx))))))) (* 13/108 (* (pow ky 2) (exp (* 1/3 (- (log ky) (log kx)))))))
386.0ms
(- (+ (exp (* 1/3 (- (log ky) (log kx)))) (* 1/18 (* (pow kx 2) (exp (* 1/3 (- (log ky) (log kx))))))) (* 13/108 (* (pow ky 2) (exp (* 1/3 (- (log ky) (log kx)))))))

prune2.1s

Pruning

28 alts after pruning (27 fresh and 1 done)

Merged error: 9.6b

regimes1.3s

Accuracy

0% (0.1b remaining)

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

bsearch1.0ms

end0.0ms

sample12.8s

Algorithm
intervals