Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 12810 Details for
Bug 22053
New ebuilds for festival-1.4.3, and speech-tools-1.2.3.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
The elusive diff I neglected to upload
speech_tools-gcc3.2.diff (text/plain), 10.39 KB, created by
Paul Giordano
on 2003-06-04 21:55:17 UTC
(
hide
)
Description:
The elusive diff I neglected to upload
Filename:
MIME Type:
Creator:
Paul Giordano
Created:
2003-06-04 21:55:17 UTC
Size:
10.39 KB
patch
obsolete
>diff -Naur speech_tools/base_class/vec_mat_aux.cc speech_tools.new/base_class/vec_mat_aux.cc >--- speech_tools/base_class/vec_mat_aux.cc 2001-04-04 06:55:32.000000000 -0500 >+++ speech_tools.new/base_class/vec_mat_aux.cc 2003-05-31 18:57:31.000000000 -0500 >@@ -453,15 +453,15 @@ > return (a.a_no_check(0,0) * a.a_no_check(1,1)) - > (a.a_no_check(0,1) * a.a_no_check(1,0)); > >- float p; >+ double p; > > // create cofactor matrix > j = 1; > for (i = 0; i < n; ++i) > { >- p = (float)(i + j + 2); // because i & j should start at 1 >+ p = (double)(i + j + 2); // because i & j should start at 1 > // cout << "power " <<p << endl; >- A[i] = pow(-1.0, p) * determinant(sub(a, i, j)); >+ A[i] = pow((double)-1.0, p) * determinant(sub(a, i, j)); > } > // cout << "cofactor " << A; > >diff -Naur speech_tools/grammar/ngram/EST_Ngrammar.cc speech_tools.new/grammar/ngram/EST_Ngrammar.cc >--- speech_tools/grammar/ngram/EST_Ngrammar.cc 2001-04-04 06:55:32.000000000 -0500 >+++ speech_tools.new/grammar/ngram/EST_Ngrammar.cc 2003-05-31 19:18:32.000000000 -0500 >@@ -579,7 +579,7 @@ > return false; > } > >- p_num_states = (int)pow(vocab->length(),p_order-1); >+ p_num_states = (int)pow((double)vocab->length(),(double)p_order-1); > p_states = new EST_NgrammarState[p_num_states]; > for (i=0; i < p_num_states; i++) > p_states[i].init(i,pred_vocab); >@@ -597,7 +597,7 @@ > return false; > } > >- p_num_states = (int)pow(vocab->length(),p_order-1); >+ p_num_states = (int)pow((double)vocab->length(),(double)p_order-1); > p_states = new EST_NgrammarState[p_num_states]; > > return (bool)(p_states != NULL); >diff -Naur speech_tools/grammar/ngram/ngrammar_aux.cc speech_tools.new/grammar/ngram/ngrammar_aux.cc >--- speech_tools/grammar/ngram/ngrammar_aux.cc 2001-04-04 06:55:32.000000000 -0500 >+++ speech_tools.new/grammar/ngram/ngrammar_aux.cc 2003-05-31 19:20:35.000000000 -0500 >@@ -110,7 +110,7 @@ > } > > for(int r=first;r<=last;r++) >- N[r] = exp(a)* pow((float)r, b); >+ N[r] = exp(a)* pow((double)r, (double)b); > > return true; > } >@@ -252,7 +252,7 @@ > for (i=1;i<ff.n();i++) > total += ff(i); > >- ff[0] = pow(n.get_vocab_length(),n.order()) - total; >+ ff[0] = pow((double)n.get_vocab_length(),(double)n.order()) - total; > } > } > break; >@@ -285,7 +285,7 @@ > double total=0; > for (i=1;i<ff.n();i++) > total += ff(i); >- ff[0] = pow(n.get_vocab_length(),this_order) - total; >+ ff[0] = pow((double)n.get_vocab_length(),(double)this_order) - total; > > > >diff -Naur speech_tools/grammar/ngram/ngrammar_io.cc speech_tools.new/grammar/ngram/ngrammar_io.cc >--- speech_tools/grammar/ngram/ngrammar_io.cc 2001-05-17 07:18:09.000000000 -0500 >+++ speech_tools.new/grammar/ngram/ngrammar_io.cc 2003-05-31 19:19:23.000000000 -0500 >@@ -756,7 +756,7 @@ > n.print_freqs(*ost,floor); > else if (n.representation() == EST_Ngrammar::backoff) > { >- int total_ngrams = (int)pow(n.get_vocab_length(),n.order()-1); >+ int total_ngrams = (int)pow((double)n.get_vocab_length(),(double)n.order()-1); > > for(i=0;i<total_ngrams;i++) > { >@@ -903,7 +903,7 @@ > // word in the ngram is the least significant 'bit' > > // number of ngrams, excluding last word, is >- int total_ngrams = (int)pow(n.get_vocab_length(),n.order()-1); >+ int total_ngrams = (int)pow((double)n.get_vocab_length(),(double)n.order()-1); > > for(i=0;i<total_ngrams;i++) > { >diff -Naur speech_tools/intonation/tilt/tilt_utils.cc speech_tools.new/intonation/tilt/tilt_utils.cc >--- speech_tools/intonation/tilt/tilt_utils.cc 2002-12-28 16:43:44.000000000 -0600 >+++ speech_tools.new/intonation/tilt/tilt_utils.cc 2003-05-31 19:22:01.000000000 -0500 >@@ -378,9 +378,9 @@ > > x = (t / (dur)) * 2.0; > if (x < 1.0) >- val = pow(x, 2.0); >+ val = pow((double)x, 2.0); > else >- val = 2 - pow((2 - x), 2.0); >+ val = 2 - pow((double)(2.0 - x), 2.0); > > val = (val / 2.0); > >@@ -398,9 +398,9 @@ > x = (t / length) * 2.0; > > if (x < 1.0) >- val = pow(x, curve); >+ val = pow((double)x, (double)curve); > else >- val = 2 - pow((2 - x), curve); >+ val = 2 - pow((double)(2.0 - x), (double)curve); > > val = val / 2.0; > >diff -Naur speech_tools/main/wfst_run_main.cc speech_tools.new/main/wfst_run_main.cc >--- speech_tools/main/wfst_run_main.cc 2001-09-25 12:05:43.000000000 -0500 >+++ speech_tools.new/main/wfst_run_main.cc 2003-05-31 19:32:21.000000000 -0500 >@@ -213,7 +213,7 @@ > (int)R.samples(),R.mean()*100,(1-R.mean())*100); > if (al.present("-perplexity")) > { >- printf("perplexity is %f\n", pow(2.0,(-1 * (sumlogp/count)))); >+ printf("perplexity is %f\n", pow(2.0,(double)(-1 * (sumlogp/count)))); > } > > if (ofd != stdout) >diff -Naur speech_tools/sigpr/filter.cc speech_tools.new/sigpr/filter.cc >--- speech_tools/sigpr/filter.cc 2001-06-21 19:26:36.000000000 -0500 >+++ speech_tools.new/sigpr/filter.cc 2003-05-31 19:14:43.000000000 -0500 >@@ -419,7 +419,7 @@ > > // check frequency_response has dimension 2^N > int N = fastlog2(frequency_response.n()); >- if(frequency_response.n() != (int)pow(2,(float)N)){ >+ if(frequency_response.n() != (int)pow(2,(double)N)){ > cerr << "Desired frequency response must have dimension 2^N" << endl; > return EST_FVector(0); > } >@@ -470,10 +470,10 @@ > int i; > int N=10; // good minimum size > >- int fft_size = (int)pow(2, N); >+ int fft_size = (int)pow(2.0, (double)N); > while(fft_size < order*4){ // rule of thumb !? > N++; >- fft_size = (int)pow(2, N); >+ fft_size = (int)pow(2.0, (double)N); > } > > // freq response is from 0 to sampling freq and therefore >diff -Naur speech_tools/sigpr/sigpr_frame.cc speech_tools.new/sigpr/sigpr_frame.cc >--- speech_tools/sigpr/sigpr_frame.cc 2001-04-04 06:55:32.000000000 -0500 >+++ speech_tools.new/sigpr/sigpr_frame.cc 2003-05-31 19:15:20.000000000 -0500 >@@ -499,7 +499,7 @@ > { > power = 0.0; > for (int i = 0; i < frame.length(); i++) >- power += pow(frame(i), 2.0); >+ power += pow((double)frame(i), 2.0); > > power /= frame.length(); > } >diff -Naur speech_tools/siod/slib_math.cc speech_tools.new/siod/slib_math.cc >--- speech_tools/siod/slib_math.cc 2001-04-04 08:11:27.000000000 -0500 >+++ speech_tools.new/siod/slib_math.cc 2003-05-31 18:51:56.000000000 -0500 >@@ -14,14 +14,13 @@ > > LISP numberp(LISP x) > {if FLONUMP(x) return(truth); else return(NIL);} >- >-static LISP plus(LISP args) >+static LISP lplus(LISP args) > { > LISP l; > double sum; > for (sum=0.0,l=args; l != NIL; l=cdr(l)) > { >- if (NFLONUMP(car(l))) err("wrong type of argument to plus",car(l)); >+ if (NFLONUMP(car(l))) err("wrong type of argument to lplus",car(l)); > sum += FLONM(car(l)); > } > return flocons(sum); >@@ -138,7 +137,7 @@ > init_subr_1("number?",numberp, > "(number? DATA)\n\ > Returns t if DATA is a number, nil otherwise."); >- init_lsubr("+",plus, >+ init_lsubr("+",lplus, > "(+ NUM1 NUM2 ...)\n\ > Returns the sum of NUM1 and NUM2 ... An error is given is any argument\n\ > is not a number."); >diff -Naur speech_tools/speech_class/EST_track_aux.cc speech_tools.new/speech_class/EST_track_aux.cc >--- speech_tools/speech_class/EST_track_aux.cc 2001-04-04 08:11:28.000000000 -0500 >+++ speech_tools.new/speech_class/EST_track_aux.cc 2003-05-31 19:09:46.000000000 -0500 >@@ -351,7 +351,7 @@ > mean /= n; > > for (i = 0, var = 0.0; i < tr.num_frames(); ++i) >- var += tr.track_break(i) ? 0.0 : pow(tr.a(i, channel) - mean, 2.0); >+ var += tr.track_break(i) ? 0.0 : pow((double)(tr.a(i, channel) - mean), 2.0); > > var /= n; > sd = sqrt(var); >@@ -369,7 +369,7 @@ > > for (i = 0; i < size; ++i) > if (a.val(i) && b.val(i)) >- sum += pow((a.a(i, channel) - b.a(i, channel)), 2.0); >+ sum += pow((double)(a.a(i, channel) - b.a(i, channel)), 2.0); > > sum = sqrt(sum / size); > return sum; >@@ -461,7 +461,7 @@ > for (p = tl.head(); p; p = next(p)) > for (i = 0; i < tl(p).num_frames(); ++i) > if (!tl(p).track_break(i)) >- var += pow(tl(p).a(i, channel) - mean, 2.0); >+ var += pow((double)(tl(p).a(i, channel) - mean), 2.0); > > var /= n; > sd = sqrt(var); >diff -Naur speech_tools/speech_class/EST_wave_temp.cc speech_tools.new/speech_class/EST_wave_temp.cc >--- speech_tools/speech_class/EST_wave_temp.cc 2001-04-04 06:55:32.000000000 -0500 >+++ speech_tools.new/speech_class/EST_wave_temp.cc 2003-05-31 19:11:24.000000000 -0500 >@@ -83,7 +83,7 @@ > mean /= n; > > for (i = 0, mean = 0.0; i < tr.num_samples(); ++i) >- var += pow(tr.a(i, channel) - mean, 2.0); >+ var += pow((double)(tr.a(i, channel) - mean), 2.0); > > var /= n; > sd = sqrt(var); >@@ -96,7 +96,7 @@ > float sum = 0; > > for (i = 0; i < size; ++i) >- sum += pow((a.a(i, channel) - b.a(i, channel)), 2.0); >+ sum += pow((double)(a.a(i, channel) - b.a(i, channel)), 2.0); > > sum = sqrt(sum / size); > return sum; >@@ -110,7 +110,7 @@ > for (i = 0; i < size; ++i) > { > // cout << i << " " << a.a(i, channel) << " " << b.a(i, channel) << endl; >- sum += fabs(a.a(i, channel) - b.a(i, channel)); >+ sum += fabs((double)(a.a(i, channel) - b.a(i, channel))); > } > return sum / size; > } >diff -Naur speech_tools/stats/EST_multistats.cc speech_tools.new/stats/EST_multistats.cc >--- speech_tools/stats/EST_multistats.cc 2001-04-04 06:55:32.000000000 -0500 >+++ speech_tools.new/stats/EST_multistats.cc 2003-05-31 19:16:32.000000000 -0500 >@@ -89,7 +89,7 @@ > { > v[j] = 0.0; > for (i = 0; i < m.num_rows(); ++i) >- v[j] += pow(m(i, j) - u(j), 2.0); >+ v[j] += pow((double)(m(i, j) - u(j)), 2.0); > v[j] /= m.num_rows() - 1; // sample variance > } > >@@ -183,7 +183,7 @@ > { > P(i, j) = 0.0; > for (k = 0; k < p; ++k) >- P(i, j) += pow(gu(i, k) - gu(j, k), 2.0) / gv(k); >+ P(i, j) += pow((double)(gu(i, k) - gu(j, k)), 2.0) / gv(k); > P(i, j) /= p; > } > return P; >@@ -228,7 +228,7 @@ > float P = 0.0; > > for (k = 0; k < n; ++k) >- P += pow(ui(k) - uj(k), 2.0) / v(k); >+ P += pow((double)(ui(k) - uj(k)), 2.0) / v(k); > P /= n; > > return P; >diff -Naur speech_tools/testsuite/hash_example.cc speech_tools.new/testsuite/hash_example.cc >--- speech_tools/testsuite/hash_example.cc 2001-04-04 06:55:32.000000000 -0500 >+++ speech_tools.new/testsuite/hash_example.cc 2003-05-31 19:33:54.000000000 -0500 >@@ -71,8 +71,8 @@ > > EST_THash<int,float> logs(100); > >-logs.add_item(12, log(12)); >-logs.add_item(34, log(34)); >+logs.add_item(12, log(12.0)); >+logs.add_item(34, log(34.0)); > > cout << "length of `fred' = " << lengths.val("fred") << "\n"; > cout << "log of 34' = " << logs.val(34) << "\n"; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 22053
:
12633
|
12634
|
12635
|
12636
|
12810
|
13656
|
13657
|
13658
|
13659
|
13661
|
13680
|
13681
|
13699
|
13701
|
13702
|
13769