computing fractions



A really basic math question:

I'm trying to compute values like 2^-30000 (in base 10 representation).
I'd like to get the decimals directly, without dividing
a bignum 40000 times to get 2^-40000 etc.

There oughta be some smarter way? (Say, O(log N) rather than O(N)...)
A general method (for any number base) would be cool, but I'm also
all ears if there's some special method for power of 2 fractions.

The right terminology so I can find it with google/wikipedia may be all I need...

Thanks,

Bosse


.



Relevant Pages

  • Re: computing fractions
    ... A really basic math question: ... representation). ... dividing a bignum 40000 times to get 2^-40000 etc. ... O...) A general method would be cool, ...
    (comp.programming)
  • Re: computing fractions
    ... I'm trying to compute values like 2^-30000 (in base 10 representation). ... I'd like to get the decimals directly, without dividing ... a bignum 40000 times to get 2^-40000 etc. ... all ears if there's some special method for power of 2 fractions. ...
    (comp.programming)
  • Re: computing fractions
    ... CBFalconer wrote: ... representation). ... dividing a bignum 40000 times to get 2^-40000 etc. ...
    (comp.programming)