How do computers calculate irrational numbers? like how do they compute root 2?

59 Views Asked by At

I do know how to like get root 2 but it's the long division method, and from just seeing it I am genuinely confused how they would implement it. Then there is the prime factorization method but it doesn't get it for irrationals. I do understand for pi though, it maybe predefined but how is it done for other irrationals?