LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sin off pi (3,14159) equal a 1,22465

why sin off pi is equal a 1.22465  when is 0 the same ocurr with pi x2 6,283 is equal a 2,44 when is 0

i use sin example to control it

0 Kudos
Message 1 of 5
(956 Views)

It sounds like the classic DEG/RAD issue, Maybe post your code to elaborate on this issue. 

______________________________________________________________
Have a pleasant day and be sure to learn Python for success and prosperity.
0 Kudos
Message 2 of 5
(951 Views)

This is a display format issue.  You're looking at the number in scientific notation.  Right click the indicator -> Display Format and change to floating point. 

 

aputman_0-1745272440986.png

aputman_1-1745272781527.png

 

aputman
Message 3 of 5
(938 Views)

thanks you

0 Kudos
Message 4 of 5
(905 Views)

the precision of floating point numbers are limited. Pi and 2pi cannot be represented exactly as a floating point number, so sin(pi) and sin(2pi) can't be zero.

 

sin (pi) is something like sin(3,14159265358979311) and that's not zero.

 

 

0 Kudos
Message 5 of 5
(875 Views)