Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.95k stars 554 forks source link

Integer math occurring when not expected #6826

Closed p5pRT closed 11 years ago

p5pRT commented 21 years ago

Migrated from rt.perl.org#24160 (status was 'resolved')

Searchable as RT24160$

p5pRT commented 21 years ago

From wasquith@red1ast.cr.usgs.gov

This is a bug report for perl from wasquith@​red1ast.cr.usgs.gov\, generated with the help of perlbug 1.34 running under perl v5.8.1.

#!/usr/bin/perl -w

=head1 BUG REPORT -- INTEGER MATH OCCURRING WHEN NOT EXPECTED

I have stumbled onto strange float/integer/string behavior on Perl5.8.0 and Perl5.8.1 that did not exist in prior Perls. I have read (see REFERENCES) that Numbers are better behaved in Perl5.8.+ and math is no longer purely floating point. I am certain that this change has a weakness.

=head2 CONTENTS OF REPORT

This text file discribes the "buggy" behavior--that I am convinced represents something important in Perl itself. In seemingly unpredicatable circumstances floats are suddently seen by Perl as integers--it is though the function 'int()' is wrapped around a scalar variable\, which should contain a floating point number or possibly a string of a floating point number.

The sudden conversion to integers appears unpredicatable\, and myself and many others are at a total loss as to what Perl is trying to do. The behavior is exhibited in at least four unrelated portions of code. I will discuss two here. But first background is needed.

=head2 BACKGROUND

I am sole author of a large +47k line interactive Perl/Tk based data graphing package called Tkg2. Tkg2 has about 1000 users and sees thousands of executions per day across the U.S. Geological Survey Water Resources Division. The software provides the paramount "corporate" package for our specialized data base needs in collecting hydrologic information for the United States.

The behavior that is described here is absolutely restricted to Perl5.8.+ We have years of perfect operation on Perl5.6 and prior Perls. The behavior is evident on both Solaris and Linux. This bug report is originating from my Linux development host. Tkg2 uses about 100 custom modules\, dynamic loading with SelfLoader\, and CPAN modules of Tk\, Date​::Calc\, Date​::Manip\, Storable\, File​::Spec\, Tk​::JPEG\, Tk​::Pod\, and a few others. I am able to provide you with Tkg2 and can demonstrate the behavior. I need to state up front that I have not yet reproduced behavior in smaller stand-alone scripts.

=head1 DEMONSTRATION OF BEHAVIOR

This section describes the behavior.

=head2 BEHAVIOR NUMBER 1

(I posted on this in comp.lang.perl.misc from home Numbers not acting like numbers on 09/30/2003 08​:57PM\, although I have been toying with behaviors and potential solutions ever since my upgrade to Perl5.8 in June 2003)

