Role of Fuzz bits in Round Function

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Role of Fuzz bits in Round Function

Manoj Arora (DEL/Abacus Analytics)

Hi,

 

Can someone explain the role of fuzzbits in round function? How it works and what is the impact?

 

Thanks & Regards

Manoj

 


http://www.imrbint.com/disclaimer.html ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Role of Fuzz bits in Round Function

Jon K Peck
FUZZBITS arises from the nature of floating point arithmetic.  Most fractional values cannot be represented exactly as a floating point number, which leads to unexpected results sometimes even when the pencil and paper calculation seems simple.  You might want to Google floating point numbers for some background.  Wikipedia has a good article on this.

From the help...
Rounding and Truncation of Numeric Values. For the RND and TRUNC functions, this setting controls the default threshold for rounding up values that are very close to a rounding boundary. The setting is specified as a number of bits and is set to 6 at install time, which should be sufficient for most applications. Setting the number of bits to 0 produces the same results as in release 10. Setting the number of bits to 10 produces the same results as in releases 11 and 12.
  • For the RND function, this setting specifies the number of least-significant bits by which the value to be rounded may fall short of the threshold for rounding up but still be rounded up. For example, when rounding a value between 1.0 and 2.0 to the nearest integer this setting specifies how much the value can fall short of 1.5 (the threshold for rounding up to 2.0) and still be rounded up to 2.0.
  • For the TRUNC function, this setting specifies the number of least-significant bits by which the value to be truncated may fall short of the nearest rounding boundary and be rounded up before truncating. For example, when truncating a value between 1.0 and 2.0 to the nearest integer this setting specifies how much the value can fall short of 2.0 and be rounded up to 2.0.


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        "Manoj Arora (DEL/Abacus Analytics)" <[hidden email]>
To:        [hidden email]
Date:        01/16/2015 05:40 AM
Subject:        [SPSSX-L] Role of Fuzz bits in Round Function
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi,
 
Can someone explain the role of fuzzbits in round function? How it works and what is the impact?
 
Thanks & Regards
Manoj
 


http://www.imrbint.com/disclaimer.html
===================== To manage your subscription to SPSSX-L, send a message to LISTSERV@... (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD
===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD