sandygao    2003/02/17 05:45:57

  Modified:    java/src/org/apache/xerces/impl/dv/xs DoubleDV.java
                        FloatDV.java
  Log:
  Schema erratum E2-40:
  NaN in float and double equals itself, and isn't comparable with any other value.
  
  Revision  Changes    Path
  1.6       +6 -6      xml-xerces/java/src/org/apache/xerces/impl/dv/xs/DoubleDV.java
  
  Index: DoubleDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs/DoubleDV.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DoubleDV.java     20 Nov 2002 23:43:46 -0000      1.5
  +++ DoubleDV.java     17 Feb 2003 13:45:57 -0000      1.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -148,12 +148,12 @@
                   // this = NaN = other
                   if (oval != oval)
                       return 0;
  -                // this is this = NaN > other
  -                return 1;
  +                // this is NaN <> other
  +                return INDETERMINATE;
               }
   
  -            // this < NaN = other
  -            return -1;
  +            // other is NaN <> this
  +            return INDETERMINATE;
           }
   
           private String canonical;
  
  
  
  1.6       +7 -7      xml-xerces/java/src/org/apache/xerces/impl/dv/xs/FloatDV.java
  
  Index: FloatDV.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs/FloatDV.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FloatDV.java      20 Nov 2002 23:43:46 -0000      1.5
  +++ FloatDV.java      17 Feb 2003 13:45:57 -0000      1.6
  @@ -2,7 +2,7 @@
    * The Apache Software License, Version 1.1
    *
    *
  - * Copyright (c) 2001, 2002 The Apache Software Foundation.  All rights
  + * Copyright (c) 2001-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -148,12 +148,12 @@
                   // this = NaN = other
                   if (oval != oval)
                       return 0;
  -                // this is this = NaN > other
  -                return 1;
  +                // this is NaN <> other
  +                return INDETERMINATE;
               }
  -            
  -            // this < NaN = other
  -            return -1;
  +
  +            // other is NaN <> this
  +            return INDETERMINATE;
           }
   
           private String canonical;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to