现在,让我们回到阶乘函数上来。
这极大地限制了阶乘函数的可能范围。
This limits greatly the possible range of your factorial function.
计算阶乘是递归程序设计的一个经典示例。
The classic example of recursive programming involves computing factorials.
在寄存器3中想要做的是计算此值的阶乘。
What you want to do with this value in register 3 is to calculate the factorial of it.
这样将产生一个相对简单的结果,因为阶乘被消去了。
So this is going to turn out to be a relatively simple case, because the factorials are going to cancel.
否则,使用递归函数计算阶乘。
Otherwise, a recursive function is used to calculate the factorial.
写出一个用递归来计算阶乘的函数。
Write a function that calculates a number's factorial using recursion.
更糟糕的是,4的阶乘被计算了三次。
Even worse, the factorial of 4 is being calculated three times.
当需要阶乘时,将从该表中读取阶乘。
如何使用扩展精度运算处理更大的阶乘?
How to use extended precision arithmetic to handle bigger factorials?
该示例将计算一次阶乘表。
结果稍后将显示在阶乘按钮下方的标签中。
Results will later be displayed in the labels beneath the factorial buttons.
现在符号有两重意义,即组合意义和阶乘意义。
The symbol now has two meanings, the combinatorial and the factorial.
它的功能还包含计算三角函数,阶乘,排列和组合的计算。
Some of the features include trigonometry, factorials, permutations and combinations.
什么是两阶乘计算任意精度比的一种有效途径?
What would be an efficient way of calculating ratio of two factorials with arbitrary precision?
计算了阶乘之后,现在需要用printf将其打印出来。
After computing the factorial, you now want to print it out using printf.
可以用与Fibonacci序列基本相同的方式对待阶乘。
You can think of factorials in much the same way as Fibonacci sequences.
作为直接推论给出了中心阶乘数反演关系的新证明。
As immediate consequence of our results we give a new proof of the inverse relations of central factorial Numbers.
下面同样是计算阶乘的方法,这次是针对Duby编译器而写的。
The same method to calculate the factorial, this time written for the Duby compiler.
例如,如果我们要计算4的阶乘为多少,到底会发生什么呢?
What happens, for instance, if you try to find the value of the factorial of 4? Let's follow the sequence
计算某个数的阶乘就是用那个数去乘包括1在内的所有比它小的数。
The factorial of a number is computed as that number times all of the Numbers below it up to and including 1.
显然,差分算子及其逆算子是阶乘幂多项式的方便工具。
Clearly, the difference operator or sum operator is the convenient tool for the polynomial of factorial powers.
用蒙特-卡洛模拟方法对纵向阶乘矩和横向阶乘矩进行了比较和研究。
The difference in the horizontal and vertical factorial moments is compared and studied using Monte-Carlo simulation.
这个功能作为递归应用程序工作良好,如清单4中的样本阶乘函数所示。
This functionality works well as a recursive application, as shown in the sample factorial function in Listing 4.
测试用例包含几个简单的命令参数处理,然后是一个循环,它计算指定值(如果有的话)的阶乘。
The test case consists of some simple command argument processing followed by a loop that calculates the factorial of the specified values (if any).
在开始介绍SPU汇编语言之前,先来看一个通过递归算法计算32 位数的阶乘的简单程序。
To begin looking at SPU assembly language, I will enter in a simple program for calculating the factorial of a 32-bit number using a recursive algorithm.
依照伽马函数,对通常的阶乘、排列、组合的概念进行了推广,并证明了一些常用的组合公式。
Using gamma function, the paper popularized the common conceptions of the usual factorial, permutation and combination and proved some combination formulas in common use.
复杂算法通常比较容易使用递归实现。事实上,有些传统算法正是以递归实现的,诸如阶乘函数。
Complex algorithms are typically made easier by using recursion. In fact, there are some traditional algorithms that presume recursion as the implementation, such as a function to return factorials.
然后,由于 num大于0,因此会再次调用factorial,不过这次是计算3 的阶乘了。
Then, because num is greater than 0, factorial will be called again, this time with 3.
然后,由于 num大于0,因此会再次调用factorial,不过这次是计算3 的阶乘了。
Then, because num is greater than 0, factorial will be called again, this time with 3.
应用推荐