It sounds like you're passing the (clean) prices of 105.58 for a bond that pays 100 (+ some accrued interest) in one month. The simple yield would be somewhere around -50 to -100, pretty nonsensical.
I've seen two philosophical approaches to this situation in libraries. If the program returns a large number that makes no economic sense, then it will be mostly numerical noise. (This is the approach mostly taken by Bloomberg.) Then some users of the library will question why one library computes -100 and some other library computes -110. Conversely, if program throws, then (the same) users will ask why this library throws, while, e.g. Bloomberg terminal displays some huge number that makes no economic sense. Should a library developer try to perform all the arithmetic in exactly the same (undocumented) sequence as Bloomberg in order to match some nonsensical numerical noise?
Edited: the approach that I would try if I were writing yet another library might be along these lines:
Model Validation sets the minimum yield (and maximum, and valid ranges for other such things)
the library calcuates the yield, which could be as low as
the ibrary looks at the validated range (ideally - dynamically at run rime)
depending on user-specified setting, the library either throws, or returns the best estimate "tagged" with a warning that this number is outside the vaidated range.
if a downstream/caller encounters a number tainted by such a tag, then depending on user-specified setting, the caller either throws, or tags other tainted numbers, or footnotes reports, etc.