Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Round Function - Results seem incorrect

Featured Replies

I have a system for calculating golf handicaps. I noticed that a handicap of 14.5 rounded to 14 instead of 15.

A players playing handicap for a round of golf is calculated as Handicap Index / 113 * Course Slope Rating. In this case the Handicap Index is 14.5 and the Slope is 113. The playing handicap is 14.5, which rounds to 15.

So I opened a data viewer window and entered Round(14.5, 0). The result is 15, which is correct.

Again in the data viewer  I entered Round(14.5/113*113) and the result is 14. That seems wrong to me. 

I entered 14.5 / 113 * 113 on my calculator (an old Casio), and strangely, the answer is 14.4999999. 

On my phone calculator and in excel, 14.5/113*113 evaluates correctly to 14.5

Round(14.5/113*113) correctly evaluates to 15 in Excel.

Am I doing something wrong?  

 (This is in FMPA13)

FM_Round.png

Short answer: this is a (rare) rounding error. To avoid it, multiply first, then divide.

 

Edited by comment

  • Author

OK, that works, thank you

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.