Math functions: Abs(), Atn(), Cos(), Exp(), Fix(), Hex(), Int(), Log(), Oct(), Round(), Sgn(), Sin(), Sqr(), Tan()

Abs(number)
Absolute value of a number

Abs(1)= <% =Abs(1) %>
Abs(2)= <% =Abs(2) %>
Abs(3)= <% =Abs(3) %>
Abs(4)= <% =Abs(4) %>
Abs(5)= <% =Abs(5) %>

Abs(-1)= <% =Abs(-1) %>
Abs(-2)= <% =Abs(-2) %>
Abs(-3)= <% =Abs(-3) %>
Abs(-4)= <% =Abs(-4) %>
Abs(-5)= <% =Abs(-5) %>

Abs(-5.234)= <% =Abs(-5.234) %>

Absolute value of a number

Abs(1)= 1
Abs(2)= 2
Abs(3)= 3
Abs(4)= 4
Abs(5)= 5

Abs(-1)= 1
Abs(-2)= 2
Abs(-3)= 3
Abs(-4)= 4
Abs(-5)= 5

Abs(-5.234)= 5.234

Sin(number)
Sine of number (number must be in radians)
Sin(0)= <% =Sin(0) %>
Sin(1)= <% =Sin(1) %>
Sin(2)= <% =Sin(2) %>
Sin(3)= <% =Sin(3) %>
Sin(4)= <% =Sin(4) %>
Sin(5)= <% =Sin(5) %>
Sin(6)= <% =Sin(6) %>
Sin(7)= <% =Sin(7) %>
Sin(8)= <% =Sin(8) %>
Sin(9)= <% =Sin(9) %>
Sine of number (number must be in radians)
Sin(0)= 0
Sin(1)= 0.841470984807897
Sin(2)= 0.909297426825682
Sin(3)= 0.141120008059867
Sin(4)= -0.756802495307928
Sin(5)= -0.958924274663138
Sin(6)= -0.279415498198926
Sin(7)= 0.656986598718789
Sin(8)= 0.989358246623382
Sin(9)= 0.412118485241757
Cos(number)
Cosine of number (number must be in radians)
Cos(0)= <% =Cos(0) %>
Cos(1)= <% =Cos(1) %>
Cos(2)= <% =Cos(2) %>
Cos(3)= <% =Cos(3) %>
Cos(4)= <% =Cos(4) %>
Cos(5)= <% =Cos(5) %>
Cos(6)= <% =Cos(6) %>
Cos(7)= <% =Cos(7) %>
Cos(8)= <% =Cos(8) %>
Cos(9)= <% =Cos(9) %>
Cosine of number (number must be in radians)
Cos(0)= 1
Cos(1)= 0.54030230586814
Cos(2)= -0.416146836547142
Cos(3)= -0.989992496600445
Cos(4)= -0.653643620863612
Cos(5)= 0.283662185463226
Cos(6)= 0.960170286650366
Cos(7)= 0.753902254343305
Cos(8)= -0.145500033808614
Cos(9)= -0.911130261884677
Tan(number)
Tangent of number (number must be in radians)
Tan(0)= <% =Tan(0) %>
Tan(1)= <% =Tan(1) %>
Tan(2)= <% =Tan(2) %>
Tan(3)= <% =Tan(3) %>
Tan(4)= <% =Tan(4) %>
Tan(5)= <% =Tan(5) %>
Tan(6)= <% =Tan(6) %>
Tan(7)= <% =Tan(7) %>
Tan(8)= <% =Tan(8) %>
Tan(9)= <% =Tan(9) %>
Tangent of number (number must be in radians)
Tan(0)= 0
Tan(1)= 1.5574077246549
Tan(2)= -2.18503986326152
Tan(3)= -0.142546543074278
Tan(4)= 1.15782128234958
Tan(5)= -3.38051500624659
Tan(6)= -0.291006191384749
Tan(7)= 0.871447982724319
Tan(8)= -6.79971145522038
Tan(9)= -0.45231565944181
Atn(number)
Arctangent of number (number must be in radians)
Atn(0)= <% =Atn(0) %>
Atn(1)= <% =Atn(1) %>
Atn(2)= <% =Atn(2) %>
Atn(3)= <% =Atn(3) %>
Atn(10)= <% =Atn(10) %>
Atn(100)= <% =Atn(100) %>
Atn(1000)= <% =Atn(1000) %>
Arctangent of number (number must be in radians)
Atn(0)= 0
Atn(1)= 0.785398163397448
Atn(2)= 1.10714871779409
Atn(3)= 1.24904577239825
Atn(10)= 1.47112767430373
Atn(100)= 1.56079666010823
Atn(1000)= 1.56979632712823
Sqr(number)
Square of number (number must be positive)

