Board index » delphi » cube roots
Harley Bowle
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
|
Harley Bowle
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
cube roots
Can some one please tell me how to calculate a cube root in Pascal? THX.
|
Timo Sal
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootsIn article <31561B82.6...@killroy.seanet.com>, Harley Bowler <kill...@killroy.seanet.com> wrote: :Can some one please tell me how to calculate a cube root in Pascal? THX. Use the power function which you'll readily find in 93045 Jan 1 09:31 ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip All the best, Timo .................................................................... |
Soeren Oestergaar
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootsHarley Bowler <kill...@killroy.seanet.com> skriver: Quote> Can some one please tell me how to calculate a cube root in Pascal? THX. Then use x=1/3 to return the cube root. |
T.Simpso
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootsQuoteOn Sun, 24 Mar 1996, Harley Bowler wrote: squares and square roots), you would have to create a function that takes a variable, squares it, and multiplies it by itself. a:=sqr(x); will give you a third root. ************************************************************************ |
Christian Froeschli
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootsQuoteT.Simpson wrote: function ;-) If it bothers you that this has the fixed base e : y y*ln(x) (are U using a fixed font ;-) To get back to the original problem of the cube root : function cuberoot(x:real):real; [Untested, freshly written in the news viewer] __/ __/ - Christian Froeschlin |
Ville Sink
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootsQuoteTimo Salmi (t...@reimari.uwasa.fi) wrote: : Harley Bowler <kill...@killroy.seanet.com> wrote: : :Can some one please tell me how to calculate a cube root in Pascal? THX. : Use the power function which you'll readily find in : 93045 Jan 1 09:31 ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip Is it really so difficult and huge you can't... never mind. 3rd root of a: exp(1/3*ln a) -- |
Tom Wheele
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootsIn article <Pine.SUN.3.91.960326125036.2664D-100...@freenet2.scri.fsu.edu> tsimp...@freenet2.scri.fsu.edu "T.Simpson" writes: Quote> On Sun, 24 Mar 1996, Harley Bowler wrote: Quote> squares and square roots), you would have to create a function that takes .splitbung |
Timo Sal
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootsQuoteIn article <4jbm0e$...@news.clinet.fi>, Ville Sinkko <v...@clinet.fi> wrote: :: 93045 Jan 1 09:31 ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip :: tsfaqp.zip Common Turbo Pascal Questions and Timo's answers : :Is it really so difficult and huge you can't... never mind. Yes. All the best, Timo .................................................................... |
Brian Mas
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootsIn article <31561B82.6...@killroy.seanet.com>, Harley Bowler <kill...@killroy.seanet.com> wrote: Quote>Can some one please tell me how to calculate a cube root in Pascal? Try this: function cuberoot(x: real):real; begin (raise x to the 1/3rd power) |
Leonard Ericks
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootsQuoteChristian Froeschlin <froes...@cip.mathematik.uni-stuttgart.de> writes: That gives *one* floating point operation rather than two. Very important in maintaining significant figures. cuberoot := exp(ln(x)/3); So, that gives us the following general function for the yth root of x. function root(x,y : real) : real; Leonard Erickson (aka Shadow) |
Rene Pett
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootstsimp...@freenet2.scri.fsu.edu meinte am 26.03.96 zum Thema "Re: cube roots": Quote> Well, since there is no exponential function (TP only does third root of x. So long |
John Da
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootsQuoteR...@garfield.computer42.org (Rene Petton) wrote: given by Cuberoot:=exp(ln(x)/3); Remember Logarithms ? John Day |
Lau Gainpaulsing
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootsIn article <Pine.SUN.3.91.960326125036.2664D- 100...@freenet2.scri.fsu.edu>, "T.Simpson" <tsimp...@freenet2.scri.fsu.e du> writes Quote>On Sun, 24 Mar 1996, Harley Bowler wrote: a:=x^(1/3) That would give the cube root. ************************************************************************ |
Karel Janec
![]() Delphi Developer |
Wed, 18 Jun 1902 08:00:00 GMT
Re:cube rootsIn <lZzNmJAfBaYxE...@lunacy.demon.co.uk> Lau Gainpaulsingh <lau...@lunacy.demon.co.uk> writes: Quote>In article <Pine.SUN.3.91.960326125036.2664D- logarithm and exponential function: x^y = exp(ln(x)*y) since y root of x is x^(1/y), you get y th root of x as: Karel Janecek |