[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Problems with "real" numbers



Am 31.12.2015 um 00:58 schrieb James Harkins <jamshark70@xxxxxx>:

> On December 31, 2015 7:51:08 AM Daniel Mayer <daniel-mayer@xxxxxxxx> wrote:
> 
>> I am not aware if something exists already in SC (does it maybe ?),
>> but a equality check with relative precision could be easily defined:
> 
> Have a look at fuzzyEqual. It calculates a "degree of equality" where 1.0 means "exactly equal." It does scale for the input numbers' order of magnitude.
> 
> hjh
> 


Ah ok, thanks, I had in mind something similar would exist -
though in Tom's use case, and probably in general,
a relative equality check with boolean result, as described, would be useful.

Regards

Daniel

-----------------------------
www.daniel-mayer.at
-----------------------------




_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/