Even when they’re not entirely successful in creating a cohesive whole, the films of Terry Gilliam are always something of which to sit up and take notice. Recent work like Tideland and The Imaginarium of Doctor Parnassus were as divisive as they were visually stunning and his latest film, The Zero Theorem, will likely prove no different.

The plot centres on Qohen Leth (Christoph Waltz) a computer hacker who is one day tasked by the sinister corporation he works for, headed by the mysterious Management (Matt Damon), to work on The Zero Theorem, which aims to figure out the meaning of existence. He becomes increasingly frustrated with the seemingly impossible task all the while being distracted by love interest Bainsley (Melaine Thierry) and the energetic boss’ son Bob (Lucas Hedges).

As a world-building exercise, Gilliam’s latest film is a marvel. Even though he’s working from a script by first-timer Pat Rushin, it still feels like an ancestor to his own 1985 masterpiece Brazil (with added hints of Twelve Monkeys and Doctor Parnassus) with an officious dystopian society that feels at once alien and believable in a nightmarish vision of the future sort of way. While it disappointingly doesn’t explore that world to the fullest extent, Gilliam nevertheless makes it feel lived-in and visually mesmerizing. Of course the idea of future-tech where things can be experienced virtually and so forth isn’t exactly a new idea (Kathryn Bigelow’s Strange Days explored it to great effect in the ’90s, for example) but Gilliam moulds it to his inimitable style.

The whole thing hinges on Waltz and he is a fascinating and unique presence as ever. His character is complex and often hard to work out but also a relatable everyman in his own sort of way and thus our anchor throughout, feeling as much adrift in this overbearing and confusing world which the film presents as he does obsessed with completing his work.

David Thewlis puts in an entertaining and sometimes tragic performance as his supervisor Joby, Tilda Swinton in an almost unrecognisable get-up and Scottish accent as Qohen’s virtual psychiatrist Dr. Shrink-Rom is genuinely hilarious and Damon as the Big Kahuna is a bizarre but nevertheless inspired piece of casting. Other famous faces like Peter Stormare, Ben Wishaw and Rupert Friend turn up but only very briefly and it adds to the feeling that there’s a longer cut out there that was somehow restricted that makes more use of both the extended cast and the overall world which it showcases.

The central plot of Qohen (pronounced “Coen” and not Quinn as Waltz keeps having to remind his supervisor) trying to perpetually “crunch numbers” in order to adhere to the instructions that “zero must equal 100%” is gobbledygook. And depending on your how much you buy into it all, that’s either a failure by the film on an intellectual level or part of the point that the meaning of the life is ultimately confusing and unknowable.

How much you enjoy Gilliam’s latest bizarre outing will depend entirely on how much you’re willing to give yourself over to its surreal ways of thinking. It’s a veritable treasure trove of filmic creativity both in its fundamental ideas and the visually arresting ways it presents them, even if it doesn’t entirely pull them off satisfactorily. For die hard Gilliam fans its odd and wacky world will be something akin to cinematic heaven and it feels like the director is utterly at home in his comfort zone.

The Zero Theorem is released in UK cinemas on March 14th.