Programming abstractions in C阅读笔记:p166-p175
《Programming Abstractions In C》学习第58天,p166-p175总结。
一、技术总结
1.斐波那契数列(Fibonacci Sequenc)
(1)斐波那契数列来源
斐波那契数列来自于《Liber Abaci》一书里兔子繁殖问题,相关资料很多,这里不赘述。
(2)关于《Liber Abaci》一书
《Liber Abaci》——Liber:a book(意思是“书”);Abaci:abacus的复数形式(意思是“算盘”)。
根据Laurence Sigler《Fibonacci’s Liber Abaci: A Translation into Modern English of Leonardo Pisano’s Book of Calculation》一书第9页内容“One should here again make the point, that while derived from the word abacus the word abaci refers in the thirteenth century paradoxically to calculation without the abacus. Thus Liber abaci should not be translated as The Book of the Abacus......”在13世纪, abaci是指直接使用印度数字(Hindu numerals),而不用“算盘”进行计算。所以,这本书恰当的中文译名应该是《计算之书》(The Book of Calculation,注:纪志刚翻译的中文版用的就是这个名字)。
(3)关于“斐波那契”这个名字
既然称为斐波那契数列,那么作者的名字是否叫斐波那契?根据百科说法是:Liber Abaci is a historic 1202 Latin manuscript on arithmetic by Leonardo of Pisa, posthumously known as Fibonacci。Fibonacci是“filius Bonacci”,即“son of Bonacci”(波那契之子)。参考Keith Devlin所著《The Man of Numbers: Fibonacci's Arithmetic Revolution》一书)。
2.递推关系(recurrence realtion)
p173:
tn = tn-1 + tn-2
An expression of this type, in which each element of a sequence is defined in terms of earlier elements, is called a recurrence relation。
3.斐波那契序列的C语言实现
/*
* File: fib.c
* -----------
* This program lists the terms in the Fibonacci sequence with
* indices ranging from MinIndex to MaxIndex
*/
#include <stdio.h>
#include "genlib.h"
/* Constants */
#define MinIndex 0
#define MaxIndex 12
/* private function prototype */
int Fib(int n);
/* Main program */
int main() {
int i;
printf("This program lists the Fibonacci sequence.\n");
for (i = MinIndex; i < MaxIndex; i++) {
printf("Fib(%d)", i);
if (i < 10) { // 打印对齐
printf(" ");
}
printf(" = %4d\n", Fib(i));
}
return 0;
}
/*
* Function: Fib
* Usage: t = Fib(n)
* -----------------
* This function returns the nth term in the Fibonacci sequence
* using a recursive implementation of the recurrence relation
*
* Fib(n) = Fib(n - 1) + Fib(n - 2)
*/
int Fib(int n) {
if (n < 2) {
return n;
} else {
return (Fib(n - 1) + Fib(n - 2));
}
}
二、英语总结
1.suspcious什么意思?
答:
(1)suspicious < suspicion:adj. feel doubt or not trust(可疑的)。 语法结构:be suspicious of。
(2)suspicion < suspect:c/u.
(3)suspect: vt. sub-("up to") + *spek-("to observe"),The notion behind the word is "look at secretly," hence, "look at distrustfully"(怀疑)。
2.supersede是什么意思?
答:p168,The frame for Fact temporarily supersedes the frame for Main。vt. super-(above) + *sed-(to sit),即“displace, replace”之意。
3.essence是什么意思?
答:u. the basic or most import quality of sth(本质、核心)。示例:p174, The essence of recursion is to break problems down into simpler ones that can be solved by calls to exactly the same function。形容词格式:essential。之前老是不记得essential是什么意思,这里对比着来记。
三、参考资料
1. 编程
(1)Eric S.Roberts,《Programming Abstractions in C》:https://book.douban.com/subject/2003414
2. 英语
(1)Etymology Dictionary:https://www.etymonline.com
(2) Cambridage Dictionary:https://dictionary.cambridge.org
欢迎搜索及关注:编程人(a_codists)
Programming abstractions in C阅读笔记:p166-p175的更多相关文章
- Mongodb Manual阅读笔记:CH3 数据模型(Data Models)
3数据模型(Data Models) Mongodb Manual阅读笔记:CH2 Mongodb CRUD 操作Mongodb Manual阅读笔记:CH3 数据模型(Data Models)Mon ...
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二十三章:角色动画
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二十三章:角色动画 学习目标 熟悉蒙皮动画的术语: 学习网格层级变换 ...
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第十一章:模板测试
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第十一章:模板测试 代码工程地址: https://github.co ...
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第六章:在Direct3D中绘制
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第六章:在Direct3D中绘制 代码工程地址: https://gi ...
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第四章:Direct 3D初始化
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第四章:Direct 3D初始化 学习目标 对Direct 3D编程在 ...
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二章:矩阵代数
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第二章:矩阵代数 学习目标: 理解矩阵和与它相关的运算: 理解矩阵的乘 ...
- Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第一章:向量代数
原文:Introduction to 3D Game Programming with DirectX 12 学习笔记之 --- 第一章:向量代数 学习目标: 学习如何使用几何学和数字描述 Vecto ...
- 阅读笔记 1 火球 UML大战需求分析
伴随着七天国庆的结束,紧张的学习生活也开始了,首先声明,阅读笔记随着我不断地阅读进度会慢慢更新,而不是一次性的写完,所以会重复的编辑.对于我选的这本 <火球 UML大战需求分析>,首先 ...
- [阅读笔记]Software optimization resources
http://www.agner.org/optimize/#manuals 阅读笔记Optimizing software in C++ 7. The efficiency of differe ...
- 《uml大战需求分析》阅读笔记05
<uml大战需求分析>阅读笔记05 这次我主要阅读了这本书的第九十章,通过看这章的知识了解了不少的知识开发某系统的重要前提是:这个系统有谁在用?这些人通过这个系统能做什么事? 一般搞清楚这 ...
随机推荐
- 数位DP?记忆化罢了!
我看了半天的数位 DP,DP 没学会,人倒是麻了. 解决什么 一般用于求解给你一个区间 \([l,r]\),问你其中满足条件的数有多少个. 这种题目还是蛮常见的,我们一般情况下暴力只能拿一少部分分,之 ...
- 【C#/.NET】MAUI上的依赖注入
引言 在移动应用开发中,依赖注入是一项非常重要的技术,它可以帮助我们简化代码结构.提高可维护性并增加测试覆盖率.在最新的.NET跨平台框架MAUI中,我们也可以利用依赖注入来构建高效的应用程序架构 ...
- 如何不加锁地将数据并发写入Apache Hudi?
最近一位 Hudi 用户询问他们是否可以在不需要任何锁的情况下同时从多个写入端写入单个 Hudi 表. 他们场景是一个不可变的工作负载. 一般来说对于任何多写入端功能,Hudi 建议启用锁定配置. 但 ...
- 从零玩转系列之SpringBoot3-核心原理
一.简介 1.前置知识 ● Java17 ● Spring.SpringMVC.MyBatis ● Maven.IDEA 2.环境要求 环境&工具 版本(or later) SpringBoo ...
- MySQL的索引详解
在MySQL中,常见的索引类型有以下几种: B-Tree索引: B-Tree(Balanced Tree)索引是MySQL中最常见的索引类型.它基于B-Tree数据结构,适用于等值查询.范围查询和排序 ...
- FPGA学习之乒乓操作
乒乓操作学习记录如下: 乒乓操作" 是一个常常应用于数据流控制的设计思想, 典型的乒乓操作方法如下图 所示: 乒乓操作的处理流程为:输入数据流通过" 输入数据选择单元"将 ...
- [clickhouse]同步MySQL
前言 clickhouse的查询速度非常快,而且兼容大部分MySQL的sql语法,因此一般将clickhouse作为MySQL的读库. 本文提供两种clickhouse同步MySQL的方式 click ...
- 【Unity3D】平面光罩特效
1 前言 屏幕深度和法线纹理简介中对深度和法线纹理的来源.使用及推导过程进行了讲解,激光雷达特效中讲述了一种重构屏幕像素点世界坐标的方法,本文将沿用激光雷达特效中重构像素点世界坐标的方法,实现平面 ...
- Python 潮流周刊#15:如何分析 FastAPI 异步请求的性能?
你好,我是猫哥.这里每周分享优质的 Python.AI 及通用技术内容,大部分为英文.标题取自其中一则分享,不代表全部内容都是该主题,特此声明. 本周刊精心筛选国内外的 250+ 信息源,为你挑选最值 ...
- c# 如何将程序加密隐藏?
下面将介绍如何通过LiteDB将自己的程序进行加密,首先介绍一下LiteDB. LiteDB LiteDB是一个轻量级的嵌入式数据库,它是用C#编写的,适用于.NET平台.它的设计目标是提供一个简单易 ...