98dcefc137
looks ok to martynas@
22 lines
1.0 KiB
Plaintext
22 lines
1.0 KiB
Plaintext
$OpenBSD: patch-libs_libFreeMat_Print_cpp,v 1.4 2007/09/07 15:55:25 steven Exp $
|
|
--- libs/libFreeMat/Print.cpp.orig Fri Sep 7 11:09:49 2007
|
|
+++ libs/libFreeMat/Print.cpp Fri Sep 7 11:10:16 2007
|
|
@@ -180,13 +180,13 @@ void ComputeScaleFactor(const T* array, int count, Arr
|
|
}
|
|
if (!finiteElementFound) return;
|
|
if (max_amplitude >= 100)
|
|
- format.scalefact = pow(10.0,floor(log10(max_amplitude)));
|
|
+ format.scalefact = pow(10.0,floor(log10((double)max_amplitude)));
|
|
else if (max_amplitude <= -100)
|
|
- format.scalefact = pow(10.0,floor(log10(-max_amplitude)));
|
|
+ format.scalefact = pow(10.0,floor(log10((double)-max_amplitude)));
|
|
else if ((max_amplitude <= .1) && (max_amplitude>0))
|
|
- format.scalefact = pow(10.0,floor(log10(max_amplitude)));
|
|
+ format.scalefact = pow(10.0,floor(log10((double)max_amplitude)));
|
|
else if ((max_amplitude >= -.1) && (max_amplitude<0))
|
|
- format.scalefact = pow(10.0,floor(log10(-max_amplitude)));
|
|
+ format.scalefact = pow(10.0,floor(log10((double)-max_amplitude)));
|
|
else
|
|
format.scalefact = 1.0;
|
|
}
|