- 1、本文档共17页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Pascal uses Math 调用数学库(国外英文资料)
Pascal uses Math 调用数学库(国外英文资料)
USES invokes the Pascal database.
For example, USES Math calls the Math library.
Math library and practical summary
In FP, the Math library provides us with a rich mathematical function. The following are some functions and procedures in the Math library that you might use in OI.
Usage: load the Math library with the Uses statement in the program header
Example:
The Program Ex_Math;
Uses Math;
The Begin
Writeln (hypot (3, 4));
The End.
Function is introduced:
hypot
The prototype: function hypot (x: float; y: float) : float
Function: return the length of the longer side of a right triangle, which is SQRT (SQR (x) + SQR (y)).
ceil
Prototype: function ceil (x: float) : Integer
Function: the minimum integer that is larger than the parameter
Cause errors: overflow errors are caused when x exceeds the Integer
floor
Prototype: function floor (x: float) : Integer
Function: the maximum integer that returns a small parameter
Cause errors: overflow errors are caused when x exceeds the Integer
The power
Function power (base: float; exponent: float) : float
Function: return to base to exponent
Cause errors: when base is negative and exponent is a decimal
intpower
Prototype: function intpower (base: float; const exponent: Integer) : float
Function: return to base to exponent
ldexp
Prototype: function ldexp (x: float; const p: Integer) : float
Function: return 2 to the p times x
log10
Prototype: function log10 (x: float) : float
Function: the common logarithm of return x
log2
Prototype: function log2 (x: float) : float
Function: log base 2 of x
logn
The prototype: function logn (n: float; x: float) : float
Function: return x log base n
Max
The prototype: function Max (a: Integer; b: Integer) : Integer
Function Max (a: Int64; b: Int64) : Int64
Function Max (a: Extended; b: Extended) : Extended
Function: return a to the larger one in b
Min
The prototype: function Min (a: Integer; b: Integer) : Integer
Function Min (a: Int64; b: Int64) : Int64
Function
您可能关注的文档
最近下载
- 临床微生物学检验技术试题及答案.docx VIP
- Danfoss丹佛斯iC2-Micro Frequency Converters Appl. Gui Application guide说明书用户手册.pdf
- “一带一路”背景下国际投资争端解决机制研究.docx VIP
- JJG 1118-2015 电子汽车衡(衡器载荷测量仪法)(高清).pdf
- 冀教版五年级英语下册全套测试卷.doc
- NB∕T 32036-2017 光伏发电工程达标投产验收规程.docx
- 2024年新《机场安检员》工作岗位试题库(有答案).pdf
- 小学数学三年级下册第三单元《乘法》作业设计.docx VIP
- 超星网课尔雅《知识论导论:我们能知道什么》尔雅答案2022章节测试答案.docx
- JT 711-2008 营运客车燃料消耗量限值及测量方法.pdf VIP
文档评论(0)