Calculating the factorial of a relatively large number

I was trying recursion for finding the factorial of a number. While it works fine for small numbers, how can I go about getting the correct result for numbers like 50, 100 and larger?
Not getting a proper value even if I use uint64 as the return type.

I found this, maybe it’s what you’re looking for

package main

import (

func main() {
	var fact = new(big.Int)
	fact.MulRange(1, 100)

Ah, that’s it. Thank you.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.