Polynomial representation and manipulation

Discussion of Common Lisp

Polynomial representation and manipulation

Postby cleverhorn » Sun Dec 30, 2012 5:34 pm

Hi,

I just started learning (common) lisp so I am new to it. I saw that there was an assignment up-coming soon but I decided to try it as early as possible to get all the generic ideas.

The main idea is to make a simple program that does this:
turns " (x+y)^2 " into " x^2 + 2xy + y^2 "
and few more. (I want to do those other things myself so I can learn)

How do I do this in clisp ? Because I am not sure how I should represent in a suitable way and how I should write the function.

So, if any could care, some snippet code will definitely be useful. I am not asking anyone to write down the whole function for me. A bit of idea with an explanation of the function and background would definitely help me kick start.

Yes, I am new to this forum.

Good day.
cleverhorn
 
Posts: 1
Joined: Sun Dec 30, 2012 5:24 pm

Re: Polynomial representation and manipulation

Postby sylwester » Sun Dec 30, 2012 8:19 pm

Hi and welcome to the forum.

Might be slightly off topic but SICP videoes, lecture 4B at about 57 minutes implements adding polynomials. It's an early Scheme so you'll have to port it to CL, but it might give you some ideas and the videoes are quite entertaining :-)

Syl
I'm the author of two useless languages that uses BF as target machine.
Currently I'm planning a Scheme compiler :p
sylwester
 
Posts: 83
Joined: Mon Jul 11, 2011 2:53 pm


Return to Common Lisp

Who is online

Users browsing this forum: No registered users and 1 guest

cron