April 8, 200421 yr 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
April 8, 200421 yr 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
April 8, 200421 yr 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?
April 8, 200421 yr 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
April 8, 200421 yr 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.
April 8, 200421 yr 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