Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Are the formula functions COS(x) and SIN(x) accurate in Alteryx Designer?

JORGE4900
8 - Asteroid

I was trying to solve the weekly challenge 352 and using the formula tool to calculate the sine and cosine of certain angles for a circle. Since I was not getting a perfect circle, I double checked the values of those given degrees versus my TI-84 Plus calculator, and the results were different. Once I manually calculated those values, the circle was very round for those 16 points.

 

Could someone in the Alteryx Team double check those two functions and advise please?

 

Please note how the circle seems pretty round with the calculator values but not with the formula function from Alteryx Designer.

 

 

Spoiler
With Alteryx Function.jpg

Figure 1: Alteryx Formula Functions

 

Spoiler
With Calculator.jpg

 

Figure 2: Manual Calculator Values

3 REPLIES 3
Felipe_Ribeir0
16 - Nebula

Hi @JORGE4900 

 

I believe that the source of the problem here is that you are using deegres, but these trigonometric functions work with rad (source: https://help.alteryx.com/20223/designer/math-functions)

 

Felipe_Ribeir0_0-1673384382909.png

 

If you convert this 22.5 to rad (convert 22.5 degrees to rad )

 

Felipe_Ribeir0_3-1673384497312.png

 

 

You will see a perfect circle too:

 

Felipe_Ribeir0_2-1673384439085.png

 

 

JORGE4900
8 - Asteroid

Hi there @Felipe_Ribeir0 

 

Oh; I see; I wish I knew that before.

 

Any change to add that the X values for the SIN COS formulas should be in rad?

 

2023-01-10_14-31-22.jpg

Maybe add x in rad?

 

 

Felipe_Ribeir0
16 - Nebula

@JORGE4900 

 

Yes, the information could be more explicit. But it is possible to assume that because they said that ACOS/ASIN are in rad, so SIN and COS must be too.

 

Felipe_Ribeir0_0-1673387275394.png

 

Labels