Repository navigation
Commit 5e7731f
The double factorial is the postfix n!! (#2187)
Mathematics writes the double factorial n!!, as it writes the factorial n!, and 5!! was a parse
error. It is Entity.DoubleFactorialf, MathS.DoubleFactorial, written n!! and exported as SymPy's
factorial2: the product of the positive integers up to n with its parity, 0!! and (-1)!! being
the empty product 1, and below them n!! = (n + 2)!!/(n + 2), so (-3)!! is -1 and (-5)!! is 1/3.
A negative even integer has none, and nothing off the integers has one: the extension through
the gamma function gives 0!! = sqrt(2/pi), so no extension is the double factorial's.
(n!)! keeps its parentheses. Three marks are the triple factorial in the literature, which the
library does not have, so n!!! is refused rather than read as (n!!)!. The refusals of
doublefactorial and factorial2 now point to n!!, and the native smoke test evaluates one.
Part of #2182.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura1 parent 3dbb55b commit 5e7731f
29 files changed
Lines changed: 3241 additions & 2898 deletions
File tree
- Sources
- AngouriMath
- Convenience
- Core
- Antlr
- Entity/Continuous
- Serialization
- Transformations/Matching
- Docs
- Contributing
- Usage
- Functions
- Continuous/Solvers/EquationSolver
- Evaluation/Evaluation.Continuous
- Output
- Latex
- ToString
- ToSympy
- TreeAnalyzer
- MCP/AngouriMath.Mcp
- Tests
- AotSmokeTest
- UnitTests
- Common
- Convenience
- Core/Transformations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
293 | 308 | | |
294 | 309 | | |
295 | 310 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
249 | 252 | | |
250 | 253 | | |
251 | 254 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1484 | 1484 | | |
1485 | 1485 | | |
1486 | 1486 | | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
1487 | 1514 | | |
1488 | 1515 | | |
1489 | 1516 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
85 | 90 | | |
86 | 91 | | |
87 | 92 | | |
| |||
698 | 703 | | |
699 | 704 | | |
700 | 705 | | |
701 | | - | |
702 | | - | |
| 706 | + | |
| 707 | + | |
703 | 708 | | |
704 | 709 | | |
705 | 710 | | |
| |||
Large diffs are not rendered by default.
0 commit comments