How to correctly include and run the square root function in scripts?

I try

import math

print math.sqrt(4)

but obtain

AttributeError: ‘com.inductiveautomation.ignition.designer.gui.tool’ object has no attribute ‘sqrt’

Ignition 8.0.15

How to correctly include and run the square root function in scripts?

I try

import math

print math.sqrt(4)

but obtain

AttributeError: ‘com.inductiveautomation.ignition.designer.gui.tool’ object has no attribute ‘sqrt’

Ignition 8.0.15

I’d try deleting your cache, and letting it download a fresh copy from the gateway.

Without result(

A project colleague on a different machine has the same problem

Ok, seems pow() is working, so I will use it

Strange problem with such popular function…

Thanks to all

Do you have a project script named `math`

?

1 Like

Oh really it exists

Now it is clear.

Thank you!