Thank you for your post.
Yes, I can replicate the problem. This works properly up to 1e+404, and definitely fails with 1e+406 and larger. This occurs on both Windows and Mac platform.
I have forwarded your post along with my findings to our Development and Software Quality Assurance (Testing) departments for review and confirmation. If I receive an explanation, I will let you know.
It is strange, but on Windows in vs. 9.0v3, 10.0v3 and now 11, we get same result on 10^203 * 10^203 of 1.0e+406. But on (10^203)^2, all we have ever gotten is a question mark in the data viewer. I am curious how you could get an error number for the result in the data viewer. Or are you using it in a script and referring to Last Error?
Regardless, it appears to be broken in vs. 11as well.
Sorry, I wasn't entirely clear:
EvaluationError ( (10^203)^2 )
Not saying one way or another about the situation, but just wanted to point out in the specification for FileMaker Pro :
• Number: Support values from 10^-400 up to 10^400 and the negative values of the same range. Index based on the first 400 significant digits. Up to 1 billion characters per field. The first 400 digits are indexed.
The result is above 10e400.
The information I received back from Development and Testing confirms what "oki182" says. In specific:
"We don't support numbers past 10e+400, so I suppose Calc1 should also return ?."
This inconsistency has been confirmed and sent on to Development.
Here's another one, and it has nothing to do with the range limit. Paste this into your Data Viewer:
n = 1.0000000009
1060 * n*n
1060 * n^2
It's obvious that n*n is evaluated differently than n^2. It seems that n*n is more precise (both return the same result if SetPrecision is used).
Thanks for the example. From your original post, it was quite evident that "x*x" was being evaluated differently than "x^2".
Just to show another difference, if you have (n*n), you get another result.
I have entered a new issue, related to the original issue, using your new example along with my findings. If any additional information becomes available, I will let you know.
That's a good catch with the parentheses, since 1060 * n*n is actually (1060 * n) * n so it should be evaluated differently than 1060 * n^2.
But I cannot find a good reason why n * 1060 * n and n * n * 1060 are calculated to a different precision.
The difference is precision/truncation during the calculation.
Let (n = 1.0000000009;
1060*SetPrecision (n*n;32) &¶&
The two values will equal the same when you calculate the whole precision.
Also to note :
Let (n = 1.0000000009;
is also showing the correct values.
Just as a note, FileMaker's default precision is 16.
Your calculation goes beyond 16 decimal places.