comparison src/pr-output.cc @ 11450:5eb10763069f

substitute and use LAPACK_LIBS in mkoctfile script
author John W. Eaton <jwe@octave.org>
date Thu, 06 Jan 2011 03:10:24 -0500
parents eec74ee00b32
children 8a40037533e2
comparison
equal deleted inserted replaced
11449:93b8c7ca211f 11450:5eb10763069f
239 { 239 {
240 int ex = 0; 240 int ex = 0;
241 if (x != 0) 241 if (x != 0)
242 { 242 {
243 double absval = (x < 0.0 ? -x : x); 243 double absval = (x < 0.0 ? -x : x);
244 int logabsval = static_cast<int> (floor (log10 (absval))); 244 int logabsval = static_cast<int> (gnulib::floor (log10 (absval)));
245 /* Avoid using modulo function with negative arguments for portability. 245 /* Avoid using modulo function with negative arguments for portability.
246 * See extended comment at calc_scale_exp */ 246 * See extended comment at calc_scale_exp */
247 if (logabsval < 0.0) 247 if (logabsval < 0.0)
248 ex = logabsval - 2 + ((-logabsval + 2) % 3); 248 ex = logabsval - 2 + ((-logabsval + 2) % 3);
249 else 249 else
253 } 253 }
254 254
255 static int 255 static int
256 num_digits (const double& x) 256 num_digits (const double& x)
257 { 257 {
258 return 1 + (print_eng ? engineering_exponent (x) 258 return 1 + (print_eng
259 : static_cast<int> (floor (log10 (x)))); 259 ? engineering_exponent (x)
260 : static_cast<int> (gnulib::floor (log10 (x))));
260 } 261 }
261 262
262 class 263 class
263 pr_engineering_float 264 pr_engineering_float
264 { 265 {
3215 int digits = 0; 3216 int digits = 0;
3216 3217
3217 for (octave_idx_type i = 0; i < dims.numel (); i++) 3218 for (octave_idx_type i = 0; i < dims.numel (); i++)
3218 { 3219 {
3219 int new_digits = static_cast<int> 3220 int new_digits = static_cast<int>
3220 (floor (log10 (double (abs (nda(i).value ()))) + 1.0)); 3221 (gnulib::floor (log10 (double (abs (nda(i).value ()))) + 1.0));
3221 3222
3222 if (new_digits > digits) 3223 if (new_digits > digits)
3223 digits = new_digits; 3224 digits = new_digits;
3224 3225
3225 if (! isneg) 3226 if (! isneg)