- 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
Samual Sam has Published 2492 Articles
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
30 Views
The lcg_value() function Returns a pseudo random number in the range 0 - 1Syntaxlcg_value()ParametersReturnThe lcg_value() function Returns a pseudo random float value in the range 0 - 1.Example Live DemoOutput0.42510822828987Let us see another example generating different values every time lgc_value() function is used.Example Live DemoOutput0.0016752472603958 0.95593815480995 0.57392418877843 0.1374706663408Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
50 Views
The mt_srand() function seeds the Mersenne Twister random number generator.Note − Random number generator is seeded automatically after the release of PHP 4.2.0. This function is not needed now.Syntaxmt_srand(seed)Parametersseed − The seed valueReturnThe mt_srand() function Returns nothing.Example Live DemoOutput1320295657
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
78 Views
The deg2rad() function converts degree to radian value. It Returns the radian equivalent of the specified degree value.Syntaxdeg2rad(num)Parametersnum − The degree value to be converted to radian.ReturnThe deg2rad() function Returns the radian equivalent of the specified degree value.Example Live DemoOutput360 degrees converted to 6.2831853071796 radians!Let us see another example −Example Live DemoOutput0.785398163397451.57079632679493.14159265358984.71238898038476.2831853071796Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
29 Views
The expm1() function Returns e raised to the power x - 1 i.eex -1Syntaxexpm1(val)Parametersval − This is the powerReturnThe expm1() function Returns e raised to the power x - 1Example Live DemoOutput01.718281828459Let us see another example −Example Live DemoOutpute^1-1 = 1.718281828459
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
146 Views
The fmod() function Returns the modulo of dividend/ divisor. Floating modulo in fmod.Syntaxfmod(dividend/ divisor)Parametersdividend − The number to be divided.divisor − This is the number that divides.ReturnThe fmod() function Returns the remainder of dividend/ divisor.Example Live DemoOutput3
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
65 Views
The hypot() function is used to calculate the hypotenuse of a right-angle triangle. It Returns the length of the hypotenuse in float. Of a right-angled triangle, the longest side is hypotenuse.Syntaxhypot(a, b)Parametersa − Length of first sideb − Length of second sideReturnThe hypot() function Returns the length of the hypotenuse ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
32 Views
The is_infinite() function checks if a value is infinite or not. It Returns true if num is an infinite number, else it Returns false.Syntaxis_infinite(num)Parametersnum − The number to be checked.ReturnThe is_infinite() function Returns true if num is an infinite number, else it Returns false.ExampleExample Live DemoOutput1Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
34 Views
The dechex() function converts decimal to hexadecimal. It Returns the hexadecimal string of the specified decimal.Syntaxdechex(num)Parametersnum − The decimal value to be convertedReturnThe dechex() function Returns the hexadecimal string of the specified decimal.Example Live DemoOutputf7c6
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
Samual Sam
203 Views
User replaceAll() method to replace all occurrences of a given string. Let’s say the following is our string.String str = "THIS IS DEMO LINE AND NEW LINE!";Here, we are replacing all occurrences of string “LINE” to “TEXT”str.replaceAll("LINE", "TEXT");The following is the final example.Example Live Demopublic class Demo { public static void main(String[] args) { String str = "THIS ... Read More