Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r100

D toc

Excerpt

Computes the sine of an input value for an angle measured in radians. The value can be a Decimal or Integer literal or a reference to a column containing numeric values.

In the above, the sine of angle A is computed as the following:

Code Block
sin(A) = x/z

The cosecant of angle A is 1/sin(A), or:

Code Block
csc(A) = 1/sin(A) = z/x

You can convert from degrees to radians. For more information, see RADIANS Function.

D s lang vs sql

D s
snippetBasic

Numeric literal example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value: round(sin(radians(30)),3)

round(sin(radians(30)),3)

Output: Returns the computation of the sine of a 30-degree angle, which is converted to radians before being passed to the SIN function. The output value is rounded to three decimals: 0.500.

Column reference example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value: sin(X) as: 'sinX'

sin(X)

Output: Returns  the sine of the radians values in X column.

D s
snippetSyntax

D lang syntax
RawWrangletrue
Typesyntax
showNotetrue
WrangleTextderive type:single value: sin(numeric_value)

sin(numeric_value)


ArgumentRequired?Data TypeDescription
numeric_valueYstring, decimal, or integerName of column, Decimal or Integer literal, or function returning those types to apply to the function

D s lang notes

numeric_value

Name of the column, Integer or Decimal literal, or function returning that data type to apply to the function.

  • Missing input values generate missing results.
  • Literal numeric values should not be quoted. Quoted values are treated as strings.
  • Multiple columns and wildcards are not supported.

D s
snippetusage

Required?Data TypeExample Value
YesString (column reference) or Integer or Decimal literal0.5

D s
snippetExamples

Example - Trigonometry functions

Include Page
EXAMPLE - Trigonometry Functions
EXAMPLE - Trigonometry Functions

D s also
labeltrigonometry