Re: (x * x) % y

New Message Reply About this list Date view Thread view Subject view Author view

James H. Cloos Jr. (cloos@jhcloos.com)
26 Apr 1999 12:16:24 -0500


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

My copies of _TAoCP_ are not at hand, so I could easily be
mis-remembering, but doesn't Knuth provide efficient algorithms for
such problems?

Another possibility may be the _Numerical Recipes_ series.

In short, cf the numerical algorithms section of your nearest
university or college library. You should be able to find an
algorithm for arbitrary y requring only ints with
size(y) <= size(int) < 2*size(y).

- -JimC
- --
James H. Cloos, Jr. <http://www.jhcloos.com/cloos/public_key> 1024D/ED7DAEA6
<cloos@jhcloos.com> E9E9 F828 61A4 6EA9 0F2B 63E7 997A 9F17 ED7D AEA6
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v0.9.5 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE3JJ9nmXqfF+19rqYRAjfcAKDCvILzqgwOMbV3N4djXf+z4E696ACeINAH
6gVYSyUIcb6CUyAdjwSmEYU=
=9cMq
-----END PGP SIGNATURE-----


New Message Reply About this list Date view Thread view Subject view Author view

 
All trademarks and copyrights are the property of their respective owners.

Other Directory Sites: SeekWonder | Directory Owners Forum

The following archive was created by hippie-mail 7.98617-22 on Thu May 27 1999 - 23:44:22