
1. Re: Exp Function not working how I want it too – help please!
Jade Mar 19, 2010 10:58 AM (in response to zibzab_1)I think that gives 6.0897E36 not 6.0897

2. Re: Exp Function not working how I want it too – help please!
WoodApple Mar 19, 2010 11:21 AM (in response to zibzab_1) 
3. Re: Exp Function not working how I want it too – help please!
Jade Mar 19, 2010 12:04 PM (in response to zibzab_1)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 3e17.
The SetPrecision function suggested in the thread above helps alot.
SetPrecision(30*Exp((((z  275)/25)^2)); 40) gives the right result.

4. Re: Exp Function not working how I want it too – help please!
comment_1 Mar 19, 2010 12:32 PM (in response to zibzab_1)
WoodApple wrote: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.

5. Re: Exp Function not working how I want it too – help please!
zibzab_1 Mar 19, 2010 1:25 PM (in response to zibzab_1)Hi everyone,
thanks for that – much appreciated. I now get the figure 6.87277486e40 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.87277486e40 and C36 = 3.2975E41
In filemaker I have added the formula as: SetPrecision ( Sin ( 2 * Radians ( C35)) * C36 ; 41 )
This returns the value 5.853088383e46
Any ideas anyone?

6. Re: Exp Function not working how I want it too – help please!
comment_1 Mar 19, 2010 1:48 PM (in response to zibzab_1)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).

7. Re: Exp Function not working how I want it too – help please!
zibzab_1 Mar 19, 2010 1:55 PM (in response to zibzab_1)If I remove the SetPrecision then filemaker only returns a 0
any ideas how I can get the correct result

8. Re: Exp Function not working how I want it too – help please!
comment_1 Mar 19, 2010 2:41 PM (in response to zibzab_1)I made an error earlier and omitted a minus sign. I get the same result of 0 for both:
Sin ( 2 * Radians ( C35)) * C36
and
SetPrecision ( Sin ( 2 * Radians ( C35)) * C36 ; 41 )Note that 2 * Radians ( C35 ) is 2.399051e41, and I don't think Filemaker can calculate the Sin of this to a precision greater than 15.

9. Re: Exp Function not working how I want it too – help please!
zibzab_1 Mar 19, 2010 4:20 PM (in response to zibzab_1)Do you think this is impossible then.

10. Re: Exp Function not working how I want it too – help please!
comment_1 Mar 19, 2010 4:29 PM (in response to zibzab_1)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.

11. Re: Exp Function not working how I want it too – help please!
Jade Mar 19, 2010 6:24 PM (in response to zibzab_1)Excel gives approximately 7.91E82. 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.91E82. 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:
SetPrecision((2*Radians(C35)*C36); 82)

12. Re: Exp Function not working how I want it too – help please!
zibzab_1 Mar 19, 2010 11:58 PM (in response to zibzab_1)Brilliant, that works fine – crazy eh.
Appreciate all your help – this is part of a colour formula which can now be solved.
Many thanks