Mail Archives: djgpp/2001/05/22/08:00:04
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 -