Provided by: ocaml-man_4.08.1-8_all

**NAME**

Stdlib.Int32 - no description

**Module**

Module Stdlib.Int32

**Documentation**

ModuleInt32:(moduleStdlib__int32)valzero:int32The 32-bit integer 0.valone:int32The 32-bit integer 1.valminus_one:int32The 32-bit integer -1.valneg:int32->int32Unary negation.valadd:int32->int32->int32Addition.valsub:int32->int32->int32Subtraction.valmul:int32->int32->int32Multiplication.valdiv:int32->int32->int32Integer division. RaiseDivision_by_zeroif the second argument is zero. This division rounds the real quotient of its arguments towards zero, as specified for(/).valunsigned_div:int32->int32->int32Same asInt32.div, except that arguments and result are interpreted as unsigned 32-bit integers.Since4.08.0valrem:int32->int32->int32Integer remainder. Ifyis not zero, the result ofInt32.remxysatisfies the following property:x=Int32.add(Int32.mul(Int32.divxy)y)(Int32.remxy). Ify=0,Int32.remxyraisesDivision_by_zero.valunsigned_rem:int32->int32->int32Same asInt32.rem, except that arguments and result are interpreted as unsigned 32-bit integers.Since4.08.0valsucc:int32->int32Successor.Int32.succxisInt32.addxInt32.one.valpred:int32->int32Predecessor.Int32.predxisInt32.subxInt32.one.valabs:int32->int32Return the absolute value of its argument.valmax_int:int32The greatest representable 32-bit integer, 2^31 - 1.valmin_int:int32The smallest representable 32-bit integer, -2^31.vallogand:int32->int32->int32Bitwise logical and.vallogor:int32->int32->int32Bitwise logical or.vallogxor:int32->int32->int32Bitwise logical exclusive or.vallognot:int32->int32Bitwise logical negation.valshift_left:int32->int->int32Int32.shift_leftxyshiftsxto the left byybits. The result is unspecified ify<0ory>=32.valshift_right:int32->int->int32Int32.shift_rightxyshiftsxto the right byybits. This is an arithmetic shift: the sign bit ofxis replicated and inserted in the vacated bits. The result is unspecified ify<0ory>=32.valshift_right_logical:int32->int->int32Int32.shift_right_logicalxyshiftsxto the right byybits. This is a logical shift: zeroes are inserted in the vacated bits regardless of the sign ofx. The result is unspecified ify<0ory>=32.valof_int:int->int32Convert the given integer (typeint) to a 32-bit integer (typeint32). On 64-bit platforms, the argument is taken modulo 2^32.valto_int:int32->intConvert the given 32-bit integer (typeint32) to an integer (typeint). On 32-bit platforms, the 32-bit integer is taken modulo 2^31, i.e. the high-order bit is lost during the conversion. On 64-bit platforms, the conversion is exact.valunsigned_to_int:int32->intoptionSame asInt32.to_int, but interprets the argument as an unsigned integer. ReturnsNoneif the unsigned value of the argument cannot fit into anint.Since4.08.0valof_float:float->int32Convert the given floating-point number to a 32-bit integer, discarding the fractional part (truncate towards 0). The result of the conversion is undefined if, after truncation, the number is outside the range [Int32.min_int,Int32.max_int].valto_float:int32->floatConvert the given 32-bit integer to a floating-point number.valof_string:string->int32Convert the given string to a 32-bit integer. The string is read in decimal (by default, or if the string begins with0u) or in hexadecimal, octal or binary if the string begins with0x,0oor0brespectively. The0uprefix reads the input as an unsigned integer in the range[0,2*Int32.max_int+1]. If the input exceedsInt32.max_intit is converted to the signed integerInt32.min_int+input-Int32.max_int-1. The_(underscore) character can appear anywhere in the string and is ignored. RaiseFailureInt32.of_stringif the given string is not a valid representation of an integer, or if the integer represented exceeds the range of integers representable in typeint32.valof_string_opt:string->int32optionSame asof_string, but returnNoneinstead of raising.Since4.05valto_string:int32->stringReturn the string representation of its argument, in signed decimal.valbits_of_float:float->int32Return the internal representation of the given float according to the IEEE 754 floating-point 'single format' bit layout. Bit 31 of the result represents the sign of the float; bits 30 to 23 represent the (biased) exponent; bits 22 to 0 represent the mantissa.valfloat_of_bits:int32->floatReturn the floating-point number whose internal representation, according to the IEEE 754 floating-point 'single format' bit layout, is the givenint32.typet=int32An alias for the type of 32-bit integers.valcompare:t->t->intThe comparison function for 32-bit integers, with the same specification ascompare. Along with the typet, this functioncompareallows the moduleInt32to be passed as argument to the functorsSet.MakeandMap.Make.valunsigned_compare:t->t->intSame asInt32.compare, except that arguments are interpreted as unsigned 32-bit integers.Since4.08.0valequal:t->t->boolThe equal function for int32s.Since4.03.0