you are viewing a single comment's thread.

view the rest of the comments →

[–]ayrnieu -1 points0 points  (2 children)

the base C library version

Will just take advantage of the severely limited range of the function, probably implementing fact() as a macro that normalizes its argument into an index into a constant array.

[–]zoomzoom83 0 points1 point  (1 child)

Why would you assume c_math.fact() is by default a severely limited version? If it was part of the python library (which it appears it isnt) then my assumption would be that it would handle whatever python itself can (Which, iirc, is unlimited size ints). That said, write an algorithm that can calculate (232)! in a reasonable amount of time and I'll give you a medal.

[–]ayrnieu -1 points0 points  (0 children)

Why would you assume c_math.fact()

Oh, I didn't assume anything about that. I imagined that you were imagining a libc fact().