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=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,69bb03cc695b330a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-03-09 11:45:53 PST Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!psinet-france!psiuk-f4!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Large numbers (or is Ada the choice for me?) Date: Fri, 9 Mar 2001 14:35:42 -0500 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <98bbbg$jmf$1@nh.pace.co.uk> References: NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 984166576 20175 136.170.200.133 (9 Mar 2001 19:36:16 GMT) X-Complaints-To: newsmaster@pace.co.uk NNTP-Posting-Date: 9 Mar 2001 19:36:16 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: supernews.google.com comp.lang.ada:5578 Date: 2001-03-09T19:36:16+00:00 List-Id: "Hans Georg Schaathun" wrote in message news:slrn9ai9uk.iv9.georg@apal.ii.uib.no... > I need a tool to solve large systems of linear equations, with no > floating point operations (or any other approximations) allowed. > Even though I am not a seasoned programmer, I think I'll have to > write the tool myself. > This is a hopeless mission. Consider the instant you're row reduction results in 1/3 - can you put that into a computer *without* an approximation and still do math on it? The only issue then is how much accuracy is enough? There are some Ada packages out there to do matrix math, but none that I know of that will do so without some version of floating point numbers. However, you could use these packages as models for ones of your own implementation. A good place to start looking for Ada software is: http://www.adapower.org/ A quick Google search with the words "Ada Linear Algebra" yielded: http://www.cc.utah.edu/~nahaj/ada/math/linear.ads.html http://www.masstech.com/mpdesc.htm See also: http://lglwww.epfl.ch/Team/MW/mw_components.html As I recall Mats Weber had some Linear Algebra stuff in Ada... > My question is, will it be reasonably simple to handle large > rational numbers with Ada? Is there any packages for this? > easier than in most languages because you can create a package to house the whole thing and use it just as if it was a native data type. Ex: package My_Big_Numbers is type Really_Big_Number_Type is private ; function "+" ( Left, Right : in Really_Big_Number_Type) return Really_Big_Number_Type ; -- And so on.... I know of none in existence, but that doesn't mean there isn't one. Try Adapower &/or Google. A quick search of Google using "Big Number Arithmetic Ada" gave me: http://www.chez.com/bignumber/ > Does basic Ada (gnat) support (f.ex.) 2048-bit integers? Does > any module exist for integers of dynamic size? Are these > handled reasonably efficiently, or is there much overhead? > Nope. Nope and Not Applicable. You're either going to have to download someone's large-number-package(s) or roll your own. I know of no general purpose languages that are going to give you math on that big a scale right out of the box. It should not be too hard to make your own code and it might make a valuable contribution if you were to post it somewhere... > I guess I will manage to implement the rational numbers without > too much hardship, but I really don't feel like implementing > arithmetics on large integers. > Someone probably has done this, but it would be nice if you end up creating one to post it somewhere useful. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/