Provided by: ocaml-nox_4.02.3-5ubuntu2_amd64

**NAME**

Int32 - 32-bit integers.

**Module**

Module Int32

**Documentation**

ModuleInt32:sigend32-bit integers. This module provides operations on the typeint32of signed 32-bit integers. Unlike the built-ininttype, the typeint32is guaranteed to be exactly 32-bit wide on all platforms. All arithmetic operations overint32are taken modulo 2^{32. Performance notice: values of typeint32occupy more memory space than values of typeint, and arithmetic operations onint32are generally slower than those onint. Useint32only when the application requires exact 32-bit arithmetic.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 forPervasives.(/).valrem: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.valsucc: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 negationvalshift_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).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.valof_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 in hexadecimal, octal or binary if the string begins with0x,0oor0brespectively. RaiseFailureint_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.valto_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 asPervasives.compare. Along with the typet, this functioncompareallows the moduleInt32to be passed as argument to the functorsSet.MakeandMap.Make.===Deprecatedfunctions===valformat:string->int32->stringDo not use this deprecated function. Instead, usedPrintf.sprintfwith a%l...format.