List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:February 22 2000 5:48pm
Subject:Re: Serious BUG in 3.23!
View as plain text  
In the last episode (Feb 22), Tim Bunce said:
> All very true, but it ought to be possible for mysqld to do the right
> thing for simple constants that have not undergone any manipulation
> (addition, subtraction etc).

The problem is that 0.2 is not a simple constant.  In binary, it's
represented as .0011(0011), repeating until infinity.  It's possible
that float->double or double->float casts could round in different
directions, making even direct comparison fail.  If you want accurate
fractional amounts, use the DECIMAL field type.

-- 
	Dan Nelson
	dnelson@stripped
Thread
Serious BUG in 3.23!Dimitri22 Feb
  • Re: Serious BUG in 3.23!Gary Bickford22 Feb
    • Re: Serious BUG in 3.23!Tim Bunce22 Feb
      • Re: Serious BUG in 3.23!Dan Nelson22 Feb
        • Re: Serious BUG in 3.23!Tim Bunce22 Feb
          • Re: Serious BUG in 3.23!Benjamin Pflugmann25 Feb
            • Re: Serious BUG in 3.23!Thimble Smith25 Feb
              • Re: Serious BUG in 3.23!Benjamin Pflugmann25 Feb
  • Re: Serious BUG in 3.23!Jaime Teng22 Feb
  • Re: Serious BUG in 3.23!James Lyon22 Feb
  • Re: Serious BUG in 3.23!Jan Dvorak22 Feb
  • Re: Serious BUG in 3.23!Jan Dvorak25 Feb
  • Re: Serious BUG in 3.23!Gary Bickford2 Mar
Re: Serious BUG in 3.23!Jimmy Moore22 Feb
Re: Serious BUG in 3.23!Dimitri22 Feb
Re: Serious BUG in 3.23!Christopher R. Jones22 Feb
  • Re: Serious BUG in 3.23!Vivek Khera22 Feb
  • Re: Serious BUG in 3.23!Benjamin Pflugmann25 Feb
  • Re: Serious BUG in 3.23!Gary Bickford25 Feb
Re: Serious BUG in 3.23!James Lyon23 Feb