There’s no one way to be a mathematical genius.

Shakuntala Devi had little formal education. Maryam Mirzakhani attended graduate school at Harvard University. Two films chronicle how each woman became famous for her own variety of mathematical prowess.

The two women’s skills took vastly different forms: Devi was known for her blazingly fast mental arithmetic, while Mirzakhani made strides in the mathematics of surfaces, becoming the first woman to win one of the highest honors bestowed on mathematicians, the Fields Medal.

The contrast between the two women is echoed in the divergent styles of the two films: One is a Bollywood biopic heavy on emotional drama, and the other is a documentary replete with mathematical lingo.

Born in India in 1929, Devi grew up in an impoverished family. As recounted in the Hindi-language film *Shakuntala Devi*, available with subtitles on Amazon Prime, she could make complex mental calculations at a rapid-fire pace, even as a small child. Devi became a performer, touring internationally and stunning observers with her feats, which outpaced computers in the 1970s and ’80s.

While fun, the movie features bouts of cheesy dialog that may be off-putting to some viewers. But others will enjoy the scenes that re-create some of Devi’s most famous achievements, such as taking the 23rd root of a 201-digit number in under a minute, and multiplying two 13-digit numbers in less than 30 seconds. Careful viewers might be able to glean a few number facts from the film, but the movie focuses on Devi’s fraught relationships — particularly with her daughter — rather than on the details of mental math algorithms.

*Secrets of the Surface*, available on the online video platform Vimeo, recounts Mirzakhani’s life via interviews with her friends, teachers and colleagues. Although Mirzakhani preferred reading to mathematics at first, her mathematical talent soon became apparent. As a high school student in Iran in the 1990s, she twice won gold medals in the International Mathematical Olympiad. But aside from the youthful mathematical interests Devi and Mirzakhani shared, the two women’s backgrounds couldn’t be more different. Mirzakhani attended a high school for gifted girls and studied mathematics at Sharif University of Technology in Tehran before heading to Harvard and eventually a professorship at Stanford University.

Mirzakhani’s work focused on the geometry of surfaces, such as doughnuts with multiple holes. Her work has connections to other fields such as string theory, the mathematics-intensive branch of physics that attempts to describe the universe as composed of tiny, vibrating strings.

The film includes beautifully clear descriptions and visualizations — for example, lines winding around a doughnut shape illustrate Mirzakhani’s study of the number of closed loops that can form on various curved surfaces. These visual aids elucidate the complicated mathematical concepts underlying Mirzakhani’s work, for which she won the Fields Medal in 2014. Three years after receiving that honor, Mirzakhani died of cancer at just 40 years old. In the film, interviews with students at her former high school reveal what an inspirational figure she still is. “I think she’s raised the bar for girls, but beside that, she has opened up a new way,” says student Dorsa Majdi.

Devi likewise inspired schoolchildren, promoting math as fun and unintimidating and authoring books about numbers. Watching the two films, I couldn’t help but wonder how Devi’s life might have been different had she been privileged with the type of schooling Mirzakhani received. In the biopic’s depiction, Devi seems to yearn for such an opportunity. She is portrayed staring longingly at children attending a school at which she is paid to perform, but which she can’t afford to attend.