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

Re: [sc-dev] .frac, .sign - perhaps other SimpleNumber primitives???



On a second look, the frac UnaryOp UGen doesn't use sc_frac, but the nova-simd stuff now. Still it seems it suffers from the same rounding error.

Le 16 déc. 09 à 00:41, Axel Balley a écrit :

In PyrMathOps, opFrac was changed from a->uf - floor(a->uf) to using the sc_frac inline function This is the same code that is used in the frac Unary UGen, that seems to present the same wrong behaviour

There's a comment in the UnaryOps code that says :
// NOTE: this will only work if the FPU is set to round downward.
// That is NOT the default rounding mode. SC sets it to this mode.

It looks like SC no longer sets rounding to this mode, I'm not sure where and how this was done before...

Le 15 déc. 09 à 21:35, Josh Parmenter a écrit :

Hi Tim...

Just saw this in the new build:

0.6.frac
-0.4

it should return 0.6

0.6.sign

returns a float, not 1

Josh

******************************************
/* Joshua D. Parmenter
http://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-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/