Why do different methods for solving Xc=y in python give different solution when they should not?

前端 未结 1 1130
隐瞒了意图╮
隐瞒了意图╮ 2021-01-14 23:33

I was trying to solve a linear system Xc=y that was square. The methods I know to solve this are:

  1. using inverse c=
相关标签:
1条回答
  • 2021-01-14 23:41

    The issue is floating point accuracy. You're raising numbers between zero and one to the 30th power, then adding them together. If you were doing this with infinite precision arithmetic, the methods would recover the inputs. With floating point arithmetic, precision loss means you can't.

    0 讨论(0)
提交回复
热议问题