Found 33676 Articles for Programming

lcg_value() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:51:36

73 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.1374706663408

is_nan() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:51:50

88 Views

The is_nan() function checks for ‘not a number’ value. It Returns TRUE if num is 'not a number', else FALSE is Returned.Syntaxis_nan(num)Parametersnum − The value to checkReturnThe is_nan() function Returns TRUE if num is 'not a number', else FALSE is Returned.ExampleLet us see another example −Example

is_infinite() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:44:22

93 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 DemoOutput1

is_finite() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:45:33

65 Views

The is_finite() function checks if a value is finite or not. It Returns true if num is a finite number, else it Returns false.Syntaxis_finite(num)Parametersnum − The number to be checked.ReturnThe is_finite() function Returns true if num is a finite number, else it Returns false.Example Live DemoOutput1Let us see another example −Example Live DemoOutput

hypot() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:45:55

115 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 in float.Example Live DemoOutput8.24621125123538.5440037453175

hexdec() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:46:17

124 Views

The hexdec() function converts hexadecimal number to decimal number.Syntaxhexdec(val)Parametersval − The hexadecimal to be converted.ReturnThe hexdec() function Returns the decimal value of val, which is hexadecimal.Example Live DemoOutput1314735

fmod() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:46:50

218 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

floor() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:47:17

176 Views

The ceil() function rounds a number down to the nearest integer.Syntaxfloor(num)Parametersnum − The number to round upReturnThe floor() function Returns the value rounded up to the nearest (down) integer.Example Live DemoOutput0 0Let us see another example −Example Live DemoOutput9Let us see another example −Example Live DemoOutput7 -5

expm1() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:47:39

72 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

exp() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:48:06

98 Views

The exp() function Returns ex. This is e raised to the power x.Here,'e' is 2.718282 x is the powerSyntaxexp(x)Parametersx = The exponentReturnThe exp() function Returns e raised to the power of x, which is a float value.Example Live DemoOutput12.718281828459Let us see another example −Example Live DemoOutput7.3890560989307148.41315910258485165195.40979

Advertisements