a common cause for a value being left on the fp stack
(although your diagnostic said "stack underflow" so i didn't suggest
it originally)
is that a function returns float or double but isn't declared as such
at the call site. (i had that problem once with dot or dotty.)
the function will leave the return value on the stack, and the call
site won't pop it, since it's not declared (or declared incorrectly).
the -T external type checking system should detect that, but
not for imported programs that aren't or can't be compiled that way
(eg, because there are other type errors, or -B must be used with pcc)