• Bruce Momjian's avatar
    Attached is a patch implementing factorial(), returning numeric. Points · 04a4821a
    Bruce Momjian authored
    to note:
    
    1) arttype is numeric. I thought this was the best way of allowing
    arbitarily large factorials, even though factorial(2^63) is a large
    number. Happy to change to integers if this is overkill.
    2) since we're accepting numeric arguments, the patch tests for floats.
    If a numeric is passed with non-zero decimal portion, an error is raised
    since (from memory) they are undefined.
    
    Gavin Sherry
    04a4821a
builtins.h 31.5 KB