There are some films, and directors, who know how to balance the emotional highs and lows of a movie. You’ll laugh, you’ll cry, then you’ll cry some more.

Gifted comes from a script by Tom Flynn whose last major credit was as the director and writer of the hilarious 1993 relation comedy Watch It. Director Marc Webb established himself with the indie romance (where the couple break up at the end) 500 Days of Summer. With the release of that film, Webb parlayed his newfound success into helming a couple of studio tentpoles, the two Amazing Spiderman movies starring Andrew Garfield.

Webb returns to his roots with great effect in Gifted. Chris Evans stars as an ex-philosophy professor who lives off the grid in a ratty Florida beach community raising his niece. Said niece (scene stealer Mckenna Grace as Mary) happens to be a math prodigy. A quick turn of plot reveals that her mother, who was also a bit of a math genius, committed suicide.

Rather than enroll the calculus-performing first grader into a special school, Evans attempts to let her grow up like a normal kid. Enter the domineering and possibly evil grandmother (Lindsay Duncan) who starts legal proceedings to gain custody of Mary. The family has a history of dysfunction, which specifically is the reason Mary’s mother killed herself. Octavia Spencer and Jenny Slate co-star.

Gifted doesn’t pull punches when it comes to the eliciting intense feelings related to family dynamics. But on the other hand, Gifted is a film that celebrates mathematics even more than the recent Hidden Figures. Among the higher computations that Gifted covers are the Millennial Prize Problems, a series of seven equations established by a math institute in 2000. Since then, only one has been solved. “The correct solution to any of the problems awards a $1 million prize,” in addition to the Fields Medal, which is considered the equal of a Nobel Prize in mathematics.

As it turns out, Mary’s mother may have solved the Navier-Stokes problem that deals with fluid dynamics.

Another film opening this week is the dramedy Their Finest, which focuses on a group of filmmakers in World War II England making a film about the evacuation of Dunkirk. Lone Scherfig (An Education, Italian for Beginners) directs with dutiful performances from an ensemble that includes Gemma Arterton, Sam Claflin, Eddie Marsan, Bill Nighy, Jack Huston and Richard E. Grant.

The action goes back and forth from the comic attempts to make a film following the dictates of the War Department to the more personal lives of the participants during the constant bombing of London. In the end the film-within-the-film makes quite a splash, but the characters involved are forever changed by the experience.