12th root of two

K

ksnapp

hi,

i need a udf or nested function that will give me the 12th root of 2.
This value is important for music stuff and I could use a udf that giv
it to me exactly.


thank
 
B

Bob Phillips

Why do you need nested functions. 12th root of 2 is just 2^(1/12), so your
UDF just needs

Function NthRoothOf2(Root as Long)
NthRootOf2 = 2^(1/Root)
End Function

The accuracy will be limited by Excel's FPA engine.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
T

Trevor Shuttleworth

One way:

Function sqrtx12()
Dim i As Integer
sqrtx12 = 2
For i = 1 To 12
sqrtx12 = Sqr(sqrtx12)
Next
End Function

Called by: = sqrtx12()

Regards

Trevor
 
B

Bob Phillips

Should have said that call with

=NthRootOf2(12)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Bob Phillips said:
Why do you need nested functions. 12th root of 2 is just 2^(1/12), so your
UDF just needs

Function NthRoothOf2(Root as Long)
NthRootOf2 = 2^(1/Root)
End Function

The accuracy will be limited by Excel's FPA engine.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
B

Bill Renaud

UDF not needed. Enter formula into a cell:
=2^1/12

(Set the value of the cell to 2 raised to the 1/12th power. This is a
one-time calculation, unless you can define the problem a bit more.)
 
B

Bob Phillips

We know, but he asked for a UDF, so we gave him one.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Bill Renaud said:
UDF not needed. Enter formula into a cell:
=2^1/12

(Set the value of the cell to 2 raised to the 1/12th power. This is a
one-time calculation, unless you can define the problem a bit more.)
 
Top