Use floating point for MemorySize division

Using whole number division resulted in close to default memory size
warnings in cases where the memory size was far from the default.
Using floating point division instead fixes the problem.

Add diagnostics and extra tests.

[#54997812]
Merge 54997812-inappropriate-default-memory-warning to master

[#54997812]