Exercise2.3 Implementarepresentationforrectanglesinaplane.(Hint:YoumaywanttomakeuseofExercise2.2.)Intermsofyourconstructorsandselectors,createproceduresthatcomputetheperimeterandtheareaofagivenrectangle.Nowimplementadifferentrepresentationforrectangles.Canyoudesignyoursystemwithsuitableabstractionb...

  XQhsaWUMj5JH   9天前   37   0   0 其他语言

Exercise1.45 WesawinSection1.3.3thatattemptingtocomputesquarerootsbynaivelyfindingafixedpointofy->x/ydoesnotconverge,andthatthiscanbefixedbyaveragedamping.Thesamemethodworksforfindingcuberootsasfixedpointsoftheaverage-dampedyx/y^2.Unfortunately,theprocessdoesnotworkforfourthroots—asingleaveraged...

  XQhsaWUMj5JH   11天前   46   0   0 其他语言

Exercise2.1 Exercise2.1:Defineabetterversionofmake-ratthathandlesbothpositiveandnegativearguments.make-ratshouldnormalizethesignsothatiftherationalnumberispositive,boththenumeratoranddenominatorarepositive,andiftherationalnumberisnegative,onlythenumeratorisnegative. 第一章学完了,今天开始学习第二章,目前还没有遇到什么问题,...

  XQhsaWUMj5JH   11天前   42   0   0 其他语言
关注 更多

空空如也 ~ ~

粉丝 更多

空空如也 ~ ~