Triangular numbers: Difference between revisions
→{{header|jq}}: cbrt
m (→{{header|jq}}: explain `def figurates:`) |
(→{{header|jq}}: cbrt) |
||
Line 638:
'''Also works with gojq and fq, the Go implementations of jq'''
an indefinitely long stream of the $r-simplex numbers if $r >= 2, where $r is the input to the filter.
For the sake of illustration, however, `tetrahedrals` and `pentatopics` are defined without reference to `figurates/0`.
'''Preliminaries'''
Line 694 ⟶ 695:
def tetrahedralRoot:
def term(sign):
(3 * .) as $y
| ($y + sign * ( (($y*$y) - (1/27))|sqrt)) |
term(1) + term(-1) -1;
|