Found 2418 Articles for HTML

Math.tanh() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:44:07

31 Views

The tanh() function of the Math object accepts an angle (in radians) and returns its hyperbolic tangent value.SyntaxIts Syntax is as followsMath.tanh(90)Example Live Demo    JavaScript Example           var result = Math.tanh(90);       document.write("Hyperbolic tangent value of the given angle: "+result);     OutputHyperbolic tangent value of the given angle: 1

Math.sinh() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:34:10

32 Views

The sinh() function of the Math object accepts an angle (in radians) and returns its hyperbolic sine value.SyntaxIts Syntax is as followsMath.sinh(90)Example Live Demo    JavaScript Example           var result = Math.sinh(90);       document.write("Hyperbolic sine value of the given angle: "+result);     OutputHyperbolic sine value of the given angle: 6.102016471589204e+38

Math.cosh() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:35:37

32 Views

The cosh() function of the Math object accepts an angle (in radians) and returns its hyperbolic cosine value.SyntaxIts Syntax is as followsMath.cosh(90)Example Live Demo    JavaScript Example           var result = Math.cosh(90);       document.write("Hyperbolic cosine value of the given angle: "+result);     OutputHyperbolic cosine value of the given angle: 6.102016471589204e+38

Math.trunc() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:37:50

68 Views

The trunc() function of the Math object accepts a number and returns its integral point (excluding the fractional part). If the given number itself is an integer this function returns the same.SyntaxIts Syntax is as followsMath.trunc();Example Live Demo    JavaScript Example           var result = Math.trunc(58.745);       document.write("Integral part of the given number: "+result);     OutputIntegral part of the given number: 58

Math.sqrt() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 12:38:10

71 Views

The sqrt() function of the Math object accepts a number and returns the square root value of the given number.SyntaxIts Syntax is as followsMath.sqrt();Example Live Demo    JavaScript Example           var result = Math.sqrt(169);       document.write("Square root value of the given number: "+result);     OutputSquare root value of the given number: 13

Math.sign() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:38:31

74 Views

The sign() function of the Math object accepts an integer number and returns its sign.(positive, negative)If the given number is a positive integer then, this function returns +1.And, if the given number is a negative integer then, this function returns -1.SyntaxIts Syntax is as followsMath.sign();Example Live Demo    JavaScript Example           var result = Math.sign(-128);       document.write("Result: "+result);     OutputResult: -1

Math.round() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 12:38:53

124 Views

The round() function of the Math object accepts a floating point random number and returns its nearest integer value.If the given number is x.5 or more this function returns the next number (x+1)If the given number is x.4 or less this function returns the previous number (x-1).If the given number itself is an integer this function returns the same.SyntaxIts Syntax is as followsMath.round();Example Live Demo    JavaScript Example           var result = Math.round(2541.542);       document.write("Rounded value of the given number: "+result);     OutputRounded value of the given number: 2542

Math.log2() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:27:45

52 Views

The log2() function of the Math object accepts a number and returns the natural logarithm (base 2) of the given number.SyntaxIts Syntax is as followsMath.log2(48);Example Live Demo    JavaScript Example           var result = Math.log2(48);       document.write("Result: "+result);     OutputResult: 5.584962500721156

Math.log1p() function in JavaScript

karthikeya Boyini
Updated on 25-Jun-2020 12:28:08

45 Views

The log1p() function of the Math object accepts a number and returns the natural logarithm (base E) of the (given number+1).SyntaxIts Syntax is as followsMath.log1p(48);Example Live Demo    JavaScript Example           var result = Math.log1p(48);       document.write("Result: "+result);     OutputResult: 3.8918202981106265

Math.log10() function in JavaScript

Samual Sam
Updated on 25-Jun-2020 12:28:31

99 Views

The log10() function of the Math object accepts a number and returns the natural logarithm (base 10) of the given number.SyntaxIts Syntax is as followsMath.log10(48);Example Live Demo    JavaScript Example           var result = Math.log10(48);       document.write("Result: "+result);     OutputResult: 1.6812412373755872

Advertisements