Pascal uses Math 调用数学库(国外英文资料).docVIP

  • 11
  • 0
  • 约9.77千字
  • 约 17页
  • 2017-06-10 发布于河南
  • 举报

Pascal uses Math 调用数学库(国外英文资料).doc

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

文档评论(0)

1亿VIP精品文档

相关文档