Re: what's it worth to write a short program for polynomial multiplication?



rjf wrote:

This is somewhat off topic; I do not myself consider unadorned common
lisp to be an ideal language for expression of mathematics for
applications. It is pretty handy for programming, though, and I think
that is illustrated by the short programs for multiplication of
polynomials in the referenced paper. If shorter programs can be
written in other languages, (other than Tim's x*y) I'd like to see
them.

I'm not really sure about the value of short multiplication codes other
than for pedagogical applications, but maybe that's just me. In any
case, I thought I'd throw a ruby program to multiply polynomials stored
as hash tables with exponents as keys into the pot:

c = Hash.new(0)
a.each {|ea,ca| b.each {|eb,cb| c[ea+eb] += ca*cb }}

Certainly not optimized for anything, maybe(!) except for code size. The
code would look virtually the same in almost any language that provides
hash tables, which certainly includes C++, Python, MuPAD, Maple, and I
would be very surprised if it did not include LISP, Axiom etc.

--
seit wann sind Vertragsinhalte für NewsGroup-Frager relevant?
Sie sind lebensnotwendig um sie sofort auf überraschende Inhalte
abzuklopfen oder sonst in Frage zu stellen.
(Kurt Gunter und Konrad Wilhelm in dsrm)
.



Relevant Pages

  • something i dont understand...
    ... that i don't understand has to do with the use of lisp as a programming ... language for "large" applications. ... i see centers around providing ".exe" like applications that someone ... application application is written in mumps. ...
    (comp.lang.lisp)
  • Re: Chestnut Lisp translator
    ... but a full fledged programming language that's capable of ... Lisp has seen some success in widely different areas: ... as an implementation language for symbolic computing applications ...
    (comp.lang.lisp)
  • Re: Executables: Why all the abuse?
    ... Cameron> applications and want to share them on the net. ... Lisp was developed for programming large systems, ... Common Lisp has been used in embedded systems, ... concise demonstrations of theoretical language power) or Dylan ...
    (comp.lang.lisp)
  • Re: Joel hammers the final nail into Lisps coffin
    ... programmer with extensive experience in the language. ... If you have been writing applications in Java for 10 years and just learned ... Lisp you are probably better off sticking with Java. ... I can't say there have been zero successes with Lisp (Naughty Dog, ...
    (comp.lang.lisp)
  • Re: whats it worth to write a short program for polynomial multiplication?
    ... code would look virtually the same in almost any language that provides ... would be very surprised if it did not include LISP, ... The equivalent program in lisp is ... languages with hash tables, ...
    (sci.math.symbolic)