Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex DataLens
  • Getting started
  • Use cases
    • All use cases
    • Visualizing data from a CSV file
    • Visualizing data from a ClickHouse database
    • Visualizing data from Yandex.Metriсa
    • Visualizing data from Yandex.Metrica Logs API
    • Publishing a chart with a map from a CSV file to DataLens Public
    • Visualizing data from AppMetrica
    • Visualizing geodata from a CSV file
  • Step-by-step instructions
    • All instructions
    • Working with connections
      • Creating a ClickHouse connection
      • Creating a connection to a CSV file
      • Creating a MySQL connection
      • Creating a PostgreSQL connection
      • Creating an MS SQL Server connection
      • Creating an Oracle Database connection
      • Creating a Yandex.Metrica API connection
      • Creating a Yandex.Metrica Logs API connection
      • Creating an AppMetrica connection
      • Managing connection access
    • Working with datasets
      • Create dataset
      • Creating a data field
      • Creating a calculated data field
      • Updating fields in datasets
      • Dataset materialization
      • Managing dataset access
      • Managing access to data rows
    • Working with charts
      • Creating a line chart
      • Creating an area chart
      • Creating a pie chart
      • Creating a column chart
      • Creating a bar chart
      • Creating a map
      • Creating a table
      • Creating a pivot table
      • Publishing a chart
      • Managing chart access
    • Working with dashboards
      • Creating dashboards
      • Adding charts to dashboards
      • Adding selectors to dashboards
      • Publishing dashboards
      • Managing dashboard access
    • Working with permissions
      • Granting permissions
      • Deleting permissions
      • Request permissions
  • Concepts
    • Overview
    • Connections
    • Data types
    • Datasets
      • Overview
      • Data model
      • Dataset settings
    • Charts
    • Dashboards
    • Using Markdown in DataLens
    • DataLens Public
    • Calculated fields
    • Marketplace
    • Backups in DataLens
    • Quotas and limits
  • Access management
    • Managing access to DataLens
    • Managing access at the data row level
  • Pricing policy
  • Function reference
    • All Functions
    • Aggregate functions
      • Overview
      • ALL_CONCAT
      • ANY
      • ARG_MAX
      • ARG_MIN
      • AVG
      • AVG_IF
      • COUNT
      • COUNTD
      • COUNTD_APPROX
      • COUNTD_IF
      • COUNT_IF
      • MAX
      • MEDIAN
      • MIN
      • QUANTILE
      • QUANTILE_APPROX
      • STDEV
      • STDEVP
      • SUM
      • SUM_IF
      • TOP_CONCAT
      • VAR
      • VARP
    • Date/Time functions
      • Overview
      • DATEADD
      • DATEPART
      • DATETRUNC
      • DAY
      • DAYOFWEEK
      • HOUR
      • MINUTE
      • MONTH
      • NOW
      • SECOND
      • TODAY
      • WEEK
      • YEAR
    • Geographical functions
      • Overview
      • GEOCODE
      • GEOINFO
      • TOPONYM_TO_GEOPOINT
      • TOPONYM_TO_GEOPOLYGON
    • Logical functions
      • Overview
      • CASE
      • IF
      • IFNULL
      • ISNULL
      • ZN
    • Text markup functions
      • Overview
      • BOLD
      • ITALIC
      • MARKUP
      • URL
    • Mathematical functions
      • Overview
      • ABS
      • ACOS
      • ASIN
      • ATAN
      • ATAN2
      • CEILING
      • COS
      • COT
      • DEGREES
      • DIV
      • EXP
      • FLOOR
      • GREATEST
      • LEAST
      • LN
      • LOG
      • LOG10
      • PI
      • POWER
      • RADIANS
      • ROUND
      • SIGN
      • SIN
      • SQRT
      • SQUARE
      • TAN
    • Operators
      • Overview
      • AND
      • Addition and concatenation (+)
      • BETWEEN
      • Comparison
      • Division (/)
      • IN
      • IS FALSE
      • IS TRUE
      • LIKE
      • Modulo (%)
      • Multiplication (*)
      • NOT
      • Negation (-)
      • OR
      • Power (^)
      • Subtraction (-)
    • String functions
      • Overview
      • ASCII
      • CHAR
      • CONCAT
      • CONTAINS
      • ENDSWITH
      • FIND
      • ICONTAINS
      • IENDSWITH
      • ISTARTSWITH
      • LEFT
      • LEN
      • LOWER
      • LTRIM
      • REGEXP_EXTRACT
      • REGEXP_EXTRACT_NTH
      • REGEXP_MATCH
      • REGEXP_REPLACE
      • REPLACE
      • RIGHT
      • RTRIM
      • SPACE
      • SPLIT
      • STARTSWITH
      • SUBSTR
      • TRIM
      • UPPER
      • UTF8
    • Time series functions
      • Overview
      • AGO
      • AT_DATE
    • Type conversion functions
      • Overview
      • BOOL
      • DATE
      • DATETIME
      • DATETIME_PARSE
      • DATE_PARSE
      • DB_CAST
      • FLOAT
      • GEOPOINT
      • GEOPOLYGON
      • INT
      • STR
    • Window functions
      • Overview
      • AVG
      • AVG_IF
      • COUNT
      • COUNT_IF
      • LAG
      • MAVG
      • MAX
      • MCOUNT
      • MIN
      • MMAX
      • MMIN
      • MSUM
      • RANK
      • RANK_DENSE
      • RANK_PERCENTILE
      • RANK_UNIQUE
      • RAVG
      • RCOUNT
      • RMAX
      • RMIN
      • RSUM
      • SUM
      • SUM_IF
    • Function Availability
  • Questions and answers
  1. Function reference
  2. Mathematical functions
  3. Overview

