List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:October 27 1999 4:25pm
Subject:Re: Problems with floor
View as plain text  
In the last episode (Oct 27), sinisa@stripped said:
> Dan Nelson writes:
>  > In the last episode (Oct 27), sinisa@stripped said:
>  > > 
>  > > select floor(pow(2,63));
>  > > 
>  > > returning negative result of -9223372036854775808.
>  > 
>  > Mysql should either return some kind of error, or keep the result in
>  > double format internally, or use fixed-point math..
> 
> Yes, for X/OPen it is double, for ANSI SQL it is integer. Which one is 
> more relevant for MySQL ????

Dunno.  Does ANSI SQL specify that the application must store the
number in a machine integral type?  What's wrong with using a double
internally if the number doesn't fit in a longlong?  For what it's
worth, the largest power that Oracle can process correctly is 2^132. 
Past that it starts losing precision, but still works.

-- 
	Dan Nelson
	dnelson@stripped
Thread
Re: Problems with floorsinisa27 Oct
  • Re: Problems with floorDan Nelson27 Oct
    • Re: Problems with floorsinisa27 Oct
      • Re: Problems with floorDan Nelson27 Oct
        • Re: Problems with floorMichael Widenius15 Nov
  • Re: Problems with floorJeremy Cole28 Oct
    • Re: Problems with floorsinisa28 Oct