According to Argentinian mathematician Guillermo Martínez, Borges at least had a knowledge of mathematics at the level of first courses in algebra and analysis at a university – covering logic, paradoxes, infinity, topology and probability theory.
[1] His 1939 essay "Avatars of the Tortoise" (Avatares de la Tortuga) is about infinity, and he opens by describing the book he would like to write on infinity: “five or seven years of metaphysical, theological, and mathematical training would prepare me (perhaps) for properly planning that book.”[3] In Borges' 1941 story, "The Library of Babel", the narrator declares that the collection of books of a fixed number of orthographic symbols and pages is unending.
[1] The narrator describes the book as having pages that are "infinitely thin", which can be interpreted either as referring to a set of measure zero, or of having infinitesimal length, in the sense of second order logic.
Once again you will be born from a belly, once again your skeleton will grow, once again this same page will reach your identical hands, once again you will follow the course of all the hours of your life until that of your incredible death.
[1] In "The Garden of Forking Paths", Borges describes a novel by the fictional Chinese scholar Ts'ui Pên, whose plot bifurcates at every point in time.
The idea of the flow of time branching can be compared to the many-worlds interpretation of quantum mechanics and the notion of multiverses present in some versions of string theory.