[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MSVC compiler support [patch 36]: abs of long
From: |
Michael Goffioul |
Subject: |
MSVC compiler support [patch 36]: abs of long |
Date: |
Tue, 17 Oct 2006 22:11:47 +0200 |
User-agent: |
Thunderbird 1.5.0.7 (Windows/20060909) |
Help the compiler to find the correct function for "abs"
Index: src/pr-output.cc
===================================================================
RCS file: /cvs/octave/src/pr-output.cc,v
retrieving revision 1.149
diff -p -c -r1.149 pr-output.cc
*** src/pr-output.cc 2 Oct 2006 17:23:19 -0000 1.149
--- src/pr-output.cc 17 Oct 2006 11:07:42 -0000
*************** octave_print_internal (std::ostream& os,
*** 2329,2341 ****
for (octave_idx_type i = 0; i < dims.numel (); i++)
{
int new_digits = static_cast<int>
! (floor (log10 (double (abs (nda(i).value ()))) + 1.0));
if (new_digits > digits)
digits = new_digits;
if (! isneg)
! isneg = (abs (nda(i).value ()) != nda(i).value ());
}
fw = digits + isneg;
--- 2329,2341 ----
for (octave_idx_type i = 0; i < dims.numel (); i++)
{
int new_digits = static_cast<int>
! (floor (log10 (double (abs ((long)nda(i).value ()))) + 1.0));
if (new_digits > digits)
digits = new_digits;
if (! isneg)
! isneg = (abs ((long)nda(i).value ()) != nda(i).value ());
}
fw = digits + isneg;
- MSVC compiler support [patch 32]: ls, (continued)
- MSVC compiler support [patch 33]: Help, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 33]: Help, John W. Eaton, 2006/10/25
- MSVC compiler support [patch 34]: sepchar and load_path, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 34]: sepchar and load_path, John W. Eaton, 2006/10/27
- MSVC compiler support [patch 35]: default history file, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 35]: default history file, John W. Eaton, 2006/10/25
- Re: MSVC compiler support [patch 35]: default history file, Michael Goffioul, 2006/10/26
- MSVC compiler support [patch 36]: abs of long,
Michael Goffioul <=
- MSVC compiler support [patch 36]: abs of long, John W. Eaton, 2006/10/27
- Re: MSVC compiler support [patch 36]: abs of long, Michael Goffioul, 2006/10/28
- MSVC compiler support [patch 37]: popen/pclose, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 37]: popen/pclose, John W. Eaton, 2006/10/25
- Re: MSVC compiler support [patch 37]: popen/pclose, Michael Goffioul, 2006/10/26
- Re: MSVC compiler support [patch 37]: popen/pclose, Paul Kienzle, 2006/10/26
- Re: MSVC compiler support [patch 37]: popen/pclose, John W. Eaton, 2006/10/26
- MSVC compiler support [patch 38]: include <algorithm>, Michael Goffioul, 2006/10/17
- MSVC compiler support [patch 38]: include <algorithm>, John W. Eaton, 2006/10/17
- MSVC compiler support [patch 39]: include <direct.h>, Michael Goffioul, 2006/10/17