# Re: [sc-users] Re: Re: How many years?

 There is one in ddwCommon quark (Rational). Here is my implementation. the notation I use is 3@/2 , so one can do stuff like ((3@/2) + (7@/5)).simplifyMiguel

Attachment: + SimpleNumber Rational.sc
Description: Binary data

Attachment: Rational.sc
Description: Binary data

Attachment: RationalnBox.sc
Description: Binary data

 A 2010/09/20, às 20:03, Josh Parmenter escreveu:SimpleNumber:asFraction:0.333.asFractionreturns an array with numerator and denominatorwe should have one though (that can handle math, etc.). I'll think about building something like that.JoshOn Sep 20, 2010, at 10:53 AM, Bernardo Barros wrote:Hi,Is there a (or kind of) Fraction class? (probably there is but I don't remember)2010/9/19 Tim Blechmann :But the computer doesn't knows that :-/I can't find a reference or explanation nor can deduce it myself.0.33333333333333 * 3; // 0.999999999999990.33333333333334 * 3; // 10.33333333333335 * 3; // 0.00000000000010.333333333333333 * 3 // 1Is this a feature of the floating point representation?When one is one?well, floating point numbers are not able to represent the number 1/3. [1]may be interesting to read, as it describes some of the problems of usingfloating-point math.cheers, tim[1] http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems_______________________________________________sc-users mailing listinfo (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtmlarchive: https://listarc.bham.ac.uk/marchives/sc-users/search: https://listarc.bham.ac.uk/lists/sc-users/search/_______________________________________________sc-users mailing listinfo (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtmlarchive: https://listarc.bham.ac.uk/marchives/sc-users/search: https://listarc.bham.ac.uk/lists/sc-users/search/******************************************/* Joshua D. Parmenterhttp://www.realizedsound.net/josh/“Every composer – at all times and in all cases – gives his own interpretation of how modern society is structured: whether actively or passively, consciously or unconsciously, he makes choices in this regard. He may be conservative or he may subject himself to continual renewal; or he may strive for a revolutionary, historical or social palingenesis." - Luigi Nono*/_______________________________________________sc-users mailing listinfo (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtmlarchive: https://listarc.bham.ac.uk/marchives/sc-users/search: https://listarc.bham.ac.uk/lists/sc-users/search/ -- Miguel Negrão // ZLBhttp://www.friendlyvirus.org/artists/zlb/