DOC PREVIEW
TAMU CSCE 420 - prog1

This preview shows page 1 out of 2 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 2 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

420-500: Programming Assignment 1Read every page very carefully before you begin.1. Implement deriv to support:addition, subtraction, unary minus, multiplication, and division.→ HINT: use slide02 page 44 as a skeleton.2. Implement simplification routines splus etc. for all operators andintegrate it into derivplus, etc.→ HINT: Integrate code in slide02 page 45 into code in page 44. (Codeavailable on course web page, under the src/ director y.)3. Write a simple function deriv-eval to assign a numerical value to thevariable and get a single number corresponding to the resulting derivative:(deriv-eval ’(+ (*x x) (- 2 x)) ’x 20)* You can either use recursion or some other neat lisp tricks to achieve this.1Programming Assignment 1: other conditions1. Use only one variable (say X). Other symbols should be treatedas constants (e.g. Y, Z, ...).2. All operators should be binary operators:i.e. expressions like (+ 1 2 3 4 5) do not need to besupported. Only those in the form of (+ 1 2) are expected tobe used.3. The only exception is the unary minus operator (- 10), whichonly has one argument.4. You must check for division by zero and print an error message incase such an event occurs.2Programming Assignment 1: Example Inputs andOutputs1. (deriv ’(*(+ x 4) (+ x 5)) ’x)-> (+ (+ X 4) (+ X 5)))2. (deriv ’(/ (+ x 1) x) ’x)-> (/ (- X (+ X 1)) (*X X))3. (deriv-eval ’(*(+ x 4) (+ x 5)) ’x 10)-> 294. (deriv-eval ’(/ (+ x 1) x) ’x 5)-> -1/253Programming Assignment 1: Required MaterialUse the exact filename as shown below (in bold).• Program code (deriv.lsp): put it in a single text file.– Ample indentation and documentation is required.• Documentation (README): user manual (how to load andexecute).• Sample inputs and outputs (include in README)– 5 non-trivial examples, each containing a combination of morethan 5 arithmetic operators. Provide examples for both derivand deriv-eval.• Grading criteria:– README, test cases, comments, readability: 10%– deriv : 50%– simplification: 40%4Programming Assignment 1: Important GradingInformation• Since the deriv functions call the simplification functions, if thesimplification routine is broken, regardless of the deriv functionsbeing correct, your call will result in an error. If this happens, bothderiv and simplification will be graded as malfunctioning.• If you got deriv functions to work, but if simplification is notworking, take out the simplification code from your deriv functionsso that at least your deriv functions work.5Programming Assignment 1: Submission• Use the csnet turnin form (http://csnet.cs.tamu.edu).• Due : see course web page for the due date.• Late policy: No late submission is allowed. Submit whatever youhave by then.• Only include plain text ASCII files. Do not include MS-Worddocuments or other formatted text. Your assignment will notbe graded in such a case.6Academic Policy• This is an individual assignment. No collaboration is allowed.• Any suspected academic policy violations will be promptlyreported to the Aggie Honor System Office(http://www.tamu.edu/aggiehonor/).• For discussions regarding the assignemnt, frequently check outthe read-only bulletin board on the course web page, sincemost of the Q-and-A’s will be uploaded


View Full Document

TAMU CSCE 420 - prog1

Documents in this Course
Load more
Download prog1
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view prog1 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view prog1 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?