Sounds like a fun project, but tbh I think that you'll be much better off with one of the many existing super-minimal Linux distros (google around for JEOS, Linxu from scratch and more) or - if your code is small enough - why not freedos with a 32 bits extender like HX.
At least by starting from al albeit very much stripped-down general computing platform you don't have to worry about trivial stuff like different underlying hardware, networking, basic display and command line interfaces. All the time you win by not having to program that stuff can be invested in refining the mathematical model itself.