w3resource

PostgreSQL SIN() function

SIN() function

The PostgreSQL sin() function is used to return the sine of a given argument, where the argument is an angle in radians.

Uses of SIN() Function
  • Trigonometric Calculations: To perform trigonometric operations involving sine functions.

  • Mathematical Operations: Useful in various mathematical formulas that require the sine of an angle.

  • Engineering Applications: Employed in engineering fields for calculations related to waves, oscillations, and circular motion.

  • Scientific Research: Used in scientific research for modeling periodic phenomena and solving trigonometric equations.

  • Data Analysis: Utilized in data analysis tasks where trigonometric transformations are necessary.

Syntax:

sin(a)

PostgreSQL Version: 9.3

Pictorial presentation of PostgreSQL SIN() function

pictorial presentation of PostgreSQL SIN() function

Example 1: PostgreSQL SIN() function

Code:

SELECT SIN(0) AS "Sin (0)";

Sample Output:

 Sin (0)
---------
       0
(1 row)

Example 2: PostgreSQL SIN() function

Code:

SELECT SIN(1) AS "Sin (1)";

Sample Output:

      Sin (1)
-------------------
 0.841470984807897
(1 row)

Example 2: PostgreSQL SIN() function

Code:

SELECT SIN(-1) AS "Sin (-1)";

Sample Output:

      Sin (-1)
--------------------
 -0.841470984807897
(1 row)

Previous: SIGN function
Next: SQRT function



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/PostgreSQL/sin-function.php