By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,216 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,216 IT Pros & Developers. It's quick & easy.

Cant find working function for this problem

P: n/a
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
Jul 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Nikolai Onken wrote:
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


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
Jul 16 '05 #2

P: n/a
Nikolai Onken wrote:
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 -


You just have to factorize the two numbers, and find the lowest common
denominator, just as you would if doing it by hand.

Jul 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.