0
Z odpowiedzią

Specifying the number of bits instead of number of digits

Joe 4 lat temu Ostatnio zmodyfikowane przez Pavel Holoborodko 4 lat temu 1

Is it possible to specify the number of bits used to represent numbers, rather than the number of decimal digits?

Odpowiedź

Odpowiedź
Z odpowiedzią

Not directly, but you can convert required number of bits to decimal digits using simple formula: 

>> d = floor(bits*log10(2));  % precision in decimal digits
>> mp.Digits(d)
Odpowiedź
Z odpowiedzią

Not directly, but you can convert required number of bits to decimal digits using simple formula: 

>> d = floor(bits*log10(2));  % precision in decimal digits
>> mp.Digits(d)