Average Error: 12.2 → 8.7
Time: 41.0s
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 kx\right)^2 + \left(\sin ky\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.2

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

    \[\leadsto \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-identity10.9

    \[\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. Final simplification8.7

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

Reproduce

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

start944.0ms

Algorithm
intervals

setup39.0ms

Pruning

2 alts after pruning (2 fresh and 0 done)

Merged error: 10.6b

localize43.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.1b
(hypot (sin kx) (sin ky))

rewrite28.0ms

Algorithm
rewrite-expression-head
Counts
3 → 54
Calls

3 calls. Slowest were:

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

series545.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

362.0ms
(/ (* (sin th) (sin ky)) (hypot (sin kx) (sin ky)))
125.0ms
(hypot (sin kx) (sin ky))
57.0ms
(* (sin th) (sin ky))

simplify1.8s

Counts
33 → 63
Calls

33 calls. Slowest were:

591.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))))
537.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))))
419.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))

prune899.0ms

Pruning

19 alts after pruning (19 fresh and 0 done)

Merged error: 8.9b

localize11.0ms

Local error

Found 3 expressions with local error:

0.1b
(/ (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))

rewrite20.0ms

Algorithm
rewrite-expression-head
Counts
3 → 111
Calls

3 calls. Slowest were:

9.0ms
(/ (sin th) (/ (hypot (sin kx) (sin ky)) (sin ky)))
7.0ms
(/ (hypot (sin kx) (sin ky)) (sin ky))
0.0ms
(hypot (sin kx) (sin ky))

series701.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

312.0ms
(/ (sin th) (/ (hypot (sin kx) (sin ky)) (sin ky)))
223.0ms
(/ (hypot (sin kx) (sin ky)) (sin ky))
166.0ms
(hypot (sin kx) (sin ky))

simplify4.4s

Counts
132 → 120
Calls

132 calls. Slowest were:

414.0ms
(- (+ (* 1/12 (* (pow kx 2) ky)) ky) (* 1/6 (pow ky 3)))
409.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)))))
380.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))))

prune1.7s

Pruning

23 alts after pruning (23 fresh and 0 done)

Merged error: 8.9b

localize6.0ms

Local error

Found 3 expressions with local error:

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

rewrite9.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))

series655.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

291.0ms
(* (sin th) (/ (sin ky) (hypot (sin kx) (sin ky))))
197.0ms
(/ (sin ky) (hypot (sin kx) (sin ky)))
167.0ms
(hypot (sin kx) (sin ky))

simplify1.7s

Counts
55 → 80
Calls

55 calls. Slowest were:

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

prune1.2s

Pruning

23 alts after pruning (22 fresh and 1 done)

Merged error: 8.9b

localize20.0ms

Local error

Found 4 expressions with local error:

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

rewrite22.0ms

Algorithm
rewrite-expression-head
Counts
4 → 125
Calls

4 calls. Slowest were:

12.0ms
(* (cbrt (/ (sin ky) (hypot (sin kx) (sin ky)))) (cbrt (/ (sin ky) (hypot (sin kx) (sin ky)))))
2.0ms
(cbrt (/ (sin ky) (hypot (sin kx) (sin ky))))
2.0ms
(cbrt (/ (sin ky) (hypot (sin kx) (sin ky))))

series1.1s

Counts
4 → 12
Calls

4 calls. Slowest were:

329.0ms
(cbrt (/ (sin ky) (hypot (sin kx) (sin ky))))
275.0ms
(* (cbrt (/ (sin ky) (hypot (sin kx) (sin ky)))) (cbrt (/ (sin ky) (hypot (sin kx) (sin ky)))))
260.0ms
(cbrt (/ (sin ky) (hypot (sin kx) (sin ky))))
246.0ms
(cbrt (/ (sin ky) (hypot (sin kx) (sin ky))))

simplify2.1s

Counts
98 → 137
Calls

98 calls. Slowest were:

456.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)))))))
436.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)))))))
416.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.4s

Pruning

22 alts after pruning (21 fresh and 1 done)

Merged error: 8.9b

regimes1.1s

Accuracy

0% (0.1b remaining)

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

bsearch3.0ms