delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/05/22/08:00:04

From: Waldemar Schultz <schultz AT ma DOT tum DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Generating Exponents FAST!
Date: Tue, 22 May 2001 13:47:47 +0200
Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany)
Lines: 34
Message-ID: <3B0A51E3.8DE44A8D@ma.tum.de>
References: <0q9kgtgddkvj69od8094172vodtrpubgsh AT 4ax DOT com> <9edet9$hev$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <3B0A09EC DOT 3EB10991 AT acm DOT org>
NNTP-Posting-Host: pcritter14.mathematik.tu-muenchen.de
Mime-Version: 1.0
X-Trace: wsc10.lrz-muenchen.de 990532055 6539 131.159.68.151 (22 May 2001 11:47:35 GMT)
X-Complaints-To: news AT lrz-muenchen DOT de
NNTP-Posting-Date: 22 May 2001 11:47:35 GMT
X-Mailer: Mozilla 4.75 [de] (Win98; U)
X-Accept-Language: de,en-US
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Eric Sosman schrieb:
> 
> 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

what about powi(x,n); O.K. it's not portable.

-- 
 Gruss Waldemar Schultz.         schultz AT ma DOT tum DOT de
 Technische Universität München, Zentrum Mathematik M1, D 80290 München
 Tel: +49 (0)89 2892 8226        FAX: +49 (0)89 2892 8228

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019