Opposite of raisedToInteger: or raisedTo:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Opposite of raisedToInteger: or raisedTo:

Deepi
Hi , I am new to pharo smalltalk and need a method opposite to raisedToInteger: or raisedTo: in order to calculate more roots than sqrt. I can only see the sqrt method but looking for a method that can calculate n roots.
Any immediate help would be appreciated.
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Opposite of raisedToInteger: or raisedTo:

Esteban A. Maringolo
#nthRoot: anInteger is your friend.

i.e.:
256 nthRoot: 8 "will return 2"
Reply | Threaded
Open this post in threaded view
|

Re: Opposite of raisedToInteger: or raisedTo:

Deepi
Is there any method that does this in Pharo?
Reply | Threaded
Open this post in threaded view
|

Re: Opposite of raisedToInteger: or raisedTo:

Esteban A. Maringolo
Deepi wrote
Is there any method that does this in Pharo?
Yes, again, #nthRoot: :)

It is available in Pharo 1.4 at least.

Did you try evaluating "27 nthRoot: 3" in a Workspace?

Regards,

--
Esteban.


Reply | Threaded
Open this post in threaded view
|

RE: Opposite of raisedToInteger: or raisedTo:

Deepi

 yes . I am using pharo 2.1 and there no nthRoot: in it.

Date: Thu, 2 Aug 2012 17:30:52 -0700
From: [hidden email]
To: [hidden email]
Subject: Re: Opposite of raisedToInteger: or raisedTo:

Deepi wrote
Is there any method that does this in Pharo?
Yes, again, #nthRoot: :)

It is available in Pharo 1.4 at least.

Did you try evaluating "27 nthRoot: 3" in a Workspace?

Regards,

--
Esteban.





If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Opposite-of-raisedToInteger-or-raisedTo-tp4642778p4642789.html
To unsubscribe from Opposite of raisedToInteger: or raisedTo:, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

RE: Opposite of raisedToInteger: or raisedTo:

Esteban A. Maringolo
Deepi wrote
yes . I am using pharo 2.1 and there no nthRoot: in it.
Are you sure you're using Pharo 2.1? Because there is no such version (yet).

In Pharo 2.0 there is a #nthRoot: method. I don't know what will happen with in the v2.1, but I'm pretty sure it will remain there.

Regards,

--
Esteban.

Reply | Threaded
Open this post in threaded view
|

RE: Opposite of raisedToInteger: or raisedTo:

Deepi
Oh I am using pharo 1.2.1.
 

Date: Fri, 3 Aug 2012 12:28:41 -0700
From: [hidden email]
To: [hidden email]
Subject: RE: Opposite of raisedToInteger: or raisedTo:

Deepi wrote
yes . I am using pharo 2.1 and there no nthRoot: in it.
Are you sure you're using Pharo 2.1? Because there is no such version (yet).

In Pharo 2.0 there is a #nthRoot: method. I don't know what will happen with in the v2.1, but I'm pretty sure it will remain there.

Regards,

--
Esteban.




If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Opposite-of-raisedToInteger-or-raisedTo-tp4642778p4642951.html
To unsubscribe from Opposite of raisedToInteger: or raisedTo:, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

RE: Opposite of raisedToInteger: or raisedTo:

Deepi
In reply to this post by Esteban A. Maringolo
Anyways, thanks a lot.
nthRoot: is in 1.4 which I have downloaded.
 

Date: Fri, 3 Aug 2012 12:28:41 -0700
From: [hidden email]
To: [hidden email]
Subject: RE: Opposite of raisedToInteger: or raisedTo:

Deepi wrote
yes . I am using pharo 2.1 and there no nthRoot: in it.
Are you sure you're using Pharo 2.1? Because there is no such version (yet).

In Pharo 2.0 there is a #nthRoot: method. I don't know what will happen with in the v2.1, but I'm pretty sure it will remain there.

Regards,

--
Esteban.




If you reply to this email, your message will be added to the discussion below:
http://forum.world.st/Opposite-of-raisedToInteger-or-raisedTo-tp4642778p4642951.html
To unsubscribe from Opposite of raisedToInteger: or raisedTo:, click here.
NAML