[...]blast-mining.[...]
would check a 1-tile radius, also considering every tile those tiles are attached to, and spreads an amount of force over the easiest-to-displace ones. usually, this'll be the one you want.
[...] no offense, but what would be the point? You could use such a system to breach magma pipes and HFS, but beyond that, it's weaker in every way than normal mining. Unless we start saying that there are some stones dwarves can't get through without explosives...
One point would be to arrange for something similar to a remotely removable support, but based upon natural rock. Or ditto as if for floodgate opening, but in a situation where getting the floodgate into position would be impossible (i.e. in the wall of a magma pipe or ocean). Also cutting the last channel around the aquifer-buster bedrock mass without needing a dwarf to risk life and limb and dust, or setting up a sacrificial lever-operated built support.
But if it were to be implemented, it would probably have to be based upon fuses, rather than mechanics (not that there couldn't be a lever-to-fuse interface, perhaps, but unless you implement percussion caps (needs realgar). Either (configurable?) fuse-lengths lit on the object and retired from (similar to a Pull Lever, but at the device itself) or set up as per a lever-mechanism at a distance[1] so fully equivalent to the other type of action.
There are also (at least) three differerent ways you could install explosives. As per any constructed item is at the moment (on a tile, and for the purposes of force applied considered 'next to' any walls that are adjacent that tile, maybe or maybe not including diagonals), as a petard (placed upon a wall, a development parallel to being able to put wall-hangings on specific walls/tile boundaries, also carved reliefs and the like) or by drilling holes into walls, thus planting the charge within an otherwise unmined square (with possibly minor leaking consequences to doing so on aquifer-dampened walls?).
Each way allows different effects, but also has different pre-requisites from the engine.
[1] Unless and until levers and mechanisms are connected with 'physical' chains of connectivity, rather than a psychic link, we shouldn't consider looking at a 'chain' of fuse-wire laid out in the tunnels, but as and when we do, it should be susceptible to magma or sabotage. Which is not to say that a deliberately laid fuse could not actually be used to detect magma (or, in a pinch, sabotage) and do something to counter (or react to) the appropriate intrusion. But that's far beyond speculation.
However, I think the OP had the "easiest to displace" problem wrong. If setting off a charge in the middle of an open room, then some damage would occur to the floor and ceiling, but you lose force to the open area (unless otherwise confined as per a pipe bomb or in a 'shaped charge' format).
If (big if, we all know explosives are an oft requested but by no means imminent entity) we get explosives, though, then they ought to be made to work with fluids, correctly. i.e. explosive charge placed upon a wall within a (sufficiently) flooded chamber (i.e. adjacent walls partnered with at least as much adjacent 'open' flooded space) will direct most of the energy into 'rubbelising' the wall. With greater destructive power than would have been achieved without the water there.
Perhaps the placing a remotely-detonatable charge within a cell walled (and ceilinged) off and filled with water. Taking the priority of dispersing into first of all open space, then destroying (maybe in this order, maybe not) rough walls, then bedrock then smooth walls (arguably), which for these purposes also includes Z+-1 neighbours (with constructed/mined floors on Z=0 and Z+1 being weaker than constructed/unmined walls on Z-1 and Z+1) then any remaining energy passing into 'open liquid' areas, each being given two (or more) units of disruptive energy which (if destruction occurs) bleeds over onto one disruptive unit of energy into meta-adjacent areas... I'm sure this has all been discussed before, though.
While I don't agree that this thread should be locked (and, indeed, am happy enough to waffle away about the discussion) I do agree that it's a recurring subject, and am not even sure if I'd fully welcome explosives in-game. But I might as well give my vision of the implementation. Balancing is the key and, apart from material costs (e.g. saltpeter, charcoal, one or other of the sulpherous stones/some sort of 'sulphur flower'[2] that grows near magma) needed to create the explosives, it would be heavily reliant upon skills to safely install. Or, indeed, produce in the "Fireworks Workshop". With heavily non-zero chance of accidents at all points along the process.
[2] In part a pun, in part a very rough suggestion for an actual new plant (with or without any use), in keeping with the fantasy feel. Perhaps the plant equivalent to Fire Snakes, when it comes to biomes.