Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 06-17-2019, 11:28 PM   #1
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,525
Default JSFX integer quantization at high numbers (NOT BUG)

JSFX:
test=2^64
> 18446744073709552000

Windows calc:
2^64
>18446744073709551616
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate

Last edited by mpl; 06-18-2019 at 11:23 AM.
mpl is offline   Reply With Quote
Old 06-17-2019, 11:47 PM   #2
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,973
Default

I don't think this is a bug. JSFX numbers are stored as 64-bit floating-point, and this is simply a limitation of that format, see:

https://en.wikipedia.org/wiki/Double...g-point_format
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote
Old 06-18-2019, 02:05 AM   #3
bezusheist
Human being with feelings
 
bezusheist's Avatar
 
Join Date: Nov 2010
Location: USA
Posts: 701
Default

looks ok to me...
__________________
trahpyzzup
bezusheist is offline   Reply With Quote
Old 06-18-2019, 02:27 AM   #4
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,973
Default

Quote:
Originally Posted by bezusheist View Post
You're right, 2^64 can actually be stored exactly, but e.g. 2^64-1 can't (it will be stored as 2^64).

Also note that printf("%.0f") can't output such big integers accurately, which is why 2^64 appears as 18446744073709552000, eventough the correct value is stored internally. Again, this is not a bug, but simply how things work (IMHO, YMMV).
__________________
Martinic Kee Bass - Scanner Vibrato - Elka Panther - Tale's JSFX Pack
Tale is offline   Reply With Quote
Old 06-18-2019, 08:19 AM   #5
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 2,525
Default

Got it, thanks
__________________
SoundCloud | MPL Scripts discussion | ReaPack | Donate
mpl is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:19 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.