[GiNaC-list] Change precision of numeric
Timo Schlüßler
timo at schluessler.org
Fri Nov 2 10:52:46 CET 2007
Richard B. Kreckel wrote:
> Timo Schlüßler wrote:
>> how can I change the precision of a numeric? E.g. when I've got a
>> numeric with 10,000 digits and then want that numeric truncated to 10
>> digits.
>
> Try constructing a numeric representing 1.0 to 10 Digits and multiply
> your number with that.
>
> -richy.
Thanks, that works, but isn't there a method/another way for truncating?
When setting "Digits = 2" for the 1.0 numeric, the result (of multiply)
stil has 4 decimal places ...
More information about the GiNaC-list
mailing list