Sqr(1)= <% =Sqr(1) %>
Sqr(4)= <% =Sqr(4) %>
Sqr(9)= <% =Sqr(9) %>
Sqr(16)= <% =Sqr(16) %>
Sqr(100)= <% =Sqr(100) %>

Square of number (number must be positive)

Sqr(1)= 1
Sqr(4)= 2
Sqr(9)= 3
Sqr(16)= 4
Sqr(100)= 10

Fix(number) and Int(number)
Integer portion of number.
Fix() and Int() will return different numbers for negative values. 

Fix(10.123456)= <% =Fix(10.123456) %>
Fix(10.999999)= <% =Fix(10.999999) %>
Fix(-10.123456)= <% =Fix(-10.123456) %>

Int(10.123456)= <% =Int(10.123456) %>
Int(10.999999)= <% =Int(10.999999) %>
Int(-10.123456)= <% =Int(-10.123456) %>

Integer portion of number.
Fix() and Int() will return different numbers for negative values. 

Fix(10.123456)= 10
Fix(10.999999)= 10
Fix(-10.123456)= -10

Int(10.123456)= 10
Int(10.999999)= 10
Int(-10.123456)= -11

Log(number)
Natural logarithm of number

Log(10)= <% =Log(10) %>
Log(100)= <% =Log(100) %>
Log(1000)= <% =Log(1000) %>

Natural logarithm of number

Log(10)= 2.30258509299405
Log(100)= 4.60517018598809
Log(1000)= 6.90775527898214

Round(number) and Round(number,decimals)
Number rounded to an integer

Round(2.123)= <% =Round(2.123) %>
Round(2.987)= <% =Round(2.987) %>

Number rounded to indicated decimal places

Round(2.123, 1)= <% =Round(2.123, 1) %>
Round(2.987, 2)= <% =Round(2.987, 2) %>

Number rounded to an integer

Round(2.123)= 2
Round(2.987)= 3

Number rounded to indicated decimal places

Round(2.123, 1)= 2.1
Round(2.987, 2)= 2.99

Hex(number) and Oct(number)
Conversion of number form base 10 to hexadecimal

Hex(15)= <% =Hex(15) %>
Hex(16)= <% =Hex(16) %>
Hex(4095)= <% =Hex(4095) %>
Hex(4096)= <% =Hex(4096) %>

Conversion of number form base 10 to octadecimal

Oct(7)= <% =Oct(7) %>
Oct(8)= <% =Oct(8) %>
Oct(4095)= <% =Oct(4095) %>
Oct(4096)= <% =Oct(4096) %>

Conversion of number form base 10 to hexadecimal

Hex(15)= F
Hex(16)= 10
Hex(4095)= FFF
Hex(4096)= 1000

Conversion of number form base 10 to octadecimal

Oct(7)= 7
Oct(8)= 10
Oct(4095)= 7777
Oct(4096)= 10000

Exp(number)
e raised to the power number
Exp(0)= <% =Exp(0) %>
Exp(1)= <% =Exp(1) %>
Exp(2)= <% =Exp(2) %>
Exp(3)= <% =Exp(3) %>
e raised to the power number
Exp(0)= 1
Exp(1)= 2.71828182845905
Exp(2)= 7.38905609893065
Exp(3)= 20.0855369231877
Sgn(number)
Is the number positive or negative?
   If positive value will be 1
   If negative value will be -1
   If number is 0, value will be 0

Sgn(2)= <% =Sgn(2) %>
Sgn(1)= <% =Sgn(1) %>
Sgn(0)= <% =Sgn(0) %>
Sgn(-1)= <% =Sgn(-1) %>
Sgn(-2)= <% =Sgn(-2) %>

Is the number positive or negative?
   If positive value will be 1
   If negative value will be -1
   If number is 0, value will be 0

Sgn(2)= 1
Sgn(1)= 1
Sgn(0)= 0
Sgn(-1)= -1
Sgn(-2)= -1


 

AspTutorial.info.