home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / programm / 2073 < prev    next >
Encoding:
Text File  |  1992-07-22  |  1.1 KB  |  21 lines

  1. Newsgroups: comp.programming
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!watserv1!watmath!thinkage!atbowler
  3. From: atbowler@thinkage.on.ca (Alan Bowler)
  4. Subject: Re: Calculating a cube root
  5. Message-ID: <1992Jul22.213049.3589@thinkage.on.ca>
  6. Organization: /etc/organization
  7. References: <1992Jul20.123722.27958@cs.ruu.nl> <1992Jul20.160255.17562@organpipe.uug.arizona.edu> <1992Jul21.085023.11890@cs.ruu.nl>
  8. Date: Wed, 22 Jul 1992 21:30:49 GMT
  9. Lines: 10
  10.  
  11. The easy way to go is clearly to use the exp + log library routines.
  12. If that is not quite accurate enough for you, run the answer through
  13. a single Newton iteration.   If this is not fast enough, then you
  14. will have to resort to a customized routine.  You may find something
  15. published on cube roots explicitly, or you can certainly look up how to
  16. do a Chebyshev fit of a rational function ( P(x)/Q(x) where P and Q are
  17. polynomials (Remez'z algorithm?)).   In any case the speed will vary
  18. with the machine.  A number of the IEEE standard implementations have
  19. hardware support for exp and log, and it may be impossible to
  20. outperform that.
  21.