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

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



> ... so for negative input values, the fractional part will be negative
> in sclang, but positive in scsynth (without the nova-simd patch).
> 
> this is inconsistent and imo should be changed. since it changes the
> behavior, i would like to hear, what other people think about this
> issue, though ...

wikipedia defines frac(x) as x - floor(x) (according to Graham, Knuth, &
Patashnik) [1], wolfram as x - trunc(x) [2] ...

personally, i would prefer the first definition ...

[1] http://en.wikipedia.org/wiki/Floor_and_ceiling_functions#Fractional_part
[2] http://mathworld.wolfram.com/FractionalPart.html

-- 
tim@xxxxxxxxxx
http://tim.klingt.org

You can play a shoestring if you're sincere
  John Coltrane

Attachment: signature.asc
Description: OpenPGP digital signature