It could be surprising in the example below:

SELECT CAST('-0.0' AS NUMERIC); -- 0.0
SELECT CAST('0.0' AS NUMERIC); -- 0
SELECT CAST('+0.0' AS NUMERIC); -- 0

Best,
Manuel

On Wed, Jun 12, 2019 at 3:57 PM John McKown <john.archie.mck...@gmail.com>
wrote:

> On Wed, Jun 12, 2019 at 8:35 AM Richard Hipp <d...@sqlite.org> wrote:
>
> > IEEE754 floating point numbers have separate representations for +0.0
> > and -0.0.  As currently implemented, SQLite always display both
> > quantities as just "0.0".
> >
> > Question:  Should SQLite be enhanced to show -0.0 as "-0.0"?  Or,
> > would that create unnecessary confusion?
> >
>
> Is there any case where the display makes a difference? I cannot think of
> any case where it is mathematically important. Actually the "0.0" is more
> mathematically correct because zero is neither positive nor negative.
>
> The IBM "mainframe" zSeries processors implement three floating points
> formats: HFP (historic "hexadecimal Floating Point"), BFP (Binary Floating
> Point -- IEEE754) and DFP (Decimal Floating Point -- IEEE754-2008). I am
> not aware of any other architecture which does this.
>
>
>
> >
> > --
> > D. Richard Hipp
> > d...@sqlite.org
>
>
> --
> This is clearly another case of too many mad scientists, and not enough
> hunchbacks.
>
>
> Maranatha! <><
> John McKown
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to