perl 8 == length(pack "J") or die; $b = 1<<58; $c = $b + 1e-7; $d = $b + 1; warn join " ", $b, $c, $d, $b <=> $c, $c <=> $d, $b <=> $d; __END__ 288230376151711744 2.88230376151712e+017 288230376151711745 0 0 -1 at - line 3. When you numeric compare an integer and a floating point number, perl seems to convert the integer to a float and then compares the two floats. If IVs are 64 byte sized, this can cause two values that are numerically unequal to compare equal, namely $c and $d here. The result is the numeric equality, as understood by perl, isn't transitive: here $c is equal to both $b and $d, but $b is not equal to $d. Is this a feature or a bug? Can it cause problems, eg. when you numerically sort lists that contain such values, or when you otherwise handle numerical data? -- AmbrusThread Next