A83: Help with roots and fractions...
[Prev][Next][Index][Thread]
A83: Help with roots and fractions...
Hey,
This one is for some of you really advanced programmers. I was wondering
how to convert decimal numbers to fractions. The first example I have is .5,
this is easy because 1/.5 = 2 and 2 is the denominator. I was wondering how
to do this with other numbers besides 1 as the numerator. I know that you
may be wondering why I don't just use the _tofrac routine, but I want to be
able to convert .7071067812 to the square root of two divided by two. The
first thing to do would be to find the denominator because I think I could
find the other part myself. If you could help, I would appreciate anything.
You don't have to make into z80 asm code either. PCode would be just fine.
Thanks.
Ted