Skip to content
dann toliver edited this page Feb 27, 2014 · 7 revisions
Why do I always get the mathy ones?

General questions

  • Have you ever used "data directed recursion" before?
  • Why don't we apply the same tactic to terms as well as polynomials?

Exercises

2.87

Install =zero? for polynomials.

2.88

Extend the poly system to include subtraction.

  • Did you find generic negation to be useful?

2.89

Define procedures that implement the term-list representation described above for dense polynomials.

2.90

Make polys generic over sparse and dense representations.

  • Did anyone do it?
  • What problems did you run into?
  • What did you end up changing?

2.91

Too long to summarize; pg 312 in my PDF

2.92

Impose ordering on variables and make mul/add work for polynomials in different variables.

  • Did anyone do it?
  • How not easy was it?
  • Where in particular did you hit problems?

2.93

Modify rational-arithmetic to use generic operations, but change make-rat so that it does not attempt to reduce to lowest terms.

2.94

Using div-terms, implement remainder-terms.

dann notes

Some links:

http://math.ucr.edu/home/baez/roots/

http://johncarlosbaez.wordpress.com/2011/12/11/the-beauty-of-roots/

http://cscheid.github.io/lux/demos/beauty_of_roots/beauty_of_roots.html

  • scary first sentence
  • division seems slightly unnatural... what is a remainder re: polys? "fractional" part?
  • generally the idea is quite easy, which is weird: polys are an awful lot like regular numbers, re: arithmetic
  • tower is not a natural fit for polys... why is that?
  • Indeed, it is fair to say that we do not yet completely understand coercion. In fact, we do not yet completely understand the concept of a data type. ---- what does that all mean?
  • Euclidean rings
  • GCD is important [still not sure what GCD of polys means]
  • data-directed recursion is awesome -- what is this like in other languages? our arithmetic hierarchy works really well for this.
  • did anyone try it with complex coefficients?
  • how did it work with manually tagging numeric values?

Also discussed: surreal numbers, polynomial remainders, type hierarchies vs class hierarchies, the "opposite of types", bezier curves and more.

weekly recap message

Clone this wiki locally