quotient、remainder、modulo和sqrt
函数quotient用于求商数(quotient)。
函数remainder和modulo用于求余数(remainder)。
函数sqrt用于求参数的平方根(square root)。
以下是一些示例:
(quotient73)
;Value:2
(modulo73)
;Value:1
(sqrt 10)
;Value:3.1622776601683795
sin、cos、tan、asin、acos和atan
atan接受1个或2个参数。如果期望atan的结果是1/2π,就使用第二个参数指明使用弧度制。
以下依旧是一些示例:
(atan1)
;Value:0.7853981633974483

本文介绍了Scheme语言中的算术运算,包括quotient、remainder、modulo和sqrt等基本数学函数,以及sin、cos、tan等三角函数和指数、对数运算。还提及了数值变换中的exact->inexact函数,帮助读者理解Scheme中的数值处理。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



