RuleGo RuleGo
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • StreamSQL
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文
🏠Home
  • Quick Start
  • Rule Chain
  • Standard Components
  • Extension Components
  • Custom Components
  • Visualization
  • RuleGo-Server
  • RuleGo-MCP-Server
  • AOP
  • Trigger
  • Advanced Topics
  • Performance
  • Standard Components
  • Extension Components
  • Custom Components
  • Components Marketplace
  • Overview
  • Quick Start
  • Routing
  • DSL
  • API
  • Options
  • Components
🔥Editor (opens new window)
  • RuleGo Editor (opens new window)
  • RuleGo Server (opens new window)
  • StreamSQL
  • Github (opens new window)
  • Gitee (opens new window)
  • Changelog (opens new window)
  • English
  • 简体中文

广告采用随机轮播方式显示 ❤️成为赞助商
  • Quick Start

  • Rule Chain

  • Standard Components

  • Extension Components

  • Custom Components

  • Components marketplace

  • Visualization

  • AOP

  • Trigger

  • Advanced Topic

  • RuleGo-Server

  • FAQ

  • Endpoint Module

  • Support

  • StreamSQL

    • Overview
    • Quick Start
    • Core Concepts
    • SQL Reference
    • API Reference
    • RuleGo Integration
    • functions

      • Aggregate Functions
      • Analytical Functions
      • Window Functions
      • Math Functions
        • Basic Math Functions
          • ABS - Absolute Value Function
          • SQRT - Square Root Function
          • POWER - Power Function
          • CEILING - Ceiling Function
          • FLOOR - Floor Function
          • ROUND - Round Function
          • MOD - Modulo Function
          • RAND - Random Function
          • SIGN - Sign Function
        • Trigonometric Functions
          • SIN - Sine Function
          • COS - Cosine Function
          • TAN - Tangent Function
          • ASIN - Arc Sine Function
          • ACOS - Arc Cosine Function
          • ATAN - Arc Tangent Function
          • ATAN2 - Two-Parameter Arc Tangent Function
        • Hyperbolic Functions
          • SINH - Hyperbolic Sine Function
          • COSH - Hyperbolic Cosine Function
          • TANH - Hyperbolic Tangent Function
        • Logarithmic and Exponential Functions
          • EXP - Exponential Function
          • LN - Natural Logarithm Function
          • LOG - Logarithm Function
          • LOG10 - Common Logarithm Function
          • LOG2 - Binary Logarithm Function
        • Bitwise Functions
          • BIT_AND - Bitwise AND Function
          • BIT_OR - Bitwise OR Function
          • BIT_XOR - Bitwise XOR Function
          • BIT_NOT - Bitwise NOT Function
        • 📚 Related Documentation
      • String Functions
      • Conversion Functions
      • DateTime Functions
      • JSON Functions
      • Hash Functions
      • Array Functions
      • Type Check Functions
      • Conditional Functions
      • Multi-row Functions
      • Expression Functions
      • Custom Functions
    • case-studies

目录

Math Functions

# StreamSQL Math Functions

Math functions are used for numerical calculations.

# Basic Math Functions

# ABS - Absolute Value Function

Syntax: abs(number)
Description: Returns the absolute value of a number.

# SQRT - Square Root Function

Syntax: sqrt(number)
Description: Returns the square root of a number.

# POWER - Power Function

Syntax: power(base, exponent)
Description: Returns the base raised to the specified power.

# CEILING - Ceiling Function

Syntax: ceiling(number)
Description: Returns the smallest integer greater than or equal to the specified number.

# FLOOR - Floor Function

Syntax: floor(number)
Description: Returns the largest integer less than or equal to the specified number.

# ROUND - Round Function

Syntax: round(number, [precision])
Description: Rounds a number to the specified number of decimal places.

# MOD - Modulo Function

Syntax: mod(dividend, divisor)
Description: Returns the remainder of a division operation.

# RAND - Random Function

Syntax: rand()
Description: Returns a random number between 0 and 1.

# SIGN - Sign Function

Syntax: sign(number)
Description: Returns the sign of a number (-1, 0, or 1).

# Trigonometric Functions

# SIN - Sine Function

Syntax: sin(number)
Description: Returns the sine of an angle (in radians).

# COS - Cosine Function

Syntax: cos(number)
Description: Returns the cosine of an angle (in radians).

# TAN - Tangent Function

Syntax: tan(number)
Description: Returns the tangent of an angle (in radians).

# ASIN - Arc Sine Function

Syntax: asin(number)
Description: Returns the arc sine of a number (in radians).

# ACOS - Arc Cosine Function

Syntax: acos(number)
Description: Returns the arc cosine of a number (in radians).

# ATAN - Arc Tangent Function

Syntax: atan(number)
Description: Returns the arc tangent of a number (in radians).

# ATAN2 - Two-Parameter Arc Tangent Function

Syntax: atan2(y, x)
Description: Returns the arc tangent of y/x (in radians).

# Hyperbolic Functions

# SINH - Hyperbolic Sine Function

Syntax: sinh(number)
Description: Returns the hyperbolic sine of a number.

# COSH - Hyperbolic Cosine Function

Syntax: cosh(number)
Description: Returns the hyperbolic cosine of a number.

# TANH - Hyperbolic Tangent Function

Syntax: tanh(number)
Description: Returns the hyperbolic tangent of a number.

# Logarithmic and Exponential Functions

# EXP - Exponential Function

Syntax: exp(number)
Description: Returns e raised to the specified power.

# LN - Natural Logarithm Function

Syntax: ln(number)
Description: Returns the natural logarithm of a number.

# LOG - Logarithm Function

Syntax: log(base, number)
Description: Returns the logarithm with the specified base.

# LOG10 - Common Logarithm Function

Syntax: log10(number)
Description: Returns the common logarithm (base 10) of a number.

# LOG2 - Binary Logarithm Function

Syntax: log2(number)
Description: Returns the binary logarithm (base 2) of a number.

# Bitwise Functions

# BIT_AND - Bitwise AND Function

Syntax: bit_and(number1, number2)
Description: Performs bitwise AND operation on two integers.

# BIT_OR - Bitwise OR Function

Syntax: bit_or(number1, number2)
Description: Performs bitwise OR operation on two integers.

# BIT_XOR - Bitwise XOR Function

Syntax: bit_xor(number1, number2)
Description: Performs bitwise XOR operation on two integers.

# BIT_NOT - Bitwise NOT Function

Syntax: bit_not(number)
Description: Performs bitwise NOT operation on an integer.

# 📚 Related Documentation

  • Aggregate Functions - Learn detailed usage of aggregate functions
  • String Functions - Learn detailed usage of string functions
  • SQL Reference - View complete SQL syntax reference
Edit this page on GitHub (opens new window)
Last Updated: 2025/08/05, 02:24:31
Window Functions
String Functions

← Window Functions String Functions→

Theme by Vdoing | Copyright © 2023-2025 RuleGo Team | Apache 2.0 License

  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式