文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > c数值算法程序大全c5-5
侵权投诉

c数值算法程序大全c5-5

c数值计算 程序大全

5.5RecurrenceRelationsandClenshaw’sRecurrenceFormula179whereαandβaretheprecomputedcoef cients

α≡2sin2δ

2β≡sinδ(5.5.7)

Thereasonfordoingthingsthisway,ratherthanwiththestandard(andequivalent)identitiesforsumsofangles,isthathereαandβdonotlosesigni canceiftheincrementalδissmall.Likewise,theaddsinequation(5.5.6)shouldbedoneintheorderindicatedbysquarebrackets.Wewilluse(5.5.6)repeatedlyinChapter12,whenwedealwithFouriertransforms.

Anothertrick,occasionallyuseful,istonotethatbothsinθandcosθcanbecalculatedviaasinglecalltotan:

2

t≡tanθ

cosθ=1 t

21+t2sinθ=2t

1+t2(5.5.8)

Thecostofgettingbothsinandcos,ifyouneedthem,isthusthecostoftanplus2multiplies,2divides,and2adds.Onmachineswithslowtrigfunctions,thiscanbeasavings.However,notethatspecialtreatmentisrequiredifθ→±π.Andalsonotethatmanymodernmachineshaveveryfasttrigfunctions;soyoushouldnotassumethatequation(5.5.8)isfasterwithouttesting.

StabilityofRecurrences

Youneedtobeawarethatrecurrencerelationsarenotnecessarilystableagainstroundofferrorinthedirectionthatyouproposetogo(eitherincreasingnordecreasingn).Athree-termlinearrecurrencerelation

yn+1+anyn+bnyn 1=0,n=1,2,...(5.5.9)

hastwolinearlyindependentsolutions,fnandgnsay.Onlyoneofthesecorrespondstothesequenceoffunctionsfnthatyouaretryingtogenerate.Theotheronegnmaybeexponentiallygrowinginthedirectionthatyouwanttogo,orexponentiallydamped,orexponentiallyneutral(growingordyingassomepowerlaw,forexample).Ifitisexponentiallygrowing,thentherecurrencerelationisoflittleornopracticaluseinthatdirection.Thisisthecase,e.g.,for(5.5.2)inthedirectionofincreasingn,whenx<n.YoucannotgenerateBesselfunctionsofhighnbyforwardrecurrenceon(5.5.2).

Tostatethingsabitmoreformally,if

fn/gn→0asn→∞(5.5.10)

thenfniscalledtheminimalsolutionoftherecurrencerelation(5.5.9).Nonminimalsolutionslikegnarecalleddominantsolutions.Theminimalsolutionisunique,ifitexists,butdominantsolutionsarenot—youcanaddanarbitrarymultipleoffntoagivengn.Youcanevaluateanydominantsolutionbyforwardrecurrence,butnottheminimalsolution.(Unfortunatelyitissometimestheoneyouwant.)

AbramowitzandStegun(intheirIntroduction)[1]givealistofrecurrencesthatarestableintheincreasingordecreasingdirections.Thatlistdoesnotcontainallvisit website doc.guandang.net or call 1-800-872-7423 (North America only), readable files (including this one) to any server cor send email to trade@cup.cam.ac.uk (outside North America).omputer, is strictly prohibited. To order Numerical Recipes books, diskettes, or CDROMsPermission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machine-Copyright (C) 1988-1992 by Cambridge University Press. Programs Copyright (C) 1988-1992 by Numerical Recipes Software. Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)

上一页第2页

你可能喜欢

热门文档

相关文档

  • C4.5算法的分析和实现

    C4.5算法的分析和实现_工学_高等教育_教育专区。本文首先分析了决策树算法,再...c数值算法程序大全c4-5 15页 免费 基于C4_5决策树算法的弱... 暂无评价 4...

  • 淘师湾作业答案

    表格数据的数值计算10-1 BDDBBC 表格数据的图形化11...(B2:B5)或=B2+B3+B4+B5; (2)=B5/C5;...(2-2)AABCB 算法及其描述(2-3) DBDBA 程序设计...

  • C高级 第三章 数据结构与算法概述

    算法和算法分析 3-1 什么是数据结构数据结构是一门研究非数值计算的程序设计...2014-5-13 9 3-1-1 教学计划编排问题课程编号 C1 C2 C3 C4 C5 C6 ...

  • C5.0分类算法及在银行个人信用评级中的应用

    到目前为止,决策树C4.5算法的研究已 基本成熟,但其C5.0算法由于商业机密的...’‘ 万 方数据 第12期 庞素琳,等:C5.0分类算法及在银行个人信用评级中的...

  • 算法代码

    2页 5财富值 最近对算法代码 2页 1财富值 查找算法代码 4页 免费 C++经典算法代码 17页 5财富值 c常用算法(代码) 19页 2财富值喜欢...

  • C语言题解(1-3)

    (4) (5) (6) (7) (8) 2.6 用伪代码表示 2.4 题中各题的算法。 ...(1) (2) (3) 第3章 3.1 请将 C 语言的数据类型和其他高级语言的数据...

  • 数值计算方法--课程背景

    数值计算方法--课程背景_数学_自然科学_专业资料。实用...实际 问题 数学 模型 数值 方法 程序 设计 上机 实现...c0 c1 c2 c3 c4 c5 原始图片 最接近原则...

  • 数据结构与算法(吴跃)ch4-3

    算法实现:图用邻接矩阵表示 ?算法描述 Ch6_3.c 例 2 1 6 1 5 3 6 6...程序设计基础 离散数学 数据结构 汇编语言 语言的设计和分析 计算机原理 编译原理...

  • visual fortran常用数值算法集源代码.part02

    visual fortran常用数值算法集源代码.part02 是压缩文档,在pdf的附加文档中!因为...C5 15:38 C6 15:38 C7 15:38 C8 7:27 P9 7:27 P10 6:12 C9 ...

  • 下篇-02 C语言程序设计_2013-2014-2(V1.8)

    (件数) 2 计算总价: total 3 输出总价 1 常量:程序运行时其值不能改变的量...{ unsigned char c3,c4,c5; char c1, c2 ; c1=97; c2='\a'; 3...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email