| re: Cant find working function for this problem
Nikolai Onken wrote:
[color=blue]
> Hey,
>
> I got a rather more mathematical Problem but have no idea how to solve
> it:
> I have following values and want them to return other values as stated
> below:
> (Best seen with fixed pitch font)
> 3/8 = 1/4
> --
> 5/8 -
> 6/8 | = 2/4
> 7/8 -
> --
> 9/8 -
> . | = 4/4
> 15/8 -
> --
> 17/8 -
> . | = 8/4
> 31/8 -
> --
> 33/8 -
> . | = 16/4
> 63/8 -
> ........
> I was trying to create a function which returns the right values but
> it didn't work.
> I hope it is kind of clear what I am looking for - I have no idea how
> to solve that problem... Maybe someone knows.
> Thanks alot,
>
> Nikolai Onken[/color]
Somehow the mod function might be helpful.
It will give you the rest of a division. What you have to do, is divide the
counter of the /8 fractal with 4 and see if it gives you any rest ... if no
rest, it's dividable by 4. And if it's dividable by 4, just do it then you
have the counter of the /4 fractal.
/Andreas
--
Registeret Linux user #292411 |