Most modern airliners have L/Ds of 18 to 22:1 (sorry I couldn't find a direct reference). So from one nautical mile, 6076 ft, in the air you can glide around 18 to 22 nm in still air.
Departure climb gradient at, say 4000 fpm, a typical both engines climb rate, which is about 40kt vertical speed, going 200 kts horizontally, is about 5:1.
So you are climbing at a gradient of 5:1, but can glide at a gradient of 4 times flatter, at 20:1.
So, being able to make it back depends. In the case of a departure and a immediate climb to enroute altitude, with no level off intervals, you should have no problem returning to the airport after a double flame out at, say, 18000 ft, because you'll only be about 15-20 nm from the airport, and from 3 nm up you can glide 50-70 nm, and you should have ample space to turn around and maneuver.
On the other hand, if ATC (or the SID you are flying) makes you level off for a period at, say 4000 ft, and keeps you there for several minutes, and then you have a double flame out, you will likely be out of range. If you're only at 4000 ft, your absolute gliding distance is only 13 nm, not allowing for manuevering, and by then you might be 15 miles out. You'll be heading for the river, like those other guys did.