I think that gives 6.0897E-36 not 6.0897
After a bit of testing, it looks like FMP doesn't display number fields with the general format correctly much beyond 30*Exp(-42) or 3e-17.
The SetPrecision function suggested in the thread above helps alot.
SetPrecision(30*Exp(-(((z - 275)/25)^2)); 40) gives the right result.
Yes, I have... :smileywink: It has nothing to do with the issue here.
Jade's answer is correct on both counts. Filemaker computes to precision of 15 decimal places (IIRC) and the result is 0. Using SetPrecision() with a precision of 36 or higher will return a more meaningful result.
thanks for that – much appreciated. I now get the figure 6.87277486e-40 which is great (new figures).
However, I’ve now encountered what I hope will be my last problem for a while. In excel I have the formula: =-SIN(2*RADIANS(C35))*C36
C35 = 6.87277486e-40 and C36 = -3.2975E-41
In filemaker I have added the formula as: SetPrecision ( -Sin ( 2 * Radians ( C35)) * C36 ; 41 )
This returns the value 5.853088383e-46
Any ideas anyone?
SetPrecision() does not work with trigonometric functions (though I wouldn't expect it to return an incorrect result - as it seems to in this case).
If I remove the SetPrecision then filemaker only returns a 0
any ideas how I can get the correct result
I made an error earlier and omitted a minus sign. I get the same result of 0 for both:
-Sin ( 2 * Radians ( C35)) * C36
SetPrecision ( -Sin ( 2 * Radians ( C35)) * C36 ; 41 )
Note that 2 * Radians ( C35 ) is 2.399051e-41, and I don't think Filemaker can calculate the Sin of this to a precision greater than 15.
Do you think this is impossible then.
Not sure what you're trying to do. I am not even sure what the "correct" result is - I'd suspect you get 0 in Excel too.
Excel gives approximately 7.91E-82. I concur with Comment that the FMP Sin function is the problem as it is returning 0.
…and interestingly enough, if I remove the Sin function from the Excel equation, it gives the same answer: 7.91E-82. So does my HP calculator.
These extremely small values are probably beyond the precision of the functions' algorithms.
You can try this but verify your results:-
Brilliant, that works fine – crazy eh.
Appreciate all your help – this is part of a colour formula which can now be solved.