Mathematical functions

  • ABS
  • ACOS
  • ASIN
  • ATAN
  • ATAN2
  • CEILING
  • COS
  • COT
  • DEGREES
  • DIV
  • EXP
  • FLOOR
  • GREATEST
  • LEAST
  • LN
  • LOG
  • LOG10
  • PI
  • POWER
  • RADIANS
  • ROUND
  • SIGN
  • SIN
  • SQRT
  • SQUARE
  • TAN

ABS

Syntax:ABS( number )

Returns the absolute value of number.

ACOS

Syntax:ACOS( number )

Returns the arccosine of number in radians.

ASIN

Syntax:ASIN( number )

Returns the arcsine of number in radians.

ATAN

Syntax:ATAN( number )

Returns the arctangent of number in radians.

ATAN2

Syntax:ATAN2( x, y )

Returns the arctangent in radians for the specified coordinates x and y.

CEILING

Syntax:CEILING( number )

Rounds the value up to the nearest integer.

COS

Syntax:COS( number )

Returns the cosine of number in radians.

COT

Syntax:COT( number )

Returns the cotangent of number in radians.

DEGREES

Syntax:DEGREES( radians )

Converts radians to degrees.

DIV

Syntax:DIV( number_1, number_2 )

Divides number_1 by number_1. The result is rounded down to the nearest integer.

EXP

Syntax:EXP( number )

Returns the result of raising the number 'e' to the power of number.

FLOOR

Syntax:FLOOR( number )

Rounds the value down to the nearest integer.

GREATEST

Syntax:GREATEST( value_1, value_2, value_3 [ , ... ] )

Returns the greatest value.

See also LEAST.

Depending on the specified data type, it returns:

  • The greatest number.
  • The last string in alphabetical order.
  • The latest date.
  • TRUE when selecting between TRUE and FALSE for Boolean type.

LEAST

Syntax:LEAST( value_1, value_2, value_3 [ , ... ] )

Returns the smallest value.

See also GREATEST.

Depending on the specified data type, it returns:

  • The smallest number.
  • The first string in alphabetical order.
  • The earliest date.
  • FALSE when selecting between TRUE and FALSE for Boolean type.

LN

Syntax:LN( number )

Returns the natural logarithm of the number number. Returns 'NULL' if the number is less than or equal to 0.

LOG

Syntax:LOG( value, base )

Returns the logarithm of value to base base. Returns 'NULL' if the number value is less than or equal to 0.

LOG10

Syntax:LOG10( number )

Returns the logarithm of the number number to base 10. Returns 'NULL' if the number is less than or equal to 0.

PI

Syntax:PI()

Returns PI. The accuracy depends on the data source.

POWER

Syntax:POWER( base, power )

Raises base to the power of power.

RADIANS

Syntax:RADIANS( degrees )

Converts degrees degrees to radians.

ROUND

Syntax:ROUND( number [ , precision ] )

Rounds the number number to the number of decimal digits specified in precision.
If the number precision is omitted, number is rounded to the nearest integer.

SIGN

Syntax:SIGN( number )

Returns the sign of the number number:

  • -1 if the number is negative.
    0 if the number is zero.
  • 1 if the number is positive.

SIN

Syntax:SIN( number )

Returns the sine of number in radians.

SQRT

Syntax:SQRT( number )

Returns the square root of the specified number.

SQUARE

Syntax:SQUARE( number )

Returns the number number raised to the power of 2.

TAN

Syntax:TAN( number )

Returns the tangent of number in radians.

In this article:
  • ABS
  • ACOS
  • ASIN
  • ATAN
  • ATAN2
  • CEILING
  • COS
  • COT
  • DEGREES
  • DIV
  • EXP
  • FLOOR
  • GREATEST
  • LEAST
  • LN
  • LOG
  • LOG10
  • PI
  • POWER
  • RADIANS
  • ROUND
  • SIGN
  • SIN
  • SQRT
  • SQUARE
  • TAN
Language
Careers
Privacy policy
Terms of use
© 2021 Yandex.Cloud LLC