VBScript Tutorials - Herong's Tutorial Examples - Version 5.20, by Dr. Herong Yang

Built-in Math Functions

This section provides a list of commonly used built-in math functions.

VBScript supports the following commonly used math functions:

  • Abs(vNumber) - Returns the absolute value of a specified number
  • Atn(vNumber) - Returns the arctangent of a specified number
  • Cos(vNumber) - Returns the cosine of a specified number (angle)
  • Exp(vPower) - Returns e raised to a power
  • Hex(vNumber) - Returns the hexadecimal value of a specified number
  • Int(vNumber) - Returns the integer part of a specified number
  • Fix(vNumber) - Returns the integer part of a specified number
  • Log(vNumber) - Returns the natural logarithm of a specified number
  • Oct(vNumber) - Returns the octal value of a specified number
  • Rnd() - Returns a random number less than 1 but greater or equal to 0
  • Sgn(vNumber) - Returns an integer that indicates the sign of a specified number
  • Sin(vNumber) - Returns the sine of a specified number (angle)
  • Sqr(vNumber) - Returns the square root of a specified number
  • Tan(vNumber) - Returns the tangent of a specified number (angle)

Table of Contents

 About This Book

 Introduction of VBScript - Visual Basic Scripting Edition

 Variant Data Type, Subtypes, and Literals

 Arithmetic Operations

 Numeric Comparison Operations and Logical Operations

 String Operations - Concatenation and Comparison

 Variable Declaration and Assignment Statement

 Expression and Order of Operation Precedence

 Statement Syntax and Statement Types

 Array Data Type and Related Statements

 Array References and Array Assignment Statements

 Conditional Statements - "If ... Then" and "Select Case"

 Loop Statements - "For", "While", and "Do"

 "Function" and "Sub" Procedures

Built-in Functions

Built-in Math Functions

 Built-in Conversion Functions

 Built-in String Functions

 Built-in Date and Time Functions

 Built-in Array Functions

 Built-in Misc. Functions

 Inspecting Variables Received in Procedures

 Error Handling Flag and the "Err" Object

 Regular Expression Pattern Match and Replacement

 scrrun.dll - Scripting Runtime DLL Library

 Creating Your Own Classes

 IE Web Browser Supporting VBScript

 IIS ASP Server Supporting VBScript

 WSH (Windows Script Host)

 References

 Printable Copy - PDF Version

Built-in Math Functions - Updated in 2015, by Dr. Herong Yang