Value was either too large or too small for a UInt16.

Topics: Help
May 21, 2012 at 10:04 AM

Hi all,

What is wrong with this formula "(30 * (27+5))*sin(30)^2" ?

When I try to evaluate this formula I get error : "Value was either too large or too small for a UInt16."

Apr 30, 2013 at 9:43 PM
This happens because ^ is translated to a BitwiseXOr operation. And the BitwiseXOr only works on Integers.

If you must make a power use the Pow(x,y) funcion.

Your formula will be like:

"(30 * (27+5))*Pow(sin(30),2)"

I got the same problem today :)