inline float32 sc_trunc(float32 x) { // truncFloat is a number which causes a loss of precision of // the fractional part. // 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. float32 tmp1 = x + truncFloat; float32 tmp2 = tmp1 - truncFloat; return tmp2; } Le 16 déc. 09 à 11:28, Tim Blechmann a écrit :
Round downward was set in SC synth. At least it used to be. However itwas never set like that in SC lang as far as I am aware. So using the same code as in the synth would be a bug.where is it set and why? (only for sc_trunk?) tim -- tim@xxxxxxxxxx http://tim.klingt.org Most of the trouble in this world has been caused by folks who can't mind their own business, because they have no business of their own to mind, any more than a smallpox virus has. William S. Burroughs
_______________________________________________ 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/