Sonny Figueroa/The New York Times

The American presidency comes with “thrilling highs” and “lows lower than a snake’s belly.” That’s what the fictitious President Jonathan Lincoln Duncan thinks to himself early in “The President Is Missing,” a thriller and escapist fairy tale co-written by Bill Clinton and James Patterson.

David Ellis is credited right up front as the person who “stuck with us through the research, our first and second outlines, and the many, many drafts,” so we know what he did: a lot. Otherwise, the former president appears to have provided inside information about how the job works when a president is paying attention (this novel’s POTUS reads his presidential daily briefing), done some speechifying and drawn upon his great love of thrillers. Patterson does what he does best: deliver cliffhanger endings to short chapters and make the story move.

Both of them seem determined to keep the shrill, bitter tone of real politics out of this fantasy. Sure, the words “impeachment” and “witch hunt” make cameo appearances. And Duncan’s vice president is a woman who thinks she deserved the nomination. Readers may wonder why the authors decide early on to kill off the first lady, who was a brilliant law student when she first dazzled Duncan, and why some of her last words were: “Promise me you’ll meet someone else, Jonathan. Promise me.” Let’s just call it a setup for the sequel and a dose of creative license. Duncan is also a Special Forces war hero who was waterboarded in Iraq and could have been a baseball star if his injuries hadn’t forced him into politics.

So there we have Duncan’s noble character. Now for the dynamic if somewhat dated plot. President Duncan is in trouble for supposedly having had dealings with terrorists. Little do the press or public know that he was trying to avert a crisis, not start one. He is a sane, sensible president who finds out that this terrorist poses a cyberthreat so horrible that … well, there’s a reason the name of the looming internet virus is Dark Ages. In an ordinary thriller, there might be a page or two outlining what this virus could do, but the Clinton touch feels present in the elaborate explanation. The book piles on loads of scary details about what the world would be like if your computer became nothing but a doorstop and every device in America was brought to a…