English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2010-01-05 (12:59)
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.