Calculation Field for 2^2

Confluence User - 04 Sep, 2018

I always unable to get 4 for 2^2 in a calculation field.

What should i write for this formula ?

 

 

forms

7


04 Sep, 2018
confluenceUser
confluenceUser

Hey there Alfa,

You may refer the image below for your answer.

The "Equation" field supports java math functions.

 

Hope this helps!

04 Sep, 2018
confluenceUser
confluenceUser

Unfortunatelly, in version 6 i still can't use a^3 = 8 where a=2 for : Math.pow(a,3) or pow(a,3) or power(a,3) Why ?

04 Sep, 2018
confluenceUser
confluenceUser

2^3 result = 1 a^3 result = unpredictable is it a bug ?

04 Sep, 2018
confluenceUser
confluenceUser

I just tested and the above equation works well on my end. Try attaching a screenshot of your calculation field configuration if you have any further doubts.

04 Sep, 2018
confluenceUser
confluenceUser

Hey Alfa, No, it is not a bug. The ^ symbol is a XOR operator. Using this incorrectly may cause unpredictable results. You may refer to this link for more information about Java operators: https://www.tutorialspoint.com/java/java_basic_operators.htm Hope this clarifies.

04 Sep, 2018
confluenceUser
confluenceUser

Yes, I'm using Variables x and y. It is good But when I'm using Variables a and b is not.. Anyway. Thank you Justin ;)

06 Sep, 2018
confluenceUser
confluenceUser

You're welcome! Gentle reminder to mark the above answer as the official answer, to assist others in this community. :)

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print