Found 34494 Articles for Programming

floor() function in PHP

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

124 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

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

exp() function in PHP

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

48 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

deg2rad() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:48:34

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.2831853071796

decoct() function in PHP

karthikeya Boyini
Updated on 26-Jun-2020 09:49:13

38 Views

The decoct() function converts a decimal number to an octal. It Returns an octal string of the specified decimal.Syntaxdecoct(num)Parametersnum − The decimal value to convert.ReturnThe decoct() function Returns an octal string of the specified decimal.Example Live DemoOutput106Let us see another example −Example Live DemoOutput72547141460

dechex() function in PHP

Samual Sam
Updated on 26-Jun-2020 09:41:43

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

decbin() function in PHP

karthikeya Boyini
Updated on 26-Dec-2019 10:38:57

62 Views

The decbin() function converts a decimal number to binary number.Syntaxdecbin(num)Parametersnum − Specifies a number to be converted to binary.ReturnThe decbin() function Returns a string representing the binary number of the decimal value.Example Live DemoOutput111100011001ExampleLet us see another example − Live DemoOutput1100011

cosh() function in PHP

Samual Sam
Updated on 26-Dec-2019 10:35:17

81 Views

The cosh() function Returns the hyperbolic cosine of a number. The value Returned is a floating point number.Syntaxcosh(num)Parametersnum − Specifies a number in radiansReturnThe cosh() function Returns the hyperbolic cosine of a number. The value Returned is a floating point number.Example Live DemoOutput1.54308063481521.5430806348152ExampleLet us see another example − Live DemoOutput1Example Live DemoOutput11.591953275522267.74676148375

cos() function in PHP

karthikeya Boyini
Updated on 26-Dec-2019 10:34:00

78 Views

The cos() function Returns the cosine of a number. A numeric value between -1 and 1 is Returned representing the cosine of the angle.Syntaxcos(num)Parametersnum − The specified value in radiansReturnThe cos() function Returns cosine of a number in float. A numeric value between -1 and 1 is Returned representing the cosine of the angle.Example Live DemoOutput0.540302305868140.54030230586814ExampleLet us see another example − Live DemoOutput1

ceil() function in PHP

Samual Sam
Updated on 26-Dec-2019 10:32:49

190 Views

The ceil() function rounds a number to the nearest integer. The value is rounded up to the nearest greatest integer.Syntaxceil(num)Parametersnum − The number to round upReturnThe ceil() function Returns the value rounded up to the nearest (up) integer.Example Live DemoOutput11ExampleLet us see another example − Live DemoOutput2ExampleLet us see another example − Live DemoOutput9-9

Advertisements