comparison liboctave/numeric/lo-specfun.cc @ 20265:e914b5399c67

Use in-place operators in C++ code where possible. * libgui/src/dialog.cc, libgui/src/m-editor/file-editor-tab.cc, libgui/src/main-window.cc, libinterp/corefcn/bsxfun.cc, libinterp/corefcn/filter.cc, libinterp/corefcn/mgorth.cc, libinterp/corefcn/oct-stream.cc, libinterp/corefcn/pr-output.cc, liboctave/array/Array-util.cc, liboctave/array/dim-vector.h, liboctave/numeric/CollocWt.cc, liboctave/numeric/eigs-base.cc, liboctave/numeric/lo-specfun.cc: Use in-place operators in C++ code where possible.
author Rik <rik@octave.org>
date Mon, 25 May 2015 22:02:15 -0700
parents 65e22ba879f0
children a9574e3c6e9e
comparison
equal deleted inserted replaced
20264:5dfaaaae784f 20265:e914b5399c67
3248 rx = xx; 3248 rx = xx;
3249 } 3249 }
3250 3250
3251 for ( ; ; ) 3251 for ( ; ; )
3252 { 3252 {
3253 term = term * temp * rx / (pp + ai); 3253 term *= temp * rx / (pp + ai);
3254 value = value + term; 3254 value += term;
3255 temp = fabs (term); 3255 temp = fabs (term);
3256 3256
3257 if (temp <= acu && temp <= acu * value) 3257 if (temp <= acu && temp <= acu * value)
3258 { 3258 {
3259 value = value * exp (pp * gnulib::log (xx) 3259 value *= exp (pp * gnulib::log (xx)
3260 + (qq - 1.0) * gnulib::log (cx) - beta) / pp; 3260 + (qq - 1.0) * gnulib::log (cx) - beta) / pp;
3261 3261
3262 if (indx) 3262 if (indx)
3263 { 3263 {
3264 value = 1.0 - value; 3264 value = 1.0 - value;
3265 } 3265 }
3266 break; 3266 break;
3267 } 3267 }
3268 3268
3269 ai = ai + 1.0; 3269 ai += 1.0;
3270 ns = ns - 1; 3270 ns -= 1;
3271 3271
3272 if (0 <= ns) 3272 if (0 <= ns)
3273 { 3273 {
3274 temp = qq - ai; 3274 temp = qq - ai;
3275 if (ns == 0) 3275 if (ns == 0)
3278 } 3278 }
3279 } 3279 }
3280 else 3280 else
3281 { 3281 {
3282 temp = psq; 3282 temp = psq;
3283 psq = psq + 1.0; 3283 psq += 1.0;
3284 } 3284 }
3285 } 3285 }
3286 3286
3287 return value; 3287 return value;
3288 } 3288 }
3450 if (0.0 <= tx && tx <= 1.0) 3450 if (0.0 <= tx && tx <= 1.0)
3451 { 3451 {
3452 break; 3452 break;
3453 } 3453 }
3454 } 3454 }
3455 g = g / 3.0; 3455 g /= 3.0;
3456 } 3456 }
3457 3457
3458 if (prev <= acu) 3458 if (prev <= acu)
3459 { 3459 {
3460 if (indx) 3460 if (indx)
3476 if (tx != 0.0 && tx != 1.0) 3476 if (tx != 0.0 && tx != 1.0)
3477 { 3477 {
3478 break; 3478 break;
3479 } 3479 }
3480 3480
3481 g = g / 3.0; 3481 g /= 3.0;
3482 } 3482 }
3483 3483
3484 if (tx == value) 3484 if (tx == value)
3485 { 3485 {
3486 break; 3486 break;