I need to compute the third square root:
Example:
sqrt3(27) --> 3
I use Allegro 3.0.2 on win32
I searched in the documentation, but I didn't find
an answer.
thomas
nthroot(x, n) == expt(x, 1/n)
=> (expt 27 (/ 3))
--
Raymond Wiker Mail: Raymon...@fast.no
Senior Software Engineer Web: http://www.fast.no/
Fast Search & Transfer ASA Phone: +47 23 01 11 60
P.O. Box 1677 Vika Fax: +47 35 54 87 99
NO-0120 Oslo, NORWAY Mob: +47 48 01 11 60
Try FAST Search: http://alltheweb.com/
You should search in your old math books first. What is "the third
square root" supposed to be? From your example I suppose you're
looking for the third root of x instead which is the same as x to the
power of 1/3th:
[CMUCL 18d]
* (expt 27 1/3)
3.0
Some implementations might even yield exact results in some cases (see
the notes at the end of the CLHS page for EXPT):
[CLISP 2.29]
[1]> (expt 27 1/3)
3
[2]> (type-of (expt 27 1/3))
FIXNUM
Edi.
Thank you very much!
thomas
It is actually called the cube root.
--
Erik Naggum, Oslo, Norway
Act from reason, and failure makes you rethink and study harder.
Act from faith, and failure makes you blame someone and push harder.
> * Thomas Guettler
> | I need to compute the third square root:
>
> It is actually called the cube root.
Erik perhaps could have mentioned that "third root" is also perfectly
acceptable English.
-- Bruce
:)w
It's quite common in England.
Third, fourth, fifth roots are not unheard of.
First and second roots are rare :-)
:)w
Me too. Fourth and up root is common, but I've never come across
third root.
--tim
Just based on my school and college experience. Admittedly 'cube' root is more common. I cannot cite a reference but "third power" and "third root" go together as well as "cube" and "cube root".
(I have experience of school and college in Bristol, Powys,
Birmingham, Stoke, Stafford, Sheffield, Leeds and Manchester and as I
currently live and work in Yorkshire and I still have yet to encounter
"third root" except in the context of enumerating the roots of
polynomial equations: e.g. to refering to the third root of the
quartic[1] (+ (* (+ (* (+ (* (+ x a) x) b) x) c) x) d) [2]...)
:)w
[1] ...or bi-quadratic...
[2] or in infix notation x^4 + ax^3 +bx^2 + cx + d ;)
I was commenting more about grammar than about frequency of use. I
certainly agree that "cube root" is far more commonly heard than "third
root", but I wouldn't expect anyone to have any trouble understanding
what is meant by "third root". "third square root", on the other hand,
is quite dissonant to the ear.
It's pretty easy to find uses of "third root". e.g.
http://mathforum.org/library/drmath/view/57892.html
-- Bruce
>
>Peter Ward wrote:
>> Just based on my school and college experience.
>Hmmm. Where?
>
>(I have experience of school and college in Bristol, Powys,
>Birmingham, Stoke, Stafford, Sheffield, Leeds and Manchester and as I
>currently live and work in Yorkshire and I still have yet to encounter
>"third root" except in the context of enumerating the roots of
>polynomial equations: e.g. to refering to the third root of the
>quartic[1] (+ (* (+ (* (+ (* (+ x a) x) b) x) c) x) d) [2]...)
I defer to your greater mobility. I went to school only in Ramsgate and college in Cambridge. I work in London, but not with Lisp. So I could claim it was commonly used in the Isle of Thanet, but I won't.
Ditto for me, born, raised, and currently living in the US.
I assume this convention exists to minimize the length of
(English) utterances: "square" and "cube" are monosyllabic,
whereas quartic, quintic, and the like are polysyllablic.
> I assume this convention exists to minimize the length of
> (English) utterances: "square" and "cube" are monosyllabic,
> whereas quartic, quintic, and the like are polysyllablic.
No, I don't think so. I think it's because of the relation between
nth-order expressions and n-dimensional spaces. I think it stops
after `cube' because people tend not to have experience of (and
therefore words for) spaces of dimension greater than 3.
--tim
No, I could not. /You/ could have mentioned this, which is contrary to an
amazing array of reference works, both online and offline. Unless, of
course, you refer to something else entierely, such as in "go, go, go!"
where the last "go" would be the third root.
I don't know about that. With that logic we would have developed the
term "hypercube root".
--
Duane Rettig du...@franz.com Franz Inc. http://www.franz.com/
555 12th St., Suite 1450 http://www.555citycenter.com/
Oakland, Ca. 94607 Phone: (510) 452-2000; Fax: (510) 452-0182
> I don't know about that. With that logic we would have developed the
> term "hypercube root".
I don't think so, because hypercube (to me, anyway) means a `cube' in
a space of dimension > 3, so hypercube root is too vague...
--tim
Although the term "cube root" is the common one, I think "third root" would
be well understood. There's no special term for all the other roots,
they're all just known by their ordinal numbers: fourth root (this could be
called "tesseract root", but AFAIK it's not), fifth root, etc. "Third
root" fits into this pattern, so I can't imagine any confusion over it.
"Third square root" on the other hand, is definitely confusing. When I
first saw that subject, my first thought was "the first square root of 4 is
2, the second one is -2, I wonder what he's thinking the third one would
be?"
--
Barry Margolin, bar...@genuity.net
Genuity, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.
Like I said in my last post, the term would be "tesseract root".
Interesting hypothesis.
When I think of roots and multidimensional spaces, I think of the
Minkowski distance metric. We say "distance" and "Euclidean
distance" for the special cases of N=1 and N=2, respectively, but
use the general form of the metric when N>=3.
I don't know is this is relevant or a non-sequitir...
I think for a physicist that (a) the minkowski metric would actually
something with signature (+,+,+,-) (or (-,-,-,+)), or in general with
n-1 +s and a - or vice-versa. And obviously it isn't actually a
metric, but... And (b) `Euclidian' can be used for any number of
dimensions (`Euclidian n-space'). Euclidean can *certainly* be used
in physics for n=3.
> I don't know is this is relevant or a non-sequitir...
No, me neither. more interesting than some other current threads
though.
--tim