Decimal place issues with floats and decimal.Decimal

前端 未结 6 1541
悲哀的现实
悲哀的现实 2020-11-29 10:47

I seem to be losing a lot of precision with floats.

For example I need to solve a matrix:

4.0x -2.0y 1.0z =11.0
1.0x +5.0y -3.0z =-6.0
2.0x +2.0y +5.         


        
6条回答
  •  执笔经年
    2020-11-29 11:40

    Also see What is a simple example of floating point error, here on SO, which has some answers. The one I give actually uses python as the example language...

提交回复
热议问题