Potato
Chat with our AI personalities
There are 8 bytes in a double
double precise = 1.09388641;
You declare a floating point variable using the float or double keyword for a single- or double-precision floating point variable, respectively:float a;double b;You reference a floating-point variable just like any other scalar variable by using the variable's name in a compatible expression, e.g.a += 2;b /= a;Floating point literals use a period for the decimal point, no "thousands separator," and use the letter 'e' to denote a power of ten, e.g.a = 0.123;b = 123e-3;Both a and b now have the same value, 123 times 10 to the power of -3 (which equals 0.123).
AnswerYes, it can. For instance, if your function returns double you can assign the function call to a variable of type double.AnswerNo, only the returned value, of course.
This answer applies to programming languages in general. The equals sign is used for assignment. For example, the code "$variable = 1" assigns the value of 1 to the variable $variable. If you want to test whether values are the same (equality) the double equals sign is used. For example, when you want to verify that $variable has been assigned the value of 1 you would use: $variable == 1