i had a go at it.  This one converts up to 5 decimal places (you could probably mod it to do more, but then you get pretty close to the limits of float-based arithmetic, i think).

i was getting glitches, because of the known issue where 58/1000 comes out as 57.99999..  , so i have just added a tiny amount to each number to stop this. 

also, the one i have done here splits a number into whole and fractional parts, but it would be trivial to multiply the whole by the denominator to express the number as a vulgar fraction (3/2, etc)






On Fri, Dec 16, 2011 at 11:52 AM, Alexandre Torres Porres <porres@gmail.com> wrote:
hi there, 

Is there an external that converts decimal numbers to fractions, like 1.5 => 3 / 2 ?

I bet it's complicated to do it as a vanilla patch, right?

thanks
alex

_______________________________________________
Pd-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list