Sane modern languages do all support infinite integers.

ErlangVM is not optimized for math by any mean, but TCO does it in circa 10 secs (half of which is the length calculation, I guess) on my desktop:

defmodule Fib do def fib(curr \\ 1, acc \\ 0, n) def fib(_, acc, n) when n <= 0, do: acc def fib(curr, acc, n), do: fib(acc, curr + acc, n - 1) end 1_000_000 |> Fib.fib() |> to_string() |> String.length() #⇒ 208988

For greater numbers, it definitely would be exponentially dying.

Yes. Python integers have unlimited precision out of the box. Java has BigInteger in standard library. Not sure about javascript.

Neither Python nor Java has TCO, so these languages are out of the race here.

We're a place where coders share, stay up-to-date and grow their careers.

We strive for transparency and don't collect excess data.

## re: Compute Smart, Not Hard VIEW POST

TOP OF THREAD FULL DISCUSSIONSane modern languages do all support infinite integers.

ErlangVM is not optimized for math by any mean, but TCO does it in circa 10 secs (half of which is the length calculation, I guess) on my desktop:

For greater numbers, it definitely would be exponentially dying.

Yes. Python integers have unlimited precision out of the box. Java has BigInteger in standard library. Not sure about javascript.

Neither Python nor Java has TCO, so these languages are out of the race here.