Quantcast
Channel: PTC Community: Message List - Creo
Viewing all articles
Browse latest Browse all 11377

Re: Trigonometric functions give wrong values if supplied units

$
0
0

I've submitted this as a bug report and been in contact with the people associated with such.

 

I did some experimenting with the problem, and reported the following results:

(1) Define your parameter with units, for example I define "angle" with a value of 15.0, Unit Quantity of "Angle" and Units of "deg", the result of "tan ( angle )" yields 0.04569. A wrong answer.

(2) Define your parameter with no value for either Unit Quantity or Units, and tan ( angle ) yields 0.267949, which is correct for 15 degrees.

(3) Do a "dumb" evaluation of "tan ( 15.0 )" and you again get 0.267949.

(4) Define your parameter with a value of 15.0, Unit Quantity of "Angle", and Units of "rad", and tan ( angle ) yields 0.267949.

 

So it appears that if you exercise "proper" practice and define your units correctly, you are delivered erroneous results. Put in the wrong units and you get the right answer.

 

The "solution" of turning off unit sensitivity is not viable, since I am using that functionality to do a number of other calculations.


Viewing all articles
Browse latest Browse all 11377


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>