According to Coldfusion when you test this is what is output
<cfset x = 9 ^ (1/3)>
<cfoutput>
9 ^ (1/3) = #x#<br>
</cfoutput>
OUTPUT:
9 ^ (1/3) = 2.08008382305
3 x 3 = 9
__________________________________________________
Nathan Stanford ColdFusion Tips Plus
[EMAIL PROTECTED] www.cftipsplus.com
__________________________________________________
> -----Original Message-----
> From: Bob Silverberg [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, October 27, 2000 2:30 PM
> To: CF-Talk
> Subject: RE: Power of 3
>
> I don't believe that a cubed root would solve his problem, but it's easy
> to
> do one in CF. Just remember (from your high school math days) that the
> cubed root of a number is the same as that number raised to 1/3.
>
> In CF - number cubed: <cfset x = number ^ 3>
> - cube root of number <cfset x = number ^ (1/3)>
>
> It's just that simple,
> Bob
>
>
> -----Original Message-----
> From: lsellers [mailto:[EMAIL PROTECTED]]
> Sent: October 27, 2000 2:20 PM
> To: CF-Talk
> Subject: RE: Power of 3
>
>
>
> > > Anyone have an idea on how to check to see if a value is a power of 3?
> >
> > Umm. Take it's cubed root? See if the fraction is other than 0?
> > --min
>
> Notcing a few posts go by today, I thought I'd expand by saying that _IF_
> you know the upper limit to these number then the best thing to do is as
> others have suggested and precompute them all (for n=1 to upperx; x=n^3;
> next; ).
>
> Put the precomputed numbers in a list. Just do a lookup and match into the
> list.
>
> If you have no idea beforehand what the upper limit will be you'll have to
> do a cube root in cf. I've never tried that. Not sure if you can. Um....
> sec.... oh yea, Tom Numaker has a tag. CFX_Functions. I think it does
> cubed
> roots.
>
> Maybe not. Seeing exponents, but no roots.
> http://toshop.com/cfx_functions/cfx_functions.htm.
>
> Oh well. Perhaps you could use a bit of algebra and get the same effect
> with
> the exp function though. ;-)
>
> --min
>
> --------------------------------------------------------------------------
> --
> --------------------
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
> a
> message with 'unsubscribe' in the body to
> [EMAIL PROTECTED]
>
> --------------------------------------------------------------------------
> ----------------------
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send
> a message with 'unsubscribe' in the body to
> [EMAIL PROTECTED]
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]