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,2aaba1527862ef22 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!proxad.net!proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Reading Float Data from a binary file into ada Date: Thu, 01 Feb 2007 18:27:12 +0100 Organization: Adalog Message-ID: References: <1170172307.292500.256090@m58g2000cwm.googlegroups.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1170352865 23064 195.25.228.57 (1 Feb 2007 18:01:05 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Thu, 1 Feb 2007 18:01:05 +0000 (UTC) User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) In-Reply-To: Xref: g2news2.google.com comp.lang.ada:8822 Date: 2007-02-01T18:27:12+01:00 List-Id: Ali Bendriss a �crit : > I was not aware that VB has some fixed point built-in. > (... In fact I never use the fixed point at all). > I was thinking that it's mostly a facility offered by Ada. > I undersand that it could be usefull for the monetary conversion for example > but is it an important feature for a language to offer a built-in fixed point > representation ? does a library can offer the same level of facility ? > IANAL, but I heard that it is forbidden by law to make monetary computations in floating point. Even when you are computing the budget of the DoD :-), you are not allowed to loose cents just because the amount is too big. Time is another interesting example: except when you are modelling the big bang, the origin of time is arbitrary, and you'd better not loose precision as time flows. Of course, if you are using a poor language without fixed point, you can get the facility with a library. However, it is much more convenient to have it as a first class type. There are really two ways of modelling mathematical reals; the fact that most languages provide only one does not imply that the other one is not useful. -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr