It really doesn’t matter if you don’t understand terms like “negative values of the gamma function” or “highly composite numbers” used in the new film “The Man Who Knew Infinity,” opening April 29. That’s because the movie, which stars Dev Patel (“Slumdog Millionaire,” “The Most Exotic Marigold Hotel”) and Jeremy Irons, is primarily the true story of the trials and tribulations of Srinivasa Ramanujan (1887-1920), a self-taught Indian mathematical genius who fought racism, classism and institutional bias in order to have his work recognized.

“The movie works because you’re emotionally invested in the characters,” says Matt Brown, the film’s writer-director. “I felt there was an enormous story seeing genius in places you would never expect it to come from.”

And that, in fact, is what all good movies about scientists try to do: give a taste of the science involved, and wrap it around a human story.

“We often say story will trump science, but science will improve story,” says Ann Merchant of the National Academy of Sciences, whose Science and Entertainment Exchange advises filmmakers dealing with scientific topics. “These films combine the really interesting and dramatic parts about a person’s life with their science, and that’s how the science comes alive.”

Or, as Stephen Brown of SilverScreenCapture.com succinctly puts it: “Showcasing authentic science in the movies means spotlighting smart characters and not lingering on the scientific jargon.”

Think, for example, of “The Imitation Game,” which not only focused on mathematician Alan Turing cracking the Nazi “Enigma” code, but also his brittle personality and persecution for being homosexual. Or the Oscar-winning “A Beautiful Mind,” in which John Nash, another brilliant mathematician, was plagued by paranoid schizophrenia.

advertisement | advertise on newsday

“You can’t portray the science in a meaningful way unless you humanize it, make the scientists relatable,” says David Long, who chairs the Film and Animation program at the Rochester Institute of Technology. “And simplifying the concept is more successful when you are showing off human ingenuity or problem-solving.”

In other words, lectures out, practical applications — if they exist — in. And it’s really important that no matter how much science makes it into the final screenplay, it better be the real thing. When it comes to advising filmmakers, Merchant says, “We look for the scientist who has strong communication skills. They’re sitting down with someone from the creative side, and using those skills to explain things so it doesn’t sound like they’re at a scientific conference. And we listen carefully — what are the questions you are looking to answer?”

“There are professionals in Hollywood and consultants whose job it is to convey the science in a correct way, and simplify it for the audience,” Long adds. “There are professional set decorators for the films, who ask things like ‘How much space do you need filled up in the blackboard?’ ”

In “The Man Who Knew Infinity,” for example, director Brown says, “We had a whole group of people just trying to make sure everything you see on the chalkboard or in [Ramanujan’s] notebooks is accurate. Everything in the film is correct in terms of the math.”

This concern for accuracy does not, however, always extend to the portrayals of scientists themselves — the fictional ones, at least. “They’re all manic or geeked out,” Long says. “They are either manic and unhappy, or introverted and wear the glasses and the lab coat.”

@Newsday

Or, they’re simply miscast, an obvious example being Denise Richards as a nuclear physicist in the 1999 James Bond film “The World Is Not Enough.”

“Hollywood often botches science in the movies with bad casting, when an actress or actor isn’t credible as the character,” Stephen Brown says. “Usually an actor who doesn’t wear glasses all of a sudden sporting them for a role is a dead giveaway.”

But that’s not the case in “Infinity,” in which Patel gives a thoroughly believable performance as an intuitive genius desperate for professional acceptance. And even if the math isn’t easy to understand, there’s a reason why. “I tried to let the audience know what kind of mathematicians these were,” director Matt Brown says. “These were not applied mathematicians, but pure mathematicians. I wanted people to understand what pure mathematics is, that pure mathematicians are artists, and I wanted people to understand the passion an artist has.”