comp.lang.ada
 help / color / mirror / Atom feed
From: waikato.ac.nz!canterbury.ac.nz!news!otago.ac.nz!simon@decwrl.dec.com  (Th e Arch-Deviant)
Subject: Re: ADA arithmetic
Date: 28 Jul 93 04:03:34 GMT	[thread overview]
Message-ID: <1993Jul28.170334.1@otago.ac.nz> (raw)

In article <gmacmanus.2.743824190@gandalf.otago.ac.nz>, gmacmanus@gandalf.otago
.ac.nz (Greg MacManus) writes:
> How do you implement the numbers then?
> 
> 	- Just curious.

Easy - treat them as variable-length arrays (ie in a record with a default
discriminant) of 0..9 then treat each term as a coefficient in an polynomial
evaluated at x=10. As Paul observes, the literature is bulging with nifty
ways for performing operations on polynomials, and since we don't have to
generate keys we can get away with defining only three operations - square
the number, halve it and test for a remainder, and MOD.

Simon Brady                     "I'd join the Movement,
University of Otago              If there was one I could believe in"
Dunedin, New Zealand                  - U2, 'Acrobat'

             reply	other threads:[~1993-07-28  4:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-07-28  4:03 Th e Arch-Deviant [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-07-30  4:44 ADA arithmetic comp.vuw.ac.nz!canterbury.ac.nz!otago.ac.nz!piglet.otago.ac.nz!pgorman
1993-07-30  3:26 waikato.ac.nz!canterbury.ac.nz!otago.ac.nz!is20115
1993-07-29 16:40 cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!spool.mu.ed
1993-07-29  1:01 Robert I. Eachus
1993-07-28 20:46 agate!spool.mu.edu!uwm.edu!wupost!waikato.ac.nz!canterbury.ac.nz!news!ota
1993-07-28 19:00 Michael Feldman
1993-07-28 14:34 Tucker Taft
1993-07-28 12:13 Robert Dewar
1993-07-28 12:11 Robert Dewar
1993-07-28  3:55 Th e Arch-Deviant
1993-07-27  6:13 agate!spool.mu.edu!wupost!waikato.ac.nz!canterbury.ac.nz!news!piglet.otag
1993-07-26 18:51 Robert I. Eachus
1993-07-26  3:06 Michael Feldman
replies disabled

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