Re: Fudging large value arithmetic in unfriendly languages
- --- In primenumbers@y..., Phil Carmody <thefatphil@y...> wrote:
> With 80-bit floats, and a 32*32->64 integer multiply, the intel-using
> bit mulmods.
> However, I plan to write some little factoring applets in
> and it would be nice to know quite how far JS can be taken andremain
> precise, without having to resort to multi-word operations, orfor
> bit-by-bit operations?
> Does this sound about right?
> Floating point multiplication with 52 bits of accuracy
> Integer mutliplication with 32 bits of accuracy
> => maybe 84-bit intermediate exactly representable
> => 42*42%42 is probably pushing it.
> Which is fairly poor for everything apart from squfof (which uses
> half-length values almost the whole time).
> I'm not intending the applets to be used in anger, obviously, but
> them to not be utterly useless would be quite nice.Phil,
> I don't relish the thought of having to write a 'bignum' library in
> to do such things?
At http://www.alpertron.com.ar/QUAD1.HTM you can see the source code
includes multiple precision functions.
Otherwise the Java applet will run, which is much faster. Remember to