[PD] number to fractions external?

i go bananas hard.off at gmail.com
Fri Dec 16 17:31:49 CET 2011

```it's possible in vanilla, but the mathematics goes over my head

On Sat, Dec 17, 2011 at 1:05 AM, Alexandre Torres Porres
<porres at gmail.com>wrote:

> looks like a job for an external
>
>
>
> 2011/12/16 i go bananas <hard.off at gmail.com>
>
>> actually, i'm not going to do anything more on this.
>>
>> i had a look at the articles claude posted, and they went a bit far over
>>
>> my patch will still work for basic things like 1/4 and 7/8, but i
>> wouldn't depend on it working for a serious application.  As you first
>> suggested, it's not so simple, and if you read claude's articles, you will
>> see that it isn't.
>>
>> it's not brain science though, so maybe someone with a bit more number
>> understanding can tackle it.
>>
>>
>>
>> On Sat, Dec 17, 2011 at 12:51 AM, Alexandre Torres Porres <
>> porres at gmail.com> wrote:
>>
>>> > i had a go at it
>>>
>>> thanks, I kinda had to go too, but no time... :(
>>>
>>> > yeah, my patch only works for rational numbers.
>>>
>>> you know what, I think I asked this before on this list,
>>>
>>> deja'vu
>>>
>>> > will have a look at the article / method you posted, claude.
>>>
>>> are you going at it too? :)
>>>
>>> by the way, I meant something like 1.75 becomes 7/4 and not 3/4, but
>>>
>>> thanks
>>>
>>> cheers
>>>
>>>
>>>
>>> 2011/12/16 i go bananas <hard.off at gmail.com>
>>>
>>>> by the way, here is the method i used:
>>>>
>>>> first, convert the decimal part to a fraction in the form of n/100000
>>>> next, find the highest common factor of n and 100000
>>>> (using the 'division method' like this:
>>>> http://easycalculation.com/what-is-hcf.php )
>>>>
>>>> then just divide n and 100000 by that factor.
>>>>
>>>> actually, that means it's accurate to 6 decimal places, i guess.
>>>> well...whatever :D
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20111217/9611e501/attachment-0001.htm>
```