zoukankan      html  css  js  c++  java
  • 【SICP练习】131 练习3.62

    练习3-62

    原文

    Exercise 3.62. Use the results of exercises 3.60 and 3.61 to define a procedure div-series that divides two power series. Div-series should work for any two series, provided that the denominator series begins with a nonzero constant term. (If the denominator has a zero constant term, then div-series should signal an error.) Show how to use div-series together with the result of exercise 3.59 to generate the power series for tangent.

    代码

    (define (div-series s1 s2)
      (let ((c (stream-car s2)))
        (if (= c 0)
            (error "constant term of s2 can't be 0!")
            (scale-stream (mul-series s1
                                      (reciprocal-series (scale-stream s2 (/ 1 c))))
                          (/ 1 c)))))
    
    (define tane-series (div-series sine-series cosine-series))



    感谢访问,希望对您有所帮助。 欢迎关注或收藏、评论或点赞。


    为使本文得到斧正和提问,转载请注明出处:
    http://blog.csdn.net/nomasp


    版权声明:本文为 NoMasp柯于旺 原创文章,如需转载请联系本人。

  • 相关阅读:
    jni ndk 入门
    Activity 四种启动模式
    广播接收者 BroadcastReceiver
    android 焦点 ListView 点击事件获取失败
    android 动画效果
    JAVA 配置
    python 1:列表和字典
    poj1595 水题
    hdu 1181 深搜
    poj3264 划分树
  • 原文地址:https://www.cnblogs.com/NoMasp/p/4786069.html
Copyright © 2011-2022 走看看