I have a log10 function. The function takes argument and returns log10 of the argument. The function has years of operation with Tkg2. Upon migration to Perl5.8.+ some values mysteriously begin testing as non-loggable (that is \<= 0). For example\, I have seen 0.1 fail the ternary hook in the function. However\, not all passes of 0.1 into the function fail\, but once failure does occur\, the value 0.1 is no longer loggable. It is though 0.1 suddenly becomes int(0.1) or zero. I have tried other log10 functions in different scopes\, without success. In the program operation\, the user can change the scalar containing the value 0.1 to another value say 0.3--things will work and then suddenly begin failing again.

  use constant logof10 => log(10);   sub log10 {   my $n = shift;   $n = "$n"; # THIS QUOTATION FIXES THE PROBLEM   # IMPORTANT HINT OF THINGS TO COME.   ($n \<= 0) ? undef : log($n)/logof10;   }

However\, I can FIX the problem by wrapping the double-quotation marks around the argument (as shown in the function). The function is not known to fail. We are told by Perl docs not to wrap "" around strings unless we have good reason--I fail to understand why I must in a function like this. Another way to fix the problem is to pack/unpack.

  $n = unpack("d"\,pack("d"\,$n));

See REFERENCES about wrapping quotation marks around values.

=head2 BEHAVIOR NUMBER 2

Tkg2 plots a log-log plot--a long stable feature. A sequence of transformation algorithms exists that converts a real-world value to log and then to page (screen) units for plotting purposes. The value passed in has an offset subtracted from it before transformation takes place.

The focus here is on the subtraction (but failure of negated addition also is seen).

I have provided source code snippet at tail of this file (commented on later).

Just to state upfront\, I can get rid of BEHAVIOR NUMBER 2 by wrapping the offset in double-quotes. Like BEHAVIOR NUMBER 1 and like I have to do in other locations of my code. Careful use of double-quotes can fix the problem in the four known locations in my code. My logic and algorithms are correct. The more disturbing aspect of the behaviors is that things work and then suddenly do not work. Perl appears to eventually become screwed up in runtime.

To move on\, as the user interacts with the plot\, changing nothing\, simple subtractionof two floats fails. I have included three diagnostic output streams to show the oddities. The first two diagnostics report the operations associated with the value 7.000 and an offset of 1.70.

**************************************************************************************

STREAM 1

The diagnostic stream for the first few redraws of the canvas for a specific value on the Y-axis is shown here.

I need to perform this computation​: 7.000 - 1.70 = 5.3

The computation is performed properly.

  # OUTPUT DEMONSTRATING STRANGE BEHAVIOR OF NUMBERS IN PERL5.8.0 AND PERL5.8.1   # A value ($val) is passed into the subroutine   # An offset ($offset) is to be subtracted from the $val   # $offset is passed into the subroutine via an object $self   # $offset is extracted via 'my $offset = $self->{-y}->{-logoffset};'   (1) Binary of 1.70 is 100011000111010011101100   (2) Binary of "1.70" is 10001100011101001110110000001100   (3) Binary of $offset within the object ($self) is 100011000111010011101100   (4) OFFSET to Binary and Back​: 1.7   (5) BEFORE SUBTRACTION OR NEGATED ADDITION   (6) $val = 7.000 $offset = 1.7 (both values appear ok)   (7) $val (no. and binary)​: 7.000 1110110001110100000011000000110000001100   (8) $offset (no. and binary)​: 1.7 100011000111010011101100   (9) printf (as floats)​: $val = 7.000000 $offset = 1.700000   (10) Setting $newval = $val   (11) Subtracting 1.7 from 7.000 via $val-=$offset   (12) Subtracting 1.7 from 7.000 via $yaval1-="$offset" (notice double quotes)   (13) Adding -1.000000000000000*$offset to $val to get $yaval2 (yet another value 2)   (14) Adding -1.000000000000001*$offset to $val to get $yaval3 (yet another value 3)   (15) AFTER SUBTRACTION OR NEGATED ADDITION   (16) printf (as floats)​: $val = 5.300000 $offset = 1.700000   (17) printf (as floats)​: $yaval1 = 5.300000   (18) printf (as floats)​: $yaval2 = 5.300000   (19) printf (as floats)​: $yaval3 = 5.300000   (20) $val - $offset = 5.3 Offset = 1.7   (21) $offset (no. and binary)​: 1.7 100011000111010011101100   (22) $val (no. and binary)​: 5.3 101011000111010011001100   (23) $yaval1 (no. and binary)​: 5.3 101011000111010011001100   (24) $yaval2 (no. and binary)​: 5.3 101011000111010011001100   (25) $yaval3 (no. and binary)​: 5.3 101011000111010011001100   # Note that all vals should be the same

COMMENTS ABOUT STREAM 1​: Lines 22-25 all show the offsetted value of 5.3. This is the correct value and everyone is happy. I have included binary representations in attempts to understand Perl number -- string issues. **************************************************************************************

**************************************************************************************

STREAM 2

After some double clicking on the Y axis hitting OK and then double clicking on the X axis and hitting OK. The exact same values (value and offset) are passed into the subroutine. (At least I am extremely convinced that nothing has changed in terms of the values that computations are needed on.)

We are still performing this computation​: 7.000 - 1.70 = 5.3

The computation does not work!

  # OUTPUT DEMONSTRATING STRANGE BEHAVIOR OF NUMBERS IN PERL5.8.0 AND PERL5.8.1   # A value ($val) is passed into the subroutine   # An offset ($offset) is to be subtracted from the $val   # $offset is passed into the subroutine via an object $self   # $offset is extracted via 'my $offset = $self->{-y}->{-logoffset};'   (1) Binary of 1.70 is 100011000111010011101100   (2) Binary of "1.70" is 10001100011101001110110000001100   (3) Binary of $offset within the object ($self) is 100011000111010011101100   (4) OFFSET to Binary and Back​: 1.7   (5) BEFORE SUBTRACTION OR NEGATED ADDITION   (6) $val = 7.000 $offset = 1.7 (both values appear ok)   (7) $val (no. and binary)​: 7.000 1110110001110100000011000000110000001100   (8) $offset (no. and binary)​: 1.7 100011000111010011101100   (9) printf (as floats)​: $val = 7.000000 $offset = 1.700000   (10) Setting $newval = $val   (11) Subtracting 1.7 from 7.000 via $val-=$offset   (12) Subtracting 1.7 from 7.000 via $yaval1-="$offset" (notice double quotes)   (13) Adding -1.000000000000000*$offset to $val to get $yaval2 (yet another value 2)   (14) Adding -1.000000000000001*$offset to $val to get $yaval3 (yet another value 3)   (15) AFTER SUBTRACTION OR NEGATED ADDITION   (16) printf (as floats)​: $val = 6.000000 $offset = 1.700000   (17) printf (as floats)​: $yaval1 = 5.300000   (18) printf (as floats)​: $yaval2 = 6.000000   (19) printf (as floats)​: $yaval3 = 5.300000   (20) $val - $offset = 6 Offset = 1.7   (21) $offset (no. and binary)​: 1.7 100011000111010011101100   (22) $val (no. and binary)​: 6 01101100   (23) $yaval1 (no. and binary)​: 5.3 101011000111010011001100   (24) $yaval2 (no. and binary)​: 6 01101100   (25) $yaval3 (no. and binary)​: 5.3 101011000111010011001100   # Note that all vals should be the same

COMMENTS ABOUT STREAM 2​: Lines 22-25 show two different values!!!! The value of 6 is just plain wrong and too far from 5.3 to blame on simple rounding problems. It is as though $val = $val - int($offset)???????????????? Note the minor change in "unity" multiplier in lines 13 and 14\, but very different output. You will need to inspect the code at the bottom of this file for more context.

**************************************************************************************

STREAM 3

Unlike streams 1 and 2\, which are captured for the value 7.000\, I can capture these errors. Note that hundreds of values are passed into the subroutine and the offset is properly subtracted. However\, in the thirteen values shown below\, the offset is converted to an integer\, and an integer results from the substraction. This is extremely alarming.

BACKGROUND​: $val=$yaval1=3.000 and $offset=1.7   ERROR​: $val-=$offset yields 2   HOWEVER​: $yaval1-="$offset" yields 1.3 !!

BACKGROUND​: $val=$yaval1=4.000 and $offset=1.7   ERROR​: $val-=$offset yields 3   HOWEVER​: $yaval1-="$offset" yields 2.3 !!

BACKGROUND​: $val=$yaval1=5.000 and $offset=1.7   ERROR​: $val-=$offset yields 4   HOWEVER​: $yaval1-="$offset" yields 3.3 !!

BACKGROUND​: $val=$yaval1=6.000 and $offset=1.7   ERROR​: $val-=$offset yields 5   HOWEVER​: $yaval1-="$offset" yields 4.3 !!

BACKGROUND​: $val=$yaval1=7.000 and $offset=1.7   ERROR​: $val-=$offset yields 6   HOWEVER​: $yaval1-="$offset" yields 5.3 !!

BACKGROUND​: $val=$yaval1=8.000 and $offset=1.7   ERROR​: $val-=$offset yields 7   HOWEVER​: $yaval1-="$offset" yields 6.3 !!

BACKGROUND​: $val=$yaval1=9.000 and $offset=1.7   ERROR​: $val-=$offset yields 8   HOWEVER​: $yaval1-="$offset" yields 7.3 !!

BACKGROUND​: $val=$yaval1=2 and $offset=1.7   ERROR​: $val-=$offset yields 1   HOWEVER​: $yaval1-="$offset" yields 0.3 !!

BACKGROUND​: $val=$yaval1=2 and $offset=1.7   ERROR​: $val-=$offset yields 1   HOWEVER​: $yaval1-="$offset" yields 0.3 !!

BACKGROUND​: $val=$yaval1=3 and $offset=1.7   ERROR​: $val-=$offset yields 2   HOWEVER​: $yaval1-="$offset" yields 1.3 !!

BACKGROUND​: $val=$yaval1=4 and $offset=1.7   ERROR​: $val-=$offset yields 3   HOWEVER​: $yaval1-="$offset" yields 2.3 !!

BACKGROUND​: $val=$yaval1=5 and $offset=1.7   ERROR​: $val-=$offset yields 4   HOWEVER​: $yaval1-="$offset" yields 3.3 !!

BACKGROUND​: $val=$yaval1=6 and $offset=1.7   ERROR​: $val-=$offset yields 5   HOWEVER​: $yaval1-="$offset" yields 4.3 !!

COMMENTS ABOUT STREAM 3​: Notice that the value "5" or "9.000" are either integers or look a lot like integers. In these circumstances\, the integer of the offset is then subtracted from the value. I think this is a B\ observation.

=head1 DESCRIPTION OF EXECUTABLE CODE PROVIDED IN REPORT

The code below should execute. The code will not exhibit the behavior as it reads in the C\<__DATA__> and performs the substraction. The contents of C\<__DATA__> are a pull from Tkg2 (my larger 2-D charting package). I placed a simple C\<print "$val\n"> in the subroutine to give you a feel for the values passed in. You will see the ERRORS embedded in the output immediately following the value that can not be properly substracted from. The ERRORS are deep in the C\<__DATA__>.

Now an important thing to know is that there are some "integer"-like values that are properly substracted from--this occurs because I have already wrapped the value in double-quotes before the subroutine is called. Let me assure you that I can remove these quotes and get all values that look like "1" or "1.000" to fail the substraction operation. The contents of __DATA__ should clearly show that a "bug" of sorts is not present?

=head1 CONCLUSIONS

I have tested\, toyed\, and tweaked code for months. Logically I have no bugs of my own causing this problem. I have years of proper operation with Perl5.6. I freely admit that historically I might be relying on Perl behavior that is no changed for a very good reason and I need to change the code. Wrapping a few double-quotations around values is not a large problem\, and I can work around. I certainly do not pretend to understand all of Perl\, but in the two behaviors discribed here--I believe I have provided sufficient evidence that something is not working as it should.

I believe that Perl5.8.+ is overly zealous in its attempts to perform integer math (see REFERENCES) for some reason with my program.

Because of the importance in this issue I am willing and able to continue coorespondence concerning this behavior. I can also provide screen shots as necessary.

THANKS\, William H. Asquith\, Ph.D.\, P.G.\, wasquith@​usgs.gov Research Hydrologist U.S. Geological Survey Austin\, Texas

=head1 REFERENCES

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ http​://www.perldoc.com/perl5.8.0/pod/perldelta.html#Understanding-of-Numbers

Understanding of Numbers

In general a lot of fixing has happened in the area of Perl's understanding of numbers\, both integer and floating point. Since in many systems the standard number parsing functions like strtoul() and atof() seem to have bugs\, Perl tries to work around their deficiencies. This results hopefully in more accurate numbers.

Perl now tries internally to use integer values in numeric conversions and basic arithmetics (+ - * /) if the arguments are integers\, and tries also to keep the results stored internally as integers. This change leads to often slightly faster and always less lossy arithmetics. (Previously Perl always preferred floating point numbers in its math.) +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ http​://www.perldoc.com/perl5.8.0/pod/perlfaq4.html \   #What's-wrong-with-always-quoting--%24vars--

The problem is that those double-quotes force stringification-- coercing numbers and references into strings--even when you don't want them to be strings. Think of it this way​: double-quote expansion is used to produce new strings. If you already have a string\, why do you need more?

If you get used to writing odd things like these​:

  print "$var"; # BAD   $new = "$old"; # BAD   somefunc("$var"); # BAD

You'll be in trouble. Those should (in 99.8% of the cases) be the simpler and more direct​:

  print $var;   $new = $old;   somefunc($var);

Otherwise\, besides slowing you down\, you're going to break code when the thing in the scalar is actually neither a string nor a number\, but a reference​:

  func(\@​array);   sub func {   my $aref = shift;   my $oref = "$aref"; # WRONG   }

You can also get into subtle problems on those few operations in Perl that actually do care about the difference between a string and a number\, such as the magical ++ autoincrement operator or the syscall() function.' +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

=cut

use vars qw($YMAX $YMIN $EPS ); # FAKE CODE TO MAKE EXECUTABLE SCRIPT

$YMAX = 0.1; # FAKE CODE TO MAKE EXECUTABLE SCRIPT $YMIN = 10; # FAKE CODE TO MAKE EXECUTABLE SCRIPT $EPS = 1e-8; # FAKE CODE TO MAKE EXECUTABLE SCRIPT

my $self = {}; # FAKE CODE TO MAKE EXECUTABLE SCRIPT   $self->{-y}->{-logoffset} = 1.70; # FAKE CODE TO MAKE EXECUTABLE SCRIPT my @​vals = (7\, 7.000\, 8.\, 1.38434\, 2.\, 23.453); # FAKE CODE TO MAKE EXECUTABLE SCRIPT

while(\) { # FAKE CODE TO MAKE EXECUTABLE SCRIPT   next if /ERROR/; # FAKE CODE TO MAKE EXECUTABLE SCRIPT   chomp; # FAKE CODE TO MAKE EXECUTABLE SCRIPT   my $returned = transReal2CanvasGLOBALS_Yonly($self\,'log'\,0\,$_);   # FAKE CODE TO MAKE EXECUTABLE SCRIPT } # FAKE CODE TO MAKE EXECUTABLE SCRIPT

sub transReal2CanvasGLOBALS_Yonly { # NOT FAKE SUBROUTINE!!!!   my ($self\, $type\, $islab_or_pt\, $val) = @​_;

  # my @​call = caller(0);   # $self = XY Plot Object   # $type = use method for a log (log10)\, prob (normal probability)\, or linear axis   # $islab_or_point = 1 for yes\, 0 for no\, returns undef if point outside plot   # $val = the value in real world units to transform   # if the axis is logarithmic\, then an offset will be applied   #my ($pkg\, $filename\, $line) = caller; # comment out to speed  
  return undef if(not defined $val or $val eq ""); # Willard's special fix   my $offset = $self->{-y}->{-logoffset}; # extract the value of the offset from the object  
  if($type =~ m/log/o ) { # some prehandling of the offset is required before depatch to transforms   if(ref($offset) eq 'ARRAY') { # the offset is an array ref of rules   # for variable offsets.   foreach my $rule (@​$offset) {   my $dn = $rule->{-lower_threshold};   my $up = $rule->{-upper_threshold};   $val -= $rule->{-offset}\, last if($val >= $dn and $val \< $up);   }   }   else { # the offset is just a constant   #$offset = "$offset"; # IF THIS LINE IS UNCOMMENTED\, BUGLESS BEHAVIOR ON PERL5.8.0 AND PERL5.8.1 IS SEEN   #my $special_extraction_for_perl_bug_folks = 0; # UNCOMMENT THIS THIS ALONG WITH PREVIOUS TO REVERT   # TO FULLY OPERATIONAL TKG2 FOR THE USERS   my $special_extraction_for_perl_bug_folks = ($val eq "7.000") ? 1 : 0;   if($special_extraction_for_perl_bug_folks) {   print "# OUTPUT DEMONSTRATING STRANGE BEHAVIOR OF NUMBERS IN PERL5.8.0 AND PERL5.8.1\n";   print "# A value (\$val) is passed into the subroutine\n";   print "# An offset (\$offset) is to be subtracted from the \$val\n";   print "# \$offset is passed into the subroutine via an object \$self\n";   print "# \$offset is extracted via 'my \$offset = \$self->{-y}->{-logoffset};'\n";   print "(1) Binary of 1.70 is "\,unpack("b*"\,1.70)\,"\n";   print "(2) Binary of \"1.70\" is "\,unpack("b*"\,"1.70")\,"\n";   print "(3) Binary of \$offset within the object (\$self) is "\,unpack("b*"\,$offset)\,"\n";   print "(4) OFFSET to Binary and Back​: "\,pack("b32"\,unpack("b*"\,$offset))\,"\n";   my $b_val = unpack("b*"\,$val);   my $b_offset = unpack("b*"\,$offset);   print "(5) BEFORE SUBTRACTION OR NEGATED ADDITION\n";   print "(6) \$val = $val \$offset = $offset (both values appear ok)\n";   print "(7) \$val (no. and binary)​: $val $b_val\n";   print "(8) \$offset (no. and binary)​: $offset $b_offset\n";   printf "(9) printf (as floats)​: \$val = %f \$offset = %f\n"\, $val\, $offset;   print "(10) Setting \$newval = \$val\n";   print "(11) Subtracting $offset from $val via \$val-=\$offset\n";   print "(12) Subtracting $offset from $val via \$yaval1-=\"\$offset\" (notice double quotes)\n";   print "(13) Adding -1.000000000000000*\$offset to \$val to get \$yaval2 (yet another value 2)\n";   print "(14) Adding -1.000000000000001*\$offset to \$val to get \$yaval3 (yet another value 3)\n";   }   my $oldval = $val;   my $yaval1 = $val;   my $yaval2 = $val;   my $yaval3 = $val;   $val -= $offset; # The way that I think Perl should be written.   $yaval1 -= "$offset"; # THIS CREATES THE PROPER $VAL - $OFFSET VALUE EVERY TIME!!!!   $yaval2 += -1.000000000000000*$offset; # experiment   $yaval3 += -1.000000000000001*$offset; # experiment   if($val != $yaval1) {   print "BACKGROUND​: \$val=\$yaval1=$val and \$offset=$offset "\,   "ERROR​: \$val-=\$offset yields $val HOWEVER​: "\,   "\$yaval1-=\"\$offset\" yields $yaval1 !!\n"   }
  if($special_extraction_for_perl_bug_folks) {   print "(15) AFTER SUBTRACTION OR NEGATED ADDITION\n";   printf "(16) printf (as floats)​: \$val = %f \$offset = %f\n"\, $val\, $offset;   printf "(17) printf (as floats)​: \$yaval1 = %f\n"\, $yaval1;   printf "(18) printf (as floats)​: \$yaval2 = %f\n"\, $yaval2;   printf "(19) printf (as floats)​: \$yaval3 = %f\n"\, $yaval3;   my $b_val = unpack("b*"\,$val);   my $b_offset = unpack("b*"\,$offset);   my $b_yaval1 = unpack("b*"\,$yaval1);   my $b_yaval2 = unpack("b*"\,$yaval2);   my $b_yaval3 = unpack("b*"\,$yaval3);   print "(20) \$val - \$offset = $val Offset = $offset\n";   print "(21) \$offset (no. and binary)​: $offset $b_offset\n";   print "(22) \$val (no. and binary)​: $val $b_val\n";   print "(23) \$yaval1 (no. and binary)​: $yaval1 $b_yaval1\n";   print "(24) \$yaval2 (no. and binary)​: $yaval2 $b_yaval2\n";   print "(25) \$yaval3 (no. and binary)​: $yaval3 $b_yaval3\n";   print "# Note that all vals should be the same\n";   print "------------------------------\n";   }   }   return undef if($val \<= 0);   }   return undef if( ( $type eq 'prob' or $type eq 'grv' )   and   ($val \<= 0 or $val >= 1 ) );  
  # return undef if plotting labels and outside plot limits   return undef if($islab_or_pt and   ( $val \< ($YMIN - EPS) or $val > ($YMAX + EPS) ) );  
  # Following four transforms commented out for purposes of this bug report   #return Real2CanvY($val) if( $type eq 'linear' or $type eq 'time' );   #return Real2log2CanvY($val) if( $type =~ /log/o );   #return Real2prob2CanvY($val) if( $type eq 'prob' );   #return Real2grv2CanvY($val) if( $type eq 'grv' );   return undef;
}

__DATA__ 0.1 15.4592773641948 2.500 2.510 2.520 2.530 2.540 2.550 2.560 2.570 2.580 2.590 2.600 2.610 2.620 2.630 2.640 2.650 2.660 2.670 2.680 2.690 2.700 2.710 2.720 2.730 2.740 2.750 2.760 2.770 2.780 2.790 2.800 2.810 2.820 2.830 2.840 2.850 2.860 2.870 2.880 2.890 2.900 2.910 2.920 2.930 2.940 2.950 2.960 2.970 2.980 2.990 3.000 3.010 3.020 3.030 3.040 3.050 3.060 3.070 3.080 3.090 3.100 3.110 3.120 3.130 3.140 3.150 3.160 3.170 3.180 3.190 3.200 3.210 3.220 3.230 3.240 3.250 3.260 3.270 3.280 3.290 3.300 3.310 3.320 3.330 3.340 3.350 3.360 3.370 3.380 3.390 3.400 3.410 3.420 3.430 3.440 3.450 3.460 3.470 3.480 3.490 3.500 3.510 3.520 3.530 3.540 3.550 3.560 3.570 3.580 3.590 3.600 3.610 3.620 3.630 3.640 3.650 3.660 3.670 3.680 3.690 3.700 3.710 3.720 3.730 3.740 3.750 3.760 3.770 3.780 3.790 3.800 3.810 3.820 3.830 3.840 3.850 3.860 3.870 3.880 3.890 3.900 3.910 3.920 3.930 3.940 3.950 3.960 3.970 3.980 3.990 4.000 4.010 4.020 4.030 4.040 4.050 4.060 4.070 4.080 4.090 4.100 4.110 4.120 4.130 4.140 4.150 4.160 4.170 4.180 4.190 4.200 4.210 4.220 4.230 4.240 4.250 4.260 4.270 4.280 4.290 4.300 4.310 4.320 4.330 4.340 4.350 4.360 4.370 4.380 4.390 4.400 4.410 4.420 4.430 4.440 4.450 4.460 4.470 4.480 4.490 4.500 4.510 4.520 4.530 4.540 4.550 4.560 4.570 4.580 4.590 4.600 4.610 4.620 4.630 4.640 4.650 4.660 4.670 4.680 4.690 4.700 4.710 4.720 4.730 4.740 4.750 4.760 4.770 4.780 4.790 4.800 4.810 4.820 4.830 4.840 4.850 4.860 4.870 4.880 4.890 4.900 4.910 4.920 4.930 4.940 4.950 4.960 4.970 4.980 4.990 5.000 5.010 5.020 5.030 5.040 5.050 5.060 5.070 5.080 5.090 5.100 5.110 5.120 5.130 5.140 5.150 5.160 5.170 5.180 5.190 5.200 5.210 5.220 5.230 5.240 5.250 5.260 5.270 5.280 5.290 5.300 5.310 5.320 5.330 5.340 5.350 5.360 5.370 5.380 5.390 5.400 5.410 5.420 5.430 5.440 5.450 5.460 5.470 5.480 5.490 5.500 5.510 5.520 5.530 5.540 5.550 5.560 5.570 5.580 5.590 5.600 5.610 5.620 5.630 5.640 5.650 5.660 5.670 5.680 5.690 5.700 5.710 5.720 5.730 5.740 5.750 5.760 5.770 5.780 5.790 5.800 5.810 5.820 5.830 5.840 5.850 5.860 5.870 5.880 5.890 5.900 5.910 5.920 5.930 5.940 5.950 5.960 5.970 5.980 5.990 6.000 6.010 6.020 6.030 6.040 6.050 6.060 6.070 6.080 6.090 6.100 6.110 6.120 6.130 6.140 6.150 6.160 6.170 6.180 6.190 6.200 6.210 6.220 6.230 6.240 6.250 6.260 6.270 6.280 6.290 6.300 6.310 6.320 6.330 6.340 6.350 6.360 6.370 6.380 6.390 6.400 6.410 6.420 6.430 6.440 6.450 6.460 6.470 6.480 6.490 6.500 6.510 6.520 6.530 6.540 6.550 6.560 6.570 6.580 6.590 6.600 6.610 6.620 6.630 6.640 6.650 6.660 6.670 6.680 6.690 6.700 6.710 6.720 6.730 6.740 6.750 6.760 6.770 6.780 6.790 6.800 6.810 6.820 6.830 6.840 6.850 6.860 6.870 6.880 6.890 6.900 6.910 6.920 6.930 6.940 6.950 6.960 6.970 6.980 6.990 7.000 7.010 7.020 7.030 7.040 7.050 7.060 7.070 7.080 7.090 7.100 7.110 7.120 7.130 7.140 7.150 7.160 7.170 7.180 7.190 7.200 7.210 7.220 7.230 7.240 7.250 7.260 7.270 7.280 7.290 7.300 7.310 7.320 7.330 7.340 7.350 7.360 7.370 7.380 7.390 7.400 7.410 7.420 7.430 7.440 7.450 7.460 7.470 7.480 7.490 7.500 7.510 7.520 7.530 7.540 7.550 7.560 7.570 7.580 7.590 7.600 7.610 7.620 7.630 7.640 7.650 7.660 7.670 7.680 7.690 7.700 7.710 7.720 7.730 7.740 7.750 7.760 7.770 7.780 7.790 7.800 7.810 7.820 7.830 7.840 7.850 7.860 7.870 7.880 7.890 7.900 7.910 7.920 7.930 7.940 7.950 7.960 7.970 7.980 7.990 8.000 8.010 8.020 8.030 8.040 8.050 8.060 8.070 8.080 8.090 8.100 8.110 8.120 8.130 8.140 8.150 8.160 8.170 8.180 8.190 8.200 8.210 8.220 8.230 8.240 8.250 8.260 8.270 8.280 8.290 8.300 8.310 8.320 8.330 8.340 8.350 8.360 8.370 8.380 8.390 8.400 8.410 8.420 8.430 8.440 8.450 8.460 8.470 8.480 8.490 8.500 8.510 8.520 8.530 8.540 8.550 8.560 8.570 8.580 8.590 8.600 8.610 8.620 8.630 8.640 8.650 8.660 8.670 8.680 8.690 8.700 8.710 8.720 8.730 8.740 8.750 8.760 8.770 8.780 8.790 8.800 8.810 8.820 8.830 8.840 8.850 8.860 8.870 8.880 8.890 8.900 8.910 8.920 8.930 8.940 8.950 8.960 8.970 8.980 8.990 9.000 9.010 9.020 9.030 9.040 9.050 9.060 9.070 9.080 9.090 9.100 9.110 9.120 9.130 9.140 9.150 9.160 9.170 9.180 9.190 9.200 9.210 9.220 9.230 9.240 9.250 9.260 9.270 9.280 9.290 9.300 9.310 9.320 9.330 9.340 9.350 9.360 9.370 9.380 9.390 9.400 9.410 9.420 9.430 9.440 9.450 9.460 9.470 9.480 9.490 9.500 9.510 9.520 9.530 9.540 9.550 9.560 9.570 9.580 9.590 9.600 1.8 1.9 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 3.7 4.7 5.7 6.7 7.7 8.7 9.7 10.7 11.7 17.1592773641948 1.8 1.9 2.1 2.3 2.5 2.7 3.7 5.7 7.7 9.7 11.7 1.8 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.9 1.91 1.92 1.93 1.94 1.95 1.96 1.97 1.98 1.99 2 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 2.1 2.11 2.12 2.13 2.14 2.15 2.16 2.17 2.18 2.19 2.2 2.22 2.24 2.26 2.28 2.3 2.32 2.34 2.36 2.38 2.4 2.42 2.44 2.46 2.48 2.5 2.52 2.54 2.56 2.58 2.6 2.62 2.64 2.66 2.68 2.7 2.8 2.9 3 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.9 7.1 7.3 7.5 7.7 7.9 8.1 8.3 8.5 8.7 8.9 9.1 9.3 9.5 9.7 9.9 10.1 10.3 10.5 10.7 10.9 11.1 11.3 11.5 11.7 12.7 13.7 14.7 15.7 16.7 2.500 2.510 2.520 2.530 2.540 2.550 2.560 2.570 2.580 2.590 2.600 2.610 2.620 2.630 2.640 2.650 2.660 2.670 2.680 2.690 2.700 2.710 2.720 2.730 2.740 2.750 2.760 2.770 2.780 2.790 2.800 2.810 2.820 2.830 2.840 2.850 2.860 2.870 2.880 2.890 2.900 2.910 2.920 2.930 2.940 2.950 2.960 2.970 2.980 2.990 3.000 3.010 3.020 3.030 3.040 3.050 3.060 3.070 3.080 3.090 3.100 3.110 3.120 3.130 3.140 3.150 3.160 3.170 3.180 3.190 3.200 3.210 3.220 3.230 3.240 3.250 3.260 3.270 3.280 3.290 3.300 3.310 3.320 3.330 3.340 3.350 3.360 3.370 3.380 3.390 3.400 3.410 3.420 3.430 3.440 3.450 3.460 3.470 3.480 3.490 3.500 3.510 3.520 3.530 3.540 3.550 3.560 3.570 3.580 3.590 3.600 3.610 3.620 3.630 3.640 3.650 3.660 3.670 3.680 3.690 3.700 3.710 3.720 3.730 3.740 3.750 3.760 3.770 3.780 3.790 3.800 3.810 3.820 3.830 3.840 3.850 3.860 3.870 3.880 3.890 3.900 3.910 3.920 3.930 3.940 3.950 3.960 3.970 3.980 3.990 4.000 4.010 4.020 4.030 4.040 4.050 4.060 4.070 4.080 4.090 4.100 4.110 4.120 4.130 4.140 4.150 4.160 4.170 4.180 4.190 4.200 4.210 4.220 4.230 4.240 4.250 4.260 4.270 4.280 4.290 4.300 4.310 4.320 4.330 4.340 4.350 4.360 4.370 4.380 4.390 4.400 4.410 4.420 4.430 4.440 4.450 4.460 4.470 4.480 4.490 4.500 4.510 4.520 4.530 4.540 4.550 4.560 4.570 4.580 4.590 4.600 4.610 4.620 4.630 4.640 4.650 4.660 4.670 4.680 4.690 4.700 4.710 4.720 4.730 4.740 4.750 4.760 4.770 4.780 4.790 4.800 4.810 4.820 4.830 4.840 4.850 4.860 4.870 4.880 4.890 4.900 4.910 4.920 4.930 4.940 4.950 4.960 4.970 4.980 4.990 5.000 5.010 5.020 5.030 5.040 5.050 5.060 5.070 5.080 5.090 5.100 5.110 5.120 5.130 5.140 5.150 5.160 5.170 5.180 5.190 5.200 5.210 5.220 5.230 5.240 5.250 5.260 5.270 5.280 5.290 5.300 5.310 5.320 5.330 5.340 5.350 5.360 5.370 5.380 5.390 5.400 5.410 5.420 5.430 5.440 5.450 5.460 5.470 5.480 5.490 5.500 5.510 5.520 5.530 5.540 5.550 5.560 5.570 5.580 5.590 5.600 5.610 5.620 5.630 5.640 5.650 5.660 5.670 5.680 5.690 5.700 5.710 5.720 5.730 5.740 5.750 5.760 5.770 5.780 5.790 5.800 5.810 5.820 5.830 5.840 5.850 5.860 5.870 5.880 5.890 5.900 5.910 5.920 5.930 5.940 5.950 5.960 5.970 5.980 5.990 6.000 6.010 6.020 6.030 6.040 6.050 6.060 6.070 6.080 6.090 6.100 6.110 6.120 6.130 6.140 6.150 6.160 6.170 6.180 6.190 6.200 6.210 6.220 6.230 6.240 6.250 6.260 6.270 6.280 6.290 6.300 6.310 6.320 6.330 6.340 6.350 6.360 6.370 6.380 6.390 6.400 6.410 6.420 6.430 6.440 6.450 6.460 6.470 6.480 6.490 6.500 6.510 6.520 6.530 6.540 6.550 6.560 6.570 6.580 6.590 6.600 6.610 6.620 6.630 6.640 6.650 6.660 6.670 6.680 6.690 6.700 6.710 6.720 6.730 6.740 6.750 6.760 6.770 6.780 6.790 6.800 6.810 6.820 6.830 6.840 6.850 6.860 6.870 6.880 6.890 6.900 6.910 6.920 6.930 6.940 6.950 6.960 6.970 6.980 6.990 7.000 7.010 7.020 7.030 7.040 7.050 7.060 7.070 7.080 7.090 7.100 7.110 7.120 7.130 7.140 7.150 7.160 7.170 7.180 7.190 7.200 7.210 7.220 7.230 7.240 7.250 7.260 7.270 7.280 7.290 7.300 7.310 7.320 7.330 7.340 7.350 7.360 7.370 7.380 7.390 7.400 7.410 7.420 7.430 7.440 7.450 7.460 7.470 7.480 7.490 7.500 7.510 7.520 7.530 7.540 7.550 7.560 7.570 7.580 7.590 7.600 7.610 7.620 7.630 7.640 7.650 7.660 7.670 7.680 7.690 7.700 7.710 7.720 7.730 7.740 7.750 7.760 7.770 7.780 7.790 7.800 7.810 7.820 7.830 7.840 7.850 7.860 7.870 7.880 7.890 7.900 7.910 7.920 7.930 7.940 7.950 7.960 7.970 7.980 7.990 8.000 8.010 8.020 8.030 8.040 8.050 8.060 8.070 8.080 8.090 8.100 8.110 8.120 8.130 8.140 8.150 8.160 8.170 8.180 8.190 8.200 8.210 8.220 8.230 8.240 8.250 8.260 8.270 8.280 8.290 8.300 8.310 8.320 8.330 8.340 8.350 8.360 8.370 8.380 8.390 8.400 8.410 8.420 8.430 8.440 8.450 8.460 8.470 8.480 8.490 8.500 8.510 8.520 8.530 8.540 8.550 8.560 8.570 8.580 8.590 8.600 8.610 8.620 8.630 8.640 8.650 8.660 8.670 8.680 8.690 8.700 8.710 8.720 8.730 8.740 8.750 8.760 8.770 8.780 8.790 8.800 8.810 8.820 8.830 8.840 8.850 8.860 8.870 8.880 8.890 8.900 8.910 8.920 8.930 8.940 8.950 8.960 8.970 8.980 8.990 9.000 9.010 9.020 9.030 9.040 9.050 9.060 9.070 9.080 9.090 9.100 9.110 9.120 9.130 9.140 9.150 9.160 9.170 9.180 9.190 9.200 9.210 9.220 9.230 9.240 9.250 9.260 9.270 9.280 9.290 9.300 9.310 9.320 9.330 9.340 9.350 9.360 9.370 9.380 9.390 9.400 9.410 9.420 9.430 9.440 9.450 9.460 9.470 9.480 9.490 9.500 9.510 9.520 9.530 9.540 9.550 9.560 9.570 9.580 9.590 9.600 1.8 1.9 2 2.1 2.2 2.3 2.4 2.5 2.6 2.7 3.7 4.7 5.7 6.7 7.7 8.7 9.7 10.7 11.7 17.1592773641948 1.8 1.9 2.1 2.3 2.5 2.7 3.7 5.7 7.7 9.7 11.7 1.8 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.9 1.91 1.92 1.93 1.94 1.95 1.96 1.97 1.98 1.99 2 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 2.1 2.11 2.12 2.13 2.14 2.15 2.16 2.17 2.18 2.19 2.2 2.22 2.24 2.26 2.28 2.3 2.32 2.34 2.36 2.38 2.4 2.42 2.44 2.46 2.48 2.5 2.52 2.54 2.56 2.58 2.6 2.62 2.64 2.66 2.68 2.7 2.8 2.9 3 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.9 7.1 7.3 7.5 7.7 7.9 8.1 8.3 8.5 8.7 8.9 9.1 9.3 9.5 9.7 9.9 10.1 10.3 10.5 10.7 10.9 11.1 11.3 11.5 11.7 12.7 13.7 14.7 15.7 16.7 2.500 2.510 2.520 2.530 2.540 2.550 2.560 2.570 2.580 2.590 2.600 2.610 2.620 2.630 2.640 2.650 2.660 2.670 2.680 2.690 2.700 2.710 2.720 2.730 2.740 2.750 2.760 2.770 2.780 2.790 2.800 2.810 2.820 2.830 2.840 2.850 2.860 2.870 2.880 2.890 2.900 2.910 2.920 2.930 2.940 2.950 2.960 2.970 2.980 2.990 3.000 ERROR​: $val=$yaval1=3.000 and $offset=1.7 $val-=$offset -> 2 $yaval1-="$offset" -> 1.3 !! 3.010 3.020 3.030 3.040 3.050 3.060 3.070 3.080 3.090 3.100 3.110 3.120 3.130 3.140 3.150 3.160 3.170 3.180 3.190 3.200 3.210 3.220 3.230 3.240 3.250 3.260 3.270 3.280 3.290 3.300 3.310 3.320 3.330 3.340 3.350 3.360 3.370 3.380 3.390 3.400 3.410 3.420 3.430 3.440 3.450 3.460 3.470 3.480 3.490 3.500 3.510 3.520 3.530 3.540 3.550 3.560 3.570 3.580 3.590 3.600 3.610 3.620 3.630 3.640 3.650 3.660 3.670 3.680 3.690 3.700 3.710 3.720 3.730 3.740 3.750 3.760 3.770 3.780 3.790 3.800 3.810 3.820 3.830 3.840 3.850 3.860 3.870 3.880 3.890 3.900 3.910 3.920 3.930 3.940 3.950 3.960 3.970 3.980 3.990 4.000 ERROR​: $val=$yaval1=4.000 and $offset=1.7 $val-=$offset -> 3 $yaval1-="$offset" -> 2.3 !! 4.010 4.020 4.030 4.040 4.050 4.060 4.070 4.080 4.090 4.100 4.110 4.120 4.130 4.140 4.150 4.160 4.170 4.180 4.190 4.200 4.210 4.220 4.230 4.240 4.250 4.260 4.270 4.280 4.290 4.300 4.310 4.320 4.330 4.340 4.350 4.360 4.370 4.380 4.390 4.400 4.410 4.420 4.430 4.440 4.450 4.460 4.470 4.480 4.490 4.500 4.510 4.520 4.530 4.540 4.550 4.560 4.570 4.580 4.590 4.600 4.610 4.620 4.630 4.640 4.650 4.660 4.670 4.680 4.690 4.700 4.710 4.720 4.730 4.740 4.750 4.760 4.770 4.780 4.790 4.800 4.810 4.820 4.830 4.840 4.850 4.860 4.870 4.880 4.890 4.900 4.910 4.920 4.930 4.940 4.950 4.960 4.970 4.980 4.990 5.000 ERROR​: $val=$yaval1=5.000 and $offset=1.7 $val-=$offset -> 4 $yaval1-="$offset" -> 3.3 !! 5.010 5.020 5.030 5.040 5.050 5.060 5.070 5.080 5.090 5.100 5.110 5.120 5.130 5.140 5.150 5.160 5.170 5.180 5.190 5.200 5.210 5.220 5.230 5.240 5.250 5.260 5.270 5.280 5.290 5.300 5.310 5.320 5.330 5.340 5.350 5.360 5.370 5.380 5.390 5.400 5.410 5.420 5.430 5.440 5.450 5.460 5.470 5.480 5.490 5.500 5.510 5.520 5.530 5.540 5.550 5.560 5.570 5.580 5.590 5.600 5.610 5.620 5.630 5.640 5.650 5.660 5.670 5.680 5.690 5.700 5.710 5.720 5.730 5.740 5.750 5.760 5.770 5.780 5.790 5.800 5.810 5.820 5.830 5.840 5.850 5.860 5.870 5.880 5.890 5.900 5.910 5.920 5.930 5.940 5.950 5.960 5.970 5.980 5.990 6.000 ERROR​: $val=$yaval1=6.000 and $offset=1.7 $val-=$offset -> 5 $yaval1-="$offset" -> 4.3 !! 6.010 6.020 6.030 6.040 6.050 6.060 6.070 6.080 6.090 6.100 6.110 6.120 6.130 6.140 6.150 6.160 6.170 6.180 6.190 6.200 6.210 6.220 6.230 6.240 6.250 6.260 6.270 6.280 6.290 6.300 6.310 6.320 6.330 6.340 6.350 6.360 6.370 6.380 6.390 6.400 6.410 6.420 6.430 6.440 6.450 6.460 6.470 6.480 6.490 6.500 6.510 6.520 6.530 6.540 6.550 6.560 6.570 6.580 6.590 6.600 6.610 6.620 6.630 6.640 6.650 6.660 6.670 6.680 6.690 6.700 6.710 6.720 6.730 6.740 6.750 6.760 6.770 6.780 6.790 6.800 6.810 6.820 6.830 6.840 6.850 6.860 6.870 6.880 6.890 6.900 6.910 6.920 6.930 6.940 6.950 6.960 6.970 6.980 6.990 7.000 ERROR​: $val=$yaval1=7.000 and $offset=1.7 $val-=$offset -> 6 $yaval1-="$offset" -> 5.3 !! 7.010 7.020 7.030 7.040 7.050 7.060 7.070 7.080 7.090 7.100 7.110 7.120 7.130 7.140 7.150 7.160 7.170 7.180 7.190 7.200 7.210 7.220 7.230 7.240 7.250 7.260 7.270 7.280 7.290 7.300 7.310 7.320 7.330 7.340 7.350 7.360 7.370 7.380 7.390 7.400 7.410 7.420 7.430 7.440 7.450 7.460 7.470 7.480 7.490 7.500 7.510 7.520 7.530 7.540 7.550 7.560 7.570 7.580 7.590 7.600 7.610 7.620 7.630 7.640 7.650 7.660 7.670 7.680 7.690 7.700 7.710 7.720 7.730 7.740 7.750 7.760 7.770 7.780 7.790 7.800 7.810 7.820 7.830 7.840 7.850 7.860 7.870 7.880 7.890 7.900 7.910 7.920 7.930 7.940 7.950 7.960 7.970 7.980 7.990 8.000 ERROR​: $val=$yaval1=8.000 and $offset=1.7 $val-=$offset -> 7 $yaval1-="$offset" -> 6.3 !! 8.010 8.020 8.030 8.040 8.050 8.060 8.070 8.080 8.090 8.100 8.110 8.120 8.130 8.140 8.150 8.160 8.170 8.180 8.190 8.200 8.210 8.220 8.230 8.240 8.250 8.260 8.270 8.280 8.290 8.300 8.310 8.320 8.330 8.340 8.350 8.360 8.370 8.380 8.390 8.400 8.410 8.420 8.430 8.440 8.450 8.460 8.470 8.480 8.490 8.500 8.510 8.520 8.530 8.540 8.550 8.560 8.570 8.580 8.590 8.600 8.610 8.620 8.630 8.640 8.650 8.660 8.670 8.680 8.690 8.700 8.710 8.720 8.730 8.740 8.750 8.760 8.770 8.780 8.790 8.800 8.810 8.820 8.830 8.840 8.850 8.860 8.870 8.880 8.890 8.900 8.910 8.920 8.930 8.940 8.950 8.960 8.970 8.980 8.990 9.000 ERROR​: $val=$yaval1=9.000 and $offset=1.7 $val-=$offset -> 8 $yaval1-="$offset" -> 7.3 !! 9.010 9.020 9.030 9.040 9.050 9.060 9.070 9.080 9.090 9.100 9.110 9.120 9.130 9.140 9.150 9.160 9.170 9.180 9.190 9.200 9.210 9.220 9.230 9.240 9.250 9.260 9.270 9.280 9.290 9.300 9.310 9.320 9.330 9.340 9.350 9.360 9.370 9.380 9.390 9.400 9.410 9.420 9.430 9.440 9.450 9.460 9.470 9.480 9.490 9.500 9.510 9.520 9.530 9.540 9.550 9.560 9.570 9.580 9.590 9.600 1.8 1.9 2 ERROR​: $val=$yaval1=2 and $offset=1.7 $val-=$offset -> 1 $yaval1-="$offset" -> 0.3 !! 2.1 2.2 2.3 2.4 2.5 2.6 2.7 3.7 4.7 5.7 6.7 7.7 8.7 9.7 10.7 11.7 17.1592773641948 1.8 1.9 2.1 2.3 2.5 2.7 3.7 5.7 7.7 9.7 11.7 1.8 1.81 1.82 1.83 1.84 1.85 1.86 1.87 1.88 1.89 1.9 1.91 1.92 1.93 1.94 1.95 1.96 1.97 1.98 1.99 2 ERROR​: $val=$yaval1=2 and $offset=1.7 $val-=$offset -> 1 $yaval1-="$offset" -> 0.3 !! 2.01 2.02 2.03 2.04 2.05 2.06 2.07 2.08 2.09 2.1 2.11 2.12 2.13 2.14 2.15 2.16 2.17 2.18 2.19 2.2 2.22 2.24 2.26 2.28 2.3 2.32 2.34 2.36 2.38 2.4 2.42 2.44 2.46 2.48 2.5 2.52 2.54 2.56 2.58 2.6 2.62 2.64 2.66 2.68 2.7 2.8 2.9 3 ERROR​: $val=$yaval1=3 and $offset=1.7 $val-=$offset -> 2 $yaval1-="$offset" -> 1.3 !! 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 4 ERROR​: $val=$yaval1=4 and $offset=1.7 $val-=$offset -> 3 $yaval1-="$offset" -> 2.3 !! 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 5 ERROR​: $val=$yaval1=5 and $offset=1.7 $val-=$offset -> 4 $yaval1-="$offset" -> 3.3 !! 5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 6 ERROR​: $val=$yaval1=6 and $offset=1.7 $val-=$offset -> 5 $yaval1-="$offset" -> 4.3 !! 6.1 6.2 6.3 6.4 6.5 6.6 6.7 6.9 7.1 7.3 7.5 7.7 7.9 8.1 8.3 8.5 8.7 8.9 9.1 9.3 9.5 9.7 9.9 10.1 10.3 10.5 10.7 10.9 11.1 11.3 11.5 11.7 12.7 13.7 14.7 15.7 16.7


Flags​:   category=core   severity=medium


Site configuration information for perl v5.8.1​:

Configured by wasquith at Mon Oct 6 10​:42​:52 CDT 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration​:   Platform​:   osname=linux\, osvers=2.4.18-27.8.0smp\, archname=i686-linux   uname='linux red1ast.cr.usgs.gov 2.4.18-27.8.0smp #1 smp fri mar 14 05​:47​:33 est 2003 i686 i686 i386 gnulinux '   config_args='-des'   hint=recommended\, useposix=true\, d_sigaction=define   usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef   useperlio=define d_sfio=undef uselargefiles=define usesocks=undef   use64bitint=undef use64bitall=undef uselongdouble=undef   usemymalloc=n\, bincompat5005=undef   Compiler​:   cc='cc'\, ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm'\,   optimize='-O3'\,   cppflags='-fno-strict-aliasing -I/usr/include/gdbm'   ccversion=''\, gccversion='3.2 20020903 (Red Hat Linux 8.0 3.2-7)'\, gccosandvers=''   intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=1234   d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=12   ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8   alignbytes=4\, prototype=define   Linker and Libraries​:   ld='cc'\, ldflags =' -L/usr/local/lib'   libpth=/usr/local/lib /lib /usr/lib   libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc   perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc   libc=/lib/libc-2.3.2.so\, so=so\, useshrplib=false\, libperl=libperl.a   gnulibc_version='2.3.2'   Dynamic Linking​:   dlsrc=dl_dlopen.xs\, dlext=so\, d_dlsymun=undef\, ccdlflags='-rdynamic'   cccdlflags='-fpic'\, lddlflags='-shared -L/usr/local/lib'

Locally applied patches​:  


@​INC for perl v5.8.1​:   /usr/local/lib/perl5/5.8.1/i686-linux   /usr/local/lib/perl5/5.8.1   /usr/local/lib/perl5/site_perl/5.8.1/i686-linux   /usr/local/lib/perl5/site_perl/5.8.1   /usr/local/lib/perl5/site_perl   .


Environment for perl v5.8.1​:   HOME=/home/wasquith   LANG=en_US.UTF-8   LANGUAGE (unset)   LD_LIBRARY_PATH (unset)   LOGDIR (unset)   PATH=/usr/local/bin​:/usr/bin​:/bin​:/usr/X11R6/bin​:.​:/home/wasquith/bin​:.   PERL_BADLANG (unset)   SHELL=/bin/bash

p5pRT commented 21 years ago

From @iabyn

On Wed\, Oct 08\, 2003 at 04​:39​:31PM -0000\, wasquith@​red1ast.cr.usgs.gov (via RT) wrote​:

=head1 BUG REPORT -- INTEGER MATH OCCURRING WHEN NOT EXPECTED

I have stumbled onto strange float/integer/string behavior on Perl5.8.0 and Perl5.8.1 that did not exist in prior Perls. I have read (see REFERENCES) that Numbers are better behaved in Perl5.8.+ and math is no longer purely floating point. I am certain that this change has a weakness.

Thanks for the report. Its a bit difficult to make direct comments without the problem being reproducabel here. However\, if you have the ability to make your code at the bottom of your email fail\, would it be possible for you to run it with the following modification​:

change this line​:

  $val -= $offset; # The way that I think Perl should be written.

to be something like​:

  use Devel​::Peek;   warn "-----\n";   Dump($val); Dump($offset);   $val -= $offset; # The way that I think Perl should be written.   Dump($val); Dump($offset);

So that we can see the internal representations of the variables before and after the subtraction?

Thanks\,

Dave.

-- Thank God I'm an atheist.....

p5pRT commented 21 years ago

From @nwc10

On Wed\, Oct 08\, 2003 at 04​:39​:31PM -0000\, wasquith@​red1ast.cr.usgs.gov (via RT) wrote​:

I have stumbled onto strange float/integer/string behavior on Perl5.8.0 and Perl5.8.1 that did not exist in prior Perls. I have read (see REFERENCES) that Numbers are better behaved in Perl5.8.+ and math is no longer purely floating point. I am certain that this change has a weakness.

This change was motivated by the desire to cope with the increasing use of 64 bit values in everyday use\, such as files >2Gb\, 64 bit device numbers and nanosecond timings

It means that configuring perl to use 64 bit integers doesn't cause other parts of arithmetic to go wrong. I'm still digesting your comprehensive report\, but I don't believe that what you are seeing should be happening (hence it would seem that it is a bug in the implementation)

If you compile perl with the C pre-processor flag NO_PERL_PRESERVE_IVUV defined you should get (close to) the 5.6.1 implementation of numeric operations. This may solve your problems.

Meanwhile\, I will continue to investigate your report. If possible\, could you also try the modifications that Dave Mitchell suggested?

Thanks

Nicholas Clark

p5pRT commented 15 years ago

@smpeters - Status changed from 'open' to 'stalled'

p5pRT commented 12 years ago

From @jkeenan

On Thu Oct 09 13​:26​:15 2003\, nicholas wrote​:

On Wed\, Oct 08\, 2003 at 04​:39​:31PM -0000\, wasquith@​red1ast.cr.usgs.gov (via RT) wrote​:

I have stumbled onto strange float/integer/string behavior on Perl5.8.0 and Perl5.8.1 that did not exist in prior Perls. I have read (see REFERENCES) that Numbers are better behaved in Perl5.8.+ and math is no longer purely floating point. I am certain that this change has a weakness.

This change was motivated by the desire to cope with the increasing use of 64 bit values in everyday use\, such as files >2Gb\, 64 bit device numbers and nanosecond timings

It means that configuring perl to use 64 bit integers doesn't cause other parts of arithmetic to go wrong. I'm still digesting your comprehensive report\, but I don't believe that what you are seeing should be happening (hence it would seem that it is a bug in the implementation)

If you compile perl with the C pre-processor flag NO_PERL_PRESERVE_IVUV defined you should get (close to) the 5.6.1 implementation of numeric operations. This may solve your problems.

Meanwhile\, I will continue to investigate your report. If possible\, could you also try the modifications that Dave Mitchell suggested?

Thanks

Nicholas Clark

Nick\, Dave​:

Can we figure out some disposition for this ticket which has been in the Stalled queue for nine years?

Thank you very much. Jim Keenan

p5pRT commented 12 years ago

The RT System itself - Status changed from 'stalled' to 'open'

p5pRT commented 11 years ago

From @jkeenan

On Sun Oct 07 08​:07​:13 2012\, jkeenan wrote​:

On Thu Oct 09 13​:26​:15 2003\, nicholas wrote​:

On Wed\, Oct 08\, 2003 at 04​:39​:31PM -0000\, wasquith@​red1ast.cr.usgs.gov (via RT) wrote​:

I have stumbled onto strange float/integer/string behavior on Perl5.8.0 and Perl5.8.1 that did not exist in prior Perls. I have read (see REFERENCES) that Numbers are better behaved in Perl5.8.+ and math is no longer purely floating point. I am certain that this change has a weakness.

This change was motivated by the desire to cope with the increasing use of 64 bit values in everyday use\, such as files >2Gb\, 64 bit device numbers and nanosecond timings

It means that configuring perl to use 64 bit integers doesn't cause other parts of arithmetic to go wrong. I'm still digesting your comprehensive report\, but I don't believe that what you are seeing should be happening (hence it would seem that it is a bug in the implementation)

If you compile perl with the C pre-processor flag NO_PERL_PRESERVE_IVUV defined you should get (close to) the 5.6.1 implementation of numeric operations. This may solve your problems.

Meanwhile\, I will continue to investigate your report. If possible\, could you also try the modifications that Dave Mitchell suggested?

Thanks

Nicholas Clark

Nick\, Dave​:

Can we figure out some disposition for this ticket which has been in the Stalled queue for nine years?

Thank you very much. Jim Keenan

No correspondence since last October. Any ideas?

Thank you very much. Jim Keenan

p5pRT commented 11 years ago

From @bulk88

On Mon Jan 14 16​:51​:38 2013\, jkeenan wrote​:

No correspondence since last October. Any ideas?

Thank you very much. Jim Keenan

Someone writing a test case would be nice.

Some random ideas on what could be causing it

-IV/UV math instead of 100% NV math in older Perls -stringification behavior during the creation of that log10 constant\, rounding\, and precision might be different\, maybe perl decided 1.0000000000000000000001 is equal to 1 or something -a bug that prevents a NV path from being taken when an NV is seen and the other UV/IV path is always taken even if the NOK and not IOK -a bug where IOK has higher priority than NOK -C compiler FPU defaults (OS/Compiler flags specific) -clib sprintf change (OS/Compiler flags specific)

-- bulk88 ~ bulk88 at hotmail.com

p5pRT commented 11 years ago

From @iabyn

On Mon\, Jan 14\, 2013 at 04​:51​:39PM -0800\, James E Keenan via RT wrote​:

On Sun Oct 07 08​:07​:13 2012\, jkeenan wrote​:

On Thu Oct 09 13​:26​:15 2003\, nicholas wrote​:

On Wed\, Oct 08\, 2003 at 04​:39​:31PM -0000\, wasquith@​red1ast.cr.usgs.gov (via RT) wrote​:

I have stumbled onto strange float/integer/string behavior on Perl5.8.0 and Perl5.8.1 that did not exist in prior Perls. I have read (see REFERENCES) that Numbers are better behaved in Perl5.8.+ and math is no longer purely floating point. I am certain that this change has a weakness.

This change was motivated by the desire to cope with the increasing use of 64 bit values in everyday use\, such as files >2Gb\, 64 bit device numbers and nanosecond timings

It means that configuring perl to use 64 bit integers doesn't cause other parts of arithmetic to go wrong. I'm still digesting your comprehensive report\, but I don't believe that what you are seeing should be happening (hence it would seem that it is a bug in the implementation)

If you compile perl with the C pre-processor flag NO_PERL_PRESERVE_IVUV defined you should get (close to) the 5.6.1 implementation of numeric operations. This may solve your problems.

Meanwhile\, I will continue to investigate your report. If possible\, could you also try the modifications that Dave Mitchell suggested?

Thanks

Nicholas Clark

Nick\, Dave​:

Can we figure out some disposition for this ticket which has been in the Stalled queue for nine years?

I haven't really got the inclination to wade through that huge report and test script\, although I note that the OP failed to respond to either of Nicholas's or my requests for further information.

If anyone can turn the report into something short that looks like it my be a reproducible bug on a modern perl\, I'll have a look at it.

-- Diplomacy is telling someone to go to hell in such a way that they'll look forward to the trip

p5pRT commented 11 years ago

From @arc

Dave Mitchell \davem@&#8203;iabyn\.com wrote​:

I haven't really got the inclination to wade through that huge report and test script\, although I note that the OP failed to respond to either of Nicholas's or my requests for further information.

If anyone can turn the report into something short that looks like it my be a reproducible bug on a modern perl\, I'll have a look at it.

I've had a non-trivial attempt at it\, and I can't find any evidence that blead has any problems here. I suggest closing this ticket; if there ever was a genuine bug here\, it seems to have been fixed since 5.8.1.

-- Aaron Crane ** http​://aaroncrane.co.uk/

p5pRT commented 11 years ago

From @jkeenan

On Fri Jan 18 06​:08​:58 2013\, perl@​aaroncrane.co.uk wrote​:

Dave Mitchell \davem@&#8203;iabyn\.com wrote​:

I haven't really got the inclination to wade through that huge report and test script\, although I note that the OP failed to respond to either of Nicholas's or my requests for further information.

If anyone can turn the report into something short that looks like it my be a reproducible bug on a modern perl\, I'll have a look at it.

I've had a non-trivial attempt at it\, and I can't find any evidence that blead has any problems here. I suggest closing this ticket; if there ever was a genuine bug here\, it seems to have been fixed since 5.8.1.

Agreed; closing.

p5pRT commented 11 years ago

@jkeenan - Status changed from 'open' to 'resolved'