Native functions in VBScript: Mathematical functions

October 2016

Abs(number)Returns the absolute value of a number.
Atn(number)Returns the arctangent of a number.
Cos(number)Returns the cosine of a number.
Exp(number)Returns the exponential of a number.
Fix(number)Returns the integer part by truncating the decimal part..
Int(number)Returns the largest integer, less than or equal to a number.
Log(number)Returns the natural logarithm (base e).
Rnd[(number)]Positive random value less than 1. Before calling Rnd, it is necessary to call the Randomize statement to initialize the random number generator.
Round(number)Rounds a specified number of decimal places.
Sgn(number)Returns the value of the sign (1, 0 or -1).
Sin(number)Returns the sine value.
Sqr(number)Returns the square root of the value.
Tan(number)Returns the tangent value.

Original document published

Related :

This document entitled « Native functions in VBScript: Mathematical functions » from CCM ( is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.