A little question, little offtopic. I need an algorithm to calculate log, I tryed to find it but no success. The normal log function isn't good enough because it only give normal floating point numbers, i need to have it 1M bits long (or longer).
*********** REPLY SEPARATOR *********** On 15-9-2004 at 19:27 [EMAIL PROTECTED] wrote: >(This is in response to the post of 15 Sept. 2004.) > >To count the number of digits of a number in the form a^n, try this QBASIC > >program: > >CLS : PRINT "Program to calculate the number of digits of a^n": PRINT >DO: a = 0: n = 0 >WHILE a <= 0 OR a <> INT(a): INPUT "What is the (positive integer) base, >a"; >a: WEND >WHILE n <= 0 OR n <> INT(n): INPUT "What is the (positive integer) power, >n"; n: WEND >digits = INT(n * (LOG(a) / LOG(10))) + 1 >PRINT : PRINT "Number of digits is"; digits >PRINT "********************************": PRINT >LOOP > >A full discussion of this appears on the REC Web site, >_http://beam.to/REC_ >(http://beam.to/REC) > >Best, Mike >Michael W. Ecker, Ph.D. > >Dr. Mike Ecker, Editor-Publisher >Recreational & Educational Computing* >187 Ferguson Ave./ Suite D >Shavertown, PA 18708 > > >* REC has been published continuously since Jan. 1986. >_http://members.aol.com/DrMWEcker/REC.html_ >(http://members.aol.com/DrMWEcker/REC.html) >or _http://beam.to/REC_ (http://beam.to/REC) > > >(Dr. Michael W. Ecker is also Associate Professor of Mathematics, >Pennsylvania State University, Wilkes-Barre Campus, Lehman, PA 18627.) _______________________________________________ Prime mailing list [EMAIL PROTECTED] http://hogranch.com/mailman/listinfo/prime
