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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable 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!proxad.net!usenet-fr.net!enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Marius Amado Alves Newsgroups: comp.lang.ada Subject: Re: Float to String Date: Wed, 10 Nov 2004 17:28:55 +0000 Organization: Cuivre, Argent, Or Message-ID: References: <526nxsbun7e2.1n5a4jpe7u7ww$.dlg@40tude.net> <87bre63qh3.fsf@beeblebrox.rfc1149.net> <1hmyhi3g3ogfq.gdvw6tkdvemq.dlg@40tude.net> NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: melchior.cuivre.fr.eu.org 1100107739 23204 212.85.156.195 (10 Nov 2004 17:28:59 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Wed, 10 Nov 2004 17:28:59 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en In-Reply-To: <1hmyhi3g3ogfq.gdvw6tkdvemq.dlg@40tude.net> X-OriginalArrivalTime: 10 Nov 2004 17:28:29.0396 (UTC) FILETIME=[B1938940:01C4C74A] X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:6123 Date: 2004-11-10T17:28:55+00:00 > 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. Ok, you're right. And implementing an order relation (required by the design of Mneson) with the three fixed point types I found myself replicating a floating point device so I'm reverting to a floating point type as the 'universal' real type! > So the second question: do you have have ADT in your database? In one word, no. In more words: Mneson supports ADT through its graph data model. Arbitrarily complex data structures are represented by graphs. Vertices are either basic values (integer, real, string) or valueless. Links are directed and untyped (unlabelled) at the base level. Support to represent complex structures including typed links exist. ADTs can be build on top of this level. Correspondence with Ada types, however, is supposed to occur more at the base level. I'm using Ada as a systems programming language only. Of course the ADTs of the system itself are represented in Ada. And these and others can be linked with Mneson graphs. I'm working on it now. Unless you were asking about the ADTs that represent Mneson. In that case yes, of course they exist. For example a working graph is represented by an instantiation of this package: generic with function To_Vertex (Value : String) return Vertex is <>; with function To_Vertex (Value : Integer_64) return Vertex is <>; with function Valueless_Vertex (Number : Serial_Number) return Vertex is <>; with function New_Serial_Number return Serial_Number is <>; with function New_Vertex return Vertex is <>; with function Value (X : Vertex) return Integer_64 is <>; with function Value (X : Vertex) return String is <>; with function Length (X : Vertex) return Natural is <>; with function Slice (X : Vertex; Low : Positive; High : Natural) return String is <>; with procedure Connect (Source, Target : Vertex) is <>; with procedure Disconnect (Source, Target : Vertex) is <>; with procedure Disconnect_From_Targets (Source : Vertex) is <>; with procedure Disconnect_From_Sources (Target : Vertex) is <>; with procedure Disconnect (X : Vertex) is <>; with procedure Reconnect (Source, Target, New_Target : Vertex) is <>; with procedure Inv_Reconnect (Target, Source, New_Source : Vertex) is <>; with function Connected (Source, Target : Vertex) return Boolean is <>; with function Connected (Source : Vertex) return Boolean is <>; with function Inv_Connected (Target : Vertex) return Boolean is <>; with procedure For_Each_Target (Source : Vertex; Process : Process_Vertex) is <>; with procedure For_Each_Source (Target : Vertex; Process : Process_Vertex) is <>; with procedure For_Each_Link (Process : Process_Link) is <>; with procedure For_Each_Common_Target (Source_1, Source_2 : Vertex; Process : Process_Vertex) is <>; with function Is_Integer_64 (X : Vertex) return Boolean is <>; with function Is_String (X : Vertex) return Boolean is <>; with function Is_Valueless (X : Vertex) return Boolean is <>; with function Img (X : Vertex) return String is <>; with function Val (Img : String) return Vertex is <>; package Work is end;