Float overflow in statistic function for large databases
(>100MB characters).
This commit is contained in:
parent
0a648f6aad
commit
81aa4713b1
@ -34,7 +34,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: fastfind.c,v 1.9 1997/02/22 19:55:45 peter Exp $
|
||||
* $Id: fastfind.c,v 1.10 1997/07/21 12:08:13 charnier Exp $
|
||||
*/
|
||||
|
||||
|
||||
@ -89,10 +89,10 @@ statistic (fp, path_fcodes)
|
||||
|
||||
(void)printf("\nDatabase: %s\n", path_fcodes);
|
||||
(void)printf("Compression: Front: %2.2f%%, ",
|
||||
(float)(100 * (size + big - (2 * NBG))) / chars);
|
||||
(void)printf("Bigram: %2.2f%%, ", (float)(100 * (size - big)) / size);
|
||||
(size + big - (2 * NBG)) / (chars / (float)100));
|
||||
(void)printf("Bigram: %2.2f%%, ", (size - big) / (size / (float)100));
|
||||
(void)printf("Total: %2.2f%%\n",
|
||||
(float)(100 * (size - (2 * NBG))) / chars);
|
||||
(size - (2 * NBG)) / (chars / (float)100));
|
||||
(void)printf("Filenames: %d, ", lines);
|
||||
(void)printf("Characters: %d, ", chars);
|
||||
(void)printf("Database size: %d\n", size);
|
||||
|
Loading…
Reference in New Issue
Block a user