Faulhaber's triangle: Difference between revisions

m
→‎JS ES6: (small edit to preamble)
(→‎JS ES6: Updated to match the scanl refactor of the Haskell version)
m (→‎JS ES6: (small edit to preamble))
Line 114:
This means that we can print Faulhaber's triangle (hand-coding some rudimentary ratio-arithmetic functions), but our only reward for evaluating faulhaber(17, 1000) is an integer overflow. With JS integers out of the box, we can get about as far as '''faulhaber(17, 8)''', or '''faulhaber(4, 1000)'''.
 
(Further progress would entail implementing some hand-crafted representation of arbitrary precision integers – perhaps a bit beyond the intended scope of this task, and good enough motivation to use a different language)
<lang JavaScript>(() => {
 
9,655

edits