By registering with us, you'll be able to discuss, share and private message with other members of our community.
SignUp Now!v:\> echo %@eval[2**103=0.10]
10141204801825835211973625643010
v:\> echo %@eval[2**103=0.11]
10141204801825835211973625643008
// this is before the decimal point; add the desired number of decimal places
INT extra (MAPM base, MAPM exponent)
{
MAPM u, mm1 = MM_One;
INT x;
u = ++((base.log10() * exponent).ceil());
CHAR *szdp = (CHAR*) AllocMem(u.significant_digits()+1);
u.toIntegerString(szdp);
x = atoi(szdp);
FreeMem(szdp);
return x;
}
... or, more appropriately for @EVAL, the minimum of that number and 15,000.
Another thing ... 10**10000 works, but 10**10001 evokes an overflow message. Does that reflect an older limit? Isn't it 15000 these days?
The help says10,000 digits to the left of the decimal, and 10,000 to the right. It is not 15,000.
The maximum size is 30,000 digits (15,000 digits to the left of the decimal point and 15,000 decimal places).
v:\> echo %@pow[1.01 10310.99]^r^n%_ruler
extra = 46
361111948879059149982803812474402661922976059.62768572890231244276
....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8....+....9....+....0....+....1...
The change was in v19's "What's new".10,000 digits to the left of the decimal, and 10,000 to the right. It is not 15,000.
INT extra (MAPM base, MAPM exponent)
{
MAPM mm1 = MM_One, u;
INT x;
u = ++(((base.log10()).abs() * exponent).ceil());
CHAR *szdp = (CHAR*) AllocMem(u.significant_digits() + 1);
u.toIntegerString(szdp);
x = atoi(szdp);
FreeMem(szdp);
return x;
}