Discuss Scratch
- Discussion Forums
- » Bugs and Glitches
- » The "sin" and "asin" of operators are wrong
- MapMaths
-
14 posts
The "sin" and "asin" of operators are wrong
My browser / operating system: Windows NT 10.0, Chrome 78.0.3904.108, Flash 29.0 (release 0)
When I used
And when I used
Then I clicked
And this is from the Windows Calculator also said it should be 30
Why?
When I used
([asin v] of (0.5) ::operators)The answer is 30.000000000000004, but it shuold be 30, because
([sin v] of (30) ::operators)=0.5
And when I used
set [my variable v] to ([asin v] of (0.5) ::operators), it was 30.
show variable [my variable v]
Then I clicked
(my variable)It said 30.000000000000004 again❗
And this is from the Windows Calculator also said it should be 30
Why?

Last edited by MapMaths (March 24, 2020 14:19:41)
- Paigeri
-
500+ posts
The "sin" and "asin" of operators are wrong
My browser / operating system: Windows NT 10.0, Chrome 78.0.3904.108, Flash 29.0 (release 0)
When I used([asin v] of (0.5) ::operators)The answer is 30.000000000000004, but it shuold be 30, because([sin v] of (30) ::operators)=0.5
And when I usedset [my variable v] to ([asin v] of (0.5) ::operators), it was 30.
show variable [my variable v]
Then I clicked(my variable)It said 30.000000000000004 again❗
Why?
Well, to compute x from sin(x). arcsin is defined to be the inverse of sin but restricted to a certain range. Hence, arcsin(sin(x))=x if x is within this range (generally either 0 to 2π or −π to π) or a value y such that sin(y)=sin(x) i.e. y=x+2πn or y=π−x+2πm for some n∈Z or m∈Z and y is in this range. Therefore, Asin of 0.5 is 0.523598776 rad. Additionally, In any right triangle, the sine of an angle x is the length of the opposite side (O) divided by the length of the hypotenuse (H). In a formula, it is written as ‘sin’ without the ‘e’: Often remembered as “SOH” - meaning Sine is Opposite over Hypotenuse. So, the sin of 30 should be -0.98803162409. But that's obviously not what you got. Therefore, I'm not sure how you would get those answers for the variable.
Last edited by Paigeri (March 24, 2020 14:11:54)
- Discussion Forums
- » Bugs and Glitches
-
» The "sin" and "asin" of operators are wrong