> > 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]

Reply via email to