delorie.com/archives/browse.cgi | search |
Message-ID: | <3B0A09EC.3EB10991@acm.org> |
From: | Eric Sosman <esosman AT acm DOT org> |
X-Mailer: | Mozilla 4.72 [en] (Win95; U) |
X-Accept-Language: | en |
MIME-Version: | 1.0 |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Generating Exponents FAST! |
References: | <0q9kgtgddkvj69od8094172vodtrpubgsh AT 4ax DOT com> <9edet9$hev$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> |
Lines: | 25 |
Date: | Tue, 22 May 2001 11:37:25 GMT |
NNTP-Posting-Host: | 12.78.200.130 |
X-Complaints-To: | abuse AT worldnet DOT att DOT net |
X-Trace: | bgtnsc06-news.ops.worldnet.att.net 990531445 12.78.200.130 (Tue, 22 May 2001 11:37:25 GMT) |
NNTP-Posting-Date: | Tue, 22 May 2001 11:37:25 GMT |
Organization: | AT&T Worldnet |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Hans-Bernhard Broeker wrote: > > Radical NetSurfer <radsmail AT juno DOT com> wrote: > > > pow(10, ep); is one obvious approach > > > Which requires the time and computational overhead of whatever > > is involved in pow() function.... > > ... which may easily be faster than anything you could come up with. > Go figure before you make blind assumptions about the quality of > library code --- you do have access to all the sources, so why not > peek into them to check for yourself? > > > IS THERE A MORE DIRECT ROUTE to generating 10 ^ ep? > > Of course: e.g. to not generate them at all. Precompute a table of > such values, if you really only need so few of them. Or for a computational approach, see Knuth "The Art of Computer Programming, Volume II: Seminumerical Algorithms," section 4.6.3. -- Eric Sosman esosman AT acm DOT org
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |