Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • 3
    \$\begingroup\$ "your code may fail due to integer overflow errors. If this is the case, please provide a version which works for arbitrary input size" - What do you mean by this? Does it mean, for instance, that if I answer in R (or any other general-purpose language which will error due to integer overflow eventually), I need to provide a second, independent, program that somehow avoids this effect? One obvious way to do this would be to import arbitrary-precision libraries, but then I will be changing the 'language' to R+gmp... \$\endgroup\$ Commented Jun 29, 2021 at 7:17
  • 3
    \$\begingroup\$ "If you do this forever, TSIJMU is the sequence of integers that are added, stati. This goes 2,3,5,6,8, " Up until that point you described adding fractions. Where do the integers in that sequence come from? \$\endgroup\$ Commented Jun 29, 2021 at 7:27
  • 2
    \$\begingroup\$ Ok - I've added a non-overflowing version using arbitrary-precision GMP library, but it's a funny requirement, because (a) this avoids floating-point errors already, so I probably would have written the function differently from the outset if I wanted to use it, and (b) I can imagine there may be some other languages for which arbitrary-precision arithmetic or unlimited integers are not implemented, and if so it seems a shame to insist on this... \$\endgroup\$ Commented Jun 29, 2021 at 9:25
  • 3
    \$\begingroup\$ @Anush I assume it should read "TSIJMU is the sequence of integers whose inverses are added". \$\endgroup\$ Commented Jun 29, 2021 at 19:35
  • 4
    \$\begingroup\$ Might be a worthy submission to the OEIS, they don't seem to have it currently... \$\endgroup\$ Commented Jun 29, 2021 at 20:51