Release calc version 2.10.3t5.45

This commit is contained in:
Landon Curt Noll
1997-10-04 20:06:29 -07:00
parent 4618313a82
commit 6e10e97592
300 changed files with 38279 additions and 8584 deletions

29
zio.c
View File

@@ -6,6 +6,7 @@
* Scanf and printf routines for arbitrary precision integers.
*/
#include <stdio.h>
#include "config.h"
#include "zmath.h"
#include "args.h"
@@ -710,4 +711,32 @@ str2z(char *s, ZVALUE *res)
*res = z;
}
void
fitzprint(ZVALUE z, long digits, long show)
{
ZVALUE ztmp1, ztmp2;
long i;
if (digits <= show) {
zprintval(z, 0, 0);
return;
}
show /= 2;
ztenpow(digits - show, &ztmp1);
(void) zquo(z, ztmp1, &ztmp2, 1);
zprintval(ztmp2, 0, 0);
zfree(ztmp1);
zfree(ztmp2);
printf("...");
ztenpow(show, &ztmp1);
(void) zmod(z, ztmp1, &ztmp2, 0);
i = zdigits(ztmp2);
while (i++ < show)
printf("0");
zprintval(ztmp2, 0, 0);
zfree(ztmp1);
zfree(ztmp2);
}
/* END CODE */