From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,91965a012526b259 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Float to String Date: Wed, 10 Nov 2004 17:35:16 +0100 Message-ID: <1hmyhi3g3ogfq.gdvw6tkdvemq.dlg@40tude.net> References: <526nxsbun7e2.1n5a4jpe7u7ww$.dlg@40tude.net> <87bre63qh3.fsf@beeblebrox.rfc1149.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 3r0+0O9TUzfcfJcRDBw0kwY7dCskgMBchhbnXm65THewc1mxE= User-Agent: 40tude_Dialog/2.0.12.1 Xref: g2news1.google.com comp.lang.ada:6121 Date: 2004-11-10T17:35:16+01:00 List-Id: On Wed, 10 Nov 2004 15:35:30 +0000, Marius Amado Alves wrote: > Samuel Tardieu wrote: >> Each time I read a thread like that, I remember why I really don't >> like floating point values :) > > Curiuously enough, I am working on adding real types to Mneson, and > currently I have only decimal fixed point types: > > "Real values are represented by decimal fixed point types Giganano, > Megapico, Teramicro. The name of each type indicates its range and > precision, e.g. Giganano values range from -1G to 1G with a precision of 1n. The first question: what makes you believe that zero should be always included? It might be needed if unary minus is required to be closed. See the point? The numeric model is driven by the operations applied, their accuracy and requirement to be closed on the domain set. But there is no good reason why 0-x as an operation should be any better than, say, 1/x. The latter, BTW would lead you directly to floating point representations. If we consider other various operations we will come to interval arithmetic, for which the very idea of a singular value (and so "precision of a value") becomes meaningless. So the second question: do you have have ADT in your database? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de