Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Rounding up problem
 Login/Join
 
Guru
posted
I'm having problems with a computed field I created that multiplies two fields together. I'm trying to create a field that is a D6.2. In one case manually doing the calculation gives the result 0.555 which should roundup to 0.56 but the report produces 0.55, how can this be corrected?

I have searched the technical support and it told me to add .000000001 to the value, this will work but I don't like it. There has to be a better way.

Here a link to the article: http://techsupport.informationbuilders.com/sps/32101095.html
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Virtuoso
posted Hide Post
The lovely rules of rounding I found, what are your two numbers you are trying to multiply?

Of course which rule IB has in force for the '5' option may be why it isn't working. Some people truncate if the number in the next position is '5' regardles.


According to Hurlburt, 1994 pg. 12,the procedure for finding the last digit of a measure is called "Rounding".

There are three general rules for rounding:



Rule 1- if the remainder beyond the last digit to be reported is less than 5, drop the last digit. Rounding to one decimal place, the number 5.3467 becomes 5.3.


Rule 2-if the remainder is greater than 5, increase the final digit by 1. The number 5.798 becomes 5.8 if rounding to 1 digit.


Rule 3- To prevent rounding bias, if the remainder is exactly 5, then round the last digit to the closest even number.Thus the number 3.55 (rounded to 1 digit) would be 3.6 (rounding up) and the number 6.450 would round to 6.4 (rounding down)if rounding to 1 decimal.
See page 12 in Hurlburt, R. (1994) Comprehending Behavioral Statistics, Brooks/Cole, Pacific Grove, CA.
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Platinum Member
posted Hide Post
Focus would round a decimal number valued
at .555 to .56 but you probably have
a full value of only .5549999 , which appears
under format D8.3 as .555 .
Increase your format to say D8.5 and see
what the value is.
 
Posts: 226 | Registered: June 08, 2003Report This Post
Guru
posted Hide Post
The numbers I'm mulitply are 48.47 and 86.50 that give the value of 4192.655
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Guru
posted Hide Post
Here is the solution to this problem.

TABLE FILE CAR
PRINT
SEATS NOPRINT
COMPUTE TEST1/D8.2 = 48.47 * 86.50 ;
COMPUTE TEST2/P8.2 = 48.47 * 86.50 ;
WHERE RECORDLIMIT EQ 1
END

If I changed the D8.2 to a P8.2 is will round the value up.
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders