Mercurial > hg > octave-lyh
diff liboctave/oct-inttypes.cc @ 15018:3d8ace26c5b4
maint: Use Octave coding conventions for cuddled parentheses in liboctave/.
* Array-util.cc, Array.cc, Array.h, CMatrix.cc, CNDArray.cc, CSparse.cc,
CmplxQR.cc, CollocWt.cc, DASPK.cc, DASRT.cc, DASSL.cc, EIG.cc, LSODE.cc,
MSparse.cc, MatrixType.cc, Sparse-op-defs.h, Sparse-perm-op-defs.h, Sparse.cc,
Sparse.h, SparseCmplxCHOL.cc, SparseCmplxLU.cc, SparseCmplxQR.cc, SparseQR.cc,
SparsedbleCHOL.cc, SparsedbleLU.cc, boolSparse.cc, cmd-hist.cc, dDiagMatrix.cc,
dMatrix.cc, dNDArray.cc, dSparse.cc, data-conv.cc, dbleQR.cc, dbleSVD.cc,
dim-vector.cc, eigs-base.cc, f2c-main.c, fCMatrix.cc, fCNDArray.cc,
fCmplxQR.cc, fEIG.cc, fMatrix.cc, fNDArray.cc, floatQR.cc, floatSVD.cc,
idx-vector.cc, kpse.cc, lo-specfun.cc, mx-inlines.cc, mx-op-defs.h,
oct-alloc.cc, oct-binmap.h, oct-fftw.cc, oct-group.h, oct-inttypes.cc,
oct-inttypes.h, oct-locbuf.cc, oct-md5.cc, oct-rand.cc, oct-sort.cc,
oct-syscalls.cc, randgamma.c, randmtzig.c, randpoisson.c, sparse-base-chol.cc,
sparse-base-lu.cc, sparse-dmsolve.cc, str-vec.cc, str-vec.h, tempnam.c,
tempname.c: Use Octave coding conventions for cuddled parentheses in liboctave/.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 26 Jul 2012 08:13:22 -0700 |
parents | d07e989686b0 |
children |
line wrap: on
line diff
--- a/liboctave/oct-inttypes.cc +++ b/liboctave/oct-inttypes.cc @@ -272,7 +272,7 @@ INT_DOUBLE_BINOP_DECL (+, uint64) { - return (y < 0) ? x - octave_uint64(-y) : x + octave_uint64(y); + return (y < 0) ? x - octave_uint64 (-y) : x + octave_uint64 (y); } DOUBLE_INT_BINOP_DECL (+, uint64) @@ -288,7 +288,7 @@ // probably), the above will work as expected. If not, it's more // complicated - as long as y is within _twice_ the signed range, the // result may still be an integer. An instance of such an operation is - // 3*2**62 + (1+intmin('int64')) that should yield int64(2**62) + 1. So + // 3*2**62 + (1+intmin ('int64')) that should yield int64 (2**62) + 1. So // what we do is to try to convert y/2 and add it twice. Note that if y/2 // overflows, the result must overflow as well, and that y/2 cannot be a // fractional number. @@ -310,12 +310,12 @@ DOUBLE_INT_BINOP_DECL (-, uint64) { if (x <= static_cast<double> (octave_uint64::max ())) - return octave_uint64(x) - y; + return octave_uint64 (x) - y; else { // Again a trick to get the corner cases right. Things like - // 3**2**63 - intmax('uint64') should produce the correct result, i.e. - // int64(2**63) + 1. + // 3**2**63 - intmax ('uint64') should produce the correct result, i.e. + // int64 (2**63) + 1. const double p2_64 = std::pow (2.0, 64); if (y.bool_value ()) { @@ -340,7 +340,7 @@ // be eliminated at compile time. if (twosc && y.value () == std::numeric_limits<int64_t>::min ()) { - return octave_int64 (x + std::pow(2.0, 63)); + return octave_int64 (x + std::pow (2.0, 63)); } else return x + (-y);