There's a bit to unpack here.
There are two things one might care about when computing an SDF .. the isosurface, or the SDF itself.
If you only care about the isosurface (ie. where the function is 0), you can do any ridiculous operations you can think of, and it'll work just fine. Add, sub, multiply, exp .. whatever you want. Voxel engines do this trick a lot. Then it becomes more of a density field, as apposed to a distance field.
If you care about having a correct SDF, for something like raymarching, then you have to be somewhat more careful. Adding two SDFs does not result in a valid SDF, but taking the min or max of two SDFs does. Additionally, computing an analytical derivative of an SDF breaks if you add them, but you can use the analytical derivative if you take a min or max. Same applies for smooth min/max.
To add some more detail, the max of two SDFs is a correct SDF of the intersection of the two volumes represented by the two SDFs, but only on the inside and at the boundary. On the outside it's actually a lower bound.
This is good enough for rendering via sphere tracing, where you want the sphere radius to never intersect the geometry, and converge to zero at the boundary.
A particular class of fields that have this property is fields with gradient not greater than one.
For example, linear blends of SDFs. So given SDFs f and g you can actually do (f(pos)+g(pos))/2 and get something you can render out the other side. Not sure what it will look like, or if it has some geometrical interpretation though.
Note that speed of convergence suffers if you do too many shenanigans.
I did some simple experiments and fairly swiftly discovered where I went wrong. I'm still not totally convinced that there isn't something clever that can be done for more operations.
My next thought is maybe you can do some interesting shenanigans by jumping to the nearest point on one surface then calculating a modulation that adjusts the
distance by an amount. I can certainly see how difficult it would become if you start making convex shapes like that though. There must be a way to take the min of a few candidates within the radius of a less precise envelope surface.
No I was thinking a hard min, but one that finds a greedy but inaccurate distance and then a refinement takes some samples that measure nearest within a radius. This would handle modulations of the shape where it folded back upon itself as long as they don't fold within the subsample radius.
It's multi sample but selective rather than weighted.
f * g is a symmetric difference (all zeros remain zeros, the new internal points are those that are inside exactly one of f and g: (-, +) -> -, (+, -) -> -, (+, +) -> +, (-, -) -> +).
f * g + x for some small constant x makes the symdiff smoother, depending on the sign of x it makes the components either meld together or "repel" each other. If the original components are disjoint (or if it's 3D solids and the internal surfaces are irrelevant) and x < 0, it functions as a smooth union.
f / g has the same inside/zero/outside behavior as f * g, but is of course very pathological for all values of g close to zero. I don't think it has any good uses.
f*g is good to mask one SDF by another. I use it all the time in my little voxel engine.