Skip to main content
Question

Cannot get value from ExpressionEvaluator

  • March 6, 2015
  • 2 replies
  • 56 views

Hi, I'm creating an attribute using Expression Evaluator, after setting the destination attribute, I put 0.75*(1-(@Value(Dis)/500)^2) in the expression, however, it gives me 0.75*(1-(266.970729596956/500)^2) at the end. Anyone know what should I do with it? Thanks!
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • March 6, 2015
Hi,

 

 

The ^ operator determines "bitwise exclusive OR";  it requires integer operands for both left and right. Since the left operand was not integer, your expression was not performed.

 

 

I suppose you are going to perform "exponentiation", rather than "bitwise exclusive OR". If so, you should use the ** operator or the @pow function.

 

 

See here to learn more about math operators and math functions.

 

Math Operators (http://docs.safe.com/fme/html/FME_Transformers/FME_Transformers.htm#transformer_parameters/math_operators.htm)

 

Math Functions (http://docs.safe.com/fme/html/FME_Transformers/FME_Transformers.htm#transformer_parameters/math_functions.htm)

 

Note the math functions list contains some new functions added in FME 2015, which cannot be used in FME 2014 or earlier.

 

 

Takashi

  • Author
  • March 7, 2015
Thanks, Takashi. Your solution works! Nice weekend!