我有以下测试代码:
这会导致在调试时test2显示为0.05。为什么会四舍五入到小数点后两位呢?
谢谢。
decimal test1 = 0.0500000000000000045656554454M;
double test2 = (double)test1;
这会导致在调试时test2显示为0.05。为什么会四舍五入到小数点后两位呢?
谢谢。