Home My Page Projects Code Snippets Project Openings SML/NJ Bugs
Summary Activity Tracker Lists

[#107] Bug of Int64 comparison

Date:
2012-10-13 13:15
Priority:
5
State:
Closed
Submitted by:
Bug Submitter (webuser)
Assigned to:
Matthias Blume (blume)
Machine Architecture:
Other
Operating System:
All
Component:
SML/NJ Library
Resolution:
Fixed
Severity:
Critical
OS Version:
debian testing
SML/NJ Version:
110.74
Keywords:
Int64 comparison
URL:
Transcript (of reproduction):
raffalli@delli7:~/Caml/caml-shift$ uname -a Linux delli7 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux raffalli@delli7:~/Caml/caml-shift$ sml Standard ML of New Jersey v110.74 [built: Sun Feb 19 03:57:22 2012] - open Int64; [autoloading] [library $SMLNJ-BASIS/basis.cm is stable] [autoloading done] opening Int64 type int = Int64.int val precision : Int31.int option val minInt : int option val maxInt : int option val toLarge : int - IntInf.int val fromLarge : IntInf.int - int val toInt : int - Int31.int val fromInt : Int31.int - int val ~ : int - int val + : int * int - int val - : int * int - int val * : int * int - int val div : int * int - int val mod : int * int - int val quot : int * int - int val rem : int * int - int val min : int * int - int val max : int * int - int val abs : int - int val sign : int - Int31.int val sameSign : int * int - bool val : int * int - bool val = : int * int - bool val : int * int - bool val = : int * int - bool val compare : int * int - order val toString : int - string val fromString : string - int option val scan : StringCvt.radix - (char,a) StringCvt.reader - (int,a) StringCvt.reader val fmt : StringCvt.radix - int - string - ~2 0; val it = true : bool
Source (for reproduction):
~2 0
Summary:
Bug of Int64 comparison

Detailed description
the Greater then operator on Int64 is completely wrong !

~2 0 is true !!!! (the same for all comparison negative positive)

Submitted via web form by Christophe Raffalli raffalli@univ-savoie.fr

Comments:

Message  ↓
Date: 2012-10-20 18:41
Sender: John Reppy

Fixed for 110.76

Date: 2012-10-14 13:34
Sender: John Reppy

Int64.compare works, but the infix comparisons fail when the signs of the arguments differ.

Attached Files:

Changes

Field Old Value Date By
ResolutionNone2012-10-20 18:41jhr
status_idOpen2012-10-20 18:41jhr
close_date2012-10-20 18:412012-10-20 18:41jhr
priority32012-10-14 13:34jhr
assigned_tonone2012-10-14 13:34jhr
Operating SystemLinux2012-10-14 13:34jhr