Am currently messing around trying to learn #OCaml, but just discovered the fact that the factorial function, given arithmetic overflow, will eventually become 0 for all subsequent terms.

I don't know if I'm the only person who hasn't clued in to this fact yet, but in retrospect it seems rather obvious. Nevertheless, kind of neat.

Random tags but I don't know where I'd place this #programming?

Follow

@pfpoitras I realized this just two days ago while teaching OCaml to my daughter. I hadn't questioned what happens once we get a negative number.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.