Languages
[Edit]
EN

Python - math.sin() method example

0 points
Created by:
Keisha-Acosta
380

math.sin is a method that takes only one parameter and returns an approximation of sine mathematical function.

Note: 1.2246467991473532e-16 and -1.133107779529596e-15 should be equal to 0 but they are not because of compuptation precision error.


1. Documentation

Edit
Syntax
Parametersx - a number that represents an angle in radians.
Result

x value calculated as sin(x) mathematical function in a range -1 to +1.

If x is not a number, the function returns TypeError.

If the function can not calculate it returns ValueError.

Descriptionsin is a method that takes only one parameter and returns an approximation of sin(x) mathematical function.

2. Working with radians

Edit

Output: 

3. Working with degrees

Edit

Output: 

4. Reversed console plot example

Edit

Output: 

References

Edit
  1. Sine - Wikipedia

1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Cross technology - Math.sin()

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join