![]() ![]() This operator is not as well defined for negative operands, but it will execute faster. Note that when use integer is in scope, "%" gives you direct access to the modulo operator as implemented by your C compiler. 45-0918 1 Quart (0.94 liter) Air Line Oil 45-0919 1 US Gallon (3.78 liter) Air Line Oil Parameter Description Air Hose Minimum inside diameter: 1/4' (4.8mm) Maximum length: 8.0 (2.4 m) Working pressure range Performance rated at: 90 psi (620 kPa) Compressed air Air quality according to ISO 8573-1, quality class 2.4.3 The compressed air must be. If the absolute value of the right operand ( abs($n)) is greater than or equal to (UV_MAX + 1), "%" computes the floating-point remainder $r in the equation ($r = $m - $i*$n) where $i is a certain integer that makes $r have the same sign as the right operand $n ( not as the left operand $m like C function fmod()) and the absolute value less than that of $n. If the operands $m and $n are floating point values and the absolute value of $n (that is abs($n)) is less than (UV_MAX + 1), only the integer portion of $m and $n will be used in the operation (Note: here UV_MAX means the maximum of the unsigned integer type). If $n is negative, then $m % $n is $m minus the smallest multiple of $n that is not less than $m (that is, the result will be less than or equal to zero). Given integer operands $m and $n : If $n is positive, then $m % $n is $m minus the largest multiple of $n less than or equal to $m. Like all operators, it is documented in perldoc perlop, which says:īinary "%" is the modulo operator, which computes the division remainder of its first argument with respect to its second argument. ![]() ![]() In general, the modulus will give you an integer between 0 and one less than the right-hand operand in the expression. When you divide an integer by 2, you get a remainder of 0 (if the number is even) or 1 (if the number is odd). You saw it being used to work out if a number is odd or even. The modulus operator gives you the remainder from an integer division. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |