-
Notifications
You must be signed in to change notification settings - Fork 11
SICP 2.5.3
- Have you ever used "data directed recursion" before?
- Why don't we apply the same tactic to
terms
as well as polynomials?
Install =zero?
for polynomials.
Extend the poly system to include subtraction.
- Did you find generic negation to be useful?
Define procedures that implement the term-list representation described above for dense polynomials.
Make polys generic over sparse and dense representations.
- Did anyone do it?
- What problems did you run into?
- What did you end up changing?
Too long to summarize; pg 312 in my PDF
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?
Modify rational-arithmetic to use generic operations, but change make-rat
so that it does not attempt to reduce to lowest terms.
Using div-terms
, implement remainder-terms
.
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.