probability.factorial
Calculate the factorial of a non-negative integer and return the exact integer string, avoiding float precision loss for large values.
Instructions
n!을 정확한 정수 문자열로 반환한다. n 은 0 이상 정수이며 상한은 20000(환경변수 SOOTOOL_LIMIT_COMBINATORICS_N 으로 조정), 1000 미만은 math.factorial, 이상은 mpmath 로 계산하며 반올림은 없다. 결과 자릿수가 매우 커서 float 로 변환하면 정밀도를 잃는다.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _meta | No | 서버가 붙이는 영수증(integrity), 엔진, 힌트 | |
| trace | Yes | 계산 근거(tool, formula, inputs, steps, output) | |
| result | Yes |