- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 8895 Articles for Front End Technology
2K+ Views
To calculate the ln of a given number, use the Math.log() method in JavaScript. This method returns the natural logarithm (base E) of a number. If the value of a number is negative, the return value is always NaN.ExampleYou can try to run the following code to get the ln of a given number − JavaScript Math log() Method var value = Math.log(2); document.write("Value : " + value );
461 Views
In this tutorial, we will learn how to get the cosine of a number in JavaScript. The cosine cos (x) function is a fundamental function used in trigonometry (the others being the cosecant, cotangent, secant, sine, and tangent). The cosine of an angle is commonly defined as the ratio between the lengths of the side of the triangle adjacent to the angle and the hypotenuse, i.e., cos x = (adjacent/hypotenuse). Let theta be a counter-clockwise angle measured from the x-axis along the arc of the unit circle then the arc termination’s horizontal location called cos (theta). Following are the methods ... Read More
3K+ Views
In this tutorial, we will learn how to get the smallest integer greater than or equal to a number in JavaScript. To get the smallest integer greater than or equal to a number, use the JavaScript Math.ceil() method. This method returns the smallest integer greater than or equal to a given number. In other words, the Math.ceil() method rounds a number and returns an integer result. Because the ceil() method is a static function of the Math object, it must be invoked via the Math placeholder object. The ceil() method produces the lowest integer value that is bigger than or ... Read More
144 Views
In this tutorial, we will learn how to get the arctangent of the quotient of its arguments in JavaScript. The JavaScript math object has several constants and methods for performing mathematical operations. It does not have constructors, unlike the date object. JavaScript Math is one of the built-in objects that contains attributes and methods for mathematical constants and functions, as well as methods for executing mathematical operations. It is neither a function nor a function object. Because Math's properties and methods are static, you can refer to it as an object without constructing it. Following are the ways to find ... Read More
149 Views
In this tutorial, we will learn how to get the arctangent (in radians) of a number in JavaScript. We can use the JavaScript Math object to perform mathematical operations on integers. Math is a pre-defined object with attributes and methods to perform different mathematical functions and constants. This isn't a function object. Math functions work with the Number data type, and it is incompatible with BigInt. Math, unlike many other global objects, does not have a function Object(). Math's methods and properties are all fixed. The Math.PI represents the constant pi, while the sine function is also referred to as ... Read More
186 Views
This tutorial will help you to find the arcsine in radians of a number in JavaScript. Sine is the ratio of the opposite side and hypotenuse of the right triangle they define. To get the sine of a number, the Math.sin() function is used in JavaScript. It returns a value between 1 and -1. This represents the sine of an angle. This will be in radians. The inverse of sine is called Arc sine. An angle's trigonometric Arc sine value can be calculated using asin() method. This returns a value between -π/2 and π/2. The input to asin() method is ... Read More
171 Views
This tutorial will help you to find the arccosine in radians of a number in JavaScript. Cosine is the ratio of the adjacent side and the hypotenuse of the right-angled triangle which is defined by them. To get the cosine of a number, the Math.cos() function is used in JavaScript. The value returned will be between -1 and 1. This denotes the cosine of an angle. This will be in radians. The inverse of cosine is called Arc cosine. An angle's trigonometric Arc cosine value can be calculated using acos() method. This returns a value between 0.0 and pi. The ... Read More
833 Views
In this tutorial, we shall learn to get the square root of 2 in JavaScript. The square root of 2 is an irrational number, and it is called Pythagoras's constant. We can’t denote it in fractions, and it has an infinite number of decimals; hence, we can’t find its exact value. The √2 value is 1.414. HTML encoding of the square root symbol in JavaScript is √. Next, we will discuss the available method to find the square root of 2. Using Math object's SQRT2 property In this part, we will see how the SQRT2 property of the Math object ... Read More
2K+ Views
In this tutorial, we will learn how to get the value of PI in JavaScript. The PI is a mathematical constant that is widely used in different sections of mathematics. It is defined by the ratio of the circumference of a circle to its diameter, which is approximately 3.14159. It is represented by the symbol ‘𝜋’, which is a Greek letter. The value of PI is an Irrational number, which means the value of the PI can’t be expressed as a fraction, and the digits that came after the decimal is non−terminating and non−repeating. The value of PI in JavaScript ... Read More
84 Views
To get base 10 logarithms of E, use the Math LOG10E property. It returns base 10 logarithm of E which is approximately 0.434.ExampleYou can try to run the following code to get base 10 logarithms of E in JavaScript − JavaScript Math LOG10E Property var property_value = Math.LOG10E document.write("Property Value: " + property_value);