Variable size/Set: Difference between revisions
m
→{{header|Phix}}
Line 398:
Sequences are 4 or 8 bytes per element, and can grow or shrink at will.<br>
Strings are always one byte per character,
When using mprf.e (aka gmp), variables can have any precision required, up to available memory.<br>
Line 404:
mpfr (floating point) variables require the precision to be explicitly specified in binary bits, for example if you want PI to 1000 decimal places:
<lang Phix>include mpfr.e -- requires 0.8.0+
string nines = repeat('9',
mpz ndp = mpz_init(nines) -- mpz_init(nines,3322) would be identical
integer precision = mpz_sizeinbase(ndp,2) -- 3322
|