comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <marin.condic.auntie.spam@pacemicro.com>
Subject: Re: Large numbers (or is Ada the choice for me?)
Date: Fri, 9 Mar 2001 14:35:42 -0500
Date: 2001-03-09T19:36:16+00:00	[thread overview]
Message-ID: <98bbbg$jmf$1@nh.pace.co.uk> (raw)
In-Reply-To: slrn9ai9uk.iv9.georg@apal.ii.uib.no

"Hans Georg Schaathun" <georg@ii.uib.no> 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/






  reply	other threads:[~2001-03-09 19:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-09 18:58 Large numbers (or is Ada the choice for me?) Hans Georg Schaathun
2001-03-09 19:35 ` Marin David Condic [this message]
2001-03-09 20:44   ` David Starner
2001-03-09 23:12     ` Marin David Condic
2001-03-10  2:56       ` David Starner
2001-03-10 11:37         ` Florian Weimer
2001-03-10  6:08       ` tmoran
2001-03-09 21:01   ` Randy Brukardt
2001-03-09 23:02   ` Robert A Duff
2001-03-09 23:28     ` Marin David Condic
2001-03-10 16:49       ` Hans Georg Schaathun
2001-03-10 11:59   ` Jeffrey Carter
2001-03-09 20:37 ` Brian Catlin
2001-03-09 21:26 ` JP Thornley
2001-03-09 21:59 ` Tucker Taft
2001-03-15  8:33   ` Modular type (Re: Large numbers) Hans Georg Schaathun
2001-03-15 10:58     ` Florian Weimer
2001-03-15 11:12       ` Hans Georg Schaathun
2001-03-15 16:24         ` Tucker Taft
2001-03-10  1:42 ` Large numbers (or is Ada the choice for me?) Keith Thompson
2001-03-19 20:48 ` Robert I. Eachus
2001-03-20  3:33   ` Brian Rogoff
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox