Jump 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.

[FP5] [FP5] Calculations, Exponents, and Decimals

Featured Replies

Okay, I'm having some difficulties with some statistical calculations I'm working on in FP5. Anytime I try to do an exponential calculation (field^2, or field*field), any decimals in the existing numbers are removed. I've tried setting the number format to the proper number of decimal places, but I can't seem to find a way to make it work.

Actually, I've had it work with ONE field. I was making a field that had a result of another calc field squared. This one seemed to be okay, but I've not been able to get correct results for more complex calculations (e.g. 1/field^2)

Is there some setting that I'm missing, or is FP5 just incapable of accurately computing a squared number?

FileMaker Version: 5

Platform: Mac OS 9

BenhamTroll:

A couple of things might be happening. One is that the field itself has to be long enough to display the results, or else you get exponential shorthand (or the evil "?"). Another is indeed the number format of the field. Also make sure that you are working with number fields, not text fields. Otherwise, examine the one that works in detail, and see what the difference is between that and the ones that don't work.

-Stanley

  • Author

Well, they all seem plenty long (I have them set to 3 decimal places and there is extra whit space even after it adds in the .000). It's a calculation field using the results of other calculation fields that ARE correctly displaying decimal data, so it's a number field by default, isn't it?

What I meant was that you should check in Define Fields and make sure that they are defined, on the database-level rather than the layout-level, as numbers. Doing calculations based on text fields can have all sorts of wierd results.

-Stanley

  • Author

I'm pretty sure they are, but since these calculations go back multiple layers, it's possible I missed something along the way. I'll check it out.

Instead of setting the number format, you might want to consider rounding the numbers before and/or after the calculation.

Create an account or sign in to comment

Important Information

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

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.