Version française
Home     About     Download     Resources     Contact us    
Browse thread
2147483648l < 2147483647l
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Matej Kosik <kosik@f...>
Subject: 2147483648l < 2147483647l
Hello,

I am sorry, I have a stupid question.
I would like to ask if this:

	# 2147483648l < 2147483647l;;
	- : bool = true

should not regarded as a bug. In my project I need Int32 value and above
behavior surprised me. Value

	2147483648l

should not be allowed at all because it cannot be encoded to 32-bit
signed integer encoded with 2's complement representation.

Thanks in advance